You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Hundtofte, Rex A" <re...@eds.com> on 2009/01/14 06:42:59 UTC

Axis2 consumer within Axis2 provider classpath issue

I am getting a NoClassDefFoundError when my Axis2 consumer code is
executed inside of an Axis2 provided web service.  I have an aar file
deployed to my web server, the consumer code and generated client stub
classes are in separate jar files under the WEB-INF/lib directory.  The
incoming request processes fine but apparently the classloader that
needs to load the consumer Axis2 classes cannot find the Axis2 classes.
I appreciate any tips on how I might resolve this issue?

Thanks,
Rex Hundtofte


Re: Axis2 consumer within Axis2 provider classpath issue

Posted by Amila Suriarachchi <am...@gmail.com>.
On Wed, Jan 14, 2009 at 3:10 PM, Paul French <pa...@kirona.com> wrote:

>  Apologies for jumping in on this thread but I too would be very
> interested in the recommended way to provide an AXIS2 web service which may
> contain AXIS2 client stubs to other web services.
>

Then the best way is to put them to  WEB-INF/lib folder

>
> I believe I read some where that you need to use the same
> ConfigurationContext for both? This would only make sense to me if you plan
> to provide the same handlers and modules for both.
>

> For example I have a web service client stub that works great (as a jar
> file) - the axis2.xml file is in the classpath
>
> I have an AXIS2 web service which works great where the axis2.xml file is
> in the WEB-INF directory. (axis2 included as part of the web application)
>
> How would you combine the two?
>

Do you want to use the client code inside your service?
Then either you can use the ConfigurationContext object which server use or
can create a new one using ConfigurationContextFactory method. In this case
using fileSystem.

thanks,
Amila.

>
>  ------------------------------
> *From:* Hundtofte, Rex A [mailto:rex.hundtofte@eds.com]
> *Sent:* 14 January 2009 05:43
> *To:* axis-user@ws.apache.org
> *Subject:* Axis2 consumer within Axis2 provider classpath issue
>
>  I am getting a NoClassDefFoundError when my Axis2 consumer code is
> executed inside of an Axis2 provided web service.  I have an aar file
> deployed to my web server, the consumer code and generated client stub
> classes are in separate jar files under the WEB-INF/lib directory.  The
> incoming request processes fine but apparently the classloader that needs to
> load the consumer Axis2 classes cannot find the Axis2 classes.  I appreciate
> any tips on how I might resolve this issue?
>
> Thanks,
> Rex Hundtofte
>
>
> __________ NOD32 3763 (20090113) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

RE: Axis2 consumer within Axis2 provider classpath issue

Posted by Paul French <pa...@kirona.com>.
Bump? Anyone??

  _____  

From: Paul French [mailto:paul.french@kirona.com] 
Sent: 05 February 2009 10:25
To: axis-user@ws.apache.org
Subject: RE: Axis2 consumer within Axis2 provider classpath issue


Any chance someone could give some insight into this thread?
 
I've created a web client project (project A), to use this project you need
to specify the respository location and axis2.xml file location since if you
need to add modules/handlers you can.
 
Hence somewhere on the file system I have the following setup
 
respository/axis2.xml
respository/modules/myLoggingModule.mar
 
Project A is built into a jar and works perfectly fine standalone.
 
I have a web application (project B) that has an axis2 web service (the
axis2 servlet has been merged into the web application). Hence part of this
web application has the structure
 
WEB-INF/axis2.xml
WEB-INF/services/MyWebService/META-INF/services.xml
WEB-INF/modules/myLoggingModule.mar
 
Now I need to use the the web client (project A) in the web application
(project B). Basically I am struggling to see how to do this? I am now
assuming it is not a good idea to try and share the same AxisConfiguration
like is mentioned in Deepal's book. Any pointers would be appreciated.
 
Paul
 

  _____  

From: Matthias.Gaiser@t-systems.com [mailto:Matthias.Gaiser@t-systems.com] 
Sent: 03 February 2009 08:05
To: axis-user@ws.apache.org
Subject: AW: Axis2 consumer within Axis2 provider classpath issue



Hi group,

 

I am jumping in as well.. I got the same question what the recommended way
is in such a case? I got problems that the handlers were used for my service
and my stub communications which confused me.

 

Any standard ways here?

 

Matthias.

 

Von: Paul French [mailto:paul.french@kirona.com] 
Gesendet: Mittwoch, 14. Januar 2009 10:41
An: axis-user@ws.apache.org
Betreff: RE: Axis2 consumer within Axis2 provider classpath issue

 

