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 Paolo Paganotto <pa...@txt.it> on 2002/10/28 15:58:43 UTC

Axis 1.0 Tomcat 4.1.12 Java 1.4.0_02 Installation tips

Since I've suffered a lot to make things working together, now that I've
succeeded I think that some simple tips will help those (maybe newbie, like
me ;-) ) who found problems in installing Axis by following the installation
instructions provided.
In the subject of this mail are the technologies I have on my machine.

First of all, with THIS releases of the technologies, there is no need to
modify the JAVA_ENDORSED_DIRS entry in the setclasspath.bat file located in
%catalina home%\bin (I don't really know if this is a matter of the early
releases of Tomcat 4.1.x or what else). I read about the need to modify it
(with java 1.4 and some version of Tomcat) but with Tomcat 4.1.12 all that I
got were problems with the server startup process.

Furthermore, there is no need to copy any xml parser into %catalina
home%\webapps\axis\WEB-INF\lib nor elsewhere since Tomcat 4.1.12 has its own
parser and AXIS is able to locate and use it correctly (as you can see in
the installation validation page).

So, all that is necessary to do is:
- to put the webapps/axis directory of the axis distribution into the
webapps directory of Tomcat;
- to provide a CLASSPATH environment variable including:
      every .jar file present into %catalina home%\webapps\axis\WEB-INF\lib,
      the directory of axis (to run the examples) and, last but not least,
      the %catalina home%\common\lib\servlet.jar file

This was all I had to do to make Axis correctly running.

Another thing I noticed is that if you provide some incorrect path in the
CLASSPATH variable, even if you correct it by editing it it is likely that
the new path aren't correctly recognised.
So it is necessary to startup the machine again or to delete and provide the
CLASSPATH variable again. Ignoring this (like me in the past) can make
people waste a lot of time.



Re: Axis 1.0 Tomcat 4.1.12 Java 1.4.0_02 Installation tips

Posted by Paolo Paganotto <pa...@txt.it>.
> > Another thing I noticed is that if you provide some incorrect path in
the
> > CLASSPATH variable, even if you correct it by editing it it is likely
that
> > the new path aren't correctly recognised.
> > So it is necessary to startup the machine again or to delete and provide
> the
> > CLASSPATH variable again. Ignoring this (like me in the past) can make
> > people waste a lot of time.
>
> That's why I dont recommend messing with classpaths. I run java with an
> empty CLASSPATH variable, and my life is better for it.
>
> I recommend you put the jars containing javax.*  code (jax-rpc, saaj,
> xerces) in the CATALINA_HOME/common/lib, where they all get picked up
> properly. The happyaxis.jsp page says exactly the same thing.
>
>
> ==>Ok, thank you. But how can I launch commands such as
java org.apache.axis.wsdl.Java2WSDL -o ...... [classname] without having the
classpath value of [classname] in the CLASSPATH
environment variable?
In other words, I tried to specify the classpath in this way:
java org.apache.axis.wsdl.Java2WSDL -o ......-cp [classpath] [classname]
obtaining an error, since -cp is not this way recognised
as an option of the Java.exe command but instead an
org.apache.axis.wsdl.Java2WSDL incorrect one.
What's wrong in that? How can I avoid to set the classpath environment
variable?
Thank you very much in advance,
:P:



Re: Axis 1.0 Tomcat 4.1.12 Java 1.4.0_02 Installation tips

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Michael Brennen" <mb...@fni.com>
To: <ax...@xml.apache.org>
Sent: Tuesday, October 29, 2002 4:49 PM
Subject: Re: Axis 1.0 Tomcat 4.1.12 Java 1.4.0_02 Installation tips


>
> Thanks much for the reply, a few comments below.
>
> On Tue, 29 Oct 2002, Steve Loughran wrote:
>
> > > Okay, I'm willing to be the idiot that asks the stupid question with
> > > the obvious answer that everyone else knows.  :)  How do you get
> > > things to run with an empty CLASSPATH?  I thought jar files had to
> > > be specifically included in order to make their contents available.
> >
> > well, there are classpaths and then there is the CLASSPATH env
> > variable. Plus there is java/ext, but we wont go there for
> > various reasons to do with serious classpath trouble.
>
> As in specific classpaths on specific command lines?  Mabye the
> obvious is escaping me here as to what else it might be.  That seems
> to be happening a lot now.

