-->
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.  [ 2 posts ] 
Author Message
 Post subject: 3.0.5 to 3.2 upgrade problem
PostPosted: Wed Dec 13, 2006 6:27 pm 
Beginner
Beginner

Joined: Fri Oct 15, 2004 10:29 am
Posts: 21
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.0.5
3.2

Mapping documents:

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>

<property name="connection.datasource">
java:comp/env/com/skillsoft/ilt/jdbc </property>
<property name="show_sql">false</property>
<property name="max_fetch_depth">0</property>
<!-- useful for debugging - true (default) means use the optimizer, false
means use standard java reflection.
<property name="cglib.use_reflection_optimizer">false</property>
-->
<property name="dialect">
org.hibernate.dialect.SQLServerDialect</property>

<!-- Mapping files -->
<mapping resource="Approval.hbm.xml"/>
</session-factory>
</hibernate-configuration>

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="com.skillsoft.ilt.beans">
<class name="Approval" table="appApproval" lazy="false">
<id name="ID" column="ID" unsaved-value="0">
<generator class="native"/>
</id>
<property name="type" column="type"/>
<property name="status" column="status"/>
<property name="requestDate" column="requestDate"/>
<property name="grantDate" column="grantDate"/>
<property name="note" column="note"/>
<many-to-one name="registration" class="Registration"
column="registration"/>
<many-to-one name="ownedBy" class="User" column="ownedBy"/>
</class>
</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:
SQL Server 2000 SP3

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


The first thing I noticed after I upgraded to 3.2 from 3.0.5 is the "Invalid object name" SQLException. It seems that there is a configuration missing since no code has changed and was working with version 3.0.5. Can someone give me a hint as to what that might be?


Top
 Profile  
 
 Post subject: connection.release_mode
PostPosted: Thu Dec 14, 2006 4:36 pm 
Beginner
Beginner

Joined: Fri Oct 15, 2004 10:29 am
Posts: 21
I'm using the session-per-request design pattern but did not have the connection.release_mode set to on_close. It was using the default of auto. Using release_mode on_close fixes the problem.


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