Subject Re: [Firebird-Java] cannot update erased record
Author Carsten Schäfer
Is there a solution to this problem ?
I do get this error message occasionally, too, when doing a delete on a
table. (using FB 1.5.3, Jaybird 2.01, Windows)
When i restart my program it works.
Java Code:
String delBefehl = "delete from t_ch_zuord where f_id_charge = 0 and
f_End_ZP is not null and f_end_zp < ?";
Connection con = null;
try {
con = this.getWriteConnection(initiator);
PreparedStatement delPS = con.prepareStatement(delBefehl);
delPS.setDate(1, TTCTools.gregToDate(enddatum));
delPS.execute(); <---- This is App_Server.java:14003
delPS.close();
delPS = null
try {
con.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
con = null;
} catch (java.sql.SQLException e) {
...

StackTrace;
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544382. cannot
update erased record
at
org.firebirdsql.jdbc.AbstractPreparedStatement.internalExecute(AbstractPreparedStatement.java:711)

at
org.firebirdsql.jdbc.AbstractPreparedStatement.execute(AbstractPreparedStatement.java:644)

at
com.TTC_Informatik.PAULA.server.App_Server.removeOldChargendokumente(App_Server.java:14003)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at org.firebirdsql.gds.GDSException: cannot update erased record
at
org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.readStatusVector(AbstractJavaGDSImpl.java:2104)

at
org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.receiveResponse(AbstractJavaGDSImpl.java:2054)

at
org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscDsqlExecute2(AbstractJavaGDSImpl.java:1146)

at org.firebirdsql.gds.impl.GDSHelper.executeStatement(GDSHelper.java:222)
at
org.firebirdsql.jdbc.AbstractPreparedStatement.internalExecute(AbstractPreparedStatement.java:707)

at
org.firebirdsql.jdbc.AbstractPreparedStatement.execute(AbstractPreparedStatement.java:644)

at
com.TTC_Informatik.PAULA.server.App_Server.removeOldChargendokumente(App_Server.java:14003)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

mfg
Carsten


Chris Donges schrieb:
> Would the whole stack trace from within tomcat help?
>
>
>> -----Original Message-----
>> From: Roman Rokytskyy [mailto:rrokytskyy@...]
>> Sent: Tuesday, 24 January 2006 7:00 PM
>> To: Firebird-Java@yahoogroups.com
>> Subject: Re: [Firebird-Java] cannot update erased record
>>
>> Hi Helen,
>>
>>
>>> Unfortunately, Roman, this doesn't help. Firebird 1.5 doesn't have
>>> any gdscodes in the 3365... range so, even if you're
>>>
>> somehow able to
>>
>>> generate this range from msgs.fdb in the Fb 2 tree, it doesn't give
>>> much of a clue about which exception is actually occurring
>>>
>> in Fb 1.5.
>>
>> I get from the engine an error code, which is then looked up
>> in the message file (much more simpler structure than
>> firebird.msg), so somehow server was able to generate the error.
>>
>>
>>> From ignorance of how the Jaybird driver versions map to
>>>
>> the Firebird
>>
>>> server versions, I wonder whether Chris' problem is somehow
>>>
>> related to
>>
>>> a mismatch between the Jaybird client and the Firebird server...?
>>>
>> Very unlikely. Jaybird 1.0.0 is pure Java version
>> implementing the v10 wire protocol (the one introduced in IB
>> 6.0) and does nothing specific there. It is proven to run
>> with IB 6.0, FB 0.9.x, FB 1.0.x and turns out - with FB
>> 1.5.x. It does not load any Firebird code, just sends and
>> receives data over the TCP socket.
>>
>> But anyway, JDBC driver just received a raw status vector
>> (byte array) and extracted the error code from it. Then it
>> just looked for an appropriate message in error file. But
>> even if error file was not correct, the error code is the one
>> returned from the server.
>>
>> Now, if you say that FB 1.5 could not have 3365.... error
>> codes, we have to check how did it happen. I will get the FB
>> 1.5 code base and appropriate msg.fdb and check what is there.
>>
>> Roman
>>
>>
>