Subject | RE: [Firebird-Java] Sporadic NullPointerException with Jaybird used from JBoss |
---|---|
Author | Rick DeBay |
Post date | 2004-11-29T15:09:41Z |
When calling con.prepareStatement is con null? I was getting back
invalid connections, and had to add code to yield() and try again. The
JBoss support forums weren't very helpful, so I just left the workaround
in.
-----Original Message-----
From: Josef Gschwendtner [mailto:Josef.Gschwendtner@...]
Sent: Thursday, November 25, 2004 9:52 AM
To: firebird-java@yahoogroups.com
Cc: Markus Holzner
Subject: [Firebird-Java] Sporadic NullPointerException with Jaybird used
from JBoss
Hi,
we use JBoss and Jaybird to connect to a Firebird 1.03 database.
Preparing a statement (stored procedure) produces sporadically a
NullPointerException.
The server is under heavy load (> 10 transactions per second).
Subsequently I will try to explain the problem:
===============================================
- Application in JBoss (3.2.3)
- Jaybird 1.5.4 (embedded via firebirdsql.rar - Firebird Database
Connector)
- WebService calls, which write data into a database via JDBC (using
Stored Procedures)
- using local transactions (not XA Transactions)
- there is only one webservice client which call methods sequentially
- after some time each database access leads to a NullPointerException
(different methods using several stored procedures get the same error).
There is no StackTrace, despite the Log4J method
log.error("ErrorMessage", e) is used to record the problem.
- the NullPointerException is thrown upon calling con.prepareStatement()
- this erroneous state lasts until a different Jboss-Application (JMS -
MessageDrivenBean) is reading data from the same database (using XA
transactions). In this case the following exeptions are thrown and
afterwords the webservice works proberly again. The whole cycle repeats
(maybe 2 hours later).
The following exceptions cure the NPE-Problem:
==============================================
2004-11-22 10:36:36,569 WARN [org.jboss.tm.TransactionImpl]
XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=TUX//11,
BranchQual=] errorCode=XAER_NOTA
org.firebirdsql.jca.FBXAException: Unrecognized transaction
at
org.firebirdsql.jca.FBManagedConnection.internalEnd(FBManagedConnection.
java:457)
at
org.firebirdsql.jca.FBManagedConnection.end(FBManagedConnection.java:429
)
at org.jboss.tm.TransactionImpl.endResource(TransactionImpl.java:1205)
at
org.jboss.tm.TransactionImpl.delistResource(TransactionImpl.java:543)
at
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEve
ntListener.delist(TxConnectionManager.java:505)
at
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEve
ntListener.connectionClosed(TxConnectionManager.java:554)
at
org.firebirdsql.jca.FBManagedConnection$5.notify(FBManagedConnection.jav
a:1208)
at
org.firebirdsql.jca.FBManagedConnection.notify(FBManagedConnection.java:
1189)
at
org.firebirdsql.jca.FBManagedConnection.close(FBManagedConnection.java:8
73)
at
org.firebirdsql.jdbc.AbstractConnection.close(AbstractConnection.java:44
8)
2004-11-22 10:36:36,571 ERROR
[org.jboss.resource.connectionmanager.TxConnectionManager]
ResourceException while closing connection handle!
javax.resource.ResourceException: Failure to delist resource
at
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEve
ntListener.delist(TxConnectionManager.java:507)
at
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEve
ntListener.connectionClosed(TxConnectionManager.java:554)
at
org.firebirdsql.jca.FBManagedConnection$5.notify(FBManagedConnection.jav
a:1208)
at
org.firebirdsql.jca.FBManagedConnection.notify(FBManagedConnection.java:
1189)
at
org.firebirdsql.jca.FBManagedConnection.close(FBManagedConnection.java:8
73)
at
org.firebirdsql.jdbc.AbstractConnection.close(AbstractConnection.java:44
8)
Has anybody an idea what could be the problem.
We would appreciate any help.
Thank you,
Josef Gschwendtner
Quattro-Soft GmbH
Yahoo! Groups Links
invalid connections, and had to add code to yield() and try again. The
JBoss support forums weren't very helpful, so I just left the workaround
in.
-----Original Message-----
From: Josef Gschwendtner [mailto:Josef.Gschwendtner@...]
Sent: Thursday, November 25, 2004 9:52 AM
To: firebird-java@yahoogroups.com
Cc: Markus Holzner
Subject: [Firebird-Java] Sporadic NullPointerException with Jaybird used
from JBoss
Hi,
we use JBoss and Jaybird to connect to a Firebird 1.03 database.
Preparing a statement (stored procedure) produces sporadically a
NullPointerException.
The server is under heavy load (> 10 transactions per second).
Subsequently I will try to explain the problem:
===============================================
- Application in JBoss (3.2.3)
- Jaybird 1.5.4 (embedded via firebirdsql.rar - Firebird Database
Connector)
- WebService calls, which write data into a database via JDBC (using
Stored Procedures)
- using local transactions (not XA Transactions)
- there is only one webservice client which call methods sequentially
- after some time each database access leads to a NullPointerException
(different methods using several stored procedures get the same error).
There is no StackTrace, despite the Log4J method
log.error("ErrorMessage", e) is used to record the problem.
- the NullPointerException is thrown upon calling con.prepareStatement()
- this erroneous state lasts until a different Jboss-Application (JMS -
MessageDrivenBean) is reading data from the same database (using XA
transactions). In this case the following exeptions are thrown and
afterwords the webservice works proberly again. The whole cycle repeats
(maybe 2 hours later).
The following exceptions cure the NPE-Problem:
==============================================
2004-11-22 10:36:36,569 WARN [org.jboss.tm.TransactionImpl]
XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=TUX//11,
BranchQual=] errorCode=XAER_NOTA
org.firebirdsql.jca.FBXAException: Unrecognized transaction
at
org.firebirdsql.jca.FBManagedConnection.internalEnd(FBManagedConnection.
java:457)
at
org.firebirdsql.jca.FBManagedConnection.end(FBManagedConnection.java:429
)
at org.jboss.tm.TransactionImpl.endResource(TransactionImpl.java:1205)
at
org.jboss.tm.TransactionImpl.delistResource(TransactionImpl.java:543)
at
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEve
ntListener.delist(TxConnectionManager.java:505)
at
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEve
ntListener.connectionClosed(TxConnectionManager.java:554)
at
org.firebirdsql.jca.FBManagedConnection$5.notify(FBManagedConnection.jav
a:1208)
at
org.firebirdsql.jca.FBManagedConnection.notify(FBManagedConnection.java:
1189)
at
org.firebirdsql.jca.FBManagedConnection.close(FBManagedConnection.java:8
73)
at
org.firebirdsql.jdbc.AbstractConnection.close(AbstractConnection.java:44
8)
2004-11-22 10:36:36,571 ERROR
[org.jboss.resource.connectionmanager.TxConnectionManager]
ResourceException while closing connection handle!
javax.resource.ResourceException: Failure to delist resource
at
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEve
ntListener.delist(TxConnectionManager.java:507)
at
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEve
ntListener.connectionClosed(TxConnectionManager.java:554)
at
org.firebirdsql.jca.FBManagedConnection$5.notify(FBManagedConnection.jav
a:1208)
at
org.firebirdsql.jca.FBManagedConnection.notify(FBManagedConnection.java:
1189)
at
org.firebirdsql.jca.FBManagedConnection.close(FBManagedConnection.java:8
73)
at
org.firebirdsql.jdbc.AbstractConnection.close(AbstractConnection.java:44
8)
Has anybody an idea what could be the problem.
We would appreciate any help.
Thank you,
Josef Gschwendtner
Quattro-Soft GmbH
Yahoo! Groups Links