posted 14 years ago
Hi,
As you suggested,I have ttried it but it does'nt work
SO, I have followed one different approach for passing BLOB to procedure.
First I have stored File to table in BLOB and then gettign that File into Blob variable.
Now I aghain stuck into one thing of passing that Blob inot procedure.
Please find the snippet of the code:
---------------------------
PreparedStatement pre = con.prepareStatement("insert into tab1 values(?)");
pre.setBinaryStream(1,theFile.getInputStream(),(int)theFile.getFileSize());
pre.executeUpdate();
System.out.println("test prepareStaement");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT COL1 FROM tab1");
while(rs.next())
{
//Blob blob= rs.getBlob("COL1");
Blob blob1= rs.getBlob(1);
System.out.println("blob start: "+blob1);
cs.setBlob(3,blob1);
------------------------------------------------------------------------------------------
Now,I am getting this error
----------------------------------------
java.lang.AbstractMethodError: oracle.jdbc.driver.OracleCallableStatement.setBlob(Ljava/lang/String;Ljava/sql/Blob;)V
dms.bo.helper.LoadManagement.UploadMetadataCallStmlCreator.createCallableStatement(UploadMetadataCallStmlCreator.java:78)
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:947)
dms.bo.impl.LoadManagement.UploadMetadataDAOImpl.getBlobString(UploadMetadataDAOImpl.java:29)
dms.web.action.LoadManagement.UploadMetadataAction.perform(UploadMetadataAction.java:33)
dms.web.action.common.BaseAction.execute(BaseAction.java:17)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
------------------------------------