I'm running a servlet/jsp app with a MySQL database behind it. One of my tables is used to buffer serialized email messages in a "blob" column.
I am using prepared statements to do my inserts and selects.
upon insert I do the following:
com.app.util.SomeObject someObject = ...
stmt.setObject(1,someObject);
This statement serializes "someObject" and when I execute the statement, it is inserted into the database.
When I try to retrieve a row from that table, I successfully execute my query, but when I try to execute a getObject() on the ResultSet, I get:
ClassNotFoundException com.app.util.SomeObject while reading serialized object
I know the class is in my classpath because I have access to that class elsewhere in my app.
I've tried adding an import for the class where I'm executing my SQL statements, but that did nothing.
Any suggestions?
stmt.getObject(1);
I am using prepared statements to do my inserts and selects.
upon insert I do the following:
com.app.util.SomeObject someObject = ...
stmt.setObject(1,someObject);
This statement serializes "someObject" and when I execute the statement, it is inserted into the database.
When I try to retrieve a row from that table, I successfully execute my query, but when I try to execute a getObject() on the ResultSet, I get:
ClassNotFoundException com.app.util.SomeObject while reading serialized object
I know the class is in my classpath because I have access to that class elsewhere in my app.
I've tried adding an import for the class where I'm executing my SQL statements, but that did nothing.
Any suggestions?
stmt.getObject(1);