You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by David Blevins <da...@visi.com> on 2009/12/09 14:27:25 UTC

Re: SimpleStateless with JBoss5/Eclipse

Hi Scott,

I think this might be an issue we've found and worked around since  
3.1.2.  The basic issue that jars that contain a "Main-Class" entry in  
the MANIFEST.MF are considered application clients when put in an ear  
-- and since we "turned on" app clients when added @LocalClient  
support in 3.1.1 jars like this started getting picked up.  I thought  
we had this fixed in 3.1.2 but we apparently needed to tighten up that  
code a bit more.

I've created a new binary for you here:

   https://repository.apache.org/snapshots/org/apache/openejb/openejb-standalone/3.1.3-SNAPSHOT/openejb-standalone-3.1.3-20091209.131438-2.zip

If you could give that a try and let us know how it goes, it'd be very  
appreciated.  We definitely want to make sure this is fixed.

-David

On Nov 27, 2009, at 9:10 PM, Scott@Egistix wrote:

>
> Hi.
> I am using eclipse.
>
> I have download the examples (openejb-examples-3.1.2) and created a  
> project
> using the simple-stateless example.
> I have added the junit.jar to my build path.
> I have created a user-library for OpenEjb and added all the jars in  
> the lib
> dir, and added this user-lib to my build path.
> I have created a server runtime using jboss5.1 and added this server  
> runtime
> to my build path.
>
> When I run the test I get:
>
> Apache OpenEJB 3.1.2    build: 20091010-03:11
> http://openejb.apache.org/
> INFO - openejb.home = E:\workspaces\openejb-examples-3.1.2\simple- 
> stateless
> INFO - openejb.base = E:\workspaces\openejb-examples-3.1.2\simple- 
> stateless
> INFO - Configuring Service(id=Default Security Service,
> type=SecurityService, provider-id=Default Security Service)
> INFO - Configuring Service(id=Default Transaction Manager,
> type=TransactionManager, provider-id=Default Transaction Manager)
> INFO - Found ClientModule in classpath:
> D:\jboss-5.1.0.GA\common\lib\jboss-serialization.jar
> INFO - Found EjbModule in classpath:
> E:\workspaces\openejb-examples-3.1.2\simple-stateless\bin
> INFO - Found ClientModule in classpath:
> D:\jboss-5.1.0.GA\client\javassist.jar
> INFO - Found ClientModule in classpath:
> D:\jboss-5.1.0.GA\common\lib\antlr.jar
> INFO - Found ClientModule in classpath:
> D:\jboss-5.1.0.GA\client\jaxws-tools.jar
> INFO - Found ClientModule in classpath: D:\jboss-5.1.0.GA\lib\jaxb- 
> xjc.jar
> INFO - Found ClientModule in classpath:
> E:\projects\openejb-3.1.2\lib\serializer-2.7.1.jar
> INFO - Found ClientModule in classpath:
> D:\jboss-5.1.0.GA\common\lib\dtdparser121.jar
> INFO - Found ClientModule in classpath:
> D:\jboss-5.1.0.GA\client\jboss-remoting.jar
> INFO - Found ClientModule in classpath:
> E:\projects\openejb-3.1.2\lib\xml-resolver-1.2.jar
> INFO - Found ClientModule in classpath:
> D:\jboss-5.1.0.GA\common\lib\jboss-remoting.jar
> INFO - Found ClientModule in classpath:
> D:\jboss-5.1.0.GA\client\jaxb-xjc.jar
> INFO - Found ClientModule in classpath: D:\jboss-5.1.0.GA\client 
> \antlr.jar
> INFO - Found ClientModule in classpath: D:\jboss-5.1.0.GA\lib 
> \javassist.jar
> INFO - Found ClientModule in classpath:
> D:\jboss-5.1.0.GA\client\jboss-serialization.jar
> INFO - Found ClientModule in classpath: D:\jboss-5.1.0.GA\common\lib 
> \bsh.jar
> INFO - Beginning load: D:\jboss-5.1.0.GA\common\lib\jboss- 
> serialization.jar
> INFO - Beginning load:
> E:\workspaces\openejb-examples-3.1.2\simple-stateless\bin
> INFO - Beginning load: D:\jboss-5.1.0.GA\client\javassist.jar
> INFO - Beginning load: D:\jboss-5.1.0.GA\common\lib\antlr.jar
> INFO - Beginning load: D:\jboss-5.1.0.GA\client\jaxws-tools.jar
> INFO - Beginning load: D:\jboss-5.1.0.GA\lib\jaxb-xjc.jar
> INFO - Beginning load: E:\projects\openejb-3.1.2\lib 
> \serializer-2.7.1.jar
> INFO - Beginning load: D:\jboss-5.1.0.GA\common\lib\dtdparser121.jar
> INFO - Beginning load: D:\jboss-5.1.0.GA\client\jboss-remoting.jar
> INFO - Beginning load: E:\projects\openejb-3.1.2\lib\xml- 
> resolver-1.2.jar
> INFO - Beginning load: D:\jboss-5.1.0.GA\common\lib\jboss-remoting.jar
> INFO - Beginning load: D:\jboss-5.1.0.GA\client\jaxb-xjc.jar
> INFO - Beginning load: D:\jboss-5.1.0.GA\client\antlr.jar
> INFO - Beginning load: D:\jboss-5.1.0.GA\lib\javassist.jar
> INFO - Beginning load: D:\jboss-5.1.0.GA\client\jboss- 
> serialization.jar
> INFO - Beginning load: D:\jboss-5.1.0.GA\common\lib\bsh.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 CalculatorImpl:
> Container(type=STATELESS, id=Default Stateless Container)
> INFO - Enterprise application "classpath.ear" loaded.
> INFO - Assembling app: classpath.ear
> INFO - Jndi(name=CalculatorImplLocal) --> Ejb(deployment- 
> id=CalculatorImpl)
> INFO - Jndi(name=CalculatorImplRemote) --> Ejb(deployment- 
> id=CalculatorImpl)
> INFO - Created Ejb(deployment-id=CalculatorImpl, ejb- 
> name=CalculatorImpl,
> container=Default Stateless Container)
> INFO - Undeploying app: classpath.ear
> ERROR - Application could not be deployed:  classpath.ear
> org.apache.openejb.OpenEJBException: Creating application failed:
> classpath.ear: ParsedName{path=openejb/client/jboss-remoting/comp/env,
> component=env}
> 	at
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:666)
> 	at
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:449)
> 	at
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.buildContainerSystem(Assembler.java:367)
> 	at  
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
> 279)
> 	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at  
> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java: 
> 36)
> 	at
> org 
> .apache 
> .openejb 
> .client 
> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
> 	at
> org 
> .apache 
> .openejb 
> .client 
> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
> 	at
> org 
> .apache 
> .openejb 
> .client 
> .LocalInitialContextFactory 
> .getInitialContext(LocalInitialContextFactory.java:42)
> 	at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
> 	at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
> 	at javax.naming.InitialContext.init(Unknown Source)
> 	at javax.naming.InitialContext.<init>(Unknown Source)
> 	at org.superbiz.calculator.CalculatorTest.setUp(CalculatorTest.java: 
> 35)
> 	at junit.framework.TestCase.runBare(TestCase.java:132)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:124)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:232)
> 	at junit.framework.TestSuite.run(TestSuite.java:227)
> 	at
> org 
> .junit 
> .internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> 	at
> org 
> .eclipse 
> .jdt 
> .internal 
> .junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
> 	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)
> Caused by: javax.naming.NameAlreadyBoundException:
> ParsedName{path=openejb/client/jboss-remoting/comp/env, component=env}
> 	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:96)
> 	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:90)
> 	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:90)
> 	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java: 
> 111)
> 	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java: 
> 105)
> 	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java: 
> 105)
> 	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java: 
> 105)
> 	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:90)
> 	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java: 
> 105)
> 	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java: 
> 105)
> 	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:90)
> 	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java: 
> 105)
> 	at  
> org.apache.openejb.core.ivm.naming.IvmContext.bind(IvmContext.java: 
> 295)
> 	at
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:618)
> 	... 33 more
>
> Why?
>
> Thanks,
> Scott
> -- 
> View this message in context: http://old.nabble.com/SimpleStateless-with-JBoss5-Eclipse-tp26545377p26545377.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>


