Tuscany-generated WAR should not package runtime jars under WEB-INF/lib
-----------------------------------------------------------------------

         Key: TUSCANY-261
         URL: http://issues.apache.org/jira/browse/TUSCANY-261
     Project: Tuscany
        Type: Bug

  Components: Java Samples BigBank  
    Reporter: Raymond Feng
    Priority: Critical


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>
 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to