4 Replies Latest reply on Feb 28, 2013 1:29 PM by Bob Muller

    ClassNotFoundException with MANIFEST.MF dependencies specified

    Bob Muller Novice

      I am adding the Oracle JDBC and connection pooling jar files ojdbc6.jar and ucp.jar to the AS7 modules system. This works fine for JNDI access, but I also use a third-party library that accesses JDBC directly for lazy-loading. When it does, I get the following error:

       

       

      15:44:05,941 WARN  [org.jboss.modules] (http--127.0.0.1-8080-5) Failed to define class oracle.ucp.jdbc.PoolDataSource in Module "com.oracle.ucp:main" from local module loader @625dcec6 (roots: /opt/jboss-as-7.1.1.Final/modules): java.lang.LinkageError: Failed to link oracle/ucp/jdbc/PoolDataSource (Module "com.oracle.ucp:main" from local module loader @625dcec6 (roots: /opt/jboss-as-7.1.1.Final/modules))

                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)

                at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)

                at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)

                at org.jboss.modules.Module.loadModuleClass(Module.java:517)

                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                at java.lang.ClassLoader.defineClass1(Native Method) [classes.jar:1.6.0_39]

                at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [classes.jar:1.6.0_39]

                at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [classes.jar:1.6.0_39]

                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [classes.jar:1.6.0_39]

                at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)

                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)

                at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)

                at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)

                at org.jboss.modules.Module.loadModuleClass(Module.java:517)

                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                at com.poesys.db.connection.PooledOracleConnectionFactory.getConnection(PooledOracleConnectionFactory.java:151) [poesys-db.jar:]

                at com.poesys.db.connection.PooledOracleConnectionFactory.getConnection(PooledOracleConnectionFactory.java:205) [poesys-db.jar:]

                at com.poesys.bs.delegate.AbstractConnectionDelegate.getConnection(AbstractConnectionDelegate.java:166) [poesys-bs.jar:]

                at com.poesys.bs.delegate.AbstractReadOnlyDataDelegate.getObject(AbstractReadOnlyDataDelegate.java:128) [poesys-bs.jar:]

                at org.tair.querytools.LocusDetail.load(LocusDetail.java:171) [classes:]

                at org.tair.tairquery.TairServlet.service(TairServlet.java:286) [classes:]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145) [prettyfaces-jsf2-3.3.3.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626) [jbossweb-7.0.13.Final.jar:]

                at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2039) [jbossweb-7.0.13.Final.jar:]

                at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_39]

      Caused by: java.lang.NoClassDefFoundError: javax/sql/DataSource

                at java.lang.ClassLoader.defineClass1(Native Method) [classes.jar:1.6.0_39]

                at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [classes.jar:1.6.0_39]

                at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [classes.jar:1.6.0_39]

                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [classes.jar:1.6.0_39]

                at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)

                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)

                ... 48 more

      Caused by: java.lang.ClassNotFoundException: javax.sql.DataSource from [Module "com.oracle.ucp:main" from local module loader @625dcec6 (roots: /opt/jboss-as-7.1.1.Final/modules)]

                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                ... 54 more

       

      The MANIFEST.MF file has the dependency with a line return at the end:

       

      Manifest-Version: 1.0

      Dependencies: com.oracle.ojdbc6,com.oracle.ucp

       

      and the manifest loads correctly as far as I can tell. I've tried the jboss-deployment-structure.xml version of dependency specs as well, no difference, same error.

       

      If I place the files directly into the WEB-INF/lib and remove the manifest/xml dependencies, everything works fine.

       

      Does anyone have any suggestions as to why the web app can't load the shared jar files?