-->
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: Hibernate Spatial : connection to oracle is abruptly closed
PostPosted: Wed Jan 05, 2011 9:53 am 
Newbie

Joined: Wed Jan 05, 2011 9:41 am
Posts: 2
Using hibernate spatial with Oracle Database 11g Release 2, Hibernate 3.6, HibernateSpatial last trunk version, Spring 3.04
I have this problem that I cannot cope to solve :

On the hibernate trace I see that the connection to oracle is abruptly closed during the iteration on the result set.
This happens only with hql request that contains spatial criteria.
The first request of the day work well.
I use Junit to realize my tests.

I have this error,
0 ERROR org.hibernate.util.JDBCExceptionReporter:234 - No more data to read from socket

Or this one :
"234 - ORA-22060: argument [2] is an invalid or uninitialized number
ORA-06512: at "MDSYS.SDO_3GL", line 4
ORA-06512: at "MDSYS.SDO_3GL", line 28
ORA-06512: at "MDSYS.MD2", line 642
ORA-06512: at "MDSYS.SDO_GEOM", line 936
ORA-06512: at "MDSYS.SDO_GEOM", line 977
ORA-06512: at "MDSYS.ST_GEOMETRY", line 89
ORA-06512: at "MDSYS.OGC_WITHIN", line 6"

My hibernate settings (via spring) are :
---------------------------------------

<property name="hibernateProperties">
<value>
connection.provider_class=org.hibernatespatial.oracle.DefaultConnectionFinder
<!-- SPATIAL SQL oracle dialect -->
hibernate.dialect=org.hibernatespatial.oracle.OracleSpatial10gDialect
hibernate.current_session_context_class=thread
hibernate.transaction.factory_class= org.hibernate.transaction.JDBCTransactionFactory
hibernate.test.validateDataCleanup=false
<!-- hibernate.connection.release_mode=on_close-->
<!-- hibernate.jdbc.use_scrollable_resultset=true-->
</value>


org.hibernatespatial.oracle.OracleSpatial10gDialect.properties File :
---------------------------------------
OGC_STRICT=true
CONNECTION-FINDER=org.hibernatespatial.oracle.DefaultConnectionFinder


hibernate-spatial.cfg.xml
---------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<hibernate-spatial>
<default_dialect>org.hibernatespatial.oracle.OracleSpatial10gDialect</default_dialect>
<dialect>org.hibernatespatial.oracle.OracleSpatial10gDialect</dialect>
<precision_model>FIXED</precision_model>
<precision_model_scale>5</precision_model_scale>
</hibernate-spatial>

<bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource" destroy-method="close">
<property name="connectionCachingEnabled" value="true" />
<property name="URL" value="jdbc:oracle:thin:@server:1521:SID"/>
<property name="user" value="USER"/>
<property name="password" value="PASS"/>
<property name="connectionCacheProperties">
<props merge="default">
<prop key="MinLimit">3</prop>
<prop key="MaxLimit">20</prop>
</props>
</property>
</bean>

I have tried different combinaison of configuration without success.

Any idea is welcomed.

Jean-Marc


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.