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 "PARLEY,THUNDER (HP-MountainView,ex1)" <th...@hp.com> on 2003/10/30 00:35:28 UTC

Web Service Class Loading + Variables

Hi List,

I'm curious what variables are thread safe when my class (*Impl) is loaded.
More specifically, is my *Impl class loaded for every call? If I have static
class variables, are these not thread safe when Axis processes concurrent
calls to the service? If not, should I be using instance variables, or are
these not safe either? I want variables that are intialized once but
available to any of the publically exposed methods. Where should
initilization of variables be done then? In a constructor, a static block or
does it not matter?

Thanks!

Thunder



-----Original Message-----
From: Wilson, Allen [mailto:Allen.Wilson@marcresearch.com]
Sent: Tuesday, October 28, 2003 1:55 PM
To: axis-user@ws.apache.org
Subject: RE: AdminClient


Thunder and to anyone else that has sent me a reply....first let me say
that I appreciate the help that everyone is trying to provide and I
hoped I have not ticked anyone off with my stupidity (to and beyond this
point)...

And believe me if you are in the Dallas area and have provided
help...once I get this going I owe you a beer (or my favorite a Crown
Royal and coke)...

But on to the second thing....I tried the command you specified and this
is what happened...
java -classpath $AXISCLASSPATH org.apache.axis.client.AdminClient
deploy.wsdd
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/axis/client/AdminClient

But when I check the path..that class is in the path and it is also in
the axis.jar in the lib directory

Allen

-----Original Message-----
From: PARLEY,THUNDER (HP-MountainView,ex1) [mailto:thunder@hp.com] 
Sent: Tuesday, October 28, 2003 3:50 PM
To: 'axis-user@ws.apache.org'
Subject: RE: AdminClient


Allen,

java -classpath $AXISCLASSPATH org.apache.axis.client.AdminClient
<your.wsdd>

Make sure you have proper permissions to access the axis jars.

This assumes you are deploying to
http://localhost:8080/axis/servlet/AxisServlet

If you are not deploying to the local machine, you need to use the -l
option
and change the default server-config.wsdd which is in the axis jar under
org/apache/axis/server/server-config.wsdd

Personally, I just "jar xvf" extract this file and place it in the
WEB-INF
of my app then modify it here if needed (AdminClient will also modify
this
file). This allows me to configure remote admin, etc. for each web app.

HTH

--Thunder



-----Original Message-----
From: Wilson, Allen [mailto:Allen.Wilson@marcresearch.com]
Sent: Tuesday, October 28, 2003 1:22 PM
To: axis-user@ws.apache.org; mikeklein@ieee.org
Subject: RE: AdminClient


Here's the information that is in my paths:

AXIS_HOME=/opt/WWW/tomcat-4.1.18/webapps/axis
export AXIS_HOME

AXIS_LIB=$AXIS_HOME/lib
export AXIS_LIB

AXISCLASSPATH=/opt/WWW/tomcat-4.1.18/webapps/axis/WEB-INF/classes:$AXIS_
LIB/axis.jar:$AXIS_LIB/commons-discovery.jar:$AXIS_LIB/commons-logging.j
ar:$AXIS_LIB/jaxrpc.jar:$AXIS_LIB/saaj.jar:$AXIS_LIB/log4j-1.2.8.jar:$AX
IS_LIB/xml-apis.jar:
$AXIS_LIB/xercesImpl.jar:/opt/WWW/tomcat-4.1.18/webapps/axis/WEB-INF/cla
sses:
export AXISCLASSPATH

This corresponds exactly to what I have set up. About the
monitor....when I compiled the class I shut the server down and then
restarted it.

On the libraries...I understand that I was just trying other locations
due to me get the ClassDefNotFound error. I have been following the
instructions as they are outlined but I am still have the problems. My
next step was to update my java to 1.4 but I wanted to make sure that it
could not be anything else...

(thanks for the all aboard comment....that was great)...

Allen

-----Original Message-----
From: Mike Klein [mailto:mikeklein@sbcglobal.net] 
Sent: Tuesday, October 28, 2003 2:58 PM
To: axis-user@ws.apache.org
Subject: Re: AdminClient


Bvvvvhhhhh! All aboard...

