ClassNotFoundException with Xalan under Tomcat 3.2.3

Hello,

i want to integrate xalan in my servlet.

the source:

try{

TransformerFactory tfFactory = TransformerFactory.newInstance();

Source xmlSource =new StreamSource(new URL("http://localhost:8080/..."+ strLang).openStream());

Source xslSource =new StreamSource(new URL(strXSL).openStream());

Transformer transformer = tfFactory.newTransformer(xslSource);

transformer.transform(xmlSource,new StreamResult(pwOut));

}catch(Exception e){}

The web.xml and server.xml files are editet correctly.

The xalan-packages are deployed global in the server-classes-directory and in the WEB-INF-classes-directory.

so it should be working.

but tomcat produce allways this exception:

javax.xml.transform.TransformerFactoryConfigurationError: java.lang.ClassNotFoundException: org/apache/xalan/processor/TransformerFactoryImpl

i guess it breaks down at:TransformerFactory.newInstance()

but why?

does anybody has an idea?

greeting, steve

[1475 byte] By [shausch] at [2007-9-26 5:23:10]
# 1

> The xalan-packages are deployed global in the

> server-classes-directory and in the

> WEB-INF-classes-directory.

>

> so it should be working.

>

> but tomcat produce allways this exception:

>

> javax.xml.transform.TransformerFactoryConfigurationErro

> : java.lang.ClassNotFoundException:

> org/apache/xalan/processor/TransformerFactoryImpl

>

>

> but why?

It sounds like Tomcat is loading up the Xalan package after it loads its own packages. So if you make sure that it is first in line to be loaded, it should work.

jsugrue at 2007-6-29 19:29:47 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
thank youit's donei changed to weblogic (production environment) and there it works. tomcat was "only" my test-environment.
shausch at 2007-6-29 19:29:47 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...