Re: SimpleStateless with JBoss5/Eclipse

Posted by David Blevins <da...@visi.com>.
On Dec 9, 2009, at 9:51 PM, Scott@Egistix wrote:

>
> FYI: We worked around this problem by having our EJB eclipse project  
> only
> contain the minimal jboss lib's necessary.  The EAR project is the  
> only one
> with the targeted runtime checked.  That works, but it would be nice  
> to not
> have to do that :)
>
> Anyway, I tried that snapshot...similar, but different :(
>
> INFO - Assembling app: classpath.ear
> INFO - Jndi(name=MyStatelessBeanImplLocal) -->
> Ejb(deployment-id=MyStatelessBeanImpl)
> INFO - Jndi(name=MyStatelessBeanImplRemote) -->
> Ejb(deployment-id=MyStatelessBeanImpl)
> INFO - Created Ejb(deployment-id=MyStatelessBeanImpl,
> ejb-name=MyStatelessBeanImpl, container=Default Stateless Container)
> INFO - Undeploying app: classpath.ear
> ERROR - Application could not be deployed:  classpath.ear
> org.apache.openejb.OpenEJBException: Creating application failed:
> classpath.ear: ParsedName{path=openejb/client/jaxb-xjc/comp/env,
> component=env}
> 	at
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:667)

This issue should be fixed now.  Looking for volunteers to try this out.

  OPENEJB-1130: Stricter ClientModule classpath discovery prevents  
