Seam Solder classloading issue on JBoss6
jonne.deprez Jun 1, 2011 9:05 AMHi,
I encountered a weird issue when deploying one of the modules of our project on a JBossAS6-Final after I had just added Seam 3 as a dependency to the Maven POM file.
There seems to be a conflict between Seam Solder and the JODReports library, that itself depends on jython and freemarker. The deployment fails with a NoClassDefFoundError caused by a missing class org.python.core.PyException. In an attempt to solve this I explicitly added jython 2.2 as a dependency to the pom, but the deployment now fails with a NoClassDefFoundError caused by freemarker.ext.jdom.NodeListModel$AttributeXMLOutputter. This is strange, because this class is clearly part of the deployed package. Somehow, just adding Seam Solder to the project prevents a class on the classpath from being loaded. In the maven tree no conflicts are visible.
I have stripped down the module to the simplest pom file that can still reproduce the issue. Can someone explain me what's happening and - if possible - how I can find a workaround? It is currently blocking us from using Seam 3. To reproduce the error I deployed a package that was built with the following pom.xml and contained a single EJB with a local interface and nothing more than a doNothing() method.
Thanks in advance.
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>eu.eee.synaptiq</groupId> <artifactId>seam-solder-compatibility</artifactId> <name>Seam solder compatibility check</name> <version>0.1</version> <packaging>jar</packaging> <properties> <jdk.source>1.6</jdk.source> <jdk.target>1.6</jdk.target> </properties> <repositories> <repository> <id>repository.jboss.org</id> <name>JBoss Repository</name> <url>http://repository.jboss.org/nexus/content/groups/public-jboss</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <build> <finalName> ${project.artifactId}-${project.version} </finalName> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>${jdk.source}</source> <target>${jdk.target}</target> <encoding>utf-8</encoding> <debug>${jdk.debug}</debug> <optimize>${jdk.optimize}</optimize> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>1.4</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <filters> <filter> <artifact>eu.eee.synaptiq:seam-solder-compatibility</artifact> <excludes> <exclude>META-INF/ejb-jar.xml</exclude> <exclude>META-INF/beans.xml</exclude> </excludes> </filter> </filters> <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>component</shadedClassifierName> </configuration> </execution> </executions> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>org.jboss.ejb3</groupId> <artifactId>jboss-ejb3-api</artifactId> <scope>provided</scope> <version>3.1.0</version> </dependency> <dependency> <groupId>org.jboss.seam.solder</groupId> <artifactId>seam-solder</artifactId> <version>3.0.0.Final</version> </dependency> <dependency> <groupId>net.sf.jodreports</groupId> <artifactId>jodreports</artifactId> <version>2.4.0</version> </dependency> <dependency> <groupId>com.artofsolving</groupId> <artifactId>jodconverter</artifactId> <version>2.2.1</version> </dependency> <dependency> <groupId>org.python</groupId> <artifactId>jython</artifactId> <version>2.2</version> </dependency> </dependencies> </project>