tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hmmahboobi <hmmahbo...@gmail.com>
Subject NameNotFoundException
Date Mon, 14 Apr 2014 10:54:03 GMT
I have an EJB 3.1 session bean on Weblogic 12c and I want to lookup it in
tomee 1.6, but this error has been occurred:

javax.naming.NameNotFoundException: Name
"global.test-product.service.ReportServiceImpl!com.test.IReportService" not
found.
	at
org.apache.openejb.core.ivm.naming.IvmContext.federate(IvmContext.java:197)
	at
org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:151)
	at
org.apache.openejb.core.ivm.ContextHandler.lookup(ContextHandler.java:50)
	at
org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:126)
	at
org.apache.openejb.core.ivm.ContextHandler.lookup(ContextHandler.java:50)
	at javax.naming.InitialContext.lookup(InitialContext.java:392)
	at com.test.service.TomeeTest.test(TomeeTest.java:173)
	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)
	at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


When I execute this test on simple java class, its works fine and returns
proper object. 
Its seems that on openejb environment, context is bind to openejb, not
weblogic!

Hashtable<String, String> props = new Hashtable<String, String>();
props.put("java.naming.factory.initial",
"weblogic.jndi.WLInitialContextFactory");
props.put("java.naming.provider.url", "t3://192.168.1.187:7023");
Context c = new InitialContext(props);

IReportService s = (IReportService)
c.lookup("test-product.service.ReportServiceImpl!com.test.IReportService");



--
View this message in context: http://openejb.979440.n4.nabble.com/NameNotFoundException-tp4668769.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message