possible NameAlreadyBoundException
  [ https://issues.apache.org/jira/browse/OPENEJB-1130 ]

New 3.1.3-SNAPSHOTS have been uploaded to:

  http://repository.apache.org/snapshots/

As well new zips and tars are available here:

  http://repository.apache.org/snapshots/org/apache/openejb/openejb-standalone/3.1.3-SNAPSHOT/openejb-standalone-3.1.3-20100113.224305-3.tar.gz
  http://repository.apache.org/snapshots/org/apache/openejb/openejb-standalone/3.1.3-SNAPSHOT/openejb-standalone-3.1.3-20100113.224305-3.zip


-David


Re: SimpleStateless with JBoss5/Eclipse

Posted by "Scott@Egistix" <sh...@egistix.com>.
FYI: We worked around this problem by having our EJB eclipse project only
contain the minimal jboss lib's necessary.  The EAR project is the only one
with the targeted runtime checked.  That works, but it would be nice to not
have to do that :)

Anyway, I tried that snapshot...similar, but different :(

INFO - Assembling app: classpath.ear
INFO - Jndi(name=MyStatelessBeanImplLocal) -->
Ejb(deployment-id=MyStatelessBeanImpl)
INFO - Jndi(name=MyStatelessBeanImplRemote) -->
Ejb(deployment-id=MyStatelessBeanImpl)
INFO - Created Ejb(deployment-id=MyStatelessBeanImpl,
ejb-name=MyStatelessBeanImpl, container=Default Stateless Container)
INFO - Undeploying app: classpath.ear
ERROR - Application could not be deployed:  classpath.ear
org.apache.openejb.OpenEJBException: Creating application failed:
classpath.ear: ParsedName{path=openejb/client/jaxb-xjc/comp/env,
component=env}
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:667)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:450)
	at
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:368)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:280)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:125)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:60)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:271)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:250)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
	at
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
	at
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
	at
org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
	at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
	at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
	at javax.naming.InitialContext.init(Unknown Source)
	at javax.naming.InitialContext.<init>(Unknown Source)
	at com.egistix.open.test.TestIt.setup(TestIt.java:18)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:607)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:417)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:154)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:88)
	at org.testng.TestRunner.beforeRun(TestRunner.java:510)
	at org.testng.TestRunner.run(TestRunner.java:478)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
	at org.testng.SuiteRunner.run(SuiteRunner.java:204)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
	at org.testng.TestNG.run(TestNG.java:751)
	at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
Caused by: javax.naming.NameAlreadyBoundException:
ParsedName{path=openejb/client/jaxb-xjc/comp/env, component=env}
	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:96)
	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:90)
	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:90)
	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:105)
	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:90)
	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:105)
	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:105)
	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:90)
	at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:105)
	at org.apache.openejb.core.ivm.naming.IvmContext.bind(IvmContext.java:295)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:619)
	... 39 more
!!!Here
FAILED: testIt
javax.naming.NameNotFoundException: Name "MyStatelessBeanImplLocal" not
found.
	at
org.apache.openejb.core.ivm.naming.IvmContext.federate(IvmContext.java:193)
	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(Unknown Source)
	at com.egistix.open.test.TestIt.testIt(TestIt.java:24)
... Removed 22 stack frames
-- 
View this message in context: http://old.nabble.com/SimpleStateless-with-JBoss5-Eclipse-tp26545377p26717474.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: SimpleStateless with JBoss5/Eclipse

Posted by David Blevins <da...@visi.com>.
Seems one of the mod rewrite rules was changed.  This works (same url  
without the "https")

http://repository.apache.org/snapshots/org/apache/openejb/openejb-standalone/3.1.3-SNAPSHOT/openejb-standalone-3.1.3-20091209.131438-2.zip


On Dec 9, 2009, at 7:24 PM, Scott@Egistix wrote:

>
> Is there something special I need to do to get to that url?
> I get a 404.
>
> Thanks.
>
>> I've created a new binary for you here:
>>
>>
>> https://repository.apache.org/snapshots/org/apache/openejb/openejb-standalone/3.1.3- 
>> >
>> SNAPSHOT/openejb-standalone-3.1.3-20091209.131438-2.zip
>>
>> If you could give that a try and let us know how it goes, it'd be  
>> very
>> appreciated.  We definitely want to make sure this is fixed.
>>
>> -David
>
>
> -- 
> View this message in context: http://old.nabble.com/SimpleStateless-with-JBoss5-Eclipse-tp26545377p26715081.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>


Re: SimpleStateless with JBoss5/Eclipse

Posted by "Scott@Egistix" <sh...@egistix.com>.
Is there something special I need to do to get to that url?
I get a 404.

Thanks.

> I've created a new binary for you here:
>
>   
> https://repository.apache.org/snapshots/org/apache/openejb/openejb-standalone/3.1.3->
> SNAPSHOT/openejb-standalone-3.1.3-20091209.131438-2.zip
>
> If you could give that a try and let us know how it goes, it'd be very  
> appreciated.  We definitely want to make sure this is fixed.
>
> -David


-- 
View this message in context: http://old.nabble.com/SimpleStateless-with-JBoss5-Eclipse-tp26545377p26715081.html
Sent from the OpenEJB User mailing list archive at Nabble.com.