Apologies for jumping in on this thread but I too would be very interested
in the recommended way to provide an AXIS2 web service which may contain
AXIS2 client stubs to other web services.

 

I believe I read some where that you need to use the same
ConfigurationContext for both? This would only make sense to me if you plan
to provide the same handlers and modules for both.

 

For example I have a web service client stub that works great (as a jar
file) - the axis2.xml file is in the classpath

 

I have an AXIS2 web service which works great where the axis2.xml file is in
the WEB-INF directory. (axis2 included as part of the web application)

 

How would you combine the two?

 

  _____  

From: Hundtofte, Rex A [mailto:rex.hundtofte@eds.com] 
Sent: 14 January 2009 05:43
To: axis-user@ws.apache.org
Subject: Axis2 consumer within Axis2 provider classpath issue

I am getting a NoClassDefFoundError when my Axis2 consumer code is executed
inside of an Axis2 provided web service.  I have an aar file deployed to my
web server, the consumer code and generated client stub classes are in
separate jar files under the WEB-INF/lib directory.  The incoming request
processes fine but apparently the classloader that needs to load the
consumer Axis2 classes cannot find the Axis2 classes.  I appreciate any tips
on how I might resolve this issue?

Thanks, 
Rex Hundtofte 



__________ NOD32 3763 (20090113) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com



__________ NOD32 3820 (20090203) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


__________ NOD32 3828 (20090205) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


RE: Axis2 consumer within Axis2 provider classpath issue

Posted by Paul French <pa...@kirona.com>.
Any chance someone could give some insight into this thread?
 
I've created a web client project (project A), to use this project you need
to specify the respository location and axis2.xml file location since if you
need to add modules/handlers you can.
 
Hence somewhere on the file system I have the following setup
 
respository/axis2.xml
respository/modules/myLoggingModule.mar
 
Project A is built into a jar and works perfectly fine standalone.
 
I have a web application (project B) that has an axis2 web service (the
axis2 servlet has been merged into the web application). Hence part of this
web application has the structure
 
WEB-INF/axis2.xml
WEB-INF/services/MyWebService/META-INF/services.xml
WEB-INF/modules/myLoggingModule.mar
 
Now I need to use the the web client (project A) in the web application
(project B). Basically I am struggling to see how to do this? I am now
assuming it is not a good idea to try and share the same AxisConfiguration
like is mentioned in Deepal's book. Any pointers would be appreciated.
 
Paul
 

  _____  

From: Matthias.Gaiser@t-systems.com [mailto:Matthias.Gaiser@t-systems.com] 
Sent: 03 February 2009 08:05
To: axis-user@ws.apache.org
Subject: AW: Axis2 consumer within Axis2 provider classpath issue



Hi group,

 

I am jumping in as well.. I got the same question what the recommended way
is in such a case? I got problems that the handlers were used for my service
and my stub communications which confused me.

 

Any standard ways here?

 

Matthias.

 

Von: Paul French [mailto:paul.french@kirona.com] 
Gesendet: Mittwoch, 14. Januar 2009 10:41
An: axis-user@ws.apache.org
Betreff: RE: Axis2 consumer within Axis2 provider classpath issue

 

Apologies for jumping in on this thread but I too would be very interested
in the recommended way to provide an AXIS2 web service which may contain
AXIS2 client stubs to other web services.

 

I believe I read some where that you need to use the same
ConfigurationContext for both? This would only make sense to me if you plan
to provide the same handlers and modules for both.

 

For example I have a web service client stub that works great (as a jar
file) - the axis2.xml file is in the classpath

 

I have an AXIS2 web service which works great where the axis2.xml file is in
the WEB-INF directory. (axis2 included as part of the web application)

 

How would you combine the two?

 

  _____  

From: Hundtofte, Rex A [mailto:rex.hundtofte@eds.com] 
Sent: 14 January 2009 05:43
To: axis-user@ws.apache.org
Subject: Axis2 consumer within Axis2 provider classpath issue

I am getting a NoClassDefFoundError when my Axis2 consumer code is executed
inside of an Axis2 provided web service.  I have an aar file deployed to my
web server, the consumer code and generated client stub classes are in
separate jar files under the WEB-INF/lib directory.  The incoming request
processes fine but apparently the classloader that needs to load the
consumer Axis2 classes cannot find the Axis2 classes.  I appreciate any tips
on how I might resolve this issue?

