These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: auto commit allways on - Domino Driver JDBC
PostPosted: Fri Feb 04, 2005 5:54 am 
Newbie

Joined: Fri Feb 04, 2005 5:34 am
Posts: 3
Has anyone managed to use Domino JDBC Driver with Hibernate ? I am getting
net.sf.hibernate.exception.GenericJDBCException opennig session because driver is unable to work in disabled auto commit mode.

Code:
Session session = sessionFactory.openSession();


    <session-factory name="TEST" >
    <property name="connection.driver_class">lotus.jdbc.domino.DominoDriver</property>
    <property name="connection.username"></property>
    <property name="connection.password"></property>
    <property name="connection.url">jdbc:domino:/XY\TEST.nsf/AB</property>
    <property name="show_sql">true</property>
    <mapping resource="TEST.hbm.xml" />
    </session-factory>

Is there any way to completely disable transactions ?

Code:
net.sf.hibernate.exception.GenericJDBCException: Cannot open connection
   at net.sf.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:80)
   at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:69)
   at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
   at net.sf.hibernate.impl.BatcherImpl.convert(BatcherImpl.java:328)
   at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:295)
   at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3373)
   at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3333)
   at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:67)
   at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:784)
   at net.sf.hibernate.loader.Loader.doQuery(Loader.java:269)
   at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
   at net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
   at net.sf.hibernate.loader.Loader.list(Loader.java:1054)
   at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
   at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1554)
   at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1531)
   at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1523)
   at Test.main(Test.java:29)
Caused by: java.sql.SQLException: Auto commit is always on.
   at lotus.jdbc.domino.DominoConnection.setAutoCommit(DominoConnection.java)
   at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:103)
   at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:292)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 06, 2005 2:05 pm 
Newbie

Joined: Sun Feb 06, 2005 1:42 pm
Posts: 4
It sounds like you are trying to use Domino as your back-end database?

Domino wasn't designed for that - it is a document store not a relational database. The existence of a JDBC driver for Domino is bizarre in itself, and trying to use Domino as a relational database is going to cause you problems in probably all aspects of your project. It's like using a screwdriver to hammer nails: You can do it but that's not what screwdrivers are for.

Assuming you are committed to using Domino as the front end, probably as a browser-based web application, my advice would be to revisit your design so that you either:

(a) set up a real relational database as the back-end and put at least one layer in between the front end and back end, and then use Hibernate in that layer (e.g. a servlet)

(b) Don't use Hibernate and relational storage, and do an all-Domino solution.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 07, 2005 2:35 am 
Newbie

Joined: Fri Feb 04, 2005 5:34 am
Posts: 3
demeritcowboy wrote:
It sounds like you are trying to use Domino as your back-end database?

Domino wasn't designed for that - it is a document store not a relational database. The existence of a JDBC driver for Domino is bizarre in itself, and trying to use Domino as a relational database is going to cause you problems in probably all aspects of your project. It's like using a screwdriver to hammer nails: You can do it but that's not what screwdrivers are for.

Assuming you are committed to using Domino as the front end, probably as a browser-based web application, my advice would be to revisit your design so that you either:

(a) set up a real relational database as the back-end and put at least one layer in between the front end and back end, and then use Hibernate in that layer (e.g. a servlet)

(b) Don't use Hibernate and relational storage, and do an all-Domino solution.


It is not the point.

We know all the aspects of using Domino database. As we want to just explore data of existing domino database in the simplest way (no updates), we are looking for a suited tool not to bother with plain SQL and VO.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 07, 2005 2:44 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
In Hibernate3 set

hibernate.jdbc.autocommit true

or in any version of Hibernate, provide your own connection to openSession()


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 07, 2005 3:27 am 
Newbie

Joined: Fri Feb 04, 2005 5:34 am
Posts: 3
gavin wrote:
In Hibernate3 set

hibernate.jdbc.autocommit true

or in any version of Hibernate, provide your own connection to openSession()


Providing established connection helped.

thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.