You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Cherisse Linford <CL...@novell.com> on 2001/05/05 00:04:24 UTC

RE: Why do I get an exception that says "Stream Closed"? (Xalan Java 2.0.1)

What Java security settings do I need to check?  I included all of the output_xxx.properties files in my JAR file and in the codebase.  It is still not working.  I made an application (instead of an applet) and my code worked just fine.  Why doesn't it work in an applet?
 
Thanks,
 
 
Cherisse Linford
Novell, Inc., the leading provider of Net services software. 
www.novell.com 

>>> Rob.Stanley@Geac.com 05/02/01 04:02AM >>>

Cherisse,
 
Your "Stream Closed" error is probably from the xerces OutputProperties.loadPropertiesFile(String,Properties) method. 
 
The file being loaded is output_xxx.properties (where xxx is 'xml', 'html' or 'text'). Sor some reason, the InputStream returned from a getResourceAsStream call is null. As you are running from an applet, I would check your Java security settings, and your codebase for the properties files themselves.
 
Hope this helps,
 
Rob Stanley
GEAC Enterprise Solutions
 
-----Original Message-----
From: Cherisse Linford [mailto:CLinford@novell.com] 
Sent: 01 May 2001 22:22
To: xalan-dev@xml.apache.org 
Subject: Why do I get an exception that says "Stream Closed"? (Xalan Java 2.0.1)


Here is some of my code:
 
// Get the XSLT from a URL
StreamSource xslDomSource = new StreamSource(codeBase + XSLT);
 
// Set the systemId: note this is actually a URL, not a local filename
xslDomSource.setSystemId(codeBase + XSLT);

// Process the stylesheet DOMSource and generate a Transformer.
Transformer transformer = tFactory.newTransformer(xslDomSource);
 
I get the following in my stack trace:
 
javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.apache.xml.utils.WrappedRuntimeException: Stream closed
javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.apache.xml.utils.WrappedRuntimeException: Stream closed
 at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:684)
 at epdApplet.loadPRDTree(epdApplet.java:1277)
 at epdApplet.start(epdApplet.java:343)
 at sun.applet.AppletPanel.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
 
Any ideas what is going wrong?
Thanks in advance,
Cherisse