axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <>
Subject RE: [axis2] Mix up Axis2 & Axis1 jars in web application (java.lang.InstantiationError occured) ?
Date Tue, 21 Aug 2012 12:35:33 GMT

Websphere Application classloader plays by different rules depending on the enforced policy
of the Application Classloader

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.

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
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
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.

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(      
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
               at java.lang.reflect.Method.invoke(                at
               ... 34 moreCaused by: java.lang.InstantiationError: org.apache.axis2.databinding.ADBDataSource
               at com.nm.bdl.webservices.ged.client.GetGedFileStub$GetFile.getOMElement(
 The stub method getOMElement code sample :public getOMElement
( final javax.xml.namespace.QName parentQName, final factory)
throws org.apache.axis2.databinding.ADBException{ 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

Nouvelle MARQUE
13 rue Sénac de Meilhan
13001 MARSEILLE   		 	   		  
View raw message