Websphere Application classloader plays by different rules depending on the 
enforced policy of the Application Classloader
http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Fcrun_classload.html

Application CL
Here is a snippet from the documentation on Application Classloaders:
Application class loaders load EJB modules,
dependency JAR files, embedded resource adapters, and application-scoped
shared libraries. Depending on the application class-loader policy,
an application class loader can be shared by multiple applications
(Single) or unique for each application (Multiple). The application
class-loader policy controls the isolation of applications that are
running in the system. 
When set to Single,
applications are not isolated. 
When set to Multiple,
applications are isolated from each other.

WAR CL:
By default, Web module class loaders load the
contents of the WEB-INF/classes and WEB-INF/lib directories.

The application class loader is the parent of the Web module class
loader. 
You can change the default behavior by changing the Web application
archive (WAR) class-loader policy of the application.  The WAR
class-loader policy controls the isolation of Web modules. 
If this
policy is set to Application, then the Web
module contents also are loaded by the application class loader (in
addition to the EJB files, RAR files, dependency JAR files, and shared
libraries). 
If the policy is set to Module,
then each Web module receives its own class loader whose parent is
the application class loader.
  Tip: The console and
the underlying deployment.xml file use different
names for WAR class-loader policy values.
In the console, the WAR
class-loader policy values are Application or Module.
However, in the underlying deployment.xml file
where the policy is set, the WAR class-loader policy values are
Single instead
of Application, 
or Multiple instead
of Module. 
Application is
the same as Single, 
and Module is
the same as Multiple.

from what you describe you want your webapps to be isolated (Axis2 from Axis2) 
so I would recommend implementing Module and or Multiple policy(ies)
Martin Gainty 
______________________________________________ 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


From: a.hao...@nouvellemarque.com
To: java-dev@axis.apache.org
Subject: [axis2] Mix up Axis2 & Axis1 jars in web application 
(java.lang.InstantiationError occured) ?
Date: Tue, 21 Aug 2012 12:19:59 +0200

Hi, I am told to try integrating a ADB client Stub (generated with Axis2 
version 1.6.1) into a web application (installed on WebSphere 7) wich already 
contains in its classpath the jars of Axis1 version 1.4. The reason is that we 
are having problems generating a Axis1 web service client from the WSDL of a 
new Axis2 web service (we have to edit the WSDL in a file to make it compatible 
and the code generated is not satisfying).  I integrated the Axis2 jars and 
stub in the web application and I am having this error on runtime : 
java.lang.reflect.InvocationTargetException                at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)   
             at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
                at java.lang.reflect.Method.invoke(Method.java:611)             
   at 
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)   
             at 
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186) 
               at 
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)       
         ... 34 moreCaused by: java.lang.InstantiationError: 
org.apache.axis2.databinding.ADBDataSource                at 
com.nm.bdl.webservices.ged.client.GetGedFileStub$GetFile.getOMElement(GetGedFileStub.java:2305)
  The stub method getOMElement code sample :public 
org.apache.axiom.om.OMElement getOMElement ( final javax.xml.namespace.QName 
parentQName, final org.apache.axiom.om.OMFactory factory) throws 
org.apache.axis2.databinding.ADBException{ org.apache.axiom.om.OMDataSource 
dataSource = new 
org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME);return 
factory.createOMElement(dataSource,MY_QNAME);} Is “mixing up” Axis2 and Axis1 
jars in the classpath can’t work ?  Alaeddine HAOUAS
+33(4) 95 04 32 49
a.hao...@nouvellemarque.com

Nouvelle MARQUE
13 rue Sénac de Meilhan
13001 MARSEILLE
http://www.nouvelle-marque.com                                            

Reply via email to