tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marius Kruger (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENEJB-1366) NameAlreadyBoundException: ParsedName{path=openejb/client/test-classes/comp/env
Date Thu, 07 Oct 2010 15:55:31 GMT
NameAlreadyBoundException: ParsedName{path=openejb/client/test-classes/comp/env
-------------------------------------------------------------------------------

                 Key: OPENEJB-1366
                 URL: https://issues.apache.org/jira/browse/OPENEJB-1366
             Project: OpenEJB
          Issue Type: Bug
          Components: configuration, deployment
         Environment: OpenEJB 3.1.3-SNAPSHOT    build: 20100923-06:56
Eclipse Version: Helios Service Release 1 Build id: 20100917-0705
M2Eclipse 0.10.2.20100623-1649
Maven 3.0-snapshot/0.10.2.20100623-1649
            Reporter: Marius Kruger


I have 2 ejb projects one depending on the otherin eclipse, 
each with their own ejb tests using application-client.xml in src/test/resources/META-INF/application-client.xml
and using @LocalClient .

In eclipse when I try to run the tests of the project depending on the other, I get the stacktrace
below.
(I saw a related issue: https://issues.apache.org/jira/browse/OPENEJB-1130)

There are two workarounds as far as I know:
!) disable workspace resolution (then eclipse will use the maven dependency, not the open
project) - but I miss this feature too much
2) rename the application-client.xml of the project that is being depended on to something
else eg: application-client.xml~ - but renaming to and fro gets annoying after a short while.

Suggestions:
1) maybe this exception should be caught and only print a warning, or
2) allow this with a configuration option


==
Apache OpenEJB 3.1.3-SNAPSHOT    build: 20100923-06:56
http://openejb.apache.org/
INFO - openejb.home = /stf/prj/DDS/trunk/dds-ejb
INFO - openejb.base = /stf/prj/DDS/trunk/dds-ejb
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 PersistenceModule in classpath: /stf/prj/DDS/trunk/dds-jpa/target/classes
INFO - Found ClientModule in classpath: /stf/prj/email-service/target/test-classes
INFO - Found EjbModule in classpath: /stf/prj/DDS/trunk/dds-ejb/target/classes
INFO - Found ClientModule in classpath: /stf/prj/DDS/trunk/dds-ejb/target/test-classes
INFO - Found EjbModule in classpath: /stf/prj/email-service/target/classes
INFO - Beginning load: /stf/prj/DDS/trunk/dds-jpa/target/classes
INFO - Beginning load: /stf/prj/email-service/target/test-classes
INFO - Beginning load: /stf/prj/DDS/trunk/dds-ejb/target/classes
INFO - Beginning load: /stf/prj/DDS/trunk/dds-ejb/target/test-classes
INFO - Beginning load: /stf/prj/email-service/target/classes
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 DdsEmailSender: Container(type=STATELESS, id=Default
Stateless Container)
INFO - Configuring PersistenceUnit(name=DDS, provider=org.hibernate.ejb.HibernatePersistence)
INFO - Configuring Service(id=Default JDBC Database, type=Resource, provider-id=Default JDBC
Database)
INFO - Auto-creating a Resource with id 'Default JDBC Database' of type 'DataSource for 'DDS'.
INFO - Configuring Service(id=Default Unmanaged JDBC Database, type=Resource, provider-id=Default
Unmanaged JDBC Database)
INFO - Auto-creating a Resource with id 'Default Unmanaged JDBC Database' of type 'DataSource
for 'DDS'.
INFO - Adjusting PersistenceUnit DDS <jta-data-source> to Resource ID 'Default JDBC
Database' from 'jdbc/dds'
INFO - Adjusting PersistenceUnit DDS <non-jta-data-source> to Resource ID 'Default Unmanaged
JDBC Database' from 'null'
INFO - Configuring PersistenceUnit(name=AddressBook, provider=org.hibernate.ejb.HibernatePersistence)
INFO - Adjusting PersistenceUnit AddressBook <jta-data-source> to Resource ID 'Default
JDBC Database' from 'jdbc/addressbook'
INFO - Adjusting PersistenceUnit AddressBook <non-jta-data-source> to Resource ID 'Default
Unmanaged JDBC Database' from 'null'
INFO - Enterprise application "classpath.ear" loaded.
INFO - Assembling app: classpath.ear
INFO - PersistenceUnit(name=DDS, provider=org.hibernate.ejb.HibernatePersistence)
ERROR - Unsuccessful: alter table DDS_EMAIL_STATUS_LOG add constraint FKB7F2A8E6BAAD6FBB foreign
key (DDS_EMAIL_STATUS_ID) references DDS_EMAIL_STATUS
ERROR - Column types do not match in statement [alter table DDS_EMAIL_STATUS_LOG add constraint
FKB7F2A8E6BAAD6FBB foreign key (DDS_EMAIL_STATUS_ID) references DDS_EMAIL_STATUS]
INFO - PersistenceUnit(name=AddressBook, provider=org.hibernate.ejb.HibernatePersistence)
ERROR - Unsuccessful: alter table DDS_EMAIL_STATUS_LOG add constraint FKB7F2A8E6BAAD6FBB foreign
key (DDS_EMAIL_STATUS_ID) references DDS_EMAIL_STATUS
ERROR - Column types do not match in statement [alter table DDS_EMAIL_STATUS_LOG add constraint
FKB7F2A8E6BAAD6FBB foreign key (DDS_EMAIL_STATUS_ID) references DDS_EMAIL_STATUS]
INFO - Jndi(name=DdsEmailSenderLocal) --> Ejb(deployment-id=DdsEmailSender)
INFO - Jndi(name=DdsEmailSenderRemote) --> Ejb(deployment-id=DdsEmailSender)
INFO - Jndi(name=DdsUtilLocal) --> Ejb(deployment-id=DdsUtil)
INFO - Jndi(name=AddressBookUtilLocal) --> Ejb(deployment-id=AddressBookUtil)
INFO - Jndi(name=EmailSenderLocal) --> Ejb(deployment-id=EmailSender)
INFO - Jndi(name=EmailSenderRemote) --> Ejb(deployment-id=EmailSender)
INFO - Created Ejb(deployment-id=DdsUtil, ejb-name=DdsUtil, container=Default Stateless Container)
INFO - Created Ejb(deployment-id=DdsEmailSender, ejb-name=DdsEmailSender, container=Default
Stateless Container)
INFO - Created Ejb(deployment-id=AddressBookUtil, ejb-name=AddressBookUtil, container=Default
Stateless Container)
INFO - Created Ejb(deployment-id=EmailSender, ejb-name=EmailSender, container=Default Stateless
Container)
INFO - LocalClient(class=za.co.enerweb.emailservice.integration_tests.ITSendEmail, module=test-classes)

