Content Filter - Stream Closed error
Hello,
i have created a Content-Filter for xml files. Within the filter i parse the file with SAX. Then i want to render this xml file with an XSLT Filter, but there i get always the error message: 'IOException: stream closed'. Any hints to solve the problem?
regards,
Marco
Hi Marco,
if the stream is parsed through an steeam handle, ensure that the implementation of the handle does not close the stream. The stream should be reseted after the handler call, or you simply creat a new buffered stream (java.io.BufferedInputStream) containing the parsed data, which is than passed to the RF.
Regards,
Thilo
Similar Messages
-
Stream closed error while testing a composite in EM
HI,
I have deployed a simple composite and wanted to test it in EM. I am getting a stream closed popup, not sure whats wrong?
I have restarted the server and problem still persists.its actually remote server, I am able to deploy a simple HelloWorld composite and even able to see the same in Em.I can even browse through all the composites deployed there by many other people.But problem is when I try to test it its giving the Stream closed error.
Is it something to do with access permissions, if so i would not have deployed it in first case..
the pop up error message----
Stream Closed
For more information, please see the server's error log for
an entry beginning with: Server Esception beginning with PPR, #14
_______________________________ -
Hello!
I have this 2-class package which gets informations on Microsoft SQL Server 2005 tables and table content. It worked perfectly on J2SE 5. Today I moved to Java J2SE1.6 u1 and recompiled the project. Now, it triggers bizzare Steam Closed exceptions when trying to read a line from the keyboard (if I let exceptions to be thrown). I found several posts regarding this readLine-stream closed issue on the java forums, but none answered this problem satisfactorily. This is my code:
package databaseinfo;
import java.io.*;
import java.sql.*;
public class DatabaseInfo {
private static DBConnection dbConn; // connection to DB
/** connects to the SQL Server 2005, using the given credntials
public static boolean connect() {
String username = "test";
String password = "test";
String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; // JDBC driver for connecting to MSSQL 2005
String url = "jdbc:sqlserver://FIREBLADE\\SQLEXPRESS"; // JDBC connection URL to MSSQL 2005
try {
dbConn = new DBConnection(username,password,driver,url);
catch (Exception e) { return false; }
return true;
/** disconnects from the SQL Server 2005
public static void disconnect() {
try {
dbConn.logout();
catch (Exception e) { }
/** prints the list of tables belonging to the user (dbo) from the current
* database
public static void printTablesList() {
try {
dbConn.printQueryResult("EXEC sp_tables @table_owner=dbo");
catch (Exception e) { return; }
/** prints extra information and the content of a user-given table
public static void printTableInfoAndContent() throws IOException {
try {
BufferedReader in = new BufferedReader(
new InputStreamReader(System.in));
String tableName;
System.out.println("\nGet extra information and the content of which table? ");
tableName = in.readLine();
in.close();
dbConn.printQueryResult("EXEC sp_columns @table_name=" + tableName);
System.out.println();
dbConn.printQueryResult("SELECT * FROM " + tableName);
catch (IOException e) { }
public static void main(String args[]) throws IOException {
connect();
printTablesList();
printTableInfoAndContent();
disconnect();
package databaseinfo;
import java.io.*;
import java.sql.*;
public class DBConnection {
// maximum no. of rows on the user console screen
private final static int maxRowCount = 25;
private Connection conn; // connection to DB
/** connects to the MSSQL 2005 database
public DBConnection (String username, String password, String driver,
String url) throws ClassNotFoundException, SQLException {
login(username,password,driver,url);
/** login to SQL Server 2005 for a user having a username and a passsword,
* using a certain database driver and a given url
public int login(String username, String password, String driver, String url)
throws ClassNotFoundException,
SQLException {
Class.forName(driver); // sets the JDBC driver
conn = DriverManager.getConnection(url,username,password); // obtains the JDBC connection
if (conn != null)
System.out.println("\nSQL Server Connection established ...\n");
else {
System.out.println("\nBad username and/or password.\n");
return 0;
return 1;
/** closes the JDBC connection
public void logout() throws SQLException {
conn.close();
System.out.println("\nSQL Server Connection closed.\n");
/** executes SQL queries and prints their output to the screen
public void printQueryResult(String sql) {
try {
BufferedReader in = new BufferedReader(
new InputStreamReader(System.in));
int rowCount = 0;
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery(sql);
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
int i;
for (i = 1; i <= numberOfColumns; i++)
System.out.print(rsmd.getColumnName(i)+"\t");
System.out.println();
while (rs.next()) {
if ((rowCount != 0) && (rowCount % maxRowCount == 0)) {
System.out.println("\nPress ENTER to continue ... ");
in.read();
for (i = 1; i <= numberOfColumns; i++)
System.out.print(rs.getString(i) + "\t\t");
rowCount++;
System.out.println();
in.close();
catch (Exception e) { }
}Thanks for reading this post!Don't close the input stream, and don't create a new one every time you want to read - create one for the life of the program.
-
Hi,
Iam using jsch API for connecting to SFTP, but my code is giving the error saying :"com.jcraft.jsch.JSchException: java.io.IOException: inputstream is closed", though Iam clossing the channel. So, can anyone suggest what could be the reason for this?So you are getting "input stream is closed" and you are "closing the channel".
Your question? -
I/O error: InputSource: Stream closed
Hi
I am new to XML. I am trying to modify XML content using DOM parser. After the modification I want to check if the changes have taken place or not by printing the XML on the console.
This is what I have done:
1. Read XML from InputSource
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
Document doc = docBuilder.parse(inputSource);2. Get the nodes to Modify.
NodeList nodeList = (NodeList)doc.getElementsByTagName("XXX");3. Print the InputSource to check the changes.
BufferedReader readerTemp = new BufferedReader(new InputStreamReader(inputSource.getByteStream()));
String inputLine;
while ((inputLine = readerTemp.readLine()) != null) {
System.out.println(inputLine);
}But however, when I try to view the changes I get an error STREAM CLOSED.
Please help me, how to open the inputSource again to read the stream from it... what can I do to solve this problem?The parser closes the input source, having read it all the way to EOF. So there's nothing left to be read even if the parser didn't close the source.
So you need a new input source.
But are the changes taking place on the file, or just in the DOM? In which case re-reading the file won't show any changes - you will need to write the DOM out to the file.
In which case you can look at it with a text editor. Alternatively you can print the DOM to the console directly.
So you don't really need the answer to your original question. -
Error on content write: Socket closed
Since a week or so we are getting the following stack trace on our WebCenter Portal (11.1.1.6.3). There are several content presenters on it, and so far I've not found out yet where the problem originates from. Has anyone experienced the same, or perhaps any pointers?
<Aug 24, 2012 3:10:13 PM CEST> <Error> <oracle.webcenter.content.internal.http.HttpServiceImpl> <WCS-11001> <Error on content write: Socket closed
oracle.webcenter.content.internal.http.InternalServerErrorException: Aug 24, 2012 3:10:13 PM oracle.webcenter.content.internal.http.HttpServiceExceptionFactory getException
ALL: Error on content write: Socket closed
at oracle.webcenter.content.internal.http.HttpServiceExceptionFactory.getException(HttpServiceExceptionFactory.java:191)
at oracle.webcenter.content.internal.http.HttpServiceExceptionFactory.createInternalServerError(HttpServiceExceptionFactory.java:707)
at oracle.webcenter.content.internal.http.HttpServiceExceptionFactory.createInternalServerError(HttpServiceExceptionFactory.java:685)
at oracle.webcenter.content.internal.http.HttpServiceExceptionFactory.createInternalServerError(HttpServiceExceptionFactory.java:664)
at oracle.webcenter.content.internal.http.Entity.sendResponse(Entity.java:205)
at oracle.webcenter.content.internal.http.HttpServiceImpl.doGetOrHead(HttpServiceImpl.java:322)
at oracle.webcenter.content.internal.http.HttpServiceImpl.service(HttpServiceImpl.java:179)
at oracle.webcenter.content.http.GetHandlerServlet.service(GetHandlerServlet.java:225)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.wcps.client.PersonalizationFilter.doFilter(PersonalizationFilter.java:75)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.webcenter.content.integration.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:168)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
>We have a content presenter which loads a video file from the content server. It looks like the socket is unexpectedly closed at some point if the video is paused or stopped for some reason.
-
Ejbc error: Stream Closed
I get this error when i build my ejb jar file using weblogic.ejbc. I
have defined WL_HOME and have applied sp12 of weblogic. Please help
D:\xyz>C:\jdk1.2.2\jre\..\bin\java.exe -mx256m -classpath
C:\xerces-1_2_1\xerces.jar;C:\Weblogic\lib
\weblogic510sp12.jar;C:\Weblogic\lib\weblogic510sp12boot.jar;C:\Weblogic\classes\boot;C:\Weblogic\li
cense;C:\Weblogic\classes;C:\Weblogic\lib\weblogicaux.jar;C:\Weblogic\myserver\clientclasses;C:\Webl
ogic\myserver\serverclasses;C:\Weblogic\mssqlserver4v70\classes;C:\TOPLink3.6\TLJ\Classes\JDK1.2;C:\
TOPLink3.6\TLJ\Classes\JDK1.2\Tools.jar;C:\TOPLink3.6\TLJ\Classes\JDK1.2\Toplink.jar;C:\TOPLink3.6\T
LJ\Classes\JDK1.2\Toplinkx.jar;C:\TOPLink3.6\TLWL51\Classes\JDK1.2\TOPLinkWLX.jar;C:\qt_v2001_1p0;%J
AVAMAIL_CLASSPATH%;%J2EE_CLASSPATH%;D:\hbp\build weblogic.ejbc
-verbose -normi "-J-mx256m" -nowarn -
compiler sj D:\abc\dist\lib\abc-generic.jar D:\abc\dist\lib\abc.jar
I keep getting this error - ejbc error: Stream Closed
Any help will be appreciated.I am using ant 1.4.1 for building this. The error message is just EJB
Error: Stream Closed. It says that ejbc reported an error. No details
at all. i know it is difficult to reproduce anywhere. When i installed
jdk1.3, it gave error on the public id of the toplink meta-inf cmp xml
files.
Rob Woollen <[email protected]> wrote in message news:<[email protected]>...
Can you show us the full error message?
-- Rob
Bala wrote:
I get this error when i build my ejb jar file using weblogic.ejbc. I
have defined WL_HOME and have applied sp12 of weblogic. Please help
D:\xyz>C:\jdk1.2.2\jre\..\bin\java.exe -mx256m -classpath
C:\xerces-1_2_1\xerces.jar;C:\Weblogic\lib
\weblogic510sp12.jar;C:\Weblogic\lib\weblogic510sp12boot.jar;C:\Weblogic\classes\boot;C:\Weblogic\li
cense;C:\Weblogic\classes;C:\Weblogic\lib\weblogicaux.jar;C:\Weblogic\myserver\clientclasses;C:\Webl
ogic\myserver\serverclasses;C:\Weblogic\mssqlserver4v70\classes;C:\TOPLink3.6\TLJ\Classes\JDK1.2;C:\
TOPLink3.6\TLJ\Classes\JDK1.2\Tools.jar;C:\TOPLink3.6\TLJ\Classes\JDK1.2\Toplink.jar;C:\TOPLink3.6\T
LJ\Classes\JDK1.2\Toplinkx.jar;C:\TOPLink3.6\TLWL51\Classes\JDK1.2\TOPLinkWLX.jar;C:\qt_v2001_1p0;%J
AVAMAIL_CLASSPATH%;%J2EE_CLASSPATH%;D:\hbp\build weblogic.ejbc
-verbose -normi "-J-mx256m" -nowarn -
compiler sj D:\abc\dist\lib\abc-generic.jar D:\abc\dist\lib\abc.jar
I keep getting this error - ejbc error: Stream Closed
Any help will be appreciated. -
ERRORS:
Business Model DAC Measures:
[nQSError: 14031] The content filter of a source for logical table: D_END_TIME references multiple dimensions.
[nQSError: 15001] Could not load navigation space for subject area DAC Measures.
Thank you!Yes ! My Task Hierarchy has 3 dimension tables that form a hierarchy :Execution Plan -> Tasks -> Detail
All the 3 levels in the hierarchy are 3 different dimension tables. -
WebLogic Server 6.1 SP 3 DocumentBuilder throws IOException: Stream closed
Hi,
I have a question about XML processing and error handling, and how the
WebLogic container affects things.
Here's what happens to us. We have a servlet parsing XML using DOM.
The servlet has an InputStream with the content. It gets the default
DocumentBuilderFactory
(weblogic.xml.jaxp.RegistryDocumentBuilderFactory) and makes it
validating. It asks for a DocumentBuilder. It gives the builder our
own custom error handler to collect up all the SAX parse errors. It
then tells the builder to parse the input stream. We would expect
that any problems with the content would be reported as an error to
our error handler, so that we can then report the errors to the user
as part of the servlet response.
However, certain malformed XML content causes the WebLogic parser to
issue several error messages to System.out and throw an IOException
with the message "Stream closed". No errors are recorded in our error
handler. This happens on a variety of inputs, which all revolve
around the root element start tag being malformed or entirely missing.
We get this behavior with a totally empty stream, with a stream that
has the <?xml> and <!DOCTYPE> headers but nothing else, with a stream
that has the headers and then a malformed start tag like
"<Submit_Contracts a="1"b="2"/>". I think the programmer would expect
any of these inputs to cause the parser to simply report a fatal error
and stop. Throwing an IOException makes it look like it's an error in
the underlying stream, and clearly it's not. (Most of the test code I
used actually pulled the XML from a ByteArrayInputStream.)
Shouldn't WebLogic's parser handle these inputs differently? Throwing
an IOException can't be correct, can it? Should the application
instead be responsible for checking that the input has a well-formed
start tag? In that case the application is doing the parsing that we
want to rely on the parser to do! Should the application instead
catch IOExceptions from the parser and report them to the user as
input errors? In that case the application can potentially swallow
and ignore harmful system errors.
The messages on System.out are all along the lines of:
"<Oct 17, 2002 5:38:03 PM EDT> <Error> <XML> <Failed to open XML
document. Failed to retrieve PUBLIC id or SYSTEM id from the document.
Decrease the number of char between the beginning of the document and
its root element.>
<Oct 17, 2002 5:38:03 PM EDT> <Error> <XML> <Failed to open XML
document. Failed to retrieve PUBLIC id. Stream closed>
<Oct 17, 2002 5:38:03 PM EDT> <Error> <XML> <Failed to parse given XML
document. Failed to retrieve PUBLIC id. The root element is required
in a well-formed document.>
<Oct 17, 2002 5:38:03 PM EDT> <Error> <XML> <Failed to parse given XML
document. Failed to retrieve SYSTEM id. The root element is required
in a well-formed document.>
<Oct 17, 2002 5:38:03 PM EDT> <Error> <XML> <Failed to open XML
document. Failed to retrieve root tag. Stream closed>
<Oct 17, 2002 5:38:03 PM EDT> <Error> <XML> <Could not instantiate
factory class specified in the Server console. Invalid parameters: at
least one of publicId,systemId, rootTag must be non-null>
The IOException looks like:
"java.io.IOException: Stream closed
at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:118)
at java.io.BufferedInputStream.read(BufferedInputStream.java:268)
at weblogic.apache.xerces.utils.ChunkyByteArray.fill(ChunkyByteArray.java:230)
at weblogic.apache.xerces.utils.ChunkyByteArray.<init>(ChunkyByteArray.java:106)
at weblogic.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultReaderFactory.java:153)
at weblogic.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:499)
at weblogic.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:318)
at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:974)
at weblogic.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:183)
at weblogic.xml.jaxp.RegistryDocumentBuilder.parse(RegistryDocumentBuilder.java:140)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
at com.isone.sms.participant.contracts.web.WebLogicParserContainerTest.testWebLogicParserTanksOnEmptyStream(WebLogicParserContainerTest.java:448)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:166)
at junit.framework.TestCase.runBare(TestCase.java:140)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at com.isone.sms.participant.contracts.web.ContractTestServlet.doPost(ContractTestServlet.java:23)
at com.isone.sms.participant.contracts.web.ContractTestServlet.doGet(ContractTestServlet.java:16)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)"
Judging from the IOException, it looks as though WebLogic's wrapper
parser, RegistryDocumentBuilder, successfully picked a real parser to
do its work and is passing off the input to be parsed there, even
though the input's already closed. Perhaps the
RegistryDocumentBuilder silently screwed up the stream while trying to
figure out what parser to use, but didn't take that into account
before attempting to pass it off for parsing. Perhaps the error
messages on System.out account for when RegistryDocumentBuilder is
screwing up the stream.
But if RegistryDocumentBuilder discovers that the stream can't be
parsed, why can't it simply report a fatal error and stop before
starting the real parser?
Mainly I wanted to put this experience up here on a newsgroup because
I was so surprised that nobody else had reported similar problems. It
makes me doubt whether our applications are handling the XML parsing
correctly. But I can't see any other way that makes sense. Please
let me know what you think!
Thanks,
Jim
Hi,
I got this error when i used JRUN as plugin server through
Ineternet Information Server. but it was working fine when used it
as standalone server.
The reason was beacuase, the inputstream was getting closed . when i removed it, it started working.
(To be frank , the Inputstream was closed by XML DOM PARSER , which is third party component.)
and believe that your case is also the same ....
If you have doubt on that then see that configuration for proxies under your webservers config files
best of luck
LOkesh T.C -
I have put a lot of work into a docx document on my Mac, but now can't open it as it gives the error message: 'the Open XML file cannot be opened because there are problems with the contents. Details, Unspecific
error, Location: 2'
When opening the original file the message said: 'this file contains word 2007 for Windows equations' etc. but I managed to track changes fine, and saved, closed and re-opened it numerous times without problem. Some graphs seemed moved, and various formulas
were illegible, but no other weirdness was observed.
I have microsoft 2008 installed on my Mac OS X version 10.6.8.
I've tried to fix it using various solutions suggested here, but am afraid am too IT illiterate to have had any luck, please help I'm new to all this!
I've uploaded it to https://www.dropbox.com/s/hkw9k6lyihzoxpc/SittwayPauktawSQUEACREPORT_KD%2BCH.docxHi,
This issue is related strictly to oMath tags and occurs when a graphical object or text box is anchored to the same paragraph that contains the equation.
Please use the "Fix it" tool in the following KB article to resolve the problem. See:
http://support.microsoft.com/kb/2528942
Hope this helps.
Regards,
Steve Fan
TechNet Community Support -
Can I set up a Content Filter that is Time/Date stamp dependent?
My company would like to add an additional disclaimer text during Holidays where the company is closed. It will say something like: "In observance of the 'XYZ' holiday, our offices will be closing at 3:00 PM on Friday, December........ and will reopen at 8:30 AM Monday.......".
I was wondering if there is a way to set up conditions in an Outgoing content filter to only include that text if the email is sent between certain dates.
This would allow me to set up the filters prior to the holidays and not have to manage them manually.
I tried to do it via Exchange Transport rule, but I can't find a time/date dependent condition for the rules in Exchange.
Thanks,
RachelHi Rachel,
there is no way to archive this directly in content filters, an indirect way would be to use a message filter that adds an additional header (i.e. X-mas: true) during a specific period. For that, message filters provide the 'date' rule, i.e
HolidayHeader:
if ((date > '12/20/2012 13:00:00') and
(date < '12/28/2012 12:00:00'))
insert-header('X-mas', 'TRUE');
You'd then create an outbound content filter matching on this header and inserting the specific footer if the header exists. Or, of course, you could have that action in the message filter already, however in that case you need additional conditions to make sure the rule applies on outbound messages only.
Hope that helps,
Andreas -
Stream closed while copying?
Hi, i am trying to open a connection to a url and then trying to save the page to a location. i frequently face a problem in which the copying terminated by itself. This only happens when i try to copy a webpage with big file size. However sometimes it manage to succesfully copy the files. So, can anyone tell me what wrong? Sometimes it can, sometimes cannot. I put my codes in a try catch block but nothing was done in the catch block although i try to print out the error message. My partial codes shown below.
URL _url = new URL("http://www.google.com");
OutputStream out = new FileOutputStream("test.html");
URLConnection conn = _url.openConnection();
conn.connect();
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
while ((inputString = reader.read()) != -1) {
out.write(inputString);
out.flush();
out.close();Thank you.i managed to track down the error stack. i think the code dies during the execution of method available() of java.net.PlainSocketImpl. I think this is the socket connection problem which throw the exception. the socket should be instantiaed when i call url.openConnection() if i not wrong. and why it dies i really clueless. and somemore it does not die at all times. most time it is ok. any help is very appreciated. below is the error msg. thanks.
java.io.IOException: Stream closed.
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.<init>(Throwable.java:87)
at java.lang.Exception.<init>(Compiled Code)
at java.io.IOException.<init>(Compiled Code)
at java.net.PlainSocketImpl.available(Compiled Code)
at java.net.SocketInputStream.available(Compiled Code)
at java.io.BufferedInputStream.read(Compiled Code)
at java.io.FilterInputStream.read(Compiled Code)
at java.io.PushbackInputStream.read(Compiled Code)
at java.io.FilterInputStream.read(Compiled Code)
at java.io.InputStreamReader.fill(Compiled Code)
at java.io.InputStreamReader.read(Compiled Code)
at java.io.BufferedReader.fill(Compiled Code)
at java.io.BufferedReader.readLine(Compiled Code)
at java.io.BufferedReader.readLine(Compiled Code)
at ActionPrintReport.loadPage(Compiled Code)
at ActionPrintReport.<init>(Compiled Code) -
Axis Client Web Service call problem: java.io.IOException: Stream closed
Hi, I tried to call a webservice from Axis Client, and I encounter the following error. Do you guys have any idea what actually happens?
Please help, I am newbie in web services.
==============Root Cause===============
AxisFault
faultCode: { h t t p : / / schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.io.IOException: Stream closed
faultActor:
faultNode:
faultDetail:
{h t t p : / / xml.apache.org/axis/}stackTrace:java.io.IOException: Stream closed
at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
at java.io.FilterInputStream.read(FilterInputStream.java:111)
at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
at java.io.FilterInputStream.read(FilterInputStream.java:90)
at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:127)
at org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:688)
at org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString(HttpMethodBase.java:796)
at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:224)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
{h t t p : / / xml.apache.org/axis/}hostname:compname
java.io.IOException: Stream closed
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:301)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by: java.io.IOException: Stream closed
at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
at java.io.FilterInputStream.read(FilterInputStream.java:111)
at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
at java.io.FilterInputStream.read(FilterInputStream.java:90)
at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:127)
at org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:688)
at org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString(HttpMethodBase.java:796)
at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:224)
... 17 more I am calling through proxy, the setting is as follows:
System.setProperty("https.proxyHost", [proxyname here]);
System.setProperty("https.proxyPort", [proxyport here]);
System.setProperty("http.proxyHost", [proxyname here]);
System.setProperty("http.proxyPort", [proxyport here]);Are there any problems showing up in the server's log?
-
Stream Closed BufferedReader in Java
I do sometimes see an error "Stream Closed" while trying to read a file which has more than 8192 chars (default size of buffer).
And the buffer sometimes consumes the entire file and some of the times only 8192 characters.
Will appreciate some one help me on this urgentlyString fileName = "D:/Venkat/test files/file.txt";
try{
BufferedReader in = new BufferedReader ( new FileReader
(fileName));
String s1 ;
while ( ( (s1 =in.readLine())!= null) ) {
count++;
if(s1.length() <=75){
System.out.println("Record length less than 75 "+s1);
in.close();
}catch(Exception e){
//Each Line "s1" contains 80 chars. and when it reaches Line No. 102 it only reads 11 chars from the line. So it totally reads only 8192 chars from the file.When i try to execute the program again it runs with no errors.
} -
Help please! java.io.IOException: Stream closed
When I run my webapp under Tomcat5.5, it works fine, but I got the following Exception in Tomcat stdout.log:
2005.04.19. 15:54:47 org.apache.jasper.runtime.PageContextImpl release
WARNING: Internal error flushing the buffer in release()
2005.04.19. 15:54:47 org.apache.catalina.core.StandardWrapperValve invoke
WARNING: Servlet.service() for servlet jsp threw exception
java.io.IOException: Stream closed
at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:204)
at org.apache.jasper.runtime.JspWriterImpl.clearBuffer(JspWriterImpl.java:159)
at org.apache.jsp.pages.tree_jsp._jspService(org.apache.jsp.pages.tree_jsp:58)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)I dont have an idea why did my webapp throw this. I got it when I logged in the webapp. I cant find the root problem, because there is no a word from my package in the exception-list above. What happened?
Thanks in advance.SEVERE: Servlet.service() for servlet jsp threw exception
java.io.IOException: Stream closed
at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:204)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:115)
at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:186)
at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
at org.apache.jsp.accSubAccount_jsp._jspService(accSubAccount_jsp.java:244)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)It is in JSP, I was just quoting that looking into error stack I opened genrated java file accSubAccount_jsp.java at line 244 and came to know that this file has only 196 lins.
At successfull submission I am opening a page through javascript window.location directive, probably it may be the reason?
Maybe you are looking for
-
Hi I have a IPod touch 32GB, but im having a few problems with it. When i plug it into the computer its doesn't charge or appear in ITunes and 'my computer'. However when i plug it into the mains it charges! Any idea what's happening the my iPod?!
-
HT1212 My ipod touch is disabled and i cant figure out how to work it
my ipod touch wont work because its disabled
-
How do I create and new enterprise alias?
I am trying to create an enterprise alias as a proof of concept to address the issue we had about 8 months ago which I described in the following thread. Terminated employee's personal reports are gone. Forever? We are not won BI 4.1 SP01 Patch 6. I
-
Inserting a logo into the header and footer
Hey Team I have a workbook with 5 worksheets. On sheet1 I have a button programed to open a new Word document; pull information from fields on 3 other sheets and creates a letter from that data. I have two company logos pasted into sheet5, Pic1 and
-
Lumia 920 - internet sharing doesn't work: Connect...
Hello all, I'm experiencing a serious problem with the lumia 920. It seems impossible to share my internet connection. Something I normally use for several hours a day. If this problem can't be fixed soon, ill be forced to swithc back to iphone or ht