Erro ao fazer persistencia de arquivo texto no PostgreSQL

olá pessoal,

Estou tentando inserir um arquivo texto, no PostgreSQL em um campo bytea da seguinte forma:

File file = new File(“C:\Documents and Settings\lucilias\Desktop\template.txt”);
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
this.preparedStatement.setBinaryStream(indece, bis, file.length());

E da o seguinte erro:

javax.servlet.ServletException: java.lang.AbstractMethodError: org.postgresql.jdbc3.Jdbc3PreparedStatement.setBinaryStream(ILjava/io/InputStream;)V
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:294)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:150)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.ecglobalpanel.eckrm.util.SegurancaFilter.doFilter(SegurancaFilter.java:69)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.AbstractMethodError: org.postgresql.jdbc3.Jdbc3PreparedStatement.setBinaryStream(ILjava/io/InputStream;)V
at com.ecglobalpanel.eckrm.util.AccessDataBase.setField(AccessDataBase.java:356)
at com.ecglobalpanel.eckrm.dao.TemplateDao.includeTemplate(TemplateDao.java:33)
at com.ecglobalpanel.eckrm.business.TemplateBusiness.includeTemplate(TemplateBusiness.java:21)
at com.ecglobalpanel.eckrm.action.TemplateAction.create(TemplateAction.java:44)
at com.ecglobalpanel.eckrm.util.SuperAction.createSuper(SuperAction.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)

O que vc está usando para persistir este arquivo. Hibernate ou JDBC? Se for Hibernate, como você está mapeando esta coluna? Não seria mais fácil você criar uma coluna do tipo text e jogar o conteúdo do arquivo lá dentro, ou ser arquivo é tão grande assim?

 att, 

rodrigo.