Storing a java.lang.Object in MySQL and retreiving it
posted 11 years ago
I am trying to store an java.lang.Object in MySQL database using CMP 2.0 and JBoss App Server. There is a xml String in this Object. When I retreive the Object by using
String obj = new String(resultSet.getBlob(4).getBytes(1,(int)resultSet.getBlob(4).length()));
the above code. I have some unecessary data at the start inbetween and at the end of the String Object which I saved. Can anyone tell me why this is happening. Does anyone have the code to retrieve a blob from MySQL using JDBC?
Thanks for all your help in advance. Waiting for all your suggestions With Regards Adrian