axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Frommherz" <Markus.Frommh...@wdr.de>
Subject Antw: RE: Packaging Axis into an EAR file
Date Fri, 13 Dec 2002 11:06:53 GMT
If you use jdk 1.4 their might be a problem with loading javax.* classes. 
May be you have to put them in a common dir of you server, or in the jre/lib/endorsed dir.

Just a thought.


>>> mike@slac.com 13.12.2002  10.43 Uhr >>>

I use Axis as both a client and server.

As a web service engine, I use Axis to basically map a web service to a
stateless session bean.  This is where the Axis WAR has to be able to
access the EJB.  If this is all I wanted to do, everything would be
fine... because that more or less works.

However, I also have a message-driven bean ( however, this could just be a
regular 'ol java file if ya wanted ) that needs a reference to a Call
objet so that it can invoke a remote web service.  So, this bean needs to
be able to get to the Call class in the axis.jar.   So, my original
thought was to move all the AXIS jars from the AXIS War's WEB-INF/lib
directory to the root level EAR.  Then I added to the manifest file of my
EJB a referene to axis.jar and jaxrpc.jar.  I also added references to
these files in my application.xml.  Now, if I were to get rid of the AXIS
WAR altogether, this would work fine.  However, I need the AXIS WAR for
the first reason I just mentioned... using Axis as a web service engine
mapping a web service to a stateless session bean.  Specifically, I guess
I need that web.xml file in the WAR that maps to the appropriate URL to
the endpoint Axis servlet.

In any case, once I have this situation... that's where I get the
following error:
<Dec 12, 2002 5:22:11 PM EST> <Error> <HTTP>
<[WebAppServletContext(2018366,axis
 ,/axis)] Error loading servlet: "AdminServlet"
 java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:120)
         at
 org.apache.axis.transport.http.AxisServletBase.class$(AxisServletBase
 .java:87)
         at
 org.apache.axis.transport.http.AxisServletBase.<clinit>(AxisServletBa
 se.java:94)
         at java.lang.Class.newInstance0(Native Method)
         at java.lang.Class.newInstance(Class.java:237)
         at
 weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
 pl.java:690)
       ...


javax.xml.soap.SOAPException is in the saaj.jar file.  That file is there
in the root level of my EAR file, but no matter how I try to reference it
(EAR manifest, WAR manifest, etc.)... nothings working.
But notice that it IS getting to the AxisServlet class in axis.jar.  So,
from one I can gather, it must be using some classloader specific to just
the axis.jar whose only parent classloader is the system classpath one.
Though I know how Class-Path entries work in manifest files for EJBs and
WAR files... I'm not sure if I know how or if they work in normal JAR
files. Cause, I'm thinking what I need here... is the ability to tell
axis.jar where the saaj.jar is.  I've tried just doing the obvious and
putting it in the Class-Path entry of the manifest file of axis.jar but
that's not working.  Maybe because it's more complicated than just putting
'saaj.jar' right there.  Maybe, I have to actually mess with the code and
somehow give it a more useful classloader... I don't know....

Any thoughts???



On Fri, 13 Dec 2002, Yates, Danny (ANTS) wrote:

