This content has been marked as final.
Show 5 replies
-
1. Re: configuring spring to wire in ejb3 stateless session bea
asack Mar 23, 2006 7:38 AM (in response to eielk)Have you tried to use the JBoss Spring deployer that allows you to inject EJB's via the @Spring notation?
-
2. Re: configuring spring to wire in ejb3 stateless session bea
bill.burke Mar 23, 2006 5:54 PM (in response to eielk)What is the cause exception please.
-
3. Re: configuring spring to wire in ejb3 stateless session bea
eielk Mar 23, 2006 9:31 PM (in response to eielk)looks i didn't look down into the root exception: NameNotFoundException, do i need to prefix this if using spring, here is a snippet of the global jndi listing also...
thanks.21:12:35,456 WARN [RequestProcessor] Unhandled Exception thrown: class java.lang.reflect.Undec laredThrowableException 21:12:35,456 ERROR [[action]] Servlet.service() for servlet action threw exception java.lang.reflect.UndeclaredThrowableException at $Proxy79.addTest(Unknown Source) at com.gwig.struts.action.TestAction.execute(TestAction.java:60) at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.j ava:106) ... Caused by: javax.naming.NameNotFoundException: gwig not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) at org.jnp.server.NamingServer.getBinding(NamingServer.java:537) at org.jnp.server.NamingServer.getObject(NamingServer.java:543) at org.jnp.server.NamingServer.lookup(NamingServer.java:267) at org.jnp.server.NamingServer.lookup(NamingServer.java:270) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:716) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587) at javax.naming.InitialContext.lookup(InitialContext.java:351) at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:123) at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:146) at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:86) at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:104) at org.springframework.jndi.JndiObjectTargetSource.getTarget(JndiObjectTargetSource.jav a:121) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java: 150) ... 28 more
+- gwig (class: org.jnp.interfaces.NamingContext) | +- TestSLSBLocal (proxy: $Proxy77 implements No ClassLoaders found for: com.gwig.ejb.TestSLSBIF (no security manager: RMI class loader disabled)) | +- TestSFSBLocalStatefulProxyFactory (class: org.jboss.ejb3.stateful.StatefulLocalProxyFactory) | +- TestSFSBLocal (class: java.lang.Object)
-
4. Re: configuring spring to wire in ejb3 stateless session bea
eielk Mar 23, 2006 9:41 PM (in response to eielk)asack, thanks for the hint for the spring deployer...i'll check it out, will it work with struts action injection using the plugin in struts-config.xml?
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> <set-property property="contextConfigLocation" value="properties/applicationContext.xml"/> </plug-in>
-
5. Re: configuring spring to wire in ejb3 stateless session bea
eielk Mar 23, 2006 11:37 PM (in response to eielk)figured it out... i simply removed the 'resourceRef' property from the JNDIObjectFactory bean config!!!
according to the spec about resource ref: it adds the java:comp crap at the beginning of the jndi lookup, no wonder it couldn't find the beans.resourceRef - if the lookup occurs in a J2EE container, i.e. if the prefix "java:comp/env/" needs to be added if the JNDI name doesn't already contain it.