4 Replies Latest reply on Sep 11, 2010 5:22 AM by Frank Langelage

    Problem with naming an resource injection on AS 6.0.0.M4

    Frank Langelage Master

      A WebService is using resources.

      This works on 4.2.3.

       

      On 6.0.0.M4 the deployment succeeds, but calling the URL to display the WSDL description fails.

       

      Webservice class:

      @WebService(endpointInterface = "biz.mbisoftware.fn.ws.sales.SalesOrderWSI", serviceName = "SalesOrderWS")
      public class SalesOrderWS implements SalesOrderWSI
      {
          @Resource(mappedName = "java:/JmsXA")
          private ConnectionFactory connectionFactory;

       

          @Resource(mappedName = "queue/mbi2e-lafr-sb2000-ipc/SalesOrderImportQueue")
          private Queue queue;

          ....

      }

       

      A look at the JNDI entries for the module containing the class above:

        |   |   +- ws-sales
        |   |   |   +- UserTransaction[link -> UserTransaction]
        |   |   |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry]
        |   |   |   +- env
        |   |   |   |   +- security
        |   |   |   |   |   +- securityMgr[link -> java:/jaas/jboss-web-policy]
        |   |   |   |   |   +- subject[link -> java:/jaas/jboss-web-policy/subject]
        |   |   |   |   |   +- realmMapping[link -> java:/jaas/jboss-web-policy/realmMapping]
        |   |   |   |   |   +- security-domain[link -> java:/jaas/jboss-web-policy]
        |   |   |   |   |   +- authorizationMgr[link -> java:/jaas/jboss-web-policy/authorizationMgr]
        |   |   |   |   +- SalesOrderImportQueue[link -> queue/mbi2e-lafr-sb2000-ipc/SalesOrderImportQueue]
        |   |   |   |   +- biz.mbisoftware.fn.ws.sales.SalesOrderWS
        |   |   |   |   |   +- connectionFactory[link -> java:/JmsXA]
        |   |   |   |   |   +- queue[link -> queue/mbi2e-lafr-sb2000-ipc/SalesOrderImportQueue]
      
      On access of the wsdl this happens
      21:55:57,302 ERROR [org.jboss.wsf.common.injection.InjectionException] Resource 'connectionFactory' not found: javax.naming.NameNotFoundException: connectionFactory not bound
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:771) [:5.0.5.Final]
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:779) [:5.0.5.Final]
              at org.jnp.server.NamingServer.getObject(NamingServer.java:785) [:5.0.5.Final]
              at org.jnp.server.NamingServer.lookup(NamingServer.java:443) [:5.0.5.Final]
              at org.jnp.server.NamingServer.lookup(NamingServer.java:399) [:5.0.5.Final]
              at org.jnp.server.NamingServer.lookup(NamingServer.java:399) [:5.0.5.Final]
              at org.jnp.server.NamingServer.lookup(NamingServer.java:399) [:5.0.5.Final]
              at org.jnp.server.NamingServer.lookup(NamingServer.java:399) [:5.0.5.Final]
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728) [:5.0.5.Final]
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688) [:5.0.5.Final]
              at org.jboss.wsf.common.injection.InjectionHelper.lookup(InjectionHelper.java:408) [:1.4.0.Beta2]
              at org.jboss.wsf.common.injection.InjectionHelper.inject(InjectionHelper.java:390) [:1.4.0.Beta2]
              at org.jboss.wsf.common.injection.InjectionHelper.injectResourceAnnotatedAccessibleObjects(InjectionHelper.java:292) [:1.4.0.Beta2]
              at org.jboss.wsf.common.injection.InjectionHelper.injectResources(InjectionHelper.java:110) [:1.4.0.Beta2]
              at org.jboss.wsf.stack.cxf.transport.ServletHelper.injectServiceAndHandlerResources(ServletHelper.java:120) [:3.4.0.Beta2]
              at org.jboss.wsf.stack.cxf.transport.ServletHelper.initServiceEndpoint(ServletHelper.java:104) [:3.4.0.Beta2]
              at org.jboss.wsf.stack.cxf.transport.ServletHelper.initEndpoint(ServletHelper.java:74) [:3.4.0.Beta2]
              at org.jboss.wsf.stack.cxf.CXFNonSpringServletExt.loadBus(CXFNonSpringServletExt.java:61) [:3.4.0.Beta2]
              at org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:78) [:2.2.10]
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1208) [:]
              at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:955) [:]
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [:]
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:]
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0-SNAPSHOT]
              at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.CR3]
              at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.CR3]
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0-SNAPSHOT]
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0-SNAPSHOT]
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:]
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:]
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0-SNAPSHOT]
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:]
              at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0-SNAPSHOT]
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:]
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:]
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [:]
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:]
              at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
      What's the problem?
      Anything missing?