I've determined that the HttpServletRequest ServletInputStream is NOT closed before the error occurs. I modified the AbstractWebdavMethod run method changing the line:
this.req = req;
to:
System.out.println("XXXXXXXXXXXX AbstractWebdavMethod.run HttpServletRequestWrapper Method="
+req.getMethod());
this.req = new javax.servlet.http.HttpServletRequestWrapper(req) {
public javax.servlet.ServletInputStream getInputStream()
throws java.io.IOException {
System.out.println("XXXXXXXXXXXX HttpServletRequestWrapper.getInputStream");
new Exception().printStackTrace();
//return super.getInputStream();
final javax.servlet.ServletInputStream sis =
super.getInputStream();
return new javax.servlet.ServletInputStream() {
public int readLine(byte[] b, int off, int len)
throws java.io.IOException {
return sis.readLine(b, off, len);
}
public int read() throws IOException {
return sis.read();
}
public void close() throws IOException {
System.out.println("XXXXXXXXXXXX ServletInputStream.close");
new Exception().printStackTrace();
sis.close();
}
};
}
};This prints 1) when the getInputStream is called on the HttpServletRequest and 2) when the HttpServletRequest's
ServletInputStream close method is called. With this I can
determine where and how often the close method is called.
I start Slide (an ear in jboss) and use the webdavclient. I open a connection and "cd" into files. Then I put a file. In Slide it first executes a PROPFIND method which returns "not found". It then executes the PUT method. The HttpServletRequestWrapper.getInputStream is called at:
PutMethod.executeRequest line 405
// Creating revisionDescriptor associated with the object NodeRevisionContent revisionContent = new NodeRevisionContent(); revisionContent.setContent(req.getInputStream());
Then the Broken pipe io exception is printed:
2004-11-10 10:41:10,165 WARN [JBossManagedConnectionPool] - Exception destroying ManagedConnection [EMAIL PROTECTED] [EMAIL PROTECTED] handles=0 lastUse=1100112064679 permit=true trackByTx=false [EMAIL PROTECTED] [EMAIL PROTECTED]
org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception: Broken pipe)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:572)
............
Which happens in the file CommonRDBMSAdapter method storeContent at line 403:
try {
long versionID = getVersionID(connection, uri.toString(),
revisionDescriptor);
statement = connection.prepareStatement(
"insert into VERSION_CONTENT (VERSION_ID, CONTENT) values
(?,?)");
statement.setLong(1, versionID);
statement.setBinaryStream(2, is, (int) blobLength);
statement.executeUpdate();
if (tempFile != null) {
is.close();
is = null;
tempFile.delete();
}
} finally {
try {
close(statement);
} finally {
if (is != null) {
// XXX some JDBC drivers seem to close the stream upon
// closing of
// // the statement; if so this will raise an
// IOException
// silently ignore it...
try {
is.close();
} catch (IOException ioe) {
logger.log("Could not close stream", ioe,
LOG_CHANNEL, Logger.DEBUG);
}
}
}
}The "close(statement);" call is what generates the error message. Then the HttpServletRequest's ServletInputStream is closed in the call "is.close();" a couple of lines later.
So, I believe that its NOT a InputStream close issue since that happens after the Oracle connection SQLException.
So the question is where is the Oracle DB connection being closed?
RME
Oliver Zeigermann wrote:
Without really having looked into this the error seems to say that the stream to read from has already been closed. This may mean there is a bug in the Slide core or (more likely) in the Oracle store.
Oliver
On Wed, 10 Nov 2004 10:47:21 -0500, Nick Longinow <[EMAIL PROTECTED]> wrote:
I get this error when I do a versionControlMethod, using classes12.jar and Oracle 10g.
Looking through the stores code, the storeContent method is the same here as when I do a putMethod (which works fine). The difference must come from up the line somewhere, in the creation of the RevisionContent object. Is it possibly some error in retrieving it, a permissions violation perhaps, that is not being flagged, and so the stream sent to storeContent is empty ? It must be something like this, since put works.
Nick
http-8080-Processor24, 10-Nov-2004 10:19:43, root, PUT, 201 "Created", 250 ms, /files/Z2/AAA/cc/Working Files/g.doc
http-8080-Processor24, 10-Nov-2004 10:19:44, root, PROPPATCH, 207 "Multi-Status", 109 ms, /files/Z2/AAA/cc/Working Files/g.doc
10 Nov 2004 10:19:45 - org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter - ERROR - SQL error 17002 on /history/1: Io exception: No more data to
read from socket
java.sql.SQLException: Io exception: No more data to read from socket
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatemen t.java:559)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java :1028)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedSta tement.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState ment.java:2960)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Delegating PreparedStatement.java:101)
at org.apache.slide.store.impl.rdbms.CommonRDBMSAdapter.storeContent(CommonRDBM SAdapter.java:344)
at org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.storeRevisionContent( StandardRDBMSAdapter.java:1101)
at org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.createRevisionContent (StandardRDBMSAdapter.java:1054)
at org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.createRevisionContent(A bstractRDBMSStore.java:823)
at org.apache.slide.store.AbstractStore.createRevisionContent(AbstractStore.jav a:1347)
at org.apache.slide.store.ExtendedStore.createRevisionContent(ExtendedStore.jav a:508)
at org.apache.slide.content.ContentImpl.create(ContentImpl.java:515)
at org.apache.slide.webdav.util.VersioningHelper.versionControl(VersioningHelpe r.java:306)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
