1 Reply Latest reply on Oct 17, 2013 9:03 PM by Freeman(Yue) Fang

    ClassNotFoundException: org.w3c.dom.Element

    Joaquin Ponte Newbie

      Hello everybody. I am using JBoss Fuse 6.0 and we created an application with drools, milyn, sooks, camel and cfx. When we deploy our app in a fabric cluster (3 registries + 5 containers) we get the next error:

       

      Caused by: java.lang.ClassNotFoundException: org.w3c.dom.Element not found by XXXXXXXXXXXXXX [268]

      at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]

      at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]

      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]

      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.7.0_25]

      ... 28 more

       

      We deployed as a bundle in a profile with the next parent profiles:

      -camel

      -camel-jms

      -cxf

      -mq

       

      Our pom.xml is:

      <?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>xxxxxxxxx</groupId>

      <artifactId>yyyyyyyy</artifactId>

      <packaging>bundle</packaging>

      <version>1.x.x.x</version>

      <description>AAAAAAA</description>

      <name>BBBBBB</name>

       

      <properties>

      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

      <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

       

      <camel.version>2.10.0.redhat-60024</camel.version>

      <amq.version>5.8.0.redhat-60024</amq.version>

      <milyn.version>1.5.1</milyn.version>

      <drools.version>5.5.0.Final</drools.version>

      <cxf.version>2.6.0.redhat-60024</cxf.version>

      <jettison.version>1.2</jettison.version>

      <jackson.version>1.9.10</jackson.version>

      <maya.model.version>0.0.1-SNAPSHOT</maya.model.version>

      <slf4j.version>1.6.1</slf4j.version>

      <log4j.version>1.2.16</log4j.version>

      <apache.commons.net.version>3.2</apache.commons.net.version>

      <springframework.version>3.1.3.RELEASE</springframework.version>

      <servicemix.specs.jsr311.version>2.0.0.redhat-60024</servicemix.specs.jsr311.version>

      <jsr311.version>1.1.1</jsr311.version>

      <xml-apis.version>1.4.01</xml-apis.version>

       

      </properties>

       

      <repositories>

      <repository>

      <id>fusesource</id>

      <name>FuseSource Release Repository</name>

      <url>http://repo.fusesource.com/nexus/content/groups/public/</url>

      <snapshots>

      <enabled>false</enabled>

      </snapshots>

      <releases>

      <enabled>true</enabled>

      </releases>

      </repository>

      <repository>

      <id>fusesource.ea</id>

      <name>FuseSource Community Early Access Release Repository</name>

      <url>http://repo.fusesource.com/nexus/content/groups/ea</url>

      <snapshots>

      <enabled>false</enabled>

      </snapshots>

      <releases>

      <enabled>true</enabled>

      </releases>

      </repository>

      <repository>

      <id>jboss-public-repository-group</id>

      <name>JBoss Public Repository Group</name>

      <url>http://repository.jboss.org/nexus/content/groups/public/</url>

      <layout>default</layout>

      <releases>

      <enabled>true</enabled>

      <updatePolicy>never</updatePolicy>

      </releases>

      <snapshots>

      <enabled>true</enabled>

      <updatePolicy>daily</updatePolicy>

      </snapshots>

      </repository>

      </repositories>

       

      <pluginRepositories>

      <pluginRepository>

      <id>fusesource</id>

      <name>FuseSource Release Repository</name>

      <url>http://repo.fusesource.com/nexus/content/groups/public/</url>

      <snapshots>

      <enabled>false</enabled>

      </snapshots>

      <releases>

      <enabled>true</enabled>

      </releases>

      </pluginRepository>

      <pluginRepository>

      <id>fusesource.ea</id>

      <name>FuseSource Community Early Access Release Repository</name>

      <url>http://repo.fusesource.com/nexus/content/groups/ea</url>

      <snapshots>

      <enabled>false</enabled>

      </snapshots>

      <releases>

      <enabled>true</enabled>

      </releases>

      </pluginRepository>

      </pluginRepositories>

       

      <dependencies>

       

      <!-- a-mq -->

      <dependency>

      <groupId>org.apache.activemq</groupId>

      <artifactId>activemq-camel</artifactId>

      <version>${amq.version}</version>

      </dependency>

       

      <!-- Spring Framework -->

      <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-core</artifactId>

      <version>${springframework.version}</version>

      </dependency>

      <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-beans</artifactId>

      <version>${springframework.version}</version>

      </dependency>

      <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-context</artifactId>

      <version>${springframework.version}</version>

      </dependency>

       

      <!-- Camel -->

      <dependency>

      <groupId>org.apache.camel</groupId>

      <artifactId>camel-core</artifactId>

      <version>${camel.version}</version>

      </dependency>

      <dependency>

      <groupId>org.apache.camel</groupId>

      <artifactId>camel-jms</artifactId>

      <version>${camel.version}</version>

      </dependency>

      <dependency>

      <groupId>org.apache.camel</groupId>

      <artifactId>camel-jaxb</artifactId>

      <version>${camel.version}</version>

      <scope>provided</scope>

      </dependency>

      <dependency>

      <groupId>org.apache.camel</groupId>

      <artifactId>camel-xstream</artifactId>

      <version>${camel.version}</version>

      <scope>provided</scope>

      </dependency>

      <dependency>

      <groupId>org.apache.camel</groupId>

      <artifactId>camel-cxf</artifactId>

      <version>${camel.version}</version>

      <!-- scope>provided</scope -->

      <exclusions>

      <exclusion>

      <groupId>javax.ws.rs</groupId>

      <artifactId>jsr311-api</artifactId>

      </exclusion>

      </exclusions>

      </dependency>

       

      <!-- cxf -->

      <dependency>

      <groupId>org.apache.cxf</groupId>

      <artifactId>cxf-bundle-jaxrs</artifactId>

      <version>${cxf.version}</version>

      <scope>provided</scope>

      <exclusions>

      <exclusion>

      <artifactId>xml-apis</artifactId>

      <groupId>xml-apis</groupId>

      </exclusion>

      <exclusion>

      <artifactId>xercesImpl</artifactId>

      <groupId>xerces</groupId>

      </exclusion>

      <exclusion>

      <artifactId>xmlbeans</artifactId>

      <groupId>org.apache.xmlbeans</groupId>

      </exclusion>

      <exclusion>

      <artifactId>xmlParserAPIs</artifactId>

      <groupId>xerces</groupId>

      </exclusion>

      <exclusion>

      <groupId>javax.ws.rs</groupId>

      <artifactId>jsr311-api</artifactId>

      </exclusion>

      </exclusions>

      </dependency>

      <dependency>

      <groupId>org.apache.cxf</groupId>

      <artifactId>cxf-rt-frontend-jaxws</artifactId>

      <version>${cxf.version}</version>

      <scope>provided</scope>

      </dependency>

      <dependency>

      <groupId>org.apache.cxf</groupId>

      <artifactId>cxf-rt-transports-http</artifactId>

      <version>${cxf.version}</version>

      <scope>provided</scope>

      </dependency>

       

      <!-- Drools -->

      <dependency>

      <groupId>org.drools</groupId>

      <artifactId>drools-core</artifactId>

      <version>${drools.version}</version>

      </dependency>

      <dependency>

      <groupId>org.drools</groupId>

      <artifactId>drools-spring</artifactId>

      <version>${drools.version}</version>

      <exclusions>

      <exclusion>

      <artifactId>spring-core</artifactId>

      <groupId>org.springframework</groupId>

      </exclusion>

      <exclusion>

      <artifactId>spring-beans</artifactId>

      <groupId>org.springframework</groupId>

      </exclusion>

      <exclusion>

      <artifactId>spring-context</artifactId>

      <groupId>org.springframework</groupId>

      </exclusion>

      </exclusions>

      </dependency>

      <dependency>

      <groupId>org.drools</groupId>

      <artifactId>drools-camel</artifactId>

      <version>${drools.version}</version>

      <exclusions>

      <exclusion>

      <artifactId>camel-cxf</artifactId>

      <groupId>org.apache.camel</groupId>

      </exclusion>

      <exclusion>

      <artifactId>spring-core</artifactId>

      <groupId>org.springframework</groupId>

      </exclusion>

      <exclusion>

      <artifactId>spring-aop</artifactId>

      <groupId>org.springframework</groupId>

      </exclusion>

      <exclusion>

      <artifactId>cxf-rt-frontend-jaxws</artifactId>

      <groupId>org.apache.cxf</groupId>

      </exclusion>

      <exclusion>

      <artifactId>cxf-bundle-jaxrs</artifactId>

      <groupId>org.apache.cxf</groupId>

      </exclusion>

      <exclusion>

      <artifactId>org.apache.camel</artifactId>

      <groupId>camel-test</groupId>

      </exclusion>

      </exclusions>

      </dependency>

       

      <!-- apache commons net -->

      <dependency>

      <groupId>commons-net</groupId>

      <artifactId>commons-net</artifactId>

      <version>${apache.commons.net.version}</version>

      </dependency>

       

      <!-- jettison -->

      <dependency>

      <groupId>org.codehaus.jettison</groupId>

      <artifactId>jettison</artifactId>

      <version>${jettison.version}</version>

      </dependency>

       

      <!-- jackson -->

      <dependency>

      <groupId>org.codehaus.jackson</groupId>

      <artifactId>jackson-core-asl</artifactId>

      <version>${jackson.version}</version>

      </dependency>

      <dependency>

      <groupId>org.codehaus.jackson</groupId>

      <artifactId>jackson-mapper-asl</artifactId>

      <version>${jackson.version}</version>

      </dependency>

      <dependency>

      <groupId>org.codehaus.jackson</groupId>

      <artifactId>jackson-jaxrs</artifactId>

      <version>${jackson.version}</version>

      </dependency>

       

      <!-- jsr311 -->

      <!-- dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId>

      <version>${jsr311.version}</version> <scope>provided</scope> </dependency -->

      <dependency>

      <groupId>org.apache.servicemix.specs</groupId>

      <artifactId>org.apache.servicemix.specs.jsr311-api-1.0</artifactId>

      <version>${servicemix.specs.jsr311.version}</version>

      </dependency>

       

      <!-- milyn -->

      <dependency>

      <groupId>org.milyn</groupId>

      <artifactId>milyn-smooks-javabean</artifactId>

      <version>${milyn.version}</version>

      <exclusions>

      <exclusion>

      <artifactId>xml-apis</artifactId>

      <groupId>xml-apis</groupId>

      </exclusion>

      <exclusion>

      <artifactId>xercesImpl</artifactId>

      <groupId>xerces</groupId>

      </exclusion>

      <exclusion>

      <artifactId>xmlbeans</artifactId>

      <groupId>org.apache.xmlbeans</groupId>

      </exclusion>

      <exclusion>

      <artifactId>xmlParserAPIs</artifactId>

      <groupId>xerces</groupId>

      </exclusion>

      <exclusion>

      <groupId>javax.ws.rs</groupId>

      <artifactId>jsr311-api</artifactId>

      </exclusion>

      </exclusions>

      </dependency>

       

      <!-- slf4j -->

      <dependency>

      <groupId>org.slf4j</groupId>

      <artifactId>slf4j-api</artifactId>

      <version>${slf4j.version}</version>

      </dependency>

      <dependency>

      <groupId>org.slf4j</groupId>

      <artifactId>slf4j-log4j12</artifactId>

      <version>${slf4j.version}</version>

      </dependency>

      <dependency>

      <groupId>org.slf4j</groupId>

      <artifactId>jcl-over-slf4j</artifactId>

      <version>${slf4j.version}</version>

      <scope>provided</scope>

      </dependency>

       

      <!-- log4j -->

      <dependency>

      <groupId>log4j</groupId>

      <artifactId>log4j</artifactId>

      <version>${log4j.version}</version>

      </dependency>

       

      <!-- testing -->

      <dependency>

      <groupId>org.apache.camel</groupId>

      <artifactId>camel-test-spring</artifactId>

      <version>${camel.version}</version>

      <scope>test</scope>

      </dependency>

      <dependency>

      <groupId>org.apache.camel</groupId>

      <artifactId>camel-test</artifactId>

      <version>${camel.version}</version>

      <scope>test</scope>

      </dependency>

       

      </dependencies>

       

      <build>

      <defaultGoal>install</defaultGoal>

       

      <resources>

      <resource>

      <directory>${project.basedir}/src/main/resources</directory>

      <filtering>true</filtering>

      </resource>

      </resources>

       

      <plugins>

      <plugin>

      <groupId>org.apache.maven.plugins</groupId>

      <artifactId>maven-compiler-plugin</artifactId>

      <version>2.3.2</version>

      <configuration>

      <source>1.6</source>

      <target>1.6</target>

      </configuration>

      </plugin>

       

      <plugin>

      <groupId>org.apache.maven.plugins</groupId>

      <artifactId>maven-resources-plugin</artifactId>

      <version>2.6</version>

      </plugin>

       

      <plugin>

      <groupId>org.apache.felix</groupId>

      <artifactId>maven-bundle-plugin</artifactId>

      <version>2.3.4</version>

      <extensions>true</extensions>

      <configuration>

      <instructions>

      <Import-Package>*;resolution:=optional</Import-Package>

      <Embed-Dependency>*;scope=compile;artifactId=!slf4j*|spring*|camel*|commons-logging*</Embed-Dependency>

      <Embed-Transitive>true</Embed-Transitive>

      <_exportcontents>org.drools.*,org.jbpm.*,org.mvel2.*</_exportcontents>

      </instructions>

      </configuration>

      </plugin>

       

      <plugin>

      <groupId>org.codehaus.mojo</groupId>

      <artifactId>build-helper-maven-plugin</artifactId>

      <version>1.7</version>

      <executions>

      <execution>

      <id>attach-artifacts</id>

      <phase>package</phase>

      <goals>

      <goal>attach-artifact</goal>

      </goals>

      <configuration>

      <artifacts>

      <artifact>

      <file>${project.build.outputDirectory}/META-INF/feature/features.xml</file>

      <type>xml</type>

      <classifier>features</classifier>

      </artifact>

      </artifacts>

      </configuration>

      </execution>

      </executions>

      </plugin>

       

      <!-- allows the route to be ran via 'mvn camel:run' -->

      <plugin>

      <groupId>org.apache.camel</groupId>

      <artifactId>camel-maven-plugin</artifactId>

      <version>${camel.version}</version>

      </plugin>

      </plugins>

      </build>

      </project>

       

      Thanks in advance,

      Joaquin