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 [mailto:[EMAIL PROTECTED]
> 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 [mailto:[EMAIL PROTECTED]
> >>Sent: Thursday, 29 May 2003 8:31 AM
> >>To: [EMAIL PROTECTED]
> >>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 [mailto:[EMAIL PROTECTED]
> >>>>
> >>>>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: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>--
> >>Brett Porter <[EMAIL PROTECTED]>
> >>f2 network
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> --
> Web Developer
> f2 network ~ everything essential
> 02 8596 4437
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
__ __
| \/ |__ Jakarta _ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0-beta-9-SNAPSHOT
[DEBUG] Adding reference: maven.dependency.classpath ->
D:\work\opensource\maven-1.0-beta-9\repository\xalan\jars\xalan-2.4.1.jar;D:\work\opensource\maven-1.0-beta-9\repository\ant\jars\ant-1.5.3-1.jar;D:\work\opensource\maven-1.0-beta-9\repository\ant\jars\ant-optional-1.5.3-1.jar;D:\work\opensource\maven-1.0-beta-9\repository\xml-apis\jars\xml-apis-1.0.b2.jar;D:\work\opensource\maven-1.0-beta-9\repository\xerces\jars\xerces-2.3.0.jar
[available] [VERBOSE] Found: src\java
[DEBUG] Adding reference: maven-classpath ->
[DEBUG] Adding reference: maven.compile.src.set ->
[DEBUG] Adding reference: maven.dependency.classpath ->
D:\work\opensource\maven-1.0-beta-9\repository\castor\jars\castor-0.9.4.3.jar
[DEBUG] Adding reference: maven-classpath ->
[DEBUG] Adding reference: maven.compile.src.set ->
[DEBUG] Adding reference: maven.dependency.classpath ->
[DEBUG] Adding reference: maven-classpath ->
[DEBUG] Adding reference: maven.compile.src.set ->
[DEBUG] Adding reference: maven.dependency.classpath ->
D:\work\opensource\maven-1.0-beta-9\repository\ant\jars\ant-1.5.3-1.jar;D:\work\opensource\maven-1.0-beta-9\repository\dom4j\jars\dom4j-1.4-dev-7.jar;D:\work\opensource\maven-1.0-beta-9\repository\commons-jelly\jars\commons-jelly-20030211.141339.jar;D:\work\opensource\maven-1.0-beta-9\repository\commons-jelly\jars\commons-jelly-tags-validate-20030211.143411.jar;D:\work\opensource\maven-1.0-beta-9\repository\commons-jelly\jars\commons-jelly-tags-xml-20030211.142705.jar;D:\work\opensource\maven-1.0-beta-9\repository\junit\jars\junit-3.8.1.jar;D:\work\opensource\maven-1.0-beta-9\repository\maven\jars\maven.jar;D:\work\opensource\maven-1.0-beta-9\repository\xml-apis\jars\xml-apis-1.0.b2.jar;D:\work\opensource\maven-1.0-beta-9\repository\isorelax\jars\isorelax-20020414.jar;D:\work\opensource\maven-1.0-beta-9\repository\msv\jars\msv-20020414.jar;D:\work\opensource\maven-1.0-beta-9\repository\relaxngDatatype\jars\relaxngDatatype-20020414.jar
[DEBUG] Adding reference: maven-classpath ->
[DEBUG] Adding reference: maven.compile.src.set ->
[DEBUG] Adding reference: maven.dependency.classpath ->
D:\work\opensource\maven-1.0-beta-9\repository\ant\jars\ant-1.5.3-1.jar;D:\work\opensource\maven-1.0-beta-9\repository\dom4j\jars\dom4j-1.4-dev-8.jar;D:\work\opensource\maven-1.0-beta-9\repository\commons-grant\jars\commons-grant-1.0-beta-4.jar;D:\work\opensource\maven-1.0-beta-9\repository\commons-jelly\jars\commons-jelly-20030211.141339.jar;D:\work\opensource\maven-1.0-beta-9\repository\commons-jelly\jars\commons-jelly-tags-jsl-20030211.143151.jar;D:\work\opensource\maven-1.0-beta-9\repository\commons-jelly\jars\commons-jelly-tags-log-20030211.142821.jar;D:\work\opensource\maven-1.0-beta-9\repository\commons-jelly\jars\commons-jelly-tags-velocity-20030303.205659.jar;D:\work\opensource\maven-1.0-beta-9\repository\commons-jelly\jars\commons-jelly-tags-xml-20030211.142705.jar;D:\work\opensource\maven-1.0-beta-9\repository\maven\jars\maven.jar;D:\work\opensource\maven-1.0-beta-9\repository\velocity\jars\velocity-1.3.jar;D:\work\opensource\maven-1.0-beta-9\repository\velocity-dvsl\jars\velocity-dvsl-0.45.jar;D:\work\opensource\maven-1.0-beta-9\repository\xml-apis\jars\xml-apis-1.0.b2.jar
[DEBUG] Adding reference: maven-classpath ->
[DEBUG] Adding reference: maven.compile.src.set ->
xdoc:init:
teststyle:
[style] [VERBOSE] Using class org.apache.tools.ant.taskdefs.optional.TraXLiaison
[style] [DEBUG] In file D:\work\opensource\jmscts\target\testcoverage.xml time:
1054181391253
[style] [DEBUG] Out file
D:\work\opensource\jmscts\target\generated-xdocs\tests2requirements.xml time: 0
[style] [DEBUG] Style file src/doc/style/testcases.xsl time: 1054121153794
[style] Processing D:\work\opensource\jmscts\target\testcoverage.xml to
D:\work\opensource\jmscts\target\generated-xdocs\tests2requirements.xml
[style] Loading stylesheet D:\work\opensource\jmscts\src\doc\style\testcases.xsl
BUILD FAILED
javax.xml.transform.TransformerFactoryConfigurationError: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found
at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
at
org.apache.tools.ant.taskdefs.optional.TraXLiaison.getFactory(TraXLiaison.java:387)
at
org.apache.tools.ant.taskdefs.optional.TraXLiaison.readTemplates(TraXLiaison.java:336)
at
org.apache.tools.ant.taskdefs.optional.TraXLiaison.createTransformer(TraXLiaison.java:354)
at
org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:181)
at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:527)
at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:239)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:231)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:116)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:394)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:357)
at org.apache.maven.cli.App.doMain(App.java:524)
at org.apache.maven.cli.App.main(App.java:1080)
at java.lang.reflect.Method.invoke(Native Method)
at com.werken.forehead.Forehead.run(Forehead.java:543)
at com.werken.forehead.Forehead.main(Forehead.java:573)
Provider org.apache.xalan.processor.TransformerFactoryImpl not found
com.werken.werkz.UnattainableGoalException: Unable to obtain goal [teststyle] --
null:59:80: <ant:style> Provider org.apache.xalan.processor.TransformerFactoryImpl not
found
at com.werken.werkz.Goal.fire(Goal.java:646)
at com.werken.werkz.Goal.attain(Goal.java:575)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:394)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:357)
at org.apache.maven.cli.App.doMain(App.java:524)
at org.apache.maven.cli.App.main(App.java:1080)
at java.lang.reflect.Method.invoke(Native Method)
at com.werken.forehead.Forehead.run(Forehead.java:543)
at com.werken.forehead.Forehead.main(Forehead.java:573)
org.apache.commons.jelly.JellyTagException: null:59:80: <ant:style> Provider
org.apache.xalan.processor.TransformerFactoryImpl not found
at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:701)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:295)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:116)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:394)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:357)
at org.apache.maven.cli.App.doMain(App.java:524)
at org.apache.maven.cli.App.main(App.java:1080)
at java.lang.reflect.Method.invoke(Native Method)
at com.werken.forehead.Forehead.run(Forehead.java:543)
at com.werken.forehead.Forehead.main(Forehead.java:573)
Root cause
javax.xml.transform.TransformerFactoryConfigurationError: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found
at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
at
org.apache.tools.ant.taskdefs.optional.TraXLiaison.getFactory(TraXLiaison.java:387)
at
org.apache.tools.ant.taskdefs.optional.TraXLiaison.readTemplates(TraXLiaison.java:336)
at
org.apache.tools.ant.taskdefs.optional.TraXLiaison.createTransformer(TraXLiaison.java:354)
at
org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:181)
at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:527)
at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:239)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:231)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:116)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:394)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:357)
at org.apache.maven.cli.App.doMain(App.java:524)
at org.apache.maven.cli.App.main(App.java:1080)
at java.lang.reflect.Method.invoke(Native Method)
at com.werken.forehead.Forehead.run(Forehead.java:543)
at com.werken.forehead.Forehead.main(Forehead.java:573)
Total time: 4 seconds
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]