Manohar, this procedure was added in Derby 10.3 and that would explain why it won't work with 10.2. But I am not sure why it is not working when you try it with 10.5. The procedure takes 7 parameters and I see that you are using 7 parameters when invoking it.
Mamta On Tue, Nov 5, 2013 at 3:54 PM, Manohar Menam -T (mmenam - PRIME SOLUTIONS INC at Cisco) <[email protected]> wrote: > I have been trying to export a table which has BLOBs. Tables with LOBs > work perfectly fine. It’s getting complicated using only java code to > export / import. > > It’s been few days that I am trying to export/import. I am running into > only issue, and that is tables with LOBs. > > Please suggest me what is going wrong. I have even tried taking latest jar > files(10.5.X), currently using 10.2.X. > > > > I am connecting to Derby as: > > NetworkServerControl server = *new* NetworkServerControl(InetAddress. > *getByName*("localhost"), 1527); > > server.start(*new* PrintWriter(System.*out*)); > > connect = DriverManager.*getConnection*( > "jdbc:derby://localhost:1527/dbName"); > > Statement used is: > > PreparedStatement statement = connect.prepareStatement("CALL > SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE(?,?,?,?,?,?,?)"); > > statement.setString(1, *null*); > > statement.setString(2, "EVENT_TRANSACTION"); > > statement.setString(3, > "c:/derbytest/EVENT_TRANSACTION.csv"); > > statement.setString(4, *null*); > > statement.setString(5, *null*); > > statement.setString(6, *null*); > > statement.setString(7, > "c:/derbytest/EVENT_TRANSACTION.dat"); > > > > statement.executeUpdate(); > > statement.close(); > > > > Here is the exception I am getting: > > > > Exception in thread "main" *java.sql.SQLException*: > 'SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE' is not recognized as a > function or procedure. > > > > at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown > Source) > > at org.apache.derby.client.am.SqlException.getSQLException(Unknown > Source) > > at org.apache.derby.client.am.Connection.prepareStatement(Unknown > Source) > > at com.pari.db.DerbyConnection.<init>(*DerbyConnection.java:102*) > > at com.pari.db.DerbyConnection.main(*DerbyConnection.java:198*) > > > > Caused by: *org.apache.derby.client.am.SqlException*: > 'SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE' is not recognized as a > function or procedure. > > > > at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) > > at > org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown > Source) > > at > org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown > Source) > > at org.apache.derby.client.net.NetStatementReply.readPrepare(Unknown > Source) > > at org.apache.derby.client.net.StatementReply.readPrepare(Unknown > Source) > > at org.apache.derby.client.net.NetStatement.readPrepare_(Unknown > Source) > > at org.apache.derby.client.am.Statement.readPrepare(Unknown Source) > > at > org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInput(Unknown > Source) > > at > org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown > Source) > > at org.apache.derby.client.am.PreparedStatement.prepare(Unknown > Source) > > at org.apache.derby.client.am.Connection.prepareStatementX(Unknown > Source) > > ... 3 more > > > > You can also call me at my mobile. > > Thanks, > > Manohar Menam > > *[email protected] <[email protected]>* > > *814 431 0923 <814%20431%200923>* > > >
