You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/03/25 22:42:41 UTC
DO NOT REPLY [Bug 7463] New: -
Returning a null serializer
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7463>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7463
Returning a null serializer
Summary: Returning a null serializer
Product: XalanJ2
Version: 2.0.0
Platform: PC
OS/Version: Windows 9x
Status: NEW
Severity: Normal
Priority: Other
Component: org.apache.xalan.serialize
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: coppinjg@ugcorp.com
I have been experimenting with JAXP in JBuilder3. I got my jar files off of sun
and crimson form apache. I can get the parser to work but not the transformer.
All of the compnents of transform.sax work until I call method
transformer.transform(Source s, Result r) I get this stack trace:
java.lang.ExceptionInInitializerError
at org.apache.xalan.serialize.SerializerFactory.getSerializer
(SerializerFactory.java:131)
at
org.apache.xalan.transformer.TransformerImpl.createResultContentHandler
(TransformerImpl.java:1007)
at
org.apache.xalan.transformer.TransformerImpl.createResultContentHandler
(TransformerImpl.java:934)
at org.apache.xalan.transformer.TransformerImpl.transform
(TransformerImpl.java:1083)
at org.apache.xalan.transformer.TransformerImpl.transform
(TransformerImpl.java:1066)
at SAXExperiment.TransformTest.initializeSAXTransformer
(TransformTest.java:111)
at SAXExperiment.TransformTest.<init>(TransformTest.java:68)
at SAXExperiment.TransformTest.main(TransformTest.java:170)
I first figured the serializer was not getting a valid output method so I then
checked the properties of my transformer and got {indent=yes, method=xml}. I am
out of ideas.
part of code:
saxFactory = (SAXTransformerFactory) TransformerFactory.newInstance();
template = saxFactory.newTemplates(new StreamSource(STYLESHEET));
//transformer = saxFactory.newTransformer(new StreamSource(STYLESHEET));
transformer = template.newTransformer();
Properties p = transformer.getOutputProperties();
System.out.println(p.toString());
File f = new File(RESULTFILE);
System.out.println(f.exists());
transformer.transform(new StreamSource(INPUTFILE), new StreamResult
(RESULTFILE));