> Hi Michael,
>
> May I ask why the EJBs need to see Axis? We use Axis in WLS6.1sp4
> with no problems, but we use it to provide a simple facade to a
> Stateless Session Bean. That is, we expose our business methods
> from the bean and have a thing POJO which Axis calls. This POJO
> is responsible for understanding the SOAP call (specifically,
> dealing with attachments if there are any) and then looking up
> the bean in JNDI and passing the call on.
>
> Regards,
>
> Dan.
>
> --
> Danny Yates
> Technical Architect
> Abbey National Treasury Services
> E-mail: Danny.Yates@ants.co.uk 
> Phone: +44 20 7756 5012
> Fax: +44 20 7612 4342
>
>
> -----Original Message-----
> From: Michael Hudson [mailto:mike@slac.com] 
> Sent: 12 December 2002 22:54
> To: axis-user@xml.apache.org 
> Subject: Packaging Axis into an EAR file
>
>
>
> I'm using Weblogic 6.1sp4, and Axis 1.0
>
> I can package Axis as a WAR file inside of my EAR file, and because of the
> Weblogic classloader hierarchy, I don't have to do anything else for Axis
> to see my EJBs in my EAR to act on them.
>
> However, if my EJBs want to use Axis... the only solution I have found
> that works is to put Axis in my system classpath before starting Weblogic.
>
> I did try to put all the Axis jars into the root level of my EAR file, and
> then add those jars to the manifest file of the EJB that needed to use
> Axis.  That seemed to work... until Weblogic then tried to deploy my Axis
> WAR.  Regardless of whether I actually had the Axis JARs in my Axis WAR's
> WEB-INF/lib directory or not, I would get the following:
>
> <Dec 12, 2002 5:22:11 PM EST> <Error> <HTTP>
> <[WebAppServletContext(2018366,axis
> ,/axis)] Error loading servlet: "AdminServlet"
> java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:120)
>         at
> org.apache.axis.transport.http.AxisServletBase.class$(AxisServletBase
> .java:87)
>         at
> org.apache.axis.transport.http.AxisServletBase.<clinit>(AxisServletBa
> se.java:94)
>         at java.lang.Class.newInstance0(Native Method)
>         at java.lang.Class.newInstance(Class.java:237)
>         at
> weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
> pl.java:690)
> 	...
>
> No matter what I do... put stuff in the EAR's manifest or the WAR's
> manifest or whatever... it doesn't seem to work.  Essentially, it does
> seem to be finding axis.jar, but it doesn't seem to be finding saaj.jar.
> You'd think BECAUSE of the classloader hierarchy in Weblogic, that it
> should see saaj.jar in the root EAR.  However, if I leave that in the root
> EAR, but go ahead and put a copy of saaj.jar in AXIS WAR's WEB-INF/lib
> directory, it still doesn't see it.  That doesn't make sense, because, if
> I get rid of the copy in the root EAR, it works again.
>
> I assume this has something to do with the servlet obtaining the
> appropriate classpathloader.  But I have no idea how to fix it?
>
> Any ideas?  Does anybody else have to do what I'm doing?  How has
> everybody else packaged Axis inside of a WAR inside of an EAR, so that
> Axis can see the EJBs, and the EJBs can see Axis???
>
> Thanks,
>
> ============================================================================
> ==
> Michael J. Hudson    |                               |        mike@slac.com 
>
>                 "Search for the perfect church, if you will;
>  		       when you find it, join it, and
>        realize that on that day it becomes something less than perfect."
>  -Rev. Andrew Greeley responding to the moral crisis in the Catholic church.
>
>                      |                               |
> ============================================================================
> ==
>
>
> ***************************************************************************
> This communication (including any attachments) contains confidential information.  If
you are not the intended recipient and you have received this communication in error, you
should destroy it without copying, disclosing or otherwise using its contents.  Please notify
the sender immediately of the error.
>
> Internet communications are not necessarily secure and may be intercepted or changed
after they are sent.  Abbey National Treasury Services plc does not accept liability for any
loss you may suffer as a result of interception or any liability for such changes.  If you
wish to confirm the origin or content of this communication, please contact the sender by
using an alternative means of communication.
>
> This communication does not create or modify any contract and, unless otherwise stated,
is not intended to be contractually binding.
>
> Abbey National Treasury Services plc. Registered Office:  Abbey National House, 2 Triton
Square, Regents Place, London NW1 3AN.  Registered in England under Company Registration Number:
2338548.  Regulated by the Financial Services Authority (FSA).
> ***************************************************************************
>

==============================================================================
Michael J. Hudson    |                               |        mike@slac.com 

                "Search for the perfect church, if you will;
 		       when you find it, join it, and
       realize that on that day it becomes something less than perfect."
 -Rev. Andrew Greeley responding to the moral crisis in the Catholic church.

                     |                               |
==============================================================================


Mime
View raw message