Re: [JBoss-user] Postgres woes
How is the data source declared in jboss.jcml? Are you on Potato (with Postgres 7.0.2) or Woody (with Postgres 7.1)? Are you relying on the "libpgjava" package or did you build the JAR? -- Mike On 2001-05-10 at 01:41 +0100, Jim Downing wrote: > Hi, > I'm trying to port our J2EE app from NT/Oracle to Debian/Postgresql. The > postgres datasource is connecting fine on startup, but when any > ejbCreate method is called (i.e. an INSERT is called) postgresql throws > this: > > java.lang.reflect.UndeclaredThrowableException: > javax.transaction.RollbackException: Unable to commit, tx=XidImpl > [FormatId=257, GlobalId=lovestuffer.internal.paribus.com//3, > BranchQual=] status=STATUS_ROLLEDBACK > at org.jboss.tm.TxCapsule.commit(TxCapsule.java:368) > at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76) > at > org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:318) > ... > > I've been able to create and drop tables through jdbc with the ant task > "sql", I have the right driver, and the same application deploys and > runs successfully with an Oracle datasource. > > I'm confused! Any tips gladly received. > > jim ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Postgres woes: solution
I found the solution to my problem. It raises a minor database portability issue. The root of the problem turned out to be a NullPointerException that the PGSQL driver threw in ejbStore. It turns out that although Oracle is OK with: PreparedStatement.setObject(x, null, Types.TYPE); PostgreSQL isn't. PreparedStatement.setNull(x, Types.TYPE); seems to work in both. Hope this is useful to someone, jim > Hi, > I'm trying to port our J2EE app from NT/Oracle to Debian/Postgresql. The > postgres datasource is connecting fine on startup, but when any > ejbCreate method is called (i.e. an INSERT is called) postgresql throws > this: > > java.lang.reflect.UndeclaredThrowableException: > javax.transaction.RollbackException: Unable to commit, tx=XidImpl > [FormatId=257, GlobalId=lovestuffer.internal.paribus.com//3, > BranchQual=] status=STATUS_ROLLEDBACK > at org.jboss.tm.TxCapsule.commit(TxCapsule.java:368) > at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76) > at > org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:318) > ... > > I've been able to create and drop tables through jdbc with the ant task > "sql", I have the right driver, and the same application deploys and > runs successfully with an Oracle datasource. > > I'm confused! Any tips gladly received. > > jim > > [EMAIL PROTECTED] > Paribus > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > http://lists.sourceforge.net/lists/listinfo/jboss-user > > ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Postgres woes
> postgres datasource is connecting fine on startup, but when any > ejbCreate method is called (i.e. an INSERT is called) > postgresql throws > this: > > java.lang.reflect.UndeclaredThrowableException: > javax.transaction.RollbackException: Unable to commit, tx=XidImpl > [FormatId=257, GlobalId=lovestuffer.internal.paribus.com//3, > BranchQual=] status=STATUS_ROLLEDBACK > at org.jboss.tm.TxCapsule.commit(TxCapsule.java:368) > at > org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76) > at > org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxI > nterceptorCMT.java:318) > ... Hmmm... That probably is not the Postgres bug/problem, because I had exactly the same exception running the InterBase. I thought, that problem is in InterClient JDBC driver, but now it seems the JBoss "programmed" behaviour. Has anybody about the reasons? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user