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.
|
|