well, java/ext loads in a completely tangential classloader, which is why it
is always a support call when someone tries to use it and they dont know
what they are doing. You havent got that far yet -dont.

> We have to run java1.4 for the ssl stuff, and I wante to start with
> the latest version of tomcat 4.1.  Sounds like I picked the right
> combination to guarantee a better learning curve. :)

yup.


> > anything you add to ant_home\lib gets pulled into the classpath of all
ant
> > builds, to axis\java\lib in axis builds. So you can have stuff to hand
> > without editing CLASSPATH.
>
> Any particular recommendations for what needs to go there?  I assume
> that symbolic links are okay, easier to revision as needed.  I'm
> testing the set below now.
>
> activation.jar@  junit.jar@  optional.jar  servlet.jar@     xml-apis.jar
> ant.jar          mail.jar@   README        xercesImpl.jar@

I have servlet.jar in there too, though that could go into axis_home\lib.
mail and activation I have for the <mail> task; NetComponents.jar for ftp
and telnet.

Axis\java\lib has what comes out of CVS, even though log4j1.2.4 is three
releases behind what I actually run with on my webapp; I am not going to
change that until pent up demand motivates me. I also have log4j1.2.7 in
ant_lib; I should pull that so stop version confusion setting in at build
time. Unless you want ants log4j listener, it isnt needed there.

I'm also running the latest and build that spilts optional.jar into umpteen
ant-needs-junit.jar files, but that's a side issue.




Re: Axis 1.0 Tomcat 4.1.12 Java 1.4.0_02 Installation tips

Posted by Michael Brennen <mb...@fni.com>.
Thanks much for the reply, a few comments below.

On Tue, 29 Oct 2002, Steve Loughran wrote:

> > Okay, I'm willing to be the idiot that asks the stupid question with
> > the obvious answer that everyone else knows.  :)  How do you get
> > things to run with an empty CLASSPATH?  I thought jar files had to
> > be specifically included in order to make their contents available.
>
> well, there are classpaths and then there is the CLASSPATH env
> variable. Plus there is java/ext, but we wont go there for
> various reasons to do with serious classpath trouble.

As in specific classpaths on specific command lines?  Mabye the
obvious is escaping me here as to what else it might be.  That seems
to be happening a lot now.

> Adding stuff to CLASSPATH is generally dangerous because
> although it gets into every app, it gets into every app. Which
> stops you versioning things.

Exactly. :)

> > Everywhere I turn with axis/tomcat there are non obvious, non
> > documented CLASSPATH problems that are the cause of most of the
> > problems in what I've done so far.
>
> java1.4 has to take half the blame here -on java1.3 things 'just work' out
> the webapp, but java1.4 tried to "fix something" by only allowing special
> endorsed directories to implement javax.* and java.* classes, as they felt
> we idiot developers didnt know what we were doing. But in doing so they
> broke so many things, and axis on catalina is one of them. At least on some
> versons of catalina

We have to run java1.4 for the ssl stuff, and I wante to start with
the latest version of tomcat 4.1.  Sounds like I picked the right
combination to guarantee a better learning curve. :)

> > For example, I built axis from source last night and found problems
> > there because I did not have servlet.jar included in CLASSPATH when
> > I ran 'ant compile'; the problem only turned up later in run time
> > when the compiled jars blew up with servlet problems.  When I
> > recompiled with servlet.jar available to ant the error disappeared.
> > Is that the right solution?  I don't really know, but looking at the
> > error it seemed to be a thing to try, and somehow it worked.
>
> anything you add to ant_home\lib gets pulled into the classpath of all ant
> builds, to axis\java\lib in axis builds. So you can have stuff to hand
> without editing CLASSPATH.

Any particular recommendations for what needs to go there?  I assume
that symbolic links are okay, easier to revision as needed.  I'm
testing the set below now.

activation.jar@  junit.jar@  optional.jar  servlet.jar@     xml-apis.jar
ant.jar          mail.jar@   README        xercesImpl.jar@


   -- Michael


