tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Davidson" <stephen.david...@etcc.com>
Subject Include Classpath not sharing Deployed EJBs?
Date Mon, 25 Jan 2010 20:18:21 GMT
Greetings.

For compatibility with the deployed app server, we can not use the
ejb-jar.xml file, only annotated class files.  Unfortunately, it seems
that the clients can only connect when the services.jar file (the jar
that has my ejbs) has an ejb-jar.xml file.  When it does not, they fail
to connect.  Details follow.  Suggestions?  Or did I miss something from
http://openejb.apache.org/3.0/application-discovery-via-the-classpath.ht
ml ?

Regards,
Steve

I've set the following in my pom.xml;
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <configuration>
                    <systemProperties>

                        <systemProperty>
 
<name>openejb.deployments.classpath.include</name>
 
<value>.*services-${service.version}.*</value>
                        </systemProperty>
                    </systemProperties>
                </configuration>

            </plugin>

(Note: project specific settings, dependenicies, and other config items
left out).

Runtime excerpt;
INFO - Beginning load: C:\Documents and
Settings\sdavidson\.m2\repository\org\mortbay\jetty\start\6.1.11\start-6
.1.11.jar
INFO - Configuring enterprise application: classpath.ear
INFO - Configuring Service(id=Default Stateless Container,
type=Container, provider-id=Default Stateless Container)
INFO - Auto-creating a container for bean com/etcc/Account:
Container(type=STATELESS, id=Default Stateless Container)
INFO - Enterprise application "classpath.ear" loaded.
INFO - Assembling app: classpath.ear
INFO - Jndi(name=com/etcc/StateLocal) -->
Ejb(deployment-id=com/etcc/State)

...

Running com.etcc.csc.delegate.StateDelegateEjbTest
TRACE - Getting EJB Client for: com.etcc.csc.service.StateInterface
TRACE - Loading service: State
TRACE - Loading service: State
DEBUG - Unable to access EJB State: Name "com/etcc/StateLocal" not
found.
javax.naming.NameNotFoundException: Name "com/etcc/StateLocal" not
found.
        at
org.apache.openejb.core.ivm.naming.IvmContext.federate(IvmContext.java:1
93)
        at
org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:150
)
        at
org.apache.openejb.core.ivm.naming.ContextWrapper.lookup(ContextWrapper.
java:115)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at
com.etcc.csc.delegate.EjbServiceFactoryTestImpl.getImpl(EjbServiceFactor
yTestImpl.java:50)
        at
com.etcc.csc.service.ServiceFactory.getImplementation(ServiceFactory.jav
a:139)
        at
com.etcc.csc.delegate.StateDelegate.getStates(StateDelegate.java:27)
        at
com.etcc.csc.delegate.StateDelegateTest.testGetStates(StateDelegateTest.
java:46)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:592)
        at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMet
hod.java:44)
        at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallab
le.java:15)
        at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMetho
d.java:41)
        at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod
.java:20)
        at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.jav
a:28)
        at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
31)
        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner
.java:73)
        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner
.java:46)
        at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
        at
org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
        at
org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
        at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.jav
a:28)
        at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
        at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.jav
a:62)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSe
t(AbstractDirectoryTestSuite.java:140)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Abstr
actDirectoryTestSuite.java:127)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:592)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Suref
ireBooter.java:345)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java
:1009)
ERROR - Failed to retrieve states: Unable to access EJB State: Name
"com/etcc/StateLocal" not found.
java.lang.RuntimeException: Unable to access EJB State: Name
"com/etcc/StateLocal" not found.
        at
com.etcc.csc.delegate.EjbServiceFactoryTestImpl.getImpl(EjbServiceFactor
yTestImpl.java:56)
        at
com.etcc.csc.service.ServiceFactory.getImplementation(ServiceFactory.jav
a:139)
        at
com.etcc.csc.delegate.StateDelegate.getStates(StateDelegate.java:27)
        at
com.etcc.csc.delegate.StateDelegateTest.testGetStates(StateDelegateTest.
java:46)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:592)
        at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMet
hod.java:44)
        at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallab
le.java:15)
        at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMetho
d.java:41)
        at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod
.java:20)
        at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.jav
a:28)
        at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
31)
        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner
.java:73)
        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner
.java:46)
        at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
        at
org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
        at
org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
        at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.jav
a:28)
        at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
        at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.jav
a:62)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSe
t(AbstractDirectoryTestSuite.java:140)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Abstr
actDirectoryTestSuite.java:127)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:592)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Suref
ireBooter.java:345)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java
:1009)
Caused by: javax.naming.NameNotFoundException: Name
"com/etcc/StateLocal" not found.
        at
org.apache.openejb.core.ivm.naming.IvmContext.federate(IvmContext.java:1
93)
        at
org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:150
)
        at
org.apache.openejb.core.ivm.naming.ContextWrapper.lookup(ContextWrapper.
java:115)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at
com.etcc.csc.delegate.EjbServiceFactoryTestImpl.getImpl(EjbServiceFactor
yTestImpl.java:50)
        ... 31 more



Mime
View raw message