Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
Java-M1
-
None
Description
Three jars (axiom-api, stax-api and wstx-asl) are packaged by the account-SNAPSHOT.war under WEB-INF/lib. Since the by default the Tomcat web application classloader uses parent-last classloading policy (delegate=false), it creates different instances of classes/interfaces from the jars in the application context and confuses the Tucany and Axis2 runtime which in turn throws ClassCastException.
Here's the patch:
Index: C:/Tuscany/Apache/java/samples/bigbank/account/pom.xml
===================================================================
— C:/Tuscany/Apache/java/samples/bigbank/account/pom.xml (revision 399340)
+++ C:/Tuscany/Apache/java/samples/bigbank/account/pom.xml (working copy)
@@ -57,21 +57,21 @@
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>1.0</version>
- <scope>compile</scope>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>woodstox</groupId>
<artifactId>wstx-asl</artifactId>
<version>2.8.2</version>
- <scope>runtime</scope>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>ws-commons</groupId>
<artifactId>axiom-api</artifactId>
<version>0.95</version>
- <scope>compile</scope>
+ <scope>provided</scope>
</dependency>
</dependencies>