?
Solved

Deploying beans in Axis + Java 1.5

Posted on 2006-03-24
16
Medium Priority
?
848 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.
0
Comment
Question by:KurtVon
  • 8
  • 8
16 Comments
 
LVL 11

Expert Comment

by:fargo
ID: 16284648
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
 
LVL 11

Author Comment

by:KurtVon
ID: 16285131
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
 
LVL 11

Expert Comment

by:fargo
ID: 16285173
also export the AXIS_LIB

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

fargo
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 11

Author Comment

by:KurtVon
ID: 16300556
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
 
LVL 11

Expert Comment

by:fargo
ID: 16303722
Hi,

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

fargo
0
 
LVL 11

Author Comment

by:KurtVon
ID: 16304959
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
 
LVL 11

Accepted Solution

by:
fargo earned 2000 total points
ID: 16305231
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
 
LVL 11

Author Comment

by:KurtVon
ID: 16305541
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
 
LVL 11

Expert Comment

by:fargo
ID: 16305592
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
 
LVL 11

Expert Comment

by:fargo
ID: 16305654
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
 
LVL 11

Author Comment

by:KurtVon
ID: 16306042
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
 
LVL 11

Expert Comment

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

fargo
0
 
LVL 11

Author Comment

by:KurtVon
ID: 16311670
I go to http://192.168.0.10/axis/servlet/AxisServlet and the only services listed are AdminService and Version.

0
 
LVL 11

Expert Comment

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

fargo
0
 
LVL 11

Author Comment

by:KurtVon
ID: 16311945
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
 
LVL 11

Author Comment

by:KurtVon
ID: 16315754
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

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Loops Section Overview
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question