Problem injecting JMS resource into stateless session bean on websphere

This works on Glassfish but throws exception on Websphere.


[2/11/11 13:57:42:864 SAST] 0000002c InjectionProc E   CWNEN0044E: A resource reference binding could not be found for the brandGroup/jms/NearFastHandlerQueue resource reference, defined for the brandGroup/ejb/NearFastHandlerEnqueuer component.
[2/11/11 13:57:42:865 SAST] 0000002c InjectionProc E   CWNEN0044E: A resource reference binding could not be found for the brandGroup/jms/NearFastHandlerFactory resource reference, defined for the brandGroup/ejb/NearFastHandlerEnqueuer component.
[2/11/11 13:57:42:906 SAST] 0000002c FfdcProvider  I com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/ffdc/server1_2f41ff3c_11.02.11_13.57.42.86638785.txt com.ibm.ws.injectionengine.InjectionEngineImpl.processBindings 480
[2/11/11 13:57:42:910 SAST] 0000002c InjectionEngi E   CWNEN0011E:  The injection engine failed to process bindings for the metadata.
[2/11/11 13:57:42:912 SAST] 0000002c FfdcProvider  I com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/ffdc/server1_2f41ff3c_11.02.11_13.57.42.91138786.txt com.ibm.ws.util.ComponentNameSpaceHelper.populateJavaNameSpace 640
[2/11/11 13:57:42:914 SAST] 0000002c ComponentName E   CNTR0125E: Unable to process injection information for class: [class com.fundamo.messaging.jms.NearFastHandlerEnqueuer].
[2/11/11 13:57:43:452 SAST] 0000002c FfdcProvider  I com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/ffdc/server1_2f41ff3c_11.02.11_13.57.42.91538787.txt com.ibm.ws.metadata.ejb.EJBMDOrchestrator.finishBMDInit 810
[2/11/11 13:57:43:455 SAST] 0000002c EJBMDOrchestr E   CNTR0035E: EJB container caught com.ibm.wsspi.injectionengine.InjectionException: Failed to process bindings for metadata
       at com.ibm.ws.injectionengine.InjectionEngineImpl.processBindings(InjectionEngineImpl.java:488)
       at com.ibm.ws.injectionengine.InjectionEngineImpl.processInjectionMetaData(InjectionEngineImpl.java:285)
       at com.ibm.ws.util.ComponentNameSpaceHelper.populateJavaNameSpace(ComponentNameSpaceHelper.java:806)
       at com.ibm.ws.util.ComponentNameSpaceHelper.populateJavaNameSpace(ComponentNameSpaceHelper.java:519)
       at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.finishBMDInit(EJBMDOrchestrator.java:1842)
       at com.ibm.ws.runtime.component.EJBContainerImpl.finishDeferredBeanMetaData(EJBContainerImpl.java:5034)
       at com.ibm.ws.runtime.component.EJBContainerImpl.initializeDeferredEJB(EJBContainerImpl.java:4832)
       at com.ibm.ejs.container.HomeOfHomes$1.run(HomeOfHomes.java:404)
       at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
       at com.ibm.ejs.container.HomeOfHomes.getHome(HomeOfHomes.java:401)
       at com.ibm.ejs.container.HomeOfHomes.getHome(HomeOfHomes.java:337)
       at com.ibm.ws.ejbcontainer.injection.factory.EJBLinkObjectFactory.getObjectInstance(EJBLinkObjectFactory.java:208)
       at com.ibm.ws.injectionengine.processor.EJBInjectionBinding.getInjectionObject(EJBInjectionBinding.java:749)
       at com.ibm.wsspi.injectionengine.InjectionTargetField.inject(InjectionTargetField.java:245)
       at com.ibm.ws.injectionengine.InjectionEngineImpl.inject(InjectionEngineImpl.java:579)
       at com.ibm.ejs.container.StatelessBeanO.initialize(StatelessBeanO.java:315)
       at com.ibm.ejs.container.CMStatelessBeanOFactory.create(CMStatelessBeanOFactory.java:45)
       at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1028)
       at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1138)
       at com.ibm.ejs.container.activator.UncachedActivationStrategy.atActivate(UncachedActivationStrategy.java:84)
       at com.ibm.ejs.container.activator.Activator.activateBean(Activator.java:599)
       at com.ibm.ejs.container.EJSContainer.preInvokeActivate(EJSContainer.java:3919)
       at com.ibm.ejs.container.EJSContainer.EjbPreInvoke(EJSContainer.java:3304)
       at com.fundamo.businessevents.service.EJSLocal0SLBusinessEventServiceLocal_faa9ae79.generateId(EJSLocal0SLBusinessEventServiceLocal_faa9ae79.java)
       at com.fundamo.interceptors.BusinessEventInterceptor.createBusinessEvent(BusinessEventInterceptor.java:153)
       at com.fundamo.interceptors.BusinessEventInterceptor.logMethodEntry(BusinessEventInterceptor.java:51)
       at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:227)
       at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:566)
       at com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInvoke(InvocationContextImpl.java:217)
       at com.ibm.ejs.container.EJSContainer.invoke(EJSContainer.java:5720)
       at com.fundamo.mno.service.EJSRemote0SLMnoServiceLocal_d4f37c4c.insertMno(EJSRemote0SLMnoServiceLocal_d4f37c4c.java)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.ibm.rmi.util.ProxyUtil$4.run(ProxyUtil.java:692)
       at java.security.AccessController.doPrivileged(Native Method)
       at com.ibm.rmi.util.ProxyUtil.invokeWithClassLoaders(ProxyUtil.java:690)
       at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1156)
       at $Proxy82.insertMno(Unknown Source)
       at com.fundamo.mno.service._MnoServiceRemote_Stub.insertMno(_MnoServiceRemote_Stub.java)
       at com.fundamo.mno.service.MnoServiceProxy.insertMno(MnoServiceProxy.java:48)
       at com.fundamo.mno.controller.MaintainMnoController.save(MaintainMnoController.java:229)
       at com.fundamo.web.BaseBean.buttonType(BaseBean.java:472)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
       at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:277)
       at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
       at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:99)
       at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
       at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:760)
       at javax.faces.component.UICommand.broadcast(UICommand.java:372)
       at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:458)
       at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:763)
       at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
       at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
       at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
       at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:132)
       at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:74)
       at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:31)
       at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
       at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
       at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
       at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
       at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:26)
       at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
       at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
       at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1384)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:852)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:785)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
       at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
       at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
       at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:859)
       at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
       at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
       at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
       at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
       at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
       at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
       at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
       at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
       at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
       at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
       at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
