You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Vuko Brigljevic <vu...@cern.ch> on 2003/02/20 10:33:56 UTC

Re: Tomcat 4.1.18, JDK 1.4.1, & Soap--Vuko's setup is similar tomine

Hello John,

J M Craig/Alpha-G wrote:
> Yes, I think your setup might be similar enough to be useful (although
> it must be nearing the end of your day--or past it by now).

OK, so I'll try to tell you what I know. Sorry for the
delay, I was gone during part of the day yesterday...

> If you're using the JK2 connector, it'd be very similar, I'm sure.
> Are you using the JK2 connector?

Very honestly I don't know what the JK2 connector is or,
more fundamentally, what is a "connector" in this context.
If you are able to tell me where and what to look for
(in configuration or log files), I will.

I'll refer to the tomcat installation directory
as $CATALINA_HOME in the following.

> So, the first question is: did you have to rebuild the soap.war with the
> 1.4.1 JDK?

No, I took the soap.war file that came with the 
soap-2_3_1 distribution and copied to the webapps
directory.

> Here's what I've got in the server.xml file (and I'm unsure about the
> correct form for the values for a .war file):
> 
>     <Context path="/soap"
>              docBase="/var/tomcat4/webapps/soap"
>          debug="1"
>          reloadable="true">
>     </Context>
> 
> Should the PATH value be "/soap" for a .war file (that is, it looks like
> it's specifying a directory?). I assumed it should since the .war file
> gets expanded into a directory, doesn't it?

Somebody already answered that and I confirm that
I didn't edit the server.xml file at all. The 
war file gets exploded automatically by tomcat.
I did the same with other web applications I 
wrote: make a war file and put it in the 
webapps directory without putting anything
about it in server.xml and it works just fine.

I don't know if a context declaration would
actually hurt, but I think that your context
declaration has anyway a problem, and that's
your next question:
 
> Should the DOCBASE value be the full path (ending as a directory, as I
> have it)?

Re: Tomcat 4.1.18, JDK 1.4.1, & Soap--the key issue found!

Posted by J M Craig/Alpha-G <ns...@netscape.net>.
Hi Folks,

Leaving aside all the fluff RE my malformed server.xml Context entry, 
there is apparently exactly one problem:

The full install of Tomcat 4.1.18 includes the following XML Parser JAR:
    jaxp-parser-impl.jar     (found in $CATALINA_HOME/common/endorsed)

When I replaced this with the Xerces parser JAR from the Sun Web 
Services Development Pack
    jswdp-1_0_01/common/endorsed/xercesImpl.jar

The Soap server started up happily. :-P (I'm trying not to think about 
how long this took to figure out!)

For anyone using the 4.1.18 version of Tomcat, the scripts that drive it 
are in /usr/bin and have different names than those found in the info on 
the Jakarta/Tomcat web site and the doc files:
    dtomcat4    corresponds to     catalina.sh

I hope this is useful to someone.

Cheers,

John



Re: Tomcat 4.1.18, JDK 1.4.1, & Soap--Vuko's setup is similar tomine

Posted by Vuko Brigljevic <vu...@cern.ch>.
Hi John,

I am glad you found the cause of your problems!

J M Craig/Alpha-G wrote:

> >Very honestly I don't know what the JK2 connector is or,
> >more fundamentally, what is a "connector" in this context.
> >
> A "connector" is the piece of software that you can optionally use with
> Tomcat so that a webserver (such as Apache) can serve the static HTML
> portions of a JSP document. It is used for performance reasons or so you
> can use SSL or various other obscure reasons. It has (finally) occurred
> to me that perhaps I don't need to bother with linking Tomcat to Apache.
> Tomcat would almost certainly serve my purposes without being hooked
> into Apache. But it's already working so I'm not going to bother with
> undoing it, I guess. In any case, you're clearly not using this
> capability or you have a different connector; and that's apparently not
> the heart of the problem I'm facing anyway.

Ah, I understand, thanks for the explanation!

I am indeed not linking Tomcat to Apache but using Tomcat
as web server for the static content as well. I had however
the intention to do so very soon, for the performance 
reasons but also to be able to use some other Apache
plugins I will need soon, so my question:
where can I find documentation on how to "plugin"
Tomcat into Apache, i.e. using Apache for the static
content and Tomcat as servlet container?

Thanks,

Vuko

-- 
===========================================================|
 Vuko Brigljevic,    EP Research Fellow                    |
 CERN - European Laboratory for Particle Physics           |
 --------------------------------------------------------- |
 Mail Address: CERN, Div. EP, 1211 Geneve 23 (Switzerland) |
 Office      : B40-2B08                                    |
 Phone       : +41-22-767 1662                             |
 e-mail      : Vuko.Brigljevic@cern.ch                     |
 www         : http://www.slac.stanford.edu/~vuko          |
===========================================================|

Re: Tomcat 4.1.18, JDK 1.4.1, & Soap--Vuko's setup is similar to mine

Posted by J M Craig/Alpha-G <ns...@netscape.net>.
Hi Vuko,

Thanks for taking the time to provide so much info. Unfortunately, the 
4.1.18 install of Tomcat is rather different (perhaps I should 
down-grade to something known!).

>>If you're using the JK2 connector, it'd be very similar, I'm sure.
>>Are you using the JK2 connector?
>>    
>>
>
>Very honestly I don't know what the JK2 connector is or,
>more fundamentally, what is a "connector" in this context.
>
A "connector" is the piece of software that you can optionally use with 
Tomcat so that a webserver (such as Apache) can serve the static HTML 
portions of a JSP document. It is used for performance reasons or so you 
can use SSL or various other obscure reasons. It has (finally) occurred 
to me that perhaps I don't need to bother with linking Tomcat to Apache. 
Tomcat would almost certainly serve my purposes without being hooked 
into Apache. But it's already working so I'm not going to bother with 
undoing it, I guess. In any case, you're clearly not using this 
capability or you have a different connector; and that's apparently not 
the heart of the problem I'm facing anyway.

<snip>

>>So, the first question is: did you have to rebuild the soap.war with the
>>1.4.1 JDK?
>>    
>>
>
>No, I took the soap.war file that came with the 
>soap-2_3_1 distribution and copied to the webapps
>directory.
>  
>
Great to know.

>>Here's what I've got in the server.xml file (and I'm unsure about the
>>correct form for the values for a .war file):
>>
>>    <Context path="/soap"
>>             docBase="/var/tomcat4/webapps/soap"
>>         debug="1"
>>         reloadable="true">
>>    </Context>
>>
>>Should the PATH value be "/soap" for a .war file (that is, it looks like
>>it's specifying a directory?). I assumed it should since the .war file
>>gets expanded into a directory, doesn't it?
>>    
>>
><snip>
>
I've taken the Context entry out of the server.xml file.

>>As to the JK2 connector side, I've added this to the workers2.properties
>>file (matches the pattern for the /examples/ directory that comes with
>>Tomcat): <snip>
>>
This wouldn't make any sense if you aren't using the JK2 connector; so 
let's not bother with it.

>>The instructions relating to Tomcat don't seem to match up with what's
>>installed on my system (I don't find any .sh files, for
>>instance--maybe I should look harder?)
>>
You wrote:

>The startup.sh and shutdown.sh scripts are 
>in $CATALINA_HOME/bin/ directory as are these
>other scripts.
>
>~/jakarta-tomcat-4.1.12-LE-jdk14 > ls bin/*.sh
>bin/catalina.sh  bin/jasper.sh  bin/setclasspath.sh  bin/startup.sh
>bin/digest.sh    bin/jspc.sh    bin/shutdown.sh      bin/tool-wrapper.sh
>  
>
This has been a major source of my confusion. There are no .sh files in 
the ~/bin directory (there's three JAR's and that's it). Well, it turns 
out that the Tomcat 4.1.18 version doesn't have any .sh files. What it 
does have is a single script file for startup and shutdown in /usr/bin 
called dtomcat4. There's also a series of other scripts which I haven't 
looked at as closely. The whole set is:
dtomcat4
tomcat4
reloctomcat4
jspc4
jasper4
djasper4

So, the whole structure's different from the directions. (When will I 
learn that there's never any decent info about the latest revs?) It 
seems that dtomcat4 corresponds to catalina.sh. It's opening comment 
line is:

# Start/Stop Script for the CATALINA Server

>>--at any rate, I can't see how to change the
>>CLASSPATH settings as described for earlier versions of Tomcat.
>>
There are lines in /usr/bin/dtomcat4 that suggest they're the place for 
this:
...
# Set standard CLASSPATH
CLASSPATH="$JAVA_HOME"/lib/tools.jar

# Add on extra jar files to CLASSPATH
if [ -n "$JSSE_HOME" ]; then
  
CLASSPATH="$CLASSPATH":"$JSSE_HOME"/lib/jcert.jar:"$JSSE_HOME"/lib/jnet.jar:"$JSSE_HOME"/lib/jsse.jar
fi

# JPackage JSSE location check
if [ -r "$JAVADIR/jsse/jcert.jar" ]; then
  
CLASSPATH="$CLASSPATH":"$JAVADIR"/jsse/jcert.jar:"$JAVADIR"/jsse/jnet.jar:"$JAVADIR"/jsse/jsse.jar
fi

CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar
...

>I may be doing the wrong thing, but I modified
>the class path (added a few libraries to it)
>by editing the file $CATALINA_HOME/bin/catalina.sh
>
Well, I've found the spot to do that, but I think all the libraries 
needed are already in the $CATALINA_HOME/common/lib or ~/endorsed 
directories. I downloaded the so-called "full" rpm from the Jakarta 
distribution directory because the LE version didn't want to work--I 
think I know why that was now, but the full install surely should have 
everything it needs (see below).

>According to the documentation on:
>http://ws.apache.org/soap/docs/install/index.html
>you need:
>
> - mail.jar from JavaMail 
> - activation.jar from JavaBeans Activation Framework 
> - a JAXP compatible, namespace-aware XML parser such as Apache Xerces
>(v1.1.2 or later).
>   If you have other non-namespace aware XML parsers on your classpath
>then the
>   namespace-aware parser must be at the front of your classpath. Apache
>SOAP will not
>   work otherwise. 
>
>I have included mail.jar, activation.jar and xerces.jar in
>my CLASSPATH (by manual editing of catalina.sh, it would
>probably be cleaner just to copy those in shared/lib/)
>
I read that about what was required; I also read (in various places) 
that the requirements for JDK 1.4 were somewhat different so I 
appreciate knowing what you've done as an indication of what information 
to pay attention to.But, unless there's something rather subtle wrong 
with the set-up I have, I don't see how this can be the problem I'm 
facing because all the required JAR files appear to be in either of 
these directories:

$CATALINA_HOME/common/lib
$CATALINA_HOME/common/endorsed

The one exception is Xerces.jar--what I've got in the endorsed directory 
is these two:
xml-commons-apis.jar
jaxp-parser-impl.jar

Now, I suppose this last one might conceivably not be the appropriate 
one (that is, it might not be XML namespace-aware like Xerces), but 
since it comes with Tomcat, that seems possible so I'll stick Xerces in 
and see if that makes a difference.

At this point, the only clue to the whole mess I have is that at least 
I've finally found the scripts! Apparently the dtomcat4 corresponds to 
the catalina.sh script from earlier releases. However, it's still unclear:

1)  Whether there's any reason Tomcat wouldn't find the classes it needs 
to run the Soap server (but the XML parser may be faulty).
2)  What the error log messages mean....

Thanks for your suggestions and the time you've taken. I'm seriously 
going to consider down-grading to an earlier version of Tomcat; feeling 
my way blind just hasn't worked well.

John