INFO - LocalClient(class=za.co.enerweb.emailservice.TestBasicEmail, module=test-classes) 
INFO - LocalClient(class=za.co.enerweb.emailservice.TestEmailRecipients, module=test-classes)

INFO - LocalClient(class=za.co.enerweb.emailservice.TestEmailBodyContentAndAttachments, module=test-classes)

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/test-classes/comp/env,
component=env}
	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:674)
	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(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	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(NamingManager.java:667)
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
	at javax.naming.InitialContext.init(InitialContext.java:223)
	at javax.naming.InitialContext.<init>(InitialContext.java:197)
	at za.co.enerweb.toolbox.openejb.AbstractOpenEjbTest.inject(AbstractOpenEjbTest.java:49)
	at za.co.enerweb.toolbox.openejb.AbstractOpenEjbTest.injectContext(AbstractOpenEjbTest.java:34)
	at za.co.enerweb.toolbox.openejb.AbstractOpenEjbTest.<init>(AbstractOpenEjbTest.java:23)
	at za.co.enerweb.emailservice.AbstractSendEmailTest.<init>(AbstractSendEmailTest.java:23)
	at za.co.enerweb.dds.ejb.DdsEmailSenderEjbTest.<init>(DdsEmailSenderEjbTest.java:34)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:202)
	at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:251)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:248)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
	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/test-classes/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:625)
	... 46 more
INFO - Initializing network services
INFO - Initializing network services
  ** Starting Services **
  NAME                 IP              PORT  
  httpejbd             127.0.0.1       4204  
  admin thread         127.0.0.1       4200  
  ejbd                 127.0.0.1       4201  
  ejbd                 127.0.0.1       4203  
-------
Ready!


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message