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]



Reply via email to