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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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.
fargoCommented:
also export the AXIS_LIB

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

fargo
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

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.
fargoCommented:
Hi,

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

fargo
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.
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
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
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
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.
fargoCommented:
What do you mean by "but the services don't show up" ??

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

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

fargo
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?
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Application Servers

From novice to tech pro — start learning today.