Re: Axis 1.0 Tomcat 4.1.12 Java 1.4.0_02 Installation tips

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Michael Brennen" <mb...@fni.com>
To: <ax...@xml.apache.org>
Sent: Tuesday, October 29, 2002 12:07 PM
Subject: Re: Axis 1.0 Tomcat 4.1.12 Java 1.4.0_02 Installation tips



>
> Okay, I'm willing to be the idiot that asks the stupid question with
> the obvious answer that everyone else knows.  :)  How do you get
> things to run with an empty CLASSPATH?  I thought jar files had to
> be specifically included in order to make their contents available.

well, there are classpaths and then there is the CLASSPATH env variable.
Plus there is java/ext, but we wont go there for various reasons to do with
serious classpath trouble.

Adding stuff to CLASSPATH is generally dangerous because although it gets
into every app, it gets into every app. Which stops you versioning things.

> There is a hint in happyaxis.jsp that is displayed if there are
> errors.  However, it does not give specific .jar names to move.  If
> jax-rpc and saaj fall in that hinted category, that directly
> conflicts with the axis setup instructions.

we need to fix the install docs. saaj.jar, jaxp,jar are the specials. any
xml parser if you add it. I'd also treat happyaxis.jar as more definative
than the docs, as its the only one that is self testing. Plus I wrote a fair
bit of it :)


> For those of us that don't yet have the detailed knowledge of this
> stuff, we need step by step procedures that work; once that happens
> we'll start to sort it out in the building.  With 26 years writing
> code from micro and mainframe assembler to C to perl to php and now
> java, I don't lack experience, but I do lack specific details in
> this area as it is fairly new to me.

> Everywhere I turn with axis/tomcat there are non obvious, non
> documented CLASSPATH problems that are the cause of most of the
> problems in what I've done so far.

java1.4 has to take half the blame here -on java1.3 things 'just work' out
the webapp, but java1.4 tried to "fix something" by only allowing special
endorsed directories to implement javax.* and java.* classes, as they felt
we idiot developers didnt know what we were doing. But in doing so they
broke so many things, and axis on catalina is one of them. At least on some
versons of catalina

> For example, I built axis from source last night and found problems
> there because I did not have servlet.jar included in CLASSPATH when
> I ran 'ant compile'; the problem only turned up later in run time
> when the compiled jars blew up with servlet problems.  When I
> recompiled with servlet.jar available to ant the error disappeared.
> Is that the right solution?  I don't really know, but looking at the
> error it seemed to be a thing to try, and somehow it worked.

anything you add to ant_home\lib gets pulled into the classpath of all ant
builds, to axis\java\lib in axis builds. So you can have stuff to hand
without editing CLASSPATH.

>
> Sorry if I'm asking stupid questions but these are very real
> problems that I've run into that have to be sorted out very
> tediously one by one.  It sounds like I'm not the only one having
> trouble following the given directions.

no, not all, classpaths are a mess. Axis is a troublespot as it is banging
up against java1.4/tomcat issues, and there is no one place to point the
finger at to say 'its your fault'. Its our fault that the docs arent
perfect, its catalinas fault for not having perfect workarounds for java1.4
funnies, and its suns fault for the endorsed dir thing in the first place.
note that Suns web service dev pack is a zip of tomcat with all the stuff in
the appropriate places, which is their workaround.


Re: Axis 1.0 Tomcat 4.1.12 Java 1.4.0_02 Installation tips

Posted by Michael Brennen <mb...@fni.com>.
On Mon, 28 Oct 2002, Steve Loughran wrote:

> > Another thing I noticed is that if you provide some incorrect path in the
> > CLASSPATH variable, even if you correct it by editing it it is likely that
> > the new path aren't correctly recognised.
> > So it is necessary to startup the machine again or to delete and provide the
> > CLASSPATH variable again. Ignoring this (like me in the past) can make
> > people waste a lot of time.
>
> That's why I dont recommend messing with classpaths. I run java
> with an empty CLASSPATH variable, and my life is better for it.
>
> I recommend you put the jars containing javax.* code (jax-rpc,
> saaj, xerces) in the CATALINA_HOME/common/lib, where they all
> get picked up properly. The happyaxis.jsp page says exactly the
> same thing.

Okay, I'm willing to be the idiot that asks the stupid question with
the obvious answer that everyone else knows.  :)  How do you get
things to run with an empty CLASSPATH?  I thought jar files had to
be specifically included in order to make their contents available.

