Deploying beans in Axis + Java 1.5

I have tomcat working and axis claims it is happy.  I had full web services working with Java 1.4 and Axis 1.2 to 1.3.  Unfortunately, the web services that worked under Java 1.4 with the old axis don't seem to work anymore (and I had to upgrade due to too many 1.5 clients choking).  All this under RedHat Linux if it matters.

The deploy files throw a class not found exception from SAXParserFactory if the local java command points to IBM java, and a NullPointerException if the local java points to the 1.5 jdk.  Here's the deploy script I've been using:

#!/bin/sh
AXIS_LIB=/opt/tomcat/webapps/axis/WEB-INF/lib
java -classpath $AXIS_LIB/axis.jar:$AXIS_LIB/jaxrpc.jar:$AXIS_LIB/jaxb-xjc.jar:$AXIS_LIB/jaxb-libs.jar:$AXIS_LIB/commons-logging.jar:$AXIS_LIB/commons-discovery.jar:$AXIS_LIB/saaj.jar:$AXIS_LIB/wsdl4j.jar:$AXIS_LIB/log4j-1.2.8.jar org.apache.axis.client.AdminClient -p 80 $1

Thanks for any help.
LVL 11
KurtVonAsked:
Who is Participating?
 
fargoCommented:
r u using the following versions of jar.

commons-discovery-0.2.jar
commons-logging-1.0.4.jar;
wsdl4j-1.5.1.jar

fargo
0
 
fargoCommented:
shouldn't it be

#!/bin/sh
JAVA_HOME=/opt/java/path
export JAVA_HOME

AXIS_LIB=/opt/tomcat/webapps/axis/WEB-INF/lib
export AXIS_LIB

java -classpath $AXIS_LIB/axis.jar:$AXIS_LIB/jaxrpc.jar:$AXIS_LIB/jaxb-xjc.jar:$AXIS_LIB/jaxb-libs.jar:$AXIS_LIB/commons-logging.jar:$AXIS_LIB/commons-discovery.jar:$AXIS_LIB/saaj.jar:$AXIS_LIB/wsdl4j.jar:$AXIS_LIB/log4j-1.2.8.jar org.apache.axis.client.AdminClient -p 80 $1

even you can add your JAVA_HOME variable here and export it too (like at the top)

fargo
0
 
KurtVonAuthor Commented:
Well, JAVA_HOME had already been defined and exported before the script was run, but I'll try putting it explicitly in teh script if you think that's going to help.
0
The Lifecycle Approach to Managing Security Policy

Managing application connectivity and security policies can be achieved more effectively when following a framework that automates repeatable processes and ensures that the right activities are performed in the right order.

 
fargoCommented:
also export the AXIS_LIB

this may be the reason for the errors you are getting.

fargo
0
 
KurtVonAuthor Commented:
Neither change had any effect.

Please keep in mind that the deploy worked fine for Java 1.4 and Axis 1.2.  It wasn't until I upgraded to Axis 1.3 (because 1.2 doesn't work with Java 1.5) that problems ocurred.  I still suspect a missing library or a change in a call, but I can't figure out what.
0
 
fargoCommented:
Hi,

Can you check some log files or stack trace? For which class it is giving errors?

fargo
0
 
KurtVonAuthor Commented:
It's not reporting the class, annoyingly enough, just a NullPointerException with no stack trace.  It must be running at least some code since it throws a service not available error if Tomcat isn't running, but I can't seem to coax a log or a stack trace out of it.  Since my code prints stack traces at every exception it must be something happening in Axis.

It also isn't producing any log files I can find.
0
 
KurtVonAuthor Commented:
None of the files had version numbers.  I downloaded the 1.3 axis binaries and copied over all the files to be sure, then pointed the shell script at the version-numbered jars.  It seems to have fixed most of the problems, now it just says

- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart).  Attachment support is disabled.

Axis still doesn't list the services as available, but it does look like the "upgraded to version 1.3" part was mishandled.  Thanks.
0
 
fargoCommented:
u need to have activation.jar to remove this error

Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart).  Attachment support is disabled.

fargo
0
 
fargoCommented:
the version axis 1.3 is definitely mishandled. Look at the bugs..

https://issues.apache.org/jira/browse/AXIS

Moreover, it seems that they were too much in hurry. NO change logs at all for version 1.3

p.s: do add mail.jar and activation.jar
fargo
0
 
KurtVonAuthor Commented:
Oops, sorry.  That was it -- the upgrade was from 1.1 to 1.2 because 1.1 didn't handle Java 1.5.  Somewhere along the line that was recorded as "latest version" and I assumed that meant 1.3 since it has been out since October.  So maybe everything was correct, and it was something else?

I have activation.jar, so I just added it (along with the latest mail.jar) to the classpath.  All optional services are listed working on teh axis validation page.  When I deploy, everything says it worked, but the services don't show up.

Still, it's a big improvment.
0
 
fargoCommented:
What do you mean by "but the services don't show up" ??

fargo
0
 
KurtVonAuthor Commented:
I go to http://192.168.0.10/axis/servlet/AxisServlet and the only services listed are AdminService and Version.

0
 
fargoCommented:
it means the configuration for the service at server-config.wsdd file is not correct OR this particular file is not available.

fargo
0
 
KurtVonAuthor Commented:
Hmm.  The .jar with my classes is on the path.  To be safe I've put it in a number of places (including the ./axis/lib directory).  I'm pretty sure no inteface has changed, so the server-config.wsdd file should still work.

Is there a way to tell which one is wrong?
0
 
KurtVonAuthor Commented:
By brute force, I guess.  I just deleted each service until it started working.

Now that I know which service is the problem, and the other services work, this question is pretty much answered.  Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.