-
Notifications
You must be signed in to change notification settings - Fork 95
Failed to setup TLS keystore of SMTP server #501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@sympati can you please share the full stacktrace? And can you please also try to use an absolute path to the certificate location? Thanks |
@gessnerfl thank you for your prompt response. I did try using an absolute path to no avail as mentioned in my report:
I will try again and post the full stacktrace later when I'm more awake :) It's still early morning here. |
Two coffee cups later :) . ____ _ __ _ _ :: Spring Boot :: (v3.3.1) 2024-07-01T06:32:05.613+02:00 INFO 51436 --- [ main] de.gessnerfl.fakesmtp.Application : Starting Application v2.3.0 using Java 22.0.1 with PID 51436 (/Users/my_name/Desktop/fake-smtp-server-2.3.0.jar started by my_name in /Users/my_name/Desktop) Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'smtpServer' defined in class path resource [de/gessnerfl/fakesmtp/config/BaseSmtpServerConfig.class]: Failed to instantiate [de.gessnerfl.fakesmtp.smtp.server.SmtpServer]: Factory method 'smtpServer' threw exception with message: Failed to setup TLS keystore of SMTP server |
I'm using Springs ResourceLoader. Most probably, you will have to prefix the path with |
That dit it!
2024-07-02T09:10:18.649+02:00 INFO 31822 --- [ main] d.g.f.config.BaseSmtpServerConfig : Setup TLS keystore of SMTP server I'll test it further today and let you know if I have any problem. Thanks |
Thank you for fake-smtp-server! It is really handy for my tests.
I am trying the latest 2.3.0 release as I also need to test with a TLS connection.
I am using the application.yaml file with the settings from the README page as is, adding the following section:
The as2_certs.p12 keystore comes from the example keystore provided by OpenAS2.
Both application.yaml and the keystore are in the same directory as fake-smtp-server-2.3.9.jar. I also tried an absolute path to the keystore in the settings.
Unfortunately I am getting the following error and I have no idea on how to debug it.
I also tried using my own keystore generated with KeyStore Explorer and got the same error:
SMTP server
2024-06-28T17:48:40.929+02:00 INFO 13348 --- [ main] d.g.f.config.BaseSmtpServerConfig : Setup TLS keystore of SMTP server
2024-06-28T17:48:40.935+02:00 WARN 13348 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'smtpServer' defined in class path resource [de/gessnerfl/fakesmtp/config/BaseSmtpServerConfig.class]: Failed to instantiate [de.gessnerfl.fakesmtp.smtp.server.SmtpServer]: Factory method 'smtpServer' threw exception with message: Failed to setup TLS keystore of SMTP server
Any help would be appreciated.
Thanks
The text was updated successfully, but these errors were encountered: