0 Replies Latest reply on Sep 17, 2012 3:35 PM by jleinawe

    Web-app requires a resource-adapter class be included in war

    jleinawe Newbie

      Deployed a resource adapter to JBoss AS 7.1.1.Final-SNAPSHOT.   The resource adapter integrates WebLogic JMS to the JBoss server.

       

      Deployed a Servlet which will use the JMS resources from the adapter to send/receive JMS messags using WebLogic JMS.  Execution of the servlet will fail for classloading issues.    The class file noted in the exception is deployed within the resource adapter's rar file.  Specifically:

       

      javax.resource.ResourceException: Error creating naming context instance: JBAS011843: Failed instantiate InitialContextFactory weblogic.jndi.WLInitialContextFactory from classloader ModuleClassLoader for Module "deployment.test.war:main" from Service Module Loader

       

      The WebLogic JMS server is up and running so the warning message we print is misleading.    If we include a copy of the jar file containing 'weblogic.jndi.WLInitialContextFactory' in the war's lib directory, this class loading issue goes away.

       

      Is this a known issue or is there something else that needs to be configured?   On other app-servers (Glassfish, WebSphere), we don't see this issue.

       

       

       

      01:05:40,734 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.PoolByCri] (http--0.0.0.0-8080-1) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.spi.EISSystemException: createManagedConnection: javax.jms.JMSException: J2EE GJRA-01003: cause = Error occured when creating a JMS connection.; action = Please verify if JMS provider is up and configuration information for accessing the JMS provider is correctly specified: javax.resource.ResourceException: Error creating naming context instance: JBAS011843: Failed instantiate InitialContextFactory weblogic.jndi.WLInitialContextFactory from classloader ModuleClassLoader for Module "deployment.test.war:main" from Service Module Loader

           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_06]

           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_06]

           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_06]

           at java.lang.reflect.Constructor.newInstance(Constructor.java:525) [rt.jar:1.7.0_06]

           at weblogic.jms.ra.RAUtils.make(RAUtils.java:410)

           at weblogic.jms.ra.RAUtils.make(RAUtils.java:427)

           at weblogic.jms.ra.RAUtils.toResourceException(RAUtils.java:478)

           at weblogic.jms.ra.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:144)

           at weblogic.jms.ra.ManagedFactoryBase.createManagedConnection(ManagedFactoryBase.java:476)

           at weblogic.jms.ra.GenericManagedConnectionFactory.createManagedConnection(Unknown Source)

           at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761)

           at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343)

           at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)

           at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)

           at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)

           at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:302)

           at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)

           at weblogic.jms.ra.Provider.allocateConnection(Provider.java:1424)

           at weblogic.jms.ra.FactoryBase.localCreateConnection(FactoryBase.java:122)

           at weblogic.jms.ra.FactoryBase.createConnectionImpl(FactoryBase.java:145)

           at weblogic.jms.ra.ConnectionFactoryBase.createConnection(ConnectionFactoryBase.java:15)

           at weblogic.jms.ra.GenericConnectionFactory.createConnection(Unknown Source)

           at testJboss.sendMsgToResultTopic(testJboss.java:77)    at testJboss.doGet(testJboss.java:55)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

           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.12.Final.jar:]

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

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

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

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

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

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

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

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

           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.12.Final.jar:]

           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.12.Final.jar:]

           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.12.Final.jar:]

           at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_06]

      Caused by: javax.jms.JMSException: J2EE GJRA-01003: cause = Error occured when creating a JMS connection.; action = Please verify if JMS provider is up and configuration information for accessing the JMS provider is correctly specified: javax.resource.ResourceException: Error creating naming context instance: JBAS011843: Failed instantiate InitialContextFactory weblogic.jndi.WLInitialContextFactory from classloader ModuleClassLoader for Module "deployment.test.war:main" from Service Module Loader

           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_06]

           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_06]

           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_06]

           at java.lang.reflect.Constructor.newInstance(Constructor.java:525) [rt.jar:1.7.0_06]

           at weblogic.jms.ra.RAUtils.make(RAUtils.java:410)

           at weblogic.jms.ra.RAUtils.make(RAUtils.java:427)

           at weblogic.jms.ra.RAUtils.toJMSException(RAUtils.java:115)

           at weblogic.jms.ra.ManagedFactoryBase.createRPConnection(ManagedFactoryBase.java:1063)

           at weblogic.jms.ra.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:123)

           ... 31 more

      Caused by: javax.resource.ResourceException: Error creating naming context instance: JBAS011843: Failed instantiate InitialContextFactory weblogic.jndi.WLInitialContextFactory from classloader ModuleClassLoader for Module "deployment.test.war:main" from Service Module Loader

           at weblogic.jms.ra.JndiResourceProvider.getResource(JndiResourceProvider.java:97)

           at weblogic.jms.ra.RAUtils.lookupUsingConnectorScheme(RAUtils.java:240)

           at weblogic.jms.ra.RAUtils.lookupUsingRpResourceLocation(RAUtils.java:181)

           at weblogic.jms.ra.ManagedFactoryBase.getFactory(ManagedFactoryBase.java:926)

           at weblogic.jms.ra.ManagedFactoryBase.createRPConnection(ManagedFactoryBase.java:1053)

           ... 32 more

      Caused by: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory weblogic.jndi.WLInitialContextFactory from classloader ModuleClassLoader for Module "deployment.test.war:main" from Service Module Loader

           at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)

           at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681) [rt.jar:1.7.0_06]

           at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307) [rt.jar:1.7.0_06]

           at javax.naming.InitialContext.init(InitialContext.java:242) [rt.jar:1.7.0_06]

           at javax.naming.InitialContext.<init>(InitialContext.java:216) [rt.jar:1.7.0_06]

           at weblogic.jms.client.JMSConnectionFactory$1.run(JMSConnectionFactory.java:533)

           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)

           at weblogic.jms.common.CrossDomainSecurityManager.runAs(CrossDomainSecurityManager.java:131)

           at weblogic.jms.client.JMSConnectionFactory.createSubjectByAnonymous(JMSConnectionFactory.java:529)

           at weblogic.jms.WrappedInitialContextFactory.getInitialContext(WrappedInitialContextFactory.java:34)

           at weblogic.jms.ra.Provider.getInitialContext(Provider.java:1305)

           at weblogic.jms.ra.JndiResourceProvider.newInitialContext(JndiResourceProvider.java:80)

           at weblogic.jms.ra.JndiResourceProvider.getResource(JndiResourceProvider.java:95)

           ... 36 more