-->
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.  [ 1 post ] 
Author Message
 Post subject: The optimizer could not find a unique index (Sybase)
PostPosted: Tue Sep 02, 2008 11:29 am 
Newbie

Joined: Tue Sep 02, 2008 11:13 am
Posts: 2
Hi ,

I am facing an issue while firing a Named query on Sybase using Hibernate.

I am using JConn2 driver for Sybase. And using the org.hibernate.Query class of Hibernate 3. Below is the exception that I am getting.

SQL state [ZZZZZ]; error code [311]; The optimizer could not find a unique index which it could use to scan table 'nectar..REF_CLIENT_COVERAGE' for cursor 'jconnect_implicit_1'.
; nested exception is com.sybase.jdbc2.jdbc.SybSQLException: The optimizer could not find a unique index which it could use to scan table 'nectar..REF_CLIENT_COVERAGE' for cursor 'jconnect_implicit_1'.

at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:97)
at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:411)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:371)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:334)



Can any one give me an Idea on how to solve this issue. Is it a problem with the Driver? I Cannot change the Database or Declare any cursors on Table from the DB.

Thanks.


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

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.