-->
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.  [ 3 posts ] 
Author Message
 Post subject: Database cannot set connection option SET_READONLY_FALSE
PostPosted: Mon Jul 19, 2004 5:48 pm 
Newbie

Joined: Tue Mar 16, 2004 1:44 pm
Posts: 17
Location: San Jose - Costa Rica
Im trying to migrate an application from Websphere 4.0 to Tomcat 4.1

Everything works ok, but when i try to access the database using hibernate i get this error

2004-07-19 15:42:01,267 WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL Warning: 0, SQLState: 010SK

2004-07-19 15:42:01,268 WARN net.sf.hibernate.util.JDBCExceptionReporter - 010SK: Database cannot set connection option SET_READONLY_FALSE.

im using exact the same driver (jConnect 5.2. ive tried jConnect 5.5 with the same result)

The database is Sybase 11.9

Any idea ???

Thanks
Ignacio


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 27, 2004 6:36 am 
Newbie

Joined: Tue Jul 27, 2004 6:33 am
Posts: 2
Location: Ellicott City, MD
I'm getting the exact same problem with Hibernate, JConnect 5.5 and ASE 12.5.1.

I've been trying to find a ASE, JConnect or Hibernate solution and have not been successful.

Darrell


Top
 Profile  
 
 Post subject: Re: Database cannot set connection option SET_READONLY_FALSE
PostPosted: Tue Aug 03, 2004 10:20 pm 
Newbie

Joined: Tue Jul 27, 2004 6:33 am
Posts: 2
Location: Ellicott City, MD
I finally got an answer from engineering (somewhat anyway).

java.sql.Connection has a setReadOnly(boolean) method that is meant to notify the database of the type of result set being requested in order to perform any optimizations. However Sybase ASE doesn't require any optimizations, therefore setReadOnly() produces a SQLWarning.

In order to suppress the message you'll need to update the spt_mda table in the MASTER database.

update spt_mda set querytype = 4, set query = '0'
where mdinfo = 'SET_READONLY_FALSE'

and

update spt_mda set querytype = 4, set query = '0'
where mdinfo = 'SET_READONLY_TRUE'

These two entries (they are the only ones) are set to a querytype of 3 by default, which means "not supported", which explains the SQLWarning.

Changing them to a 4 (meaning boolean values) with a query type of "0" basically causes the JDBC Driver to return false without the warning..

I don't know why this wasn't a default reponse to begin with. I've asked engineering to reconsider their default implementation which is distributed as part of the ASE install in SQL files.

Hope this helps.

Darrell Fuller
Sybase Professional Services
Bethesda, MD


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.