Hi,
We are trying to use hibernate with Netezza database.We have used the PostgreSQLDialect and jar in classpath which provides 'org.netezza.Driver'
But still we are not able to connect to Netezaa through Hibernate.is there any alternate way for Netezza with Hibernate?
The error trace says:
java.lang.ExceptionInInitializerError org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:473) org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:497) org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:505)
================================================ Configurations: <depends>jboss.jca:service=RARDeployer</depends> <attribute name="JndiName">java:/mbean/pm.HibernateFactory</attribute> <attribute name="Datasource">java:/jdbc/em.alt.NetezzaServerDS</attribute> <attribute name="Dialect">org.hibernate.dialect.PostgreSQLDialect</attribute> <attribute name="SecondLevelCacheEnabled">true</attribute> <attribute name="CacheProviderClass">org.hibernate.cache.EhCacheProvider</attribute> <attribute name="QueryCacheEnabled">true</attribute> <!--<attribute name="UserTransactionName">UserTransaction</attribute> --> <attribute name="UserTransactionName">UserTransaction</attribute> <attribute name="TransactionStrategy">org.hibernate.transaction.JDBCTransactionFactory</attribute>
=====================================================================
<datasources> <!-- =========Service Data Source ============== --> <local-tx-datasource> <!-- Datasources are not available outside the virtual machine, prefixed with java:/ --> <jndi-name>jdbc/em.alt.NetezzaServerDS</jndi-name> <!-- This URL syntax is specified by sqlserver, and is specific to the JTDS driver --> <connection-url>jdbc:netezza://<server>:5480/<database></connection-url> <!-- Driver class must be available in the global (jboss server) classpath --> <driver-class>org.netezza.Driver</driver-class> <user-name>uid</user-name> <password>pwd</password> <!-- Specify the default transaction isolation level --> <!-- transaction-isolation>TRANSACTION_READ_UNCOMMITTED</transaction-isolation -->
<!-- For SQLServer, use this harmless SQL to check if the connection is valid --> <check-valid-connection-sql>SELECT 1</check-valid-connection-sql> <connection-property name="sendStringParametersAsUnicode">false</connection-property>
</local-tx-datasource>
Thanks, Amar
|