Mar 22nd, 2006, 09:58 AM
Weblogic EJB remote deployment - JNDI lookup fails
I am able to unit test the EJB deployed in a EAR using java utility within my IDE. Context file I use for the junit testcase is as follows
<bean id="configurationService" class="org.springframework.ejb.access.SimpleRemote StatelessSessionProxyFactoryBean">
<property name="jndiName" value="ConfigurationService"/>
<property name="businessInterface" value="aero.sita.ads.checkin.dal.services.IConfigu rationService"/>
I set the initial factory and provider url as system properties.
Presentation tier web app is deployed remotely. When it tries to access the EJB (xml context is same as the one I used in unit test), we get following error
weblogic.management.ManagementException: - with nested exception:
Exception:weblogic.management.ApplicationException : start() failed.
Module: web-qf Error: weblogic.management.DeploymentException:
Error creating bean with name 'configurationService' defined in ServletContext resource [/WEB-INF/config_context.xml]: Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Unable to resolve 'ConfigurationService' Resolved - with nested exception:
[javax.naming.NameNotFoundException: Unable to resolve 'ConfigurationService' Resolved ; remaining name 'ConfigurationService']
] at weblogic.management.deploy.slave.SlaveDeployer$Act ivateTask.prepare() V(SlaveDeployer.java:2396)
Could you please help me resolve this error.
Mar 23rd, 2006, 01:12 AM
It looks like your EJB is not bound at the time of lookup.
Perhaps it might help to set the "lookupHomeOnStartup" flag to "false" in your SimpleRemote StatelessSessionProxyFactoryBean.
Mar 23rd, 2006, 08:56 AM
Thanks Andreas. For jndi lookup, I was relying on the JVM property jndi_URL that I set while starting the weblogic. I modified the context file bean definition to include jndi environment, now the lookup is successful.