ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Champeau <schamp...@leaselink.com>
Subject LinkageError Problems
Date Mon, 09 Apr 2001 23:40:22 GMT
A few days ago I sent a message describing a problem I had compiling some
classes that use XML under Ant 1.3. I received a response suggesting I try
using includeAntRuntime = "no" in my <javac> task.

This solved my compile problems, but I'm having trouble running my custom
tasks that use XML. I define a classpath that sticks the xerces.jar at the
front of my classpath. My javac task uses it.

   <path id="project.class.path">
      <pathelement location="${basedir}/build/xerces.jar"/>
      <pathelement location="${basedir}/build/jar_update.jar"/>
      <pathelement path="${java.class.path}"/>
   </path>

I have a custom task that also uses xerces.jar. I defined a taskdef for this
that uses the classpath.

   <taskdef
      name="buildupdate"
      classname="com.lml.leaselink.update.BuildUpdateTask">
      <classpath refid="project.class.path"/>
   </taskdef>

When I attempt to run a task that uses this task:

   <target name="move_files_for_update" depends="update_clean">
      <buildupdate
         makelogifnoupdates = "false"
         buildloglocation = "${basedir}/${buildLog}"
         lastbuilddirectory = "${basedir}/${lastBuildClassDir}"
         newbuilddirectory = "${basedir}/${classDir}"
         updatejardirectory = "${basedir}/${updateClassDir}"
         removejardirectory = "${basedir}/${removeClassDir}"
      />
   </target>

I get an exception for each of the XML classes that the task attempts to
load:

java.io.IOException: java.lang.LinkageError: Class org/w3c/dom/Document
violates loader constraints
      ...
java.io.IOException: java.lang.LinkageError: Class org/w3c/dom/Element
violates loader constraints
      ...
java.io.IOException: java.lang.LinkageError: Class org/w3c/dom/NodeList
violates loader constraints
	...

Can anyone offer any ideas on how to fix this?

Thanks,

Steve C.



Mime
View raw message