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 Alex Dovlecel <do...@kbs.twi.tudelft.nl> on 2002/12/02 15:58:57 UTC
Axis classloader
Hello all,
Does Axis implements its own classloader, or uses the classloader from the
Servlet Container (for example, tomcat)?
BEcause of the weird problem that I have loading some files from the jar.
Problem description: I have an config.xml file placed in the root of the jar.
The jar contains the service (Deploy the service by copying the jar in
axis\WEB-INF\lib and execute the AdminClient). When the service main class is
loaded I want to read the config.xml file. But the getResourceAsStream( )
returns NULL !!! (resource not found).
I made a simple main method to check the config.xml file from jar. And when
running the main method (java -cp myjar.jar test.MainClass) it finds the
file!!! So there must be a strange thing going on with the ClassLoader.
I use tomcat 4.1.12 and axis 1.0 final release. (not nightly builds or cvs
versions).
PLEASE SOMEBODY TELL ME WHAT IS WRONG OR WHY CAN'T I GET THE config.xml file.
Tx
dovle
Re: SoapMonitor Service
Posted by Sherif Abushadi <ap...@amgando.org>.
Shriram,
try using tcpmon.
it's easy to setup and i think the only difference in the use of tcpmon vs.
SOAPMonitor is that tcpmon must be run locally. you can still monitor
remote services and clients if you have access to the Call object's endpoint
setting in the client code. take a look at the Axis User Guide and try it if
you haven't already.
tcpmon receives the http request, including soap message, of course, since
the Listen Port # is that of your endpoint. this is when you see the
incoming soap request. so i guess it's the same view of the message as
SOAPMonitor except you have the added benefit / distraction of a few
characters of http header.
tcpmon then forwards the request to the service whose location is specified
as Target Hostname and Target Port # under Act as a ... Listener. the
service then replies to tcpmon and this is where you see the response,
including http header and soap message, before forwarding the response to
the client.
good luck.
sherif
----- Original Message -----
From: "Shriram Kollipara" <Sh...@motorola.com>
To: <ax...@xml.apache.org>
Sent: Tuesday, December 03, 2002 10:29 AM
Subject: SoapMonitor Service
> Hi,
>
> After digging throught the archives I found a post from Dennis
> Sosnoski which explained how to run the soapmonitor service. I performed
> all the steps mentioned at this URL:
>
> http://www.sosnoski.com/presents/java-xml/axis/axis-monitor.html
>
> I am still not able to see any soap messages. The only thing the applet
> performs is, it shutsdown when i stop and restart my container. I am
> trying to find if anyone got this working. Any replies would be of great
> help in continuing my work.
>
> Thanks for the help in advance.
>
> shri
>
Re: SoapMonitor Service
Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Hi Shri,
It sounds like you have the applet itself working okay. I've sometimes
seen problems with the applet not able to connect to the server (you get
a message in red on the applet when this occurs, I think). Aside from
that I'd suggest you double check your configuration. If you look at the
server-config.wsdd file inside your servlet's axis/WEB-INF directory you
can make sure that the service you're trying to monitor has been
deployed with requestFlow and responseFlow definitions including the
soapmonitor handler (as shown on the page you referenced). This sounds
like the most likely cause of your problems - if you don't see these
flows defined for the service, you'll need to undeploy and redeploy that
service to get the flows set up using soapmonitor.
- Dennis
Shriram Kollipara wrote:
>Hi,
>
> After digging throught the archives I found a post from Dennis
>Sosnoski which explained how to run the soapmonitor service. I performed
>all the steps mentioned at this URL:
>
>http://www.sosnoski.com/presents/java-xml/axis/axis-monitor.html
>
>I am still not able to see any soap messages. The only thing the applet
>performs is, it shutsdown when i stop and restart my container. I am
>trying to find if anyone got this working. Any replies would be of great
>help in continuing my work.
>
>Thanks for the help in advance.
>
>shri
>
>
>
SoapMonitor Service
Posted by Shriram Kollipara <Sh...@motorola.com>.
Hi,
After digging throught the archives I found a post from Dennis
Sosnoski which explained how to run the soapmonitor service. I performed
all the steps mentioned at this URL:
http://www.sosnoski.com/presents/java-xml/axis/axis-monitor.html
I am still not able to see any soap messages. The only thing the applet
performs is, it shutsdown when i stop and restart my container. I am
trying to find if anyone got this working. Any replies would be of great
help in continuing my work.
Thanks for the help in advance.
shri
Re: Axis classloader
Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Alex Dovlecel" <do...@kbs.twi.tudelft.nl>
To: <ax...@xml.apache.org>
Sent: Monday, December 02, 2002 12:53
Subject: Re: Axis classloader
> Don't understand.
> The servlet container is Tomcat 4.1.12. I have the axis deployed in
> <tomcat>/webapps/axis.
>
> I deploy the service as a jar: myserv.jar . and place it in the
> axis/WEB-INF/lib.
>
> The web service works OK. Axis can load the classes and service from my
jar
> file. But the files from the jar cannot get hold of the config.xml. So
tomcat
> is able to serve the classes to axis, but it seems not to see the
> resources???
>
> I don't know what to do anymore!!!!!!
1. restart, if you havent already
2. getResourceAsStream( ) is funny wrt the / char, I think some ways to get
resources you have to put the leading /, some ways you dont. And you have to
do it from a class that has the resources in the same classloader or higher.
Re: Axis classloader
Posted by Alex Dovlecel <do...@kbs.twi.tudelft.nl>.
Don't understand.
The servlet container is Tomcat 4.1.12. I have the axis deployed in
<tomcat>/webapps/axis.
I deploy the service as a jar: myserv.jar . and place it in the
axis/WEB-INF/lib.
The web service works OK. Axis can load the classes and service from my jar
file. But the files from the jar cannot get hold of the config.xml. So tomcat
is able to serve the classes to axis, but it seems not to see the
resources???
I don't know what to do anymore!!!!!!
Have any clue ?
dovle
>
> > Hello all,
> >
> > Does Axis implements its own classloader, or uses the classloader from
> > the Servlet Container (for example, tomcat)?
>
> the container's
>
> > Problem description: I have an config.xml file placed in the root of the
>
> jar.
>
> > The jar contains the service (Deploy the service by copying the jar in
> > axis\WEB-INF\lib and execute the AdminClient). When the service main
> > class
>
> is
>
> > loaded I want to read the config.xml file. But the getResourceAsStream( )
> > returns NULL !!! (resource not found).
>
> does your container auto-add new JARs to the classpath?
Re: Axis classloader
Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Alex Dovlecel" <do...@kbs.twi.tudelft.nl>
To: <ax...@xml.apache.org>
Sent: Monday, December 02, 2002 06:58
Subject: Axis classloader
> Hello all,
>
> Does Axis implements its own classloader, or uses the classloader from the
> Servlet Container (for example, tomcat)?
the container's
> Problem description: I have an config.xml file placed in the root of the
jar.
> The jar contains the service (Deploy the service by copying the jar in
> axis\WEB-INF\lib and execute the AdminClient). When the service main class
is
> loaded I want to read the config.xml file. But the getResourceAsStream( )
> returns NULL !!! (resource not found).
does your container auto-add new JARs to the classpath?