Sorry for the delay. I faced other issues in my application
here is the trace:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl
at
org.apache.axis2.saaj.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:109)
at
org.skalena.corporativo.AdviceAxiomClient.createSOAPRequest(AdviceAxiomClient.java:117)
at
org.skalena.corporativo.AdviceAxiomClient.callSoapWebService(AdviceAxiomClient.java:77)
at org.skalena.corporativo.AdviceAxiomClient.main(AdviceAxiomClient.java:56)
Caused by: java.lang.ClassNotFoundException:
org.apache.axiom.soap.impl.dom.SOAPFaultNodeImpl
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 4 more
my pom.xml dependencies:
<dependencies>
<dependency>
<groupId>org.apache.synapse</groupId>
<artifactId>synapse-commons</artifactId>
<version>2.1.2-wso2v4</version>
</dependency>
<dependency>
<groupId>org.apache.synapse</groupId>
<artifactId>synapse-core</artifactId>
<version>2.1.3-wso2v11</version>
</dependency>
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>1.2.22</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-impl</artifactId>
<version>1.2.22</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-dom</artifactId>
<version>1.2.22</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
<version>1.7.9</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
<version>1.6.4</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-local</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-base</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom</artifactId>
<version>1.2.22</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.neethi</groupId>
<artifactId>neethi</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20140107</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.4</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>7.2.2.jre8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.10</version>
</dependency>
<dependency>
<groupId>org.unbescape</groupId>
<artifactId>unbescape</artifactId>
<version>1.0</version>
</dependency>
I wonder if any of the other dependencies is interfering with axis dom lib
Em sex., 26 de jun. de 2020 às 22:42, Érico <[email protected]> escreveu:
> Hello
> Please I would like to run samples with the following pom.xml content:
>
> <dependency>
> <groupId>org.apache.ws.commons.axiom</groupId>
> <artifactId>axiom-api</artifactId>
> <version>1.2.22</version>
> </dependency>
>
> <dependency>
> <groupId>org.apache.ws.commons.axiom</groupId>
> <artifactId>axiom-impl</artifactId>
> <version>1.2.22</version>
> <scope>runtime</scope>
> </dependency>
>
> <dependency>
> <groupId>org.apache.ws.commons.axiom</groupId>
> <artifactId>axiom-dom</artifactId>
> <version>1.2.22</version>
> <scope>runtime</scope>
> </dependency>
>
> I'm facing this issue when running my project:
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl
> ...
> Caused by: java.lang.ClassNotFoundException:
> org.apache.axiom.soap.impl.dom.SOAPFaultNodeImpl
>
> I've tested my maven project code in IntelliJ and VS Code and got the
> error in both.
>
> I've also added the jars manually in IntelliJ creating a library (named
> lib-axiom) through File->Project Structure->Libraries. And adding the new
> library to the project module.
>
> In this case from above, for a simple java project it works, but in a
> Maven one it doesn't.
>
> My IntelliJ maven project has a .classpath file. Would the lack of record
> in it regarding the libs the issue ?
>
> Also, in IntelliJ my iml file (from maven project) has the following
> content:
> <orderEntry type="library" scope="RUNTIME" name="Maven:
> org.apache.ws.commons.axiom:axiom-impl:1.2.22" level="project" />
> <orderEntry type="library" scope="RUNTIME" name="Maven:
> org.apache.ws.commons.axiom:axiom-dom:1.2.22" level="project" />
>
> and:
> <orderEntry type="library" name="lib-axiom" level="project" />
>
> Would there be a way to set the libs in classpath through pom.xml ?
>
> I'm sorry for the beginner question but I would really like to learn axiom
> framework.
>
> Thks in Advance
>