Caused by: com.ibm.wsspi.injectionengine.InjectionException: CWNEN0044E: A resource reference binding could not be found for the following resource references [brandGroup/jms/NearFastHandlerQueue, brandGroup/jms/NearFastHandlerFactory], defined for the brandGroup/ejb/NearFastHandlerEnqueuer component.
       at com.ibm.wsspi.injectionengine.InjectionProcessor.collectInjectionNBindingData(InjectionProcessor.java:947)
       at com.ibm.ws.injectionengine.InjectionEngineImpl.processBindings(InjectionEngineImpl.java:475)
       ... 98 more
and is throwing com.ibm.ejs.container.ContainerException: Failed to initialize BeanMetaData instance; nested exception is:
       com.ibm.wsspi.injectionengine.InjectionException: Failed to process bindings for metadata.


MattDuPlessisAsked:
Who is Participating?
 
MattDuPlessisConnect With a Mentor Author Commented:
Thanks, yes, we were able to work around this by using a WAS specific implementation but that broke the Glassfish implementation. We have now implemented a local lookup to the resource instead of using @Resource to inject which is working under both Glassfish and WAS so far. It also looks like the latest WAS fix-pack addresses this issue and we'll test this as soon as we can.
0
 
ChristoferDutzCommented:
To me it looks as if the jndi names might be wrong. Perhaps the queses are created under a different name in Websphere:
http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14534664
0
 
ChristoferDutzCommented:
ok ... good luck :-)
0
 
MattDuPlessisAuthor Commented:
Workaround to enable under both glassfish and WAS
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.