We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Deploying beans in Axis + Java 1.5

KurtVon
KurtVon asked
on
Medium Priority
875 Views
Last Modified: 2010-03-17
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.
Comment
Watch Question

Commented:
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

Author

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.

Commented:
also export the AXIS_LIB

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

fargo

Author

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.

Commented:
Hi,

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

fargo

Author

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.
Commented:
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

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.

Commented:
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

Commented:
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

Author

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.

Commented:
What do you mean by "but the services don't show up" ??

fargo

Author

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

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

fargo

Author

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?

Author

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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.