To avoiding having all the Tuscany dependend jars in
the samples, 
already included in TC common/lib ,  from being
included again in the 
samples war's WEB-INF\lib can be accomplished if the
scope of the 
dependency in the sample's pom is changed from
'compile' to 'provided'.
Patch for the
java/samples/helloworld/helloworldws/pom.xml included.




rick rineholt wrote:

>I'm seeing a class cast exception in 
>GeneratedPackageDescriptorImpl.getEPackage() on the
>line:
> ePackage = (EPackage) eInstance.get(null);
>
>The reason I've concluded is that many of the EMF
jars
>are needed in 
>TC's common\lib
>and they also seem to be in the samples war's
>WEB-INF\lib and resulting 
>in some classes being loaded by TC's
>StandardClassLoader and instances 
>also loaded by TC's webapp classloader.  But then
>they're not the same 
>class and results in a classcast exception.
>Locally I've eliminated the ones in the sample's war
>and the exception 
>went away. I guess this can work now as a solution if
>maven can be 
>coerced not to package them.  But in the long run I
>think webapps need 
>to be able to have their version's of these jars.
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam
protection around 
>http://mail.yahoo.com 
>
>
>  
>



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Index: java/samples/helloworld/helloworldws/pom.xml
===================================================================
--- java/samples/helloworld/helloworldws/pom.xml        (revision 376053)
+++ java/samples/helloworld/helloworldws/pom.xml        (working copy)
@@ -32,19 +32,19 @@
             <groupId>org.apache.tuscany</groupId>
             <artifactId>tuscany-core</artifactId>
             <version>${pom.version}</version>
-            <scope>compile</scope>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.tuscany</groupId>
             <artifactId>tuscany-container-java</artifactId>
             <version>${pom.version}</version>
-            <scope>compile</scope>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.tuscany</groupId>
             <artifactId>tuscany-binding-axis</artifactId>
             <version>${pom.version}</version>
-            <scope>compile</scope>
+            <scope>provided</scope>
         </dependency>
     </dependencies>
 </project>

--------------060607050202010408030307--

Reply via email to