You must have deployed at least once via AdminClient or ant task to see 
a server-config.wsdd.

Was Tomcat running when you started the SOAPMonitor applet?

Your classpath is $#@cked up. Check each entry for path validity.

Axis libraries are delivered in a jar, put it in the right place...this 
isn't a classes directory...but a lib directory. I have nothing axis 
related in my common/lib or common/classes...my axis/WEB-INF/classes 
only has the samples code.

Follow the install instructions to the letter...they work.


Wilson, Allen wrote:

>I guess I am just missing the boat because I yet the find the
>server-config.wsdd file in the WEB-INF directory. I have the
>SOAPMonitorApplet running (I used the command javac -classpath
>WEB-INF/lib/axis.jar SOAPMonitorApplet.java) but when it starts it says
>that the Monitor is unable to communicate with the server.
>
>When I try to run the AdminClient (I was in the samples/stock directory
>and ran the command java org.apache.axis.utils.admin server
deploy.wdd).
>I get the error
>
>	Exception in thread "main" java.lang.NoClassDefFoundError:
>org/apache/axis/utils/admin
>
>I have tried moving the samples directory around to were is is above,
on
>and below the level of the webapps directory to no avail. I have the
>variables of AXIS_HOME, AXIS_LIB, and AXISCLASSPATH set. I have also
>tried using the command java -cp $AXISCLASSPATH
>org.apache.axis.client.AdminClient
>-lhttp://address/axis/services/AdminService deploy.wsdd  and got a
>similar error to the one above (the only difference being the path).
>
>I have org.apache.axis in the following place
>/tomcat4.1.18/common/classes and
>/tomcat-4.1.18/webapps/axis/WEB-INF/classes
>
>Is there something I am doing wrong....
>
>Allen
>
>
>-----Original Message-----
>From: Mike Klein [mailto:mikeklein@sbcglobal.net] 
>Sent: Tuesday, October 28, 2003 2:01 PM
>To: axis-user@ws.apache.org
>Subject: Re: AdminClient
>
>
>As is mentioned in the docs, the server-config.wsdd is created as soon 
>as you do your first deployment thru AdminClient.
>
>Use AdminClient to deploy the SOAPMonitor and then add SOAPMonitor 
>configuration xml to global configuration of server-config.wsdd...on a 
>dev't system it seems normal to want to monitor all of soap traffic 
>iniitially and not per web service.
>
>Seeing that servlets generally only have the doGet and doPost 
>methods...not sure what kind of web service this will provide you. With

>JWS you're supposed to take simple classes with user-callable functions

