-->
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: ARITHABORT problem with computed indexed column
PostPosted: Mon Aug 03, 2009 11:18 am 
Newbie

Joined: Mon Aug 03, 2009 11:05 am
Posts: 2
Hi ,

I have a table with a computed indexed column. When the hibernate tries to update the rest of the columns, the following error is thrown.
My web application uses hibernate, spring and com.mchange.v2.c3p0.ComboPooledDataSource.

Hibernate: update gnp_main_number set std=?, cli=?, port=?, cease=?, remain=?, inService=? where id=?
16:12:27,330 WARN [JDBCExceptionReporter] SQL Error: 1934, SQLState: S0001
16:12:27,330 ERROR [JDBCExceptionReporter] UPDATE failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods.
16:12:27,361 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.SQLGrammarException: could not update: [com.lifecycle.gnp.domain.GnpMainNumber#3687]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:59)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
----------
-----------

I found about about the property "validationQuery", and thinking to set it to "SET ARITHABORT ON". But I am unable to find where it should be set ? whether in the connection properties, or hibernate properties.

the connection conf is like
<bean id="commonDataSource" abstract="true" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="${db.sqldriver}" />
<property name="minPoolSize" value="${db.minpoolsize}" />
<property name="maxPoolSize" value="${db.maxpoolsize}" />
<property name="testConnectionOnCheckout" value="true" />
<property name="preferredTestQuery" value="select name from sysobjects with (nolock) where name='sysobjects'" />
</bean>

<bean id="gnpDataSource" parent="commonDataSource">
<property name="jdbcUrl" value="${db.gnp.url}" />
<property name="user" value="${db.gnp.username}" />
<property name="password" value="${db.gnp.password}" />
</bean>

and the hibernate conf is
<bean id="gnpSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="mappingDirectoryLocations">
<list>
<value>classpath:config/hibernate/gnp</value>
<value>classpath:config/hibernate/framework</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.use_outer_join">true</prop>
<prop key="hibernate.max_fetch_depth">4</prop>
<prop key="hibernate.lazy">false</prop>
<prop key="hibernate.query.substitutions">true 1, false 0</prop>
</props>
</property>
<property name="dataSource">
<ref bean="gnpDataSource" />
</property>
</bean>

Please advice me how to fix this issue? Thanks for your help in advance.

Regards
Kumaran


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.