8 Replies Latest reply on May 20, 2009 9:07 AM by Ulhas Bhole

    Servicemix and javax.sql

    Peter Chandler Master

      I have a bundle that makes a JDBC connection to a database. The code works fine in Equinox. When I port it (install & start) to ServiceMix it can't resolve javax.sql.DataSource? JDBC is apart of the JRE/JDK. Is there a bundle I need to start first. Or set bundle-classpath? 

       

      java.lang.NoClassDefFoundError: javax/sql/DataSource

              at java.lang.ClassLoader.defineClass1(Native Method)

              at java.lang.ClassLoader.defineClass(ClassLoader.java:621)

              at org.apache.felix.framework.searchpolicy.ContentClassLoader.findClass(ContentClassLoader.java:214)

              at org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClassFromModule(ContentClassLoader.java:85)

              at org.apache.felix.framework.searchpolicy.ContentLoaderImpl.getClass(ContentLoaderImpl.java:162)

              at org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:471)

              at org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:185)

              at org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)

              at org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:109)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

              at org.apache.derby.jdbc.ClientDriver.tokenizeURLProperties(Unknown Source)

              at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)

              at java.sql.DriverManager.getConnection(DriverManager.java:582)

              at java.sql.DriverManager.getConnection(DriverManager.java:207)