Thanks, 
Rex Hundtofte 



__________ NOD32 3763 (20090113) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com



__________ NOD32 3820 (20090203) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


AW: Axis2 consumer within Axis2 provider classpath issue

Posted by Ma...@t-systems.com.
Hi group,

 

I am jumping in as well.. I got the same question what the recommended
way is in such a case? I got problems that the handlers were used for my
service and my stub communications which confused me.

 

Any standard ways here?

 

Matthias.

 

Von: Paul French [mailto:paul.french@kirona.com] 
Gesendet: Mittwoch, 14. Januar 2009 10:41
An: axis-user@ws.apache.org
Betreff: RE: Axis2 consumer within Axis2 provider classpath issue

 

Apologies for jumping in on this thread but I too would be very
interested in the recommended way to provide an AXIS2 web service which
may contain AXIS2 client stubs to other web services.

 

I believe I read some where that you need to use the same
ConfigurationContext for both? This would only make sense to me if you
plan to provide the same handlers and modules for both.

 

For example I have a web service client stub that works great (as a jar
file) - the axis2.xml file is in the classpath

 

I have an AXIS2 web service which works great where the axis2.xml file
is in the WEB-INF directory. (axis2 included as part of the web
application)

 

How would you combine the two?

 

________________________________

From: Hundtofte, Rex A [mailto:rex.hundtofte@eds.com] 
Sent: 14 January 2009 05:43
To: axis-user@ws.apache.org
Subject: Axis2 consumer within Axis2 provider classpath issue

I am getting a NoClassDefFoundError when my Axis2 consumer code is
executed inside of an Axis2 provided web service.  I have an aar file
deployed to my web server, the consumer code and generated client stub
classes are in separate jar files under the WEB-INF/lib directory.  The
incoming request processes fine but apparently the classloader that
needs to load the consumer Axis2 classes cannot find the Axis2 classes.
I appreciate any tips on how I might resolve this issue?

Thanks, 
Rex Hundtofte 



__________ NOD32 3763 (20090113) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


RE: Axis2 consumer within Axis2 provider classpath issue

Posted by Paul French <pa...@kirona.com>.
Apologies for jumping in on this thread but I too would be very interested
in the recommended way to provide an AXIS2 web service which may contain
AXIS2 client stubs to other web services.
 
I believe I read some where that you need to use the same
ConfigurationContext for both? This would only make sense to me if you plan
to provide the same handlers and modules for both.
 
For example I have a web service client stub that works great (as a jar
file) - the axis2.xml file is in the classpath
 
I have an AXIS2 web service which works great where the axis2.xml file is in
the WEB-INF directory. (axis2 included as part of the web application)
 
How would you combine the two?

  _____  

From: Hundtofte, Rex A [mailto:rex.hundtofte@eds.com] 
Sent: 14 January 2009 05:43
To: axis-user@ws.apache.org
Subject: Axis2 consumer within Axis2 provider classpath issue



I am getting a NoClassDefFoundError when my Axis2 consumer code is executed
inside of an Axis2 provided web service.  I have an aar file deployed to my
web server, the consumer code and generated client stub classes are in
separate jar files under the WEB-INF/lib directory.  The incoming request
processes fine but apparently the classloader that needs to load the
consumer Axis2 classes cannot find the Axis2 classes.  I appreciate any tips
on how I might resolve this issue?

Thanks, 
Rex Hundtofte 



__________ NOD32 3763 (20090113) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


Re: Axis2 consumer within Axis2 provider classpath issue

Posted by Amila Suriarachchi <am...@gmail.com>.
On Wed, Jan 14, 2009 at 11:12 AM, Hundtofte, Rex A <re...@eds.com>wrote:

>  I am getting a NoClassDefFoundError when my Axis2 consumer code is
> executed inside of an Axis2 provided web service.  I have an aar file
> deployed to my web server, the consumer code and generated client stub
> classes are in separate jar files under the WEB-INF/lib directory.  The
> incoming request processes fine but apparently the classloader that needs to
> load the consumer Axis2 classes cannot find the Axis2 classes.  I appreciate
> any tips on how I might resolve this issue?
>
This should work. So first check whether your server has any cached old
instances of your web app. Secondly put your classes and lib files in the
.aar file.

i.e
.aar
   <class files>
   lib
      <lib files>

thanks,
Amila.

> Thanks,
> Rex Hundtofte
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/