"[EMAIL PROTECTED]" wrote : there is nothing wrong with Seam or Embedded here,
just the way Maven sets up the classpath when running tests.
Aha!
The problem then appears to be with the thirdparty-all-beta*.jar file as it
contains a separate copy of javassist.
Adding an exclusion for javassist to jboss-seam and hibernate-entitymanager in
the Ejb's POM as follows:
<dependency>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-seam</artifactId>
| <exclusions>
| <exclusion>
| <groupId>jboss</groupId>
| <artifactId>javassist</artifactId>
| </exclusion>
| </exclusions>
| </dependency>
| ...
| <dependency>
| <groupId>org.hibernate</groupId>
| <artifactId>hibernate-entitymanager</artifactId>
| <exclusions>
| <exclusion>
| <groupId>jboss</groupId>
| <artifactId>javassist</artifactId>
| </exclusion>
| </exclusions>
| </dependency>
causes the tests to now fail with:
ERROR [AbstractKernelController] Error installing to Start: name=java:comp
state=Create
| javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an application
resource file: java.naming.factory.initial
| at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
| at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
| at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at
org.jboss.naming.JavaCompInitializer.start(JavaCompInitializer.java:83)
So it appears the dependencies need to be properly and fully speced out in the
appropriate poms.
The use of these "*-all-*.jar" files appear the be the culprit.
Namely:
hibernate-all-*.jar
| jboss-embedded-all-*.jar
| thirdparty-all-*.jar
|
| These are not very useful in their current form for Maven.
|
| Unless someone knows of a way to exclude certain dependencies in the test
scope within maven? (I can't see a way)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116610#4116610
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116610
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user