[jboss-user] [JNDI and Naming] - Re: EJB3 jndi lookup failed on JBOSS EAP only due to ProxyFactory not bound
JN JNC
do-not-reply at jboss.com
Tue Jan 22 10:22:20 EST 2013
JN JNC [https://community.jboss.org/people/jnjnc] created the discussion
"Re: EJB3 jndi lookup failed on JBOSS EAP only due to ProxyFactory not bound"
To view the discussion, visit: https://community.jboss.org/message/793549#793549
--------------------------------------------------------------
Hi,
I have to deploy an application within various application server environments depending on customer environment. I successfully deploy the application in jBoss 4.2.3, 5.1 and 7.1 final.
I would like to have some "unit-integration" tests to valid my deployment as fast as I can and test remote EJB invocation and JMS deployment.
I got same issue when trying to invoke a remote EJB deployed within a ear file in JBoss 5.1 from a junit test.
It doesn't matter which 3-part pattern I use (app_name/bean_name/remote) or (app_name/remote-bean_name/qualified_bean_name).
Please note this test is working fine when I deploy this EAR file in jBoss 4.2.3.
I didn't try with jBoss 7.1 yet.
jvax.naming.NamingException: Could not dereference object [Root exception is java.lang.RuntimeException: Exception while trying to locate proxy factory in JNDI, at key ProxyFactory/MY_EAR/MyBean/MY_EAR/MyBean/remote]
...
Caused by: java.lang.RuntimeException: Exception while trying to locate proxy factory in JNDI, at key ProxyFactory/MY_EAR/MyBean/MY_EAR/MyBean/remote
...
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getProxyFactoryFromJNDI(ProxyObjectFactory.java:249)
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:157)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
... 28 more
Caused by: javax.naming.NameNotFoundException: ProxyFactory not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
I thought about a classloading issue regarding jboss client jar but it doesn't seems to be the case as I got same issue when changing my test to follow Carlo's classloading tip.
http://wolf-71.blogspot.fr/2010/02/et-phone-home.html http://wolf-71.blogspot.fr/2010/02/et-phone-home.html
If I change my test to use this classloading mechanism I got an extra exception
java.lang.ClassCastException: org.jboss.jms.client.JBossConnectionFactory cannot be cast to javax.jms.ConnectionFactory
at com.temenos.tafj.sb.JBossServerTest.testCALLATJMSCall(JBossServerTest.java:206)
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)
Any suggestion would be appreciated.
Cheers
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/793549#793549]
Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130122/a171b917/attachment.html
More information about the jboss-user
mailing list