我正在尝试将 Informix 数据库与 Play 一起使用!框架应用。我是 Informix 的新手。
我在我的 Windows 机器上安装了 Informix 11.70,并且正在运行 Play 1.1。
在玩!您可以像这样指定您的数据库连接:
db.url=jdbc:informix-sqli://localhost:9088/mydatabase:INFORMIXSERVER=ol_informix1170
db.driver=com.informix.jdbc.IfxDriver
db.user=informix
db.pass=password
但是在运行我的 Play 时我遇到了一个例外!应用程序:
An unexpected error occured caused by exception PersistenceException: org.hibernate.TransactionException: JDBC begin failed:
play.exceptions.UnexpectedException: Unexpected Error
at play.Invoker$Invocation.onException(Invoker.java:153)
at play.Invoker$Invocation.run(Invoker.java:195)
at Invocation.HTTP Request(Play!)
Caused by: javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin failed:
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1235)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1168)
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1245)
at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:63)
at play.db.jpa.JPAPlugin.startTx(JPAPlugin.java:321)
at play.db.jpa.JPAPlugin.beforeInvocation(JPAPlugin.java:289)
at play.Invoker$Invocation.before(Invoker.java:116)
at play.Invoker$Invocation.run(Invoker.java:186)
... 1 more
Caused by: org.hibernate.TransactionException: JDBC begin failed:
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:96)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1463)
at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:60)
... 5 more
Caused by: java.sql.SQLException: Transactions not supported
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:413)
at com.informix.jdbc.IfxSqliConnect.setAutoCommit(IfxSqliConnect.java:2189)
at com.mchange.v2.c3p0.impl.NewProxyConnection.setAutoCommit(NewProxyConnection.java:881)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:91)
... 7 more
我想是因为我试图在事务中执行我的查询,但我没有指定 XA 驱动程序。只有 com.informix.jdbc.IfxDriver。但是我似乎找不到用于 Informix 的 XA 驱动程序。
如何配置我的 Play!使用 Informix 的应用程序?
谢谢