About Postgres Large Object
От | root |
---|---|
Тема | About Postgres Large Object |
Дата | |
Msg-id | 401609F8.E94E3199@magnum.barc.ernet.in обсуждение исходный текст |
Ответы |
Re: About Postgres Large Object
|
Список | pgsql-jdbc |
Hi , I am using postgresql 7.1.3 and Redhat 7.3 I am running this servlet given below. But it is not running //Retrieving the image from the database: // All LargeObject API calls must be within a transaction con.setAutoCommit(false); // Get the Large Object Manager to perform operations with LargeObjectManager lobj = ((org.postgresql.Connection)con).getLargeObjectAPI(); PreparedStatement pstmt = con.prepareStatement("SELECT img FROM images WHERE imgname=?"); pstmt.setString(1, "myimage.gif"); ResultSet rs = pstmt.executeQuery(); if (rs != null) { while(rs.next()) { // open the large object for reading int oid = rs.getInt(1); LargeObject obj = lobj.open(oid, LargeObjectManager.READ); // read the data byte buf[] = new byte[obj.size()]; obj.read(buf, 0, obj.size()); // do something with the data read here // Close the object obj.close(); } rs.close(); } pstmt.close(); Error message is given below [27/01/2004 10:19:43:138 IST] java.lang.NoSuchMethodError: org.postgresql.largeo bject.LargeObject.read([BII)V at org.apache.jserv.JServConnection.processRequest(JServConnection.java: 323) at org.apache.jserv.JServConnection.run(JServConnection.java:188) at java.lang.Thread.run(Thread.java:536)
В списке pgsql-jdbc по дате отправления: