Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
4.7.0
-
None
Description
My ejb has references to both the local and the remote interface of another ejb:
@Stateless
public class ExternalServiceImpl implements ExternalServiceLocal {
@EJB private InternalServiceRemote internalServiceRemote;
@EJB private InternalServiceLocal internalServiceLocal;
}
and
@Stateless
public class InternalServiceImpl implements InternalServiceLocal, InternalServiceRemote
{
//...
}
In this condition, only the Remote Interface of InternalServiceImpl is made available, and so I have the exception:
Cannot find bean "org.apache.openejb.examples.dependency.ExternalServiceImpl/internalServiceLocal" referenced by bean "ExternalServiceImpl".
org.apache.openejb.OpenEJBException: Cannot find bean "org.apache.openejb.examples.dependency.ExternalServiceImpl/internalServiceLocal" referenced by bean "ExternalServiceImpl".
at org.apache.openejb.alt.config.JndiEncInfoBuilder.buildEjbLocalRefInfos(JndiEncInfoBuilder.java:186)
at org.apache.openejb.alt.config.JndiEncInfoBuilder.build(JndiEncInfoBuilder.java:107)
at org.apache.openejb.alt.config.EjbJarInfoBuilder.initJndiReferences(EjbJarInfoBuilder.java:247)
at org.apache.openejb.alt.config.EjbJarInfoBuilder.buildInfo(EjbJarInfoBuilder.java:132)
at org.apache.openejb.alt.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:176)
at org.apache.openejb.assembler.classic.Assembler.init(Assembler.java:99)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:136)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:275)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:260)
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:585)
at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:39)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.apache.openejb.examples.dependency.EjbDependencyTest.setUp(EjbDependencyTest.java:35)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
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:585)
at org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)
at org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216)
at org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
at org.apache.maven.surefire.Surefire.run(Surefire.java:163)
at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
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:585)
at org.apache.maven.surefire.SurefireBooter.runTestsInProcess(SurefireBooter.java:313)
at org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:221) at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:371) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
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:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
22:27:36,678 WARN [OpenEJB] Jar not loaded. /home/fdiotalevi/workspaces/ProWicket/openejb3/examples/ejb-dependency/target/classes. Cannot find bean "org.apache.openejb.examples.dependency.ExternalServiceImpl/internalServiceLocal" referenced by bean "ExternalServiceImpl".