You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by dh...@lexmark.com on 2002/01/09 19:37:21 UTC

Linkage error with new jspc task


Hi everyone,

I am using ant 1.5 alpha, to get access to the new jspc task.

However, I am running into the following error when I try and execute it:

BUILD FAILED
C:\dev\kiosk\Design\Admin\build.xml:87: java.lang.LinkageError: loader constrain
ts violated when linking org/w3c/dom/Document class

Looking through the mailing list, it appears that Ant sometimes has trouble with
the task loader loading classes that have already been loaded eg with
crimson.jar and xerces.jar (see
http://www.mail-archive.com/ant-user@jakarta.apache.org/msg10847.html).  The
suggestion there was to use fork="true" to get it to work, but this is not an
option with the jspc task.

Would REALLY appreciate any help on this one!  The new task will save LOADS of
time by selectively reprecompiling.  Do I need to replace crimson.jar with
something else?

Many thanks,

David

JSCP task:

  <target name="jspc">
    <jspc srcdir="${build.home}\jsp"
          destdir="${build.home}\java"
          package="JspServ"
          verbose="9">
      <include name="**/*.jsp" />
      <classpath>
        <pathelement location="${tomcat.home}\lib\jasper-runtime.jar"/>
        <pathelement location="${tomcat.home}\lib\naming-factory.jar"/>
        <pathelement location="${tomcat.home}\lib\jasper-compiler.jar"/>
        <pathelement location="${tomcat.home}\common\lib\servlet.jar"/>
        <pathelement location="${tomcat.home}\common\lib\xerces.jar"/>
        <pathelement location="${src}\..\Common\jsp\Web-inf\lib\struts.jar"/>
        <pathelement location="${build.home}\classes"/>
      </classpath>
    </jspc>
  </target>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Linkage error with new jspc task

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: <dh...@lexmark.com>
To: <an...@jakarta.apache.org>
Sent: Wednesday, January 09, 2002 10:37
Subject: Linkage error with new jspc task


>
>
> Hi everyone,
>
> I am using ant 1.5 alpha, to get access to the new jspc task.
>
> However, I am running into the following error when I try and execute it:
>
> BUILD FAILED
> C:\dev\kiosk\Design\Admin\build.xml:87: java.lang.LinkageError: loader
constrain
> ts violated when linking org/w3c/dom/Document class
>
> Looking through the mailing list, it appears that Ant sometimes has
trouble with
> the task loader loading classes that have already been loaded eg with
> crimson.jar and xerces.jar (see
> http://www.mail-archive.com/ant-user@jakarta.apache.org/msg10847.html).
The
> suggestion there was to use fork="true" to get it to work, but this is not
an
> option with the jspc task.

good point. we should add that. Care to make the change?

>
> Would REALLY appreciate any help on this one!  The new task will save
LOADS of
> time by selectively reprecompiling.  Do I need to replace crimson.jar with
> something else?


try putting all the jars you depend on into ant\lib, rather than the
classpath. Xerces is probably the problem.





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>