-->
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: jTDS configuration in hibernate.properties
PostPosted: Thu Sep 30, 2004 8:02 am 
jTDS Developer
jTDS Developer

Joined: Tue Feb 24, 2004 5:36 pm
Posts: 70
Location: Bucharest, Romania
In both versions 2.1.6 and 3.0alpha the configuration for the jTDS JDBC driver is inaccurate. The URL looks like

Code:
#hibernate.connection.url jdbc:jtds:sqlserver://1E1/test;SelectMethod=cursor


The selectMethod property is specific to the Microsoft driver and is not needed by jTDS, so the URL should be

Code:
#hibernate.connection.url jdbc:jtds:sqlserver://1E1/test


A second issue is the presence of this line right after the driver and URL settings:

Code:
#hibernate.jdbc.use_scrollable_resultset false


For quite a while now (probaby 6 months or about 3 minor versions ago) jTDS has had complete and performant scrollable ResultSet support, so this no longer applies. We have used Hibernate with jTDS without setting this property without any problems.

A third issue would be that the 3.0alpha release hibernate.properties states that jTDS is not supported. I suppose this is just something left over from when the two versions branched off and not an actual problem with the Hibernate 3.0alpha/jTDS combination.

Thanks,
Alin.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 07, 2004 1:42 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
this is now fixed

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Hibernate with JTDS
PostPosted: Tue Nov 11, 2008 3:29 pm 
Newbie

Joined: Tue Nov 11, 2008 3:24 pm
Posts: 2
Hello,

I am switching my database from Oracle to SQL Server. I have everything setup and working, but am getting this Exception in one page:

ERROR (JDBCExceptionReporter.java:78) -ResultSet may only be accessed in a forward direction.
2008-11-11 11:08:03,077 [http-8080-Processor25] [] [] [] ERROR (StandardWrapperValve.java:253) -Servlet.service() for servlet SpringDispatcher threw exception
org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2223)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.newmotioninc.download.service.ContentService.searchForProvider(ContentService.java:117)
at com.newmotioninc.download.service.ContentService$$FastClassByCGLIB$$fbe3ecc2.invoke(<generated>)

I see from the JTDS site this information: http://jtds.sourceforge.net/faq.html#fo ... yResultSet

Does anyone know how and where to update the hibernate configs?

thanks, brian


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 13, 2008 2:28 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Can't see how this relates to the orginal question ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 13, 2008 2:52 pm 
Newbie

Joined: Tue Nov 11, 2008 3:24 pm
Posts: 2
I guess my question has to do with using the JTDS driver and Hibernate.

I never got the java.sql.SQLException: "ResultSet may only be accessed in a forward direction" error with Oracle, but it happens with JTDS.

The JTDS site has some information in it here:
http://jtds.sourceforge.net/faq.html#fo ... yResultSet

I was curious about the #2 possibility:

The scroll insensitive/updateable combination is not supported by SQL Server, so such a ResultSet is automatically downgraded to scroll insensitive/read-only by the server. Use the scroll sensitive/updateable combination and it should work.

Is am trying to find the configuration for this when using Hibernate and HQLs. Also, this error only happens when no Results are returned.

thanks, brian


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.