Database with unbuffered logging + JDBC connection
Posted in 2012
Topics: Installation, Setup & Upgrades, Connectivity: ODBC / JDBC / .NET, Java & JDBC Development
Hello; trying to track down a puzzling error. We have a database with unbuffered logging. It is being accessed by a connection pool installed on an Oracle GlassFish 3.1.2.2 server. The DataSource objects in the pool are set up (properly) to be javax.sql.ConnectionPoolDataSource implementations, using the com.informix.jdbcx.IfxConnectionPoolDataSource class. Our access to the underlying database is through JPA and Hibernate, so we are not doing explicit BEGIN WORK or COMMIT WORK or ROLLBACK WORKstatements in our code; this is all under the control of the JPA provider. With this setup--and only on one particular installation--we are getting -255 errors ("not in transaction"). This as I understand it is caused most frequently by a COMMIT WORK statement that was never preceded by a BEGIN WORK statement. But as I said we aren't seeing this on other environments whose database properties and connection pool settings are identical. Is there a good recipe to follow on how to troubleshoot this? I don't understand what other environmental considerations could be causing this. Best, Laird -- http://about.me/lairdnelson --0021cc0231f6db1d0404cbb69f77
If you run "onmode -I -255" the engine will trap any session that
experiences a -255 error, log the event in the online message log
(including the session number), and perform a stack trace, a shared memory
dump, and an af file dump. The af file will contain an onstat -a output
which will include the onstat -g ses output for the session that received
the -255 error so you can see exactly what it was doing at the time. In
addition, you will be able to run onstat commands against the shared memory
dump file that is created to look at other server conditions at the time.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Wed, Oct 10, 2012 at 12:05 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> Hello; trying to track down a puzzling error.
>
> We have a database with unbuffered logging.
>
> It is being accessed by a connection pool installed on an Oracle GlassFish
> 3.1.2.2 server. The DataSource objects in the pool are set up (properly)
> to be javax.sql.ConnectionPoolDataSource implementations, using the
> com.informix.jdbcx.IfxConnectionPoolDataSource class.
>
> Our access to the underlying database is through JPA and Hibernate, so we
> are not doing explicit BEGIN WORK or COMMIT WORK or ROLLBACK
> WORKstatements in our code; this is all under the control of the JPA
> provider.
>
> With this setup--and only on one particular installation--we are getting
> -255 errors ("not in transaction"). This as I understand it is caused most
> frequently by a COMMIT WORK statement that was never preceded by a BEGIN
> WORK statement.
>
> But as I said we aren't seeing this on other environments whose database
> properties and connection pool settings are identical.
>
> Is there a good recipe to follow on how to troubleshoot this? I don't
> understand what other environmental considerations could be causing this.
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>
> --0021cc0231f6db1d0404cbb69f77
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--e89a8f923ba0f1b2a004cbb6efc2
Unless you really needit and do manage you EJB to XA distributed transaction, configure your jdbc-connection-pool (on glassfish) with option non-transactional-connections="true" . El mié, 10-10-2012 a las 12:05 -0400, Laird Nelson escribió: > Hello; trying to track down a puzzling error. > > We have a database with unbuffered logging. > > It is being accessed by a connection pool installed on an Oracle GlassFish > 3.1.2.2 server. The DataSource objects in the pool are set up (properly) > to be javax.sql.ConnectionPoolDataSource implementations, using the > com.informix.jdbcx.IfxConnectionPoolDataSource class. > > Our access to the underlying database is through JPA and Hibernate, so we > are not doing explicit BEGIN WORK or COMMIT WORK or ROLLBACK > WORKstatements in our code; this is all under the control of the JPA > provider. > > With this setup--and only on one particular installation--we are getting > -255 errors ("not in transaction"). This as I understand it is caused most > frequently by a COMMIT WORK statement that was never preceded by a BEGIN > WORK statement. > > But as I said we aren't seeing this on other environments whose database > properties and connection pool settings are identical. > > Is there a good recipe to follow on how to troubleshoot this? I don't > understand what other environmental considerations could be causing this. > > Best, > Laird >