[jboss-user] [JNDI and Naming] - javax.naming.NameNotFoundException with Migration from JBoss-5.1.0 to JBoss-7.1.1

Kevin Yuan do-not-reply at jboss.com
Tue Jun 12 16:01:10 EDT 2012


Kevin Yuan [https://community.jboss.org/people/kyuan] created the document:

"javax.naming.NameNotFoundException with Migration from JBoss-5.1.0 to JBoss-7.1.1"

To view the document, visit: https://community.jboss.org/docs/DOC-18532

--------------------------------------------------------------
I am also trying to connect to a stateless session bean, and it works partially – I can deploy my application ear successfully, also can contact the server, but no matter how I try to name the EJB, I get a NameNotFoundException, just like:

javax.naming.NameNotFoundException: eclipselink-advanced-model/TestRunner!org.eclipse.persistence.testing.framework.server.TestRunner -- service jboss.naming.context.java.jboss.exported.eclipselink-advanced-model."TestRunner!org.eclipse.persistence.testing.framework.server.TestRunner"
    at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)
    at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)
    at org.jboss.naming.remote.protocol.v1.Protocol$1.handleServerMessage(Protocol.java:127)
    at org.jboss.naming.remote.protocol.v1.RemoteNamingServerV1$MessageReciever$1.run(RemoteNamingServerV1.java:73)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

I have the following environment:

JBoss-as-7.1.1.Final
My EAR: eclipselink-advanced-model.ear
My EJB archive: eclipselink-advanced-model_ejb.jar
My stateless session bean: TestRunnerBean

Actually my application worked fine on JBoss-5.1.0, I have made the following changes with jndi.properties and lookup, my jndi.properties just like the following:

java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory
java.naming.factory.url.pkgs=org.jboss.ejb.client.naming
java.naming.provider.url=remote://localhost:4447
java.naming.security.principal=usera
java.naming.security.credentials=passworda
java.naming.security.authentication=none

And the lookup just like: ejb:eclipselink-advanced-model/eclipselink-advanced-model_ejb/TestRunner!org.eclipse.persistence.testing.framework.server.TestRunner
(for JBoss-5.1.0, the lookup is: TestRunner/remote-org.eclipse.persistence.testing.framework.server.TestRunner)

I have referred to the post:  https://community.jboss.org/message/722635#722635 https://community.jboss.org/message/722635, and I also tried to add jboss-ejb-client.properties in the client classpath, still didn't help. BTW, my jboss-ejb-client.properties just like the following:

remote.connections=default
endpoint.name=client-endpoint
remote.connection.default.port=4447
remote.connection.default.host=127.0.0.1
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connection.default.username=usera
remote.connection.default.password=passworda

Does anyone can give me a hint to things I can try out? Any suggestion will be appreciated.
--------------------------------------------------------------

Comment by going to Community
[https://community.jboss.org/docs/DOC-18532]

Create a new document in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2083]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120612/e5ccd976/attachment.html 


More information about the jboss-user mailing list