Hi,
I am trying to setup HA-JDBC 3.0.3 with JBoss-6.1. I am receiving below exception, please help
Exception: 2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) java.lang.IllegalArgumentException: java.lang.reflect.Method.setTransactionTimeout(...) has no associated durability phase. 2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.util.SimpleStaticRegistry.get(SimpleStaticRegistry.java:51) 2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.DurabilityPhaseRegistry.get(DurabilityPhaseRegistry.java:73) 2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.DurabilityPhaseRegistry.get(DurabilityPhaseRegistry.java:35) 2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.xa.XAResourceInvocationHandler.getInvoker(XAResourceInvocationHandler.java:179) 2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.xa.XAResourceInvocationHandler.getInvoker(XAResourceInvocationHandler.java:52) 2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.AbstractInvocationHandler.invokeOnProxy(AbstractInvocationHandler.java:92) 2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:85) 2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.ChildInvocationHandler.invoke(ChildInvocationHandler.java:44) 2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at com.sun.proxy.$Proxy308.setTransactionTimeout(Unknown Source) 2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.setTransactionTimeout(XAManagedConnection.java:318) ...
persistence.xml <property name="hibernate.show_sql" value="false"/> <property name="hibernate.hbm2ddl.auto" value="update"/> <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/> <property name="hibernate.connection.driver_class" value="net.sf.hajdbc.sql.Driver"/> <property name="hibernate.connection.url" value="jdbc:ha-jdbc:cluster1"/> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
XA data source:
<xa-datasource> <jndi-name>cluster1</jndi-name> <xa-datasource-class>net.sf.hajdbc.sql.xa.XADataSource</xa-datasource-class> <xa-datasource-property name="Cluster">cluster1</xa-datasource-property> <xa-datasource-property name="Config">ha-jdbc-cluster1.xml</xa-datasource-property> </xa-datasource>
ha-jdbc configuration
<ha-jdbc xmlns="urn:ha-jdbc:cluster:3.0"> <sync id="passive"/> <state id="simple"/> <cluster balancer="round-robin" dialect="standard" default-sync="passive" transaction-mode="parallel" durability="none" meta-data-cache="lazy"> <database id="db1" location="org.postgresql.xa.PGXADataSource" weight="2"> <property name="user">user</property> <property name="password">password</property> <property name="serverName">server1</property> <property name="portNumber">5432</property> <property name="databaseName">db</property> </database> <database id="db2" location="org.postgresql.xa.PGXADataSource" weight="1"> <property name="user">user</property> <property name="password">password</property> <property name="serverName">server2</property> <property name="portNumber">5432</property> <property name="databaseName">db</property> </database> </cluster> </ha-jdbc>
Fixed. https://github.com/ha-jdbc/ha-jdbc/commit/1f42722247e80611739a18f447c92d32684a44be
Log in to post a comment.
Hi,
I am trying to setup HA-JDBC 3.0.3 with JBoss-6.1. I am receiving below exception, please help
Exception:
2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) java.lang.IllegalArgumentException: java.lang.reflect.Method.setTransactionTimeout(...) has no associated durability phase.
2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.util.SimpleStaticRegistry.get(SimpleStaticRegistry.java:51)
2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.DurabilityPhaseRegistry.get(DurabilityPhaseRegistry.java:73)
2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.DurabilityPhaseRegistry.get(DurabilityPhaseRegistry.java:35)
2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.xa.XAResourceInvocationHandler.getInvoker(XAResourceInvocationHandler.java:179)
2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.xa.XAResourceInvocationHandler.getInvoker(XAResourceInvocationHandler.java:52)
2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.AbstractInvocationHandler.invokeOnProxy(AbstractInvocationHandler.java:92)
2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:85)
2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at net.sf.hajdbc.sql.ChildInvocationHandler.invoke(ChildInvocationHandler.java:44)
2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at com.sun.proxy.$Proxy308.setTransactionTimeout(Unknown Source)
2015-02-16 14:22:03,542 ERROR [STDERR] (pool-46-thread-1) at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.setTransactionTimeout(XAManagedConnection.java:318)
...
persistence.xml
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="hibernate.connection.driver_class" value="net.sf.hajdbc.sql.Driver"/>
<property name="hibernate.connection.url" value="jdbc:ha-jdbc:cluster1"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
XA data source:
ha-jdbc configuration
Fixed. https://github.com/ha-jdbc/ha-jdbc/commit/1f42722247e80611739a18f447c92d32684a44be