>in them (like echoString, etc.) and deploy them...not servlets.
>
>
>mike
>
>Wilson, Allen wrote:
>
>  
>
>>Okay there must be something I am doing wrong then...let me provide my
>>setup
>>
>>I am running Tomcat 4.1.18 w/Java 1.3.1 and I took the axis directory
>>and placed it into my webapps directory. The axis page came up with
the
>>links to the happyaxis.jsp page and other links. When I took a servlet
>>and change the extension to jws, it show the xml correctly. Now I am
>>trying to see how I can create more complex services and how to hit
>>    
>>
>them
>  
>
>>with another servlet.
>>
>>That lead me to trying to find the AdminClient...
>>
>>Is this the correct way (on by the way I have yet to find a
>>server-config.wsdd file anywhere in the axis path).
>>
>>Thanks...for any help
>>
>>-----Original Message-----
>>From: Sabyasachi.Gupta@us.hsbc.Com
>>    
>>
>[mailto:Sabyasachi.Gupta@us.hsbc.Com]
>  
>
>>Sent: Tuesday, October 28, 2003 1:26 PM
>>To: axis-user@ws.apache.org
>>Subject: RE: AdminClient
>>
>>
>>
>>Either way.  You need to then copy the server-config.wsdd file this
>>generates into WEB-INF
>>(In case you are using tomcat.)
>>
>>
>>
>>
>>
>>"Wilson, Allen" <Al...@marcresearch.com> on 28 Oct 2003 14:16
>>
>>Please respond to axis-user@ws.apache.org
>>
>>
>>
>>To:    <ax...@ws.apache.org>
>>Subject:    RE: AdminClient
>>
>>
>>Do you have to be in the directory of the wsdd of can you fully
qualify
>>the path
>>
>>-----Original Message-----
>>From: Sabyasachi.Gupta@us.hsbc.Com
>>    
>>
>[mailto:Sabyasachi.Gupta@us.hsbc.Com]
>  
>
>>Sent: Monday, October 27, 2003 5:17 PM
>>To: axis-user@ws.apache.org
>>Subject: Re: AdminClient
>>
>>
>>
>>
>>The command is
>>
>>java org.apache.axis.utils.admin server  yourfile.wsdd
>>
>>where yourfile.wsdd is your WSDD file.
>>
>>You need to have all the Axis jar files and xml parsers in your
>>classpath
>>before you execute that command.
>>
>>
>>
>>
>>
>>
>>"Wilson, Allen" <Al...@marcresearch.com> on 27 Oct 2003 17:41
>>
>>Please respond to axis-user@ws.apache.org
>>
>>
>>
>>To:    <ax...@ws.apache.org>
>>Subject:    AdminClient
>>
>>
>>**********************************************************************
*
>>    
>>
>*
>  
>
>>****
>>
>>This message originated from the Internet.  Its originator may or
>>may not be who they claim to be and the information contained in
>>the message and any attachments may or may not be accurate.
>>**********************************************************************
*
>>    
>>
>*
>  
>
>>****
>>
>>
>>I've looked there and it does not really point out anything definite.
>>
>>Thanks for help though.....
>>
>>
>>-----Original Message-----
>>From: Mees [mailto:horizons_nt@yahoo.com]
>>Sent: Monday, October 27, 2003 4:22 PM
>>To: axis-user@ws.apache.org
>>Subject: Re: AdminClient
>>
>>I would try looking at this site, is a real help :D
>>http://ws.apache.org/axis/java/install.html
>>--- "Wilson, Allen" <Al...@marcresearch.com>
>>wrote:
>> 
>>
>>    
>>
>>>Hello...
>>>
>>>I am new to Axis and was wonder how do I start up
>>>the Admin Client. I've
>>>found the AdminClient class but I am not sure where
>>>to put it so it can
>>>be used?
>>>
>>>Allen
>>>
>>>   
>>>
>>>      
>>>
>>>>This message may contain proprietary or
>>>>     
>>>>
>>>>        
>>>>
>>confidential
>> 
>>
>>    
>>
>>>company information.
>>>Any unauthorized use or disclosure is prohibited.
>>>
>>>   
>>>
>>>
>>>      
>>>
>>This message may contain proprietary or confidential company
>>information.
>>Any unauthorized use or disclosure is prohibited.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>**********************************************************************
*
>>    
>>
>*
>  
>
>>This E-mail is confidential. It may also be legally privileged. If you
>>are not the addressee you may not copy, forward, disclose or use any
>>part of it. If you have received this message in error, please delete
>>it and all copies from your system and notify the sender immediately
>>by return E-mail.
>>
>>Internet communications cannot be guaranteed to be timely, secure,
>>error or virus-free. The sender does not accept liability for any
>>errors or omissions.
>>
>>**********************************************************************
*
>>    
>>
>*
>  
>
>>This message may contain proprietary or confidential company
>>information.
>>Any unauthorized use or disclosure is prohibited.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>**********************************************************************
*
>>    
>>
>*
>  
>
>>This E-mail is confidential. It may also be legally privileged. If you
>>are not the addressee you may not copy, forward, disclose or use any
>>part of it. If you have received this message in error, please delete
>>it and all copies from your system and notify the sender immediately
>>by return E-mail.
>>
>>Internet communications cannot be guaranteed to be timely, secure,
>>error or virus-free. The sender does not accept liability for any
>>errors or omissions.
>>**********************************************************************
*
>>    
>>
>*
>  
>
>> 
>>
>>----------------------------------------------------------------------
-
>>    
>>
>-
>  
>
>>This message may contain proprietary or confidential company
>>    
>>
>information.
>  
>
>>Any unauthorized use or disclosure is prohibited.
>>
>> 
>>
>>    
>>
>
>
>  
>
>-----------------------------------------------------------------------
-
>
>This message may contain proprietary or confidential company
information.
>Any unauthorized use or disclosure is prohibited.
>
>  
>