-
Notifications
You must be signed in to change notification settings - Fork 78
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
Cannot resolve driver when loaded through a deployed war #26
Comments
We had the similar experience when we set this up using a war and tomcat back in December. We just made sure there was a bean defined for the native jdbc driver, so that this error wouldn't occur. It wasn't used directly by our app, but it just needed to be called/defined, then the secret manager jdbc driver was able to find it and it worked successfully. |
Our current solution passed by setting the drivermanagerprotection to false on the jre memory leak prevention listener on our server.xml, but this doesnt seem too clean. For more information: https://tomcat.apache.org/tomcat-8.0-doc/config/listeners.html#JRE_Memory_Leak_Prevention_Listener_-_org.apache.catalina.core.JreMemoryLeakPreventionListener |
Hi, I have the same behaviour, the workaround to set driverManagerProtection to false worked for me as well. |
I encountered this issue. Since, i have access to the code, I loaded the driver using class loader. The issue is gone. But this is still a workaround as it does not solve the real issue. I was using the postgresql driver. I have overwritten one of the posgresql classes similar to MySql classes. |
I am getting exact same error. Can you please let me know how you used class loader to load postgresql driver ? |
I overritten getDefaultDriverClass method inside AWSSecretsManagerPostgreSQLDriver.java ( as I was using postgres) to load the postgresql driver. JUst do a Class.forName("org.postgresql.Driver", false, this.getClass().getClassLoader());. AFter this the issue with driver load was gone. |
Can one elaborate exactly what the line is that needs to get inserted into the server.xml file? @gregory-viale-cbp @devportilla would it look like this?? --> |
@nehamallama Your server xml should have the following line : |
@devportilla thanks it works. Can confirm that this issue is still active/this solution will temporarily mitigate the error. ~best |
Thank you for opening this issue - we are looking into it. |
This issue will be resolved by adding driver jar in tomcat lib (in case of externalized tomcat). |
Hello,
Im having issues while trying to use the connector on a regular spring-boot war deployed artifact on tomcat. So far i have seen the following:
Setup is:
-Packaging type: war
-Spring boot version: 1.3.5.RELEASE with the following starters:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
-Aws secretsmanager jdbc version: 1.0.2
This is happening only when the artifact is a war file and not jar launched application, with the embedded tomcat instead of the external one.
Some guidance would be appreciated.
The text was updated successfully, but these errors were encountered: