Skip to main content

Problem:

How to overcome Axis Servlet encountering java.lang.LinkageErrorException

Resolution:

Product Name: Borland Application Server 6.7, AppServer Edition

Product Version: 6.7

Product Component: All

Platform/OS version: All

JDK: Not Applicable

Patch: Not Applicable

Problem Description

You encountered the following exception when you remove and hot-deploy an Axis servlet into an active partition. Hot-deploy is a feature within Borland Application Server which allow you to deploy a war/jar/ear file without re-starting the partition.

2009-03-11 11:31:11,365 ERROR - Servlet.service() for servlet AxisServlet threw exception
java.lang.LinkageError: loader constraints violated when linking javax/xml/transform/Source class
at org.apache.axis.Message.setup(Message.java:340)
at org.apache.axis.Message.(Message.java:233)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:810)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

You have bundled the following libraries in your war file.

  • axis.jar (1.1RC2 April 25
  • axis-ant.jar
  • axis-bes.jar
  • commons-discovery.jar (0.1)
  • commons-logging.jar (1.0.2)
  • jaxrpc.jar (1.1)
  • log4j-1.2.8.jar
  • saaj.jar (1.1)
  • wsdl4.jar (1.4)

Solution/Workaround

Borland Application Server 6.7 has bundled the Axis 1.3 2238 December 4 2006 library in the system classpath of the partition. The cause is due to the class conflict for javax.xml.transform package classes in the jaxrpc.jar in the war file.

The solution is to remove the jaxrpc.jar bundled in the war file to use the Axis 1.3 library in the system classpath. The other alternative is to restart the partition if you want to bundle the jaxrpc.jar in the war file.

References

Refer to Apache site

Author: Matthew Ong

axis-samples-5.2.1-wo-jaxrpc.war
axis-samples-5.2.1.war

Old KB# 29759

#VisiBroker
#Security