tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: NameAlreadyBoundException When Running From JUnit
Date Wed, 13 Jan 2010 23:23:57 GMT

On Aug 10, 2009, at 7:57 PM, pbuchheit wrote:

>
> We have an existing application deployed to a JBoss server. I'm  
> trying to use
> Openejb 3.1.1 to do unit testing on a stateless session bean that  
> contains
> our services. I added code to my unit test to initialize the context  
> as
> shown in the examples, but whenever I try to run the JUnit test I  
> get the
> following console output:
>
> Apache OpenEJB 3.1.1    build: 20090530-06:18
> http://openejb.apache.org/
> INFO - openejb.home = my eclipse workspace path/myApp
> INFO - openejb.base = my eclipse workspace path/myApp
> 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:
> /usr/local/dst/jboss/4.2.2.GA/server/lib/jboss-remoting.jar
> INFO - Found ClientModule in classpath:
> /usr/local/dst/jboss/4.2.2.GA/server/lib/jboss-cache-jdk50.jar
> INFO - Found ClientModule in classpath:
> /usr/local/dst/jboss/4.2.2.GA/server/esb/deploy/jbossesb.sar/lib/ 
> milyn-smooks-ejc-1.2.1.jar
> INFO - Found ClientModule in classpath:
> /home/pbuchheit/workspace.galileo/insight-lib/jbossesb-rosetta.jar
> INFO - Found ClientModule in classpath:
> /usr/local/dst/jboss/4.2.2.GA/server/lib/javassist.jar
> INFO - Found ClientModule in classpath:
[...]
> Caused by: javax.naming.NameAlreadyBoundException
> 	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: 
> 111)
> 	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: 
> 300)

Follow up on some developments here.  This problem should no longer  
show up when using the default settings (no includes/excludes  
manipulation required).  If you want to give it a try, here are the  
new snapshots:

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

And the JIRA in question if you are curious:

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

Would love to get some thumbs up from any willing testers.

-David


Mime
View raw message