File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Problem with storing document as blob Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem with storing document as blob" Watch "Problem with storing document as blob" New topic
Author

Problem with storing document as blob

Jonas Giron
Greenhorn

Joined: Sep 21, 2008
Posts: 2
I have a system where the user can upload different type of files/documents and they are stored as blobs in oracle db. Everything works fine in my develop system. WinXP java 1.5 and tomcat 5.5.2.

When I move the system to our production environment, Win2k3 Java 1.5 and tomcat 5.5.2 I can only upload and store *.txt files but no word or excel doc.

the exception I get is:

java.sql.SQLException: Io exception: Connection reset by peer: socket write error
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:273)
oracle.jdbc.driver.T4CConnection.putBytes(T4CConnection.java:1526)
oracle.sql.BLOB.setBytes(BLOB.java:658)
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1132

AG,
Pardon me for asking a silly question, but are you using the same Oracle database and JDBC driver in both development and production systems?
And are you sure the code is exactly the same in both?
And is the Tomcat configuration exactly the same in both?
According to the details you posted, your environments do run on different operating systems.

Good Luck,
Avi.
Jonas Giron
Greenhorn

Joined: Sep 21, 2008
Posts: 2
There are no silly questions in ths case.

Yes the os is different. But this system was working just fine about three weeks ago.

About the oracel driver! yes it is the same. I'm using oracle10-driver12.jar.

is this a security poblem?

If I create a new excel/word doc and don't write any thing init, then it works fine. As soon as I write some thing in it, then it stop working
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1132

Jonas,
So if you go back to the old JDBC driver, it still works?
I would go to Oracle Support, then.

Good Luck,
Avi.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with storing document as blob