There is a hint in happyaxis.jsp that is displayed if there are
errors.  However, it does not give specific .jar names to move.  If
jax-rpc and saaj fall in that hinted category, that directly
conflicts with the axis setup instructions.

For those of us that don't yet have the detailed knowledge of this
stuff, we need step by step procedures that work; once that happens
we'll start to sort it out in the building.  With 26 years writing
code from micro and mainframe assembler to C to perl to php and now
java, I don't lack experience, but I do lack specific details in
this area as it is fairly new to me.

Everywhere I turn with axis/tomcat there are non obvious, non
documented CLASSPATH problems that are the cause of most of the
problems in what I've done so far.

For example, I built axis from source last night and found problems
there because I did not have servlet.jar included in CLASSPATH when
I ran 'ant compile'; the problem only turned up later in run time
when the compiled jars blew up with servlet problems.  When I
recompiled with servlet.jar available to ant the error disappeared.
Is that the right solution?  I don't really know, but looking at the
error it seemed to be a thing to try, and somehow it worked.

Sorry if I'm asking stupid questions but these are very real
problems that I've run into that have to be sorted out very
tediously one by one.  It sounds like I'm not the only one having
trouble following the given directions.

Steve, I'm sure there is some frustration readable here; it is *not*
directed at you or anyone else.  Lest I be flamed for demanding
without giving, I'll be glad to pitch in as I can on the project; I
understand open source well as we support our own open source
product (fishcart.org).  I just have to get to the point where I
know what de heck I be doing.  Thanks for the ear...

   -- Michael


Re: Axis 1.0 Tomcat 4.1.12 Java 1.4.0_02 Installation tips

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Paolo Paganotto" <pa...@txt.it>
To: "AXIS" <ax...@xml.apache.org>
Sent: Monday, October 28, 2002 6:58 AM
Subject: Axis 1.0 Tomcat 4.1.12 Java 1.4.0_02 Installation tips


> Since I've suffered a lot to make things working together, now that I've
> succeeded I think that some simple tips will help those (maybe newbie,
like
> me ;-) ) who found problems in installing Axis by following the
installation
> instructions provided.
> In the subject of this mail are the technologies I have on my machine.
>
> First of all, with THIS releases of the technologies, there is no need to
> modify the JAVA_ENDORSED_DIRS entry in the setclasspath.bat file located
in
> %catalina home%\bin (I don't really know if this is a matter of the early
> releases of Tomcat 4.1.x or what else). I read about the need to modify it
> (with java 1.4 and some version of Tomcat) but with Tomcat 4.1.12 all that
I
> got were problems with the server startup process.


agreed.

>
> Furthermore, there is no need to copy any xml parser into %catalina
> home%\webapps\axis\WEB-INF\lib nor elsewhere since Tomcat 4.1.12 has its
own
> parser and AXIS is able to locate and use it correctly (as you can see in
> the installation validation page).

tomcat may use crimson rather than xerces; sometimes apps need the bigger
but better parser.

>
> So, all that is necessary to do is:
> - to put the webapps/axis directory of the axis distribution into the
> webapps directory of Tomcat;
> - to provide a CLASSPATH environment variable including:
>       every .jar file present into %catalina
home%\webapps\axis\WEB-INF\lib,
>       the directory of axis (to run the examples) and, last but not least,
>       the %catalina home%\common\lib\servlet.jar file

which is one way of getting everything to work, but not the way I like as it
makes versioning hard -you cant run different versions of axis on the same
box

> This was all I had to do to make Axis correctly running.
>
> Another thing I noticed is that if you provide some incorrect path in the
> CLASSPATH variable, even if you correct it by editing it it is likely that
> the new path aren't correctly recognised.
> So it is necessary to startup the machine again or to delete and provide
the
> CLASSPATH variable again. Ignoring this (like me in the past) can make
> people waste a lot of time.

That's why I dont recommend messing with classpaths. I run java with an
empty CLASSPATH variable, and my life is better for it.

I recommend you put the jars containing javax.*  code (jax-rpc, saaj,
xerces) in the CATALINA_HOME/common/lib, where they all get picked up
properly. The happyaxis.jsp page says exactly the same thing.