JDBC drivers should be loaded using the root classloader
Azeez
stlecho wrote:
Hi,
When trying to upload an AAR that uses Spring, I am receiving a
ClassNotFoundException. The "jtds.jar" that contains the class
"net.sourceforge.jtds.jdbc.Driver" is available in NoticeInterface.aar/lib.
I have seen a similar error when deploying services in Axis2. A workaround
was to add "jtds.jar" in axis2/web-inf/lib.
Any ideas on how to solve this issue - in a proper way - are more than
welcome.
[Spring config]
jdbc.main.driverClassName=net.sourceforge.jtds.jdbc.Driver
<bean id="dataSourceMain"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>${jdbc.main.driverClassName}</value>
</property>
...
</bean>
[/Spring config]
[stacktrace]
...
org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:753)
org.springframework.beans.PropertyAccessExceptionsException -
PropertyAccessExceptionsException (1 errors); nested
propertyAccessExceptions are:
[org.springframework.beans.MethodInvocationException: Property
'driverClassName' threw exception; nested exception is
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not load
JDBC driver class [net.sourceforge.jtds.jdbc.Driver]; nested exception is
java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver] by ...
[/stacktrace]
Regards, Stefan Lecho.
_______________________________________________
Wsas-java-user mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-user