Sorry for crossposting, but the problem occures, if I try to get the Parser
from FOInputHandler in the junit test case. inputHandler.getParser() throws
a FOPException:

org.apache.fop.apps.FOPException: org.apache.xerces.parsers.SAXParser is not
a SAX driver
at org.apache.fop.apps.InputHandler.createParser(InputHandler.java:75)
at org.apache.fop.apps.FOInputHandler.getParser(FOInputHandler.java:40)
....

based on a ClassCastException:

java.lang.ClassCastException:
org.apache.xerces.parsers.StandardParserConfiguration
at org.apache.xerces.parsers.SAXParser.<init>(SAXParser.java:95)
at java.lang.Class.newInstance0(Native Method)  at
java.lang.Class.newInstance(Class.java:232)
at org.apache.fop.apps.InputHandler.createParser(InputHandler.java:66)
at org.apache.fop.apps.FOInputHandler.getParser(FOInputHandler.java:40)
...

The SAX2 final version isn't correct set only in the test case (in the
application every thing works fine)!?

> -----Original Message-----
> From: Torsten Erler [mailto:[EMAIL PROTECTED]]
> Sent: Donnerstag, 16. Mai 2002 09:37
> To: Xalan-Dev (E-mail)
> Subject: Environment problem
>
>
> Hi all
>
> I've a incomprehensibly problem with the SAX environment.
>
> If I start my project and run EnvironmentCheck all is ok:
>
> #---- BEGIN writeEnvironmentReport($Revision: 1.10 $): Useful stuff
> found: ----
> version.DOM.draftlevel=2.0fd
> java.class.path=>snip (too long)
> version.JAXP=1.1
> java.ext.dirs=D:\javasoft\jdk1.3.1\jre\lib\ext
> version.xerces2=Xerces-J 2.0.1
> version.xerces1=not-present
> version.xalan2_2=Xalan Java 2.3.1
> version.xalan1=not-present
> version.ant=not-present
> java.version=1.3.1_03
> version.DOM=2.0
> version.crimson=not-present
> sun.boot.class.path=D:\javasoft\jdk1.3.1\jre\lib\rt.jar;D:\jav
> asoft\jdk1.3.1
> \jre\lib\i18n.jar;D:\javasoft\jdk1.3.1\jre\lib\sunrsasign.jar;
> D:\javasoft\jd
> k1.3.1\jre\classes
> #---- BEGIN Listing XML-related jars in:
> foundclasses.java.class.path ----
> xml-apis.jar-apparent.version=xml-apis.jar from xalan-j_2_3_0 from
> xml-commons-1.0.b2
> xml-apis.jar-path=f:\java\projects\star\beta\java\ext\tools\li
> b\xalan-2.3.1_
> xml-apis.jar
> #----- END Listing XML-related jars in:
> foundclasses.java.class.path -----
> version.SAX=2.0
> version.xalan2x=Xalan Java 2.3.1
> #----- END writeEnvironmentReport: Useful properties found: -----
> # YAHOO! Your environment seems to be OK.
>
> Then, I have a test class and if I start this unit test with 100%
> identically classpath the result is:
>
> #---- BEGIN writeEnvironmentReport($Revision: 1.10 $): Useful stuff
> found: ----
> version.DOM.draftlevel=2.0fd
> java.class.path=>snip (too long)
> version.JAXP=1.1
> java.ext.dirs=D:\javasoft\jdk1.3.1\jre\lib\ext
> version.xerces2=Xerces-J 2.0.1
> version.xerces1=not-present
> version.xalan2_2=Xalan Java 2.3.1
> ERROR.version.SAX=ERROR attempting to load SAX version 2 class:
> java.lang.NoSuchMethodException: setAttributes
> ERROR.=At least one error was found!
> version.xalan1=not-present
> version.ant=not-present
> version.SAX-backlevel=2.0beta2-or-earlier
> java.version=1.3.1_03
> version.DOM=2.0
> version.crimson=not-present
> sun.boot.class.path=D:\javasoft\jdk1.3.1\jre\lib\rt.jar;D:\jav
> asoft\jdk1.3.1
> \jre\lib\i18n.jar;D:\javasoft\jdk1.3.1\jre\lib\sunrsasign.jar;
> D:\javasoft\jd
> k1.3.1\jre\classes
> #---- BEGIN Listing XML-related jars in:
> foundclasses.java.class.path ----
> xml-apis.jar-apparent.version=xml-apis.jar from xalan-j_2_3_0 from
> xml-commons-1.0.b2
> xml-apis.jar-path=f:\java\projects\star\beta\java\ext\tools\li
> b\xalan-2.3.1_
> xml-apis.jar
> #----- END Listing XML-related jars in:
> foundclasses.java.class.path -----
> version.xalan2x=Xalan Java 2.3.1
> #----- END writeEnvironmentReport: Useful properties found: -----
> # WARNING: Potential problems found in your environment!
> #    Check any 'ERROR' items above against the Xalan FAQs
> #    to correct potential problems with your classes/jars
> #    http://xml.apache.org/xalan-j/faq.html
>
> Can anyone help me? I don't understand the difference,
> because the classpath
> and the sequence of jar files is the same in both cases!
>
> ThanX Torsten
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to