Grokbase Groups Maven users May 2003
FAQ
Hi,
I'm trying to use <ant:style> in my maven.xml, but I'm getting

<ant:style> javax.xml.transform.TransformerFactoryConfigurationError:
Provider org.apache.xalan.processor.TransformerFactoryImpl not found

errors.
I saw some posts about using xalan with maven a while back,
but not any resolution (BTW - is there an up-to-date mail archive?
the ones on nagoya are from when maven was part of turbine)

I do have a workaround (which I'm violently opposed to) i.e,
copying the xalan, xml-apis and xerces jars to $JAVA_HOME/jre/lib/ext.

Does anyone have a better solution?

I'm using JDK 1.3.1 and maven 1.0-beta 9.

Thanks,

Tim

Search Discussions

  • Martin Skopp at May 28, 2003 at 9:03 am

    On Wed, 2003-05-28 at 10:40, Tim Anderson wrote:
    I'm trying to use <ant:style> in my maven.xml, but I'm getting

    <ant:style> javax.xml.transform.TransformerFactoryConfigurationError:
    Provider org.apache.xalan.processor.TransformerFactoryImpl not found

    errors.
    The docbook plugin tries the same... (see
    src/plugins-build/docbook/plugin.jelly or
    $MAVEN_HOME/plugins/maven-docbook-plugin-1.0/plugin.jelly) and it does

    ${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apac
    he.xalan.processor.TransformerFactoryImpl')}

    inside its "docbook:transform" goal.
    Maybe it helps setting the sysProp?
    --
    Martin Skopp
    Riege Software International GmbH
    Support: mailto:maint@riege.com, Information: http://www.riege.com

    This email is intended to be viewed with a nonproportional font.
    Public Key on http://www.keyserver.net, Key-ID: 3D4027B5
    Fingerprint: 1970 C78D 9A1D 99FA 5CE4 5C0D 29E6 6A95 3D40 27B5


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Tim Anderson at May 28, 2003 at 9:32 am

    From: Martin Skopp
    On Wed, 2003-05-28 at 10:40, Tim Anderson wrote:
    I'm trying to use <ant:style> in my maven.xml, but I'm getting

    <ant:style> javax.xml.transform.TransformerFactoryConfigurationError:
    Provider org.apache.xalan.processor.TransformerFactoryImpl not found

    errors.
    The docbook plugin tries the same... (see
    src/plugins-build/docbook/plugin.jelly or
    $MAVEN_HOME/plugins/maven-docbook-plugin-1.0/plugin.jelly) and it does

    ${systemScope.setProperty('javax.xml.transform.TransformerFactory'
    ,'org.apac
    he.xalan.processor.TransformerFactoryImpl')}

    inside its "docbook:transform" goal.
    Maybe it helps setting the sysProp?
    Yep - tried that. Also tried sticking the xalan, ant, xerces and
    xml-apis in the root and root.maven classloaders. Neither
    approach works for me.





    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Brett Porter at May 28, 2003 at 10:30 pm
    Maybe the answer went to the -dev list. This has been fixed in CVS by
    one of the committers, but you can patch b9 pretty easily. You need to
    upgrade ant to 1.5.3. Grabs the JARs (including optional) from ibiblio,
    put them in maven/lib replacing the 1.5.1 versions, and edit
    maven/bin/forehead.conf to point at them instead.

    Alternatively, you can use JDK 1.4.

    I'm not sure after upgrading Ant whether you still need to the
    TransformerFactory config, but I've kept it. You will need the xalan jar
    in the "root" classloader as you said (for ant to see it).

    Let me know if you need any further help.

    Cheers,
    Brett
    On Wed, 2003-05-28 at 19:32, Tim Anderson wrote:
    From: Martin Skopp
    On Wed, 2003-05-28 at 10:40, Tim Anderson wrote:
    I'm trying to use <ant:style> in my maven.xml, but I'm getting

    <ant:style> javax.xml.transform.TransformerFactoryConfigurationError:
    Provider org.apache.xalan.processor.TransformerFactoryImpl not found

    errors.
    The docbook plugin tries the same... (see
    src/plugins-build/docbook/plugin.jelly or
    $MAVEN_HOME/plugins/maven-docbook-plugin-1.0/plugin.jelly) and it does

    ${systemScope.setProperty('javax.xml.transform.TransformerFactory'
    ,'org.apac
    he.xalan.processor.TransformerFactoryImpl')}

    inside its "docbook:transform" goal.
    Maybe it helps setting the sysProp?
    Yep - tried that. Also tried sticking the xalan, ant, xerces and
    xml-apis in the root and root.maven classloaders. Neither
    approach works for me.





    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
    --
    Brett Porter <bporter@f2network.com.au>
    f2 network


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Tim Anderson at May 29, 2003 at 4:55 am
    Hmm - doesn't work for me either.

    There seems to be two problems:

    . ANT doesn't set a context class loader before invoking
    javax.xml.transform.TransformerFactory.newInstance().
    So, if the transformer is not in the same or parent
    classloader to ANT, it won't be found.

    . Maven seems to be ignoring the <classloader>root</classloader>
    entry for xalan in my project.xml.
    Is there anything wrong with this syntax?

    <dependency>
    <id>xalan</id>
    <version>2.4.1</version>
    <url>http://xml.apache.org/xalan-j/</url>
    <properties>
    <classloader>root</classloader>
    </properties>
    </dependency>

    If I add the xalan jar to forehead.conf, it works.
    i.e:

    [root]
    ${tools.jar}
    ${maven.home}/lib/commons-grant-1.0-beta-4.jar
    ${maven.home}/lib/ant-1.5.3-1.jar
    ${maven.home}/lib/xml-apis-1.0.b2.jar
    ${maven.home}/lib/ant-optional-1.5.3-1.jar
    ${maven.home}/lib/xerces-2.2.1.jar
    ${maven.home}/repository/xalan/jars/xalan-2.4.1.jar

    Not the best solution, but much better than adding the xalan,
    xerces, and xml-apis jars to jre/lib/ext.

    -Tim

    -----Original Message-----
    From: Brett Porter
    Sent: Thursday, 29 May 2003 8:31 AM
    To: tma@netspace.net.au
    Cc: Maven Users List
    Subject: RE: class loader problems using xalan


    Maybe the answer went to the -dev list. This has been fixed in CVS by
    one of the committers, but you can patch b9 pretty easily. You need to
    upgrade ant to 1.5.3. Grabs the JARs (including optional) from ibiblio,
    put them in maven/lib replacing the 1.5.1 versions, and edit
    maven/bin/forehead.conf to point at them instead.

    Alternatively, you can use JDK 1.4.

    I'm not sure after upgrading Ant whether you still need to the
    TransformerFactory config, but I've kept it. You will need the xalan jar
    in the "root" classloader as you said (for ant to see it).

    Let me know if you need any further help.

    Cheers,
    Brett
    On Wed, 2003-05-28 at 19:32, Tim Anderson wrote:
    From: Martin Skopp
    On Wed, 2003-05-28 at 10:40, Tim Anderson wrote:
    I'm trying to use <ant:style> in my maven.xml, but I'm getting

    <ant:style>
    javax.xml.transform.TransformerFactoryConfigurationError:
    Provider org.apache.xalan.processor.TransformerFactoryImpl not found

    errors.
    The docbook plugin tries the same... (see
    src/plugins-build/docbook/plugin.jelly or
    $MAVEN_HOME/plugins/maven-docbook-plugin-1.0/plugin.jelly) and it does

    ${systemScope.setProperty('javax.xml.transform.TransformerFactory'
    ,'org.apac
    he.xalan.processor.TransformerFactoryImpl')}

    inside its "docbook:transform" goal.
    Maybe it helps setting the sysProp?
    Yep - tried that. Also tried sticking the xalan, ant, xerces and
    xml-apis in the root and root.maven classloaders. Neither
    approach works for me.





    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
    --
    Brett Porter <bporter@f2network.com.au>
    f2 network


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Brett Porter at May 29, 2003 at 4:59 am
    Strange. I tested this out when I was originally debugging it and it worked.

    My situation where it works has the ant:style and the xalan dep in a
    plugin, not in the project itself which might influence it, but I'm sure
    I tried it the other way to simplify testing.

    What is the actual exception you get from maven -X?

    Cheers,
    Brett

    Tim Anderson wrote:
    Hmm - doesn't work for me either.

    There seems to be two problems:

    . ANT doesn't set a context class loader before invoking
    javax.xml.transform.TransformerFactory.newInstance().
    So, if the transformer is not in the same or parent
    classloader to ANT, it won't be found.

    . Maven seems to be ignoring the <classloader>root</classloader>
    entry for xalan in my project.xml.
    Is there anything wrong with this syntax?

    <dependency>
    <id>xalan</id>
    <version>2.4.1</version>
    <url>http://xml.apache.org/xalan-j/</url>
    <properties>
    <classloader>root</classloader>
    </properties>
    </dependency>

    If I add the xalan jar to forehead.conf, it works.
    i.e:

    [root]
    ${tools.jar}
    ${maven.home}/lib/commons-grant-1.0-beta-4.jar
    ${maven.home}/lib/ant-1.5.3-1.jar
    ${maven.home}/lib/xml-apis-1.0.b2.jar
    ${maven.home}/lib/ant-optional-1.5.3-1.jar
    ${maven.home}/lib/xerces-2.2.1.jar
    ${maven.home}/repository/xalan/jars/xalan-2.4.1.jar

    Not the best solution, but much better than adding the xalan,
    xerces, and xml-apis jars to jre/lib/ext.

    -Tim


    -----Original Message-----
    From: Brett Porter
    Sent: Thursday, 29 May 2003 8:31 AM
    To: tma@netspace.net.au
    Cc: Maven Users List
    Subject: RE: class loader problems using xalan


    Maybe the answer went to the -dev list. This has been fixed in CVS by
    one of the committers, but you can patch b9 pretty easily. You need to
    upgrade ant to 1.5.3. Grabs the JARs (including optional) from ibiblio,
    put them in maven/lib replacing the 1.5.1 versions, and edit
    maven/bin/forehead.conf to point at them instead.

    Alternatively, you can use JDK 1.4.

    I'm not sure after upgrading Ant whether you still need to the
    TransformerFactory config, but I've kept it. You will need the xalan jar
    in the "root" classloader as you said (for ant to see it).

    Let me know if you need any further help.

    Cheers,
    Brett
    On Wed, 2003-05-28 at 19:32, Tim Anderson wrote:

    From: Martin Skopp
    On Wed, 2003-05-28 at 10:40, Tim Anderson wrote:

    I'm trying to use <ant:style> in my maven.xml, but I'm getting

    <ant:style>
    javax.xml.transform.TransformerFactoryConfigurationError:
    Provider org.apache.xalan.processor.TransformerFactoryImpl not found

    errors.
    The docbook plugin tries the same... (see
    src/plugins-build/docbook/plugin.jelly or
    $MAVEN_HOME/plugins/maven-docbook-plugin-1.0/plugin.jelly) and it does

    ${systemScope.setProperty('javax.xml.transform.TransformerFactory'
    ,'org.apac
    he.xalan.processor.TransformerFactoryImpl')}

    inside its "docbook:transform" goal.
    Maybe it helps setting the sysProp?
    Yep - tried that. Also tried sticking the xalan, ant, xerces and
    xml-apis in the root and root.maven classloaders. Neither
    approach works for me.





    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
    --
    Brett Porter <bporter@f2network.com.au>
    f2 network


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
    --
    Web Developer
    f2 network ~ everything essential
    02 8596 4437


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Tim Anderson at May 29, 2003 at 6:02 am
    I'm attaching the output.

    As a test, I also added the following goal to maven.xml

    <goal name="teststyle2" prereqs="xdoc:init">
    ${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apac
    he.xalan.processor.TransformerFactoryImpl')}
    <j:invokeStatic var="proc" method="newInstance"
    className="javax.xml.transform.TransformerFactory"/>
    <ant:echo message="got processor=${proc}"/>
    </goal>

    When xalan is added to forehead.conf, it works,
    otherwise it fails with an InvocationTargetException.

    I'm going with the forehead.conf workaround, having
    wasted too much time on this already.

    Regards,

    Tim
    -----Original Message-----
    From: Brett Porter
    Sent: Thursday, 29 May 2003 2:59 PM
    To: Maven Users List
    Subject: Re: class loader problems using xalan


    Strange. I tested this out when I was originally debugging it and
    it worked.

    My situation where it works has the ant:style and the xalan dep in a
    plugin, not in the project itself which might influence it, but I'm sure
    I tried it the other way to simplify testing.

    What is the actual exception you get from maven -X?

    Cheers,
    Brett

    Tim Anderson wrote:
    Hmm - doesn't work for me either.

    There seems to be two problems:

    . ANT doesn't set a context class loader before invoking
    javax.xml.transform.TransformerFactory.newInstance().
    So, if the transformer is not in the same or parent
    classloader to ANT, it won't be found.

    . Maven seems to be ignoring the <classloader>root</classloader>
    entry for xalan in my project.xml.
    Is there anything wrong with this syntax?

    <dependency>
    <id>xalan</id>
    <version>2.4.1</version>
    <url>http://xml.apache.org/xalan-j/</url>
    <properties>
    <classloader>root</classloader>
    </properties>
    </dependency>

    If I add the xalan jar to forehead.conf, it works.
    i.e:

    [root]
    ${tools.jar}
    ${maven.home}/lib/commons-grant-1.0-beta-4.jar
    ${maven.home}/lib/ant-1.5.3-1.jar
    ${maven.home}/lib/xml-apis-1.0.b2.jar
    ${maven.home}/lib/ant-optional-1.5.3-1.jar
    ${maven.home}/lib/xerces-2.2.1.jar
    ${maven.home}/repository/xalan/jars/xalan-2.4.1.jar

    Not the best solution, but much better than adding the xalan,
    xerces, and xml-apis jars to jre/lib/ext.

    -Tim


    -----Original Message-----
    From: Brett Porter
    Sent: Thursday, 29 May 2003 8:31 AM
    To: tma@netspace.net.au
    Cc: Maven Users List
    Subject: RE: class loader problems using xalan


    Maybe the answer went to the -dev list. This has been fixed in CVS by
    one of the committers, but you can patch b9 pretty easily. You need to
    upgrade ant to 1.5.3. Grabs the JARs (including optional) from ibiblio,
    put them in maven/lib replacing the 1.5.1 versions, and edit
    maven/bin/forehead.conf to point at them instead.

    Alternatively, you can use JDK 1.4.

    I'm not sure after upgrading Ant whether you still need to the
    TransformerFactory config, but I've kept it. You will need the xalan jar
    in the "root" classloader as you said (for ant to see it).

    Let me know if you need any further help.

    Cheers,
    Brett
    On Wed, 2003-05-28 at 19:32, Tim Anderson wrote:

    From: Martin Skopp
    On Wed, 2003-05-28 at 10:40, Tim Anderson wrote:

    I'm trying to use <ant:style> in my maven.xml, but I'm getting

    <ant:style>
    javax.xml.transform.TransformerFactoryConfigurationError:
    Provider org.apache.xalan.processor.TransformerFactoryImpl not found

    errors.
    The docbook plugin tries the same... (see
    src/plugins-build/docbook/plugin.jelly or
    $MAVEN_HOME/plugins/maven-docbook-plugin-1.0/plugin.jelly) and it does

    ${systemScope.setProperty('javax.xml.transform.TransformerFactory'
    ,'org.apac
    he.xalan.processor.TransformerFactoryImpl')}

    inside its "docbook:transform" goal.
    Maybe it helps setting the sysProp?
    Yep - tried that. Also tried sticking the xalan, ant, xerces and
    xml-apis in the root and root.maven classloaders. Neither
    approach works for me.





    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
    --
    Brett Porter <bporter@f2network.com.au>
    f2 network


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
    --
    Web Developer
    f2 network ~ everything essential
    02 8596 4437


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Dion at May 28, 2003 at 11:40 pm
    The docbook plugin uses ant:style fine. Have u tried using the trick it
    does:


    ${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apache.xalan.processor.TransformerFactoryImpl')}

    --
    dIon Gillard, Multitask Consulting
    Blog: http://www.freeroller.net/page/dion/Weblog
    Work: http://www.multitask.com.au


    "Tim Anderson" <tma@netspace.net.au> wrote on 28/05/2003 06:40:58 PM:
    Hi,
    I'm trying to use <ant:style> in my maven.xml, but I'm getting

    <ant:style> javax.xml.transform.TransformerFactoryConfigurationError:
    Provider org.apache.xalan.processor.TransformerFactoryImpl not found

    errors.
    I saw some posts about using xalan with maven a while back,
    but not any resolution (BTW - is there an up-to-date mail archive?
    the ones on nagoya are from when maven was part of turbine)

    I do have a workaround (which I'm violently opposed to) i.e,
    copying the xalan, xml-apis and xerces jars to $JAVA_HOME/jre/lib/ext.

    Does anyone have a better solution?

    I'm using JDK 1.3.1 and maven 1.0-beta 9.

    Thanks,

    Tim

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesmaven
postedMay 28, '03 at 8:37a
activeMay 29, '03 at 6:02a
posts8
users4
websitemaven.apache.org
irc#maven

People

Translate

site design / logo © 2019 Grokbase