You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by VikasRathee <vi...@gmail.com> on 2017/09/08 11:23:03 UTC
lookup failed in tomee
I have one webservice project and one EJB 3.0 project deployed in Tomee
plume in same EAR. From webservice class i'm calling EJB bean class using
remote interface. i have used multiple InitialContextFactory object, but
nothing seems to work . Each time i'm getting
*javax.naming.NameNotFoundException: Name "TestRemote" not found*
while deployment, this log is coming in server.
*08-Sep-2017 16:23:09.587 INFO [main]
org.apache.openejb.assembler.classic.JndiBuilder.bind Jndi(name=TestRemote)
--> Ejb(deployment-id=Test)*
Here is the code from my webservice class
/ Properties properties = new Properties();
properties.put("java.naming.factory.initial",
"org.apache.openejb.core.OpenEJBInitialContextFactory");
properties.put("java.naming.provider.url", "http://localhost:8081");
InitialContext ic = new InitialContext(properties);
TestRemote PSBR = (TestRemote) ic.lookup("TestRemote");/
Apart from OpenEJBInitialContextFactory, i have tried
*org.apache.openejb.core.LocalInitialContextFactory and
RemoteInitialContextFactory* but getting the same error each time.
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
Re: lookup failed in tomee
Posted by VikasRathee <vi...@gmail.com>.
Thanks, it is working fine with remote context factory and in url i added
http://127.0.0.1:8081/tomee/ejb
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
Re: lookup failed in tomee
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Vikas
You dont use the remote context factory, is it intended? If so the provider
url is ignored
Le 8 sept. 2017 17:49, "VikasRathee" <vi...@gmail.com> a écrit :
I have one webservice project and one EJB 3.0 project deployed in Tomee
plume in same EAR. From webservice class i'm calling EJB bean class using
remote interface. i have used multiple InitialContextFactory object, but
nothing seems to work . Each time i'm getting
*javax.naming.NameNotFoundException: Name "TestRemote" not found*
while deployment, this log is coming in server.
*08-Sep-2017 16:23:09.587 INFO [main]
org.apache.openejb.assembler.classic.JndiBuilder.bind Jndi(name=TestRemote)
--> Ejb(deployment-id=Test)*
Here is the code from my webservice class
/ Properties properties = new Properties();
properties.put("java.naming.factory.initial",
"org.apache.openejb.core.OpenEJBInitialContextFactory");
properties.put("java.naming.provider.url", "http://localhost:8081");
InitialContext ic = new InitialContext(properties);
TestRemote PSBR = (TestRemote) ic.lookup("TestRemote");/
Apart from OpenEJBInitialContextFactory, i have tried
*org.apache.openejb.core.LocalInitialContextFactory and
RemoteInitialContextFactory* but getting the same error each time.
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html