-->
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.  [ 4 posts ] 
Author Message
 Post subject: Migration problems 3.0.5 to 3.1rc2 - AbstractBatcher
PostPosted: Sun Oct 30, 2005 8:13 am 
Newbie

Joined: Fri Oct 03, 2003 6:47 am
Posts: 15
Hi,
I'm trying to upgrade from Hibernate 3.0.5 to 3.1rc2 but I don't get 3.1rc2 to work.

My application works without problems with 3.0.5 but after upgrading to Hibernate 3.1rc2 I get the stacktrace below. I have tried to upgrade to 3.1 before during the beta releases with the same result. I first thought that it was due to some early unstability issue but as Hibernate 3.1 seems close to release I guess I have missed something.

The mapping it concerns is really basic wihout any relations whatsoever. (See end of post.)

This happens direct when the first DB access should occur.

Hibernate version: 3.1rc2

Name and version of the database you are using:
MySQL 4.1.7 / c3p0 pool.

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

Full stack trace of any exception that occurs:
2005-10-30 12:56:33,625 [main] INFO (SettingsFactory.java:195) - Order SQL updates by primary key: disabled
2005-10-30 12:56:33,625 [main] INFO (SettingsFactory.java:338) - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
2005-10-30 12:56:33,640 [main] INFO (ASTQueryTranslatorFactory.java:21) - Using ASTQueryTranslatorFactory
2005-10-30 12:56:33,640 [main] INFO (SettingsFactory.java:203) - Query language substitutions: {}
2005-10-30 12:56:33,640 [main] INFO (SettingsFactory.java:209) - Second-level cache: enabled
2005-10-30 12:56:33,640 [main] INFO (SettingsFactory.java:213) - Query cache: disabled
2005-10-30 12:56:33,640 [main] INFO (SettingsFactory.java:325) - Cache provider: org.hibernate.cache.EhCacheProvider
2005-10-30 12:56:33,656 [main] INFO (SettingsFactory.java:228) - Optimize cache for minimal puts: disabled
2005-10-30 12:56:33,656 [main] INFO (SettingsFactory.java:237) - Structured second-level cache entries: disabled
2005-10-30 12:56:33,671 [main] INFO (SettingsFactory.java:264) - Statistics: enabled
2005-10-30 12:56:33,671 [main] INFO (SettingsFactory.java:268) - Deleted entity synthetic identifier rollback: disabled
2005-10-30 12:56:33,671 [main] INFO (SettingsFactory.java:283) - Default entity-mode: POJO
2005-10-30 12:56:33,937 [main] INFO (SessionFactoryImpl.java:155) - building session factory
2005-10-30 12:56:36,109 [main] INFO (SessionFactoryObjectFactory.java:82) - Not binding factory to JNDI, no JNDI name configured
2005-10-30 12:56:51,687 [main] INFO (SessionFactoryImpl.java:432) - Checking 0 named queries
2005-10-30 12:56:51,687 [main] INFO (HibernateSessionFactory.java:86) - Sessionfactory initialized ok!
2005-10-30 12:56:51,796 [main] ERROR (ApplicationContext.java:674) - action: null
java.lang.NullPointerException
at com.mchange.v2.c3p0.stmt.StatementCacheKey.hashCode(StatementCacheKey.java:151)
at com.mchange.v2.c3p0.stmt.ValueIdentityStatementCacheKey.init(ValueIdentityStatementCacheKey.java:190)
at com.mchange.v2.c3p0.stmt.ValueIdentityStatementCacheKey._find(ValueIdentityStatementCacheKey.java:150)
at com.mchange.v2.c3p0.stmt.StatementCacheKey.find(StatementCacheKey.java:49)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkoutStatement(GooGooStatementCache.java:81)
at com.mchange.v2.c3p0.impl.NewPooledConnection.checkoutStatement(NewPooledConnection.java:168)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:185)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:431)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:366)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1782)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:81)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2729)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:365)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:809)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:749)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:742)
at com.gnilron.monster.security.dao.MonsterSecuritySettingsDAOHbm.getMonsterSecuritySettings(MonsterSecuritySettingsDAOHbm.java:45)
at com.gnilron.monster.service.PersistenceServiceHibernateImpl.getMonsterSecuritySettings(PersistenceServiceHibernateImpl.java:166)
at com.gnilron.monster.web.application.ApplicationContainer.getMonsterSecuritySettings(ApplicationContainer.java:219)
at com.gnilron.monster.web.application.ApplicationContainer.<init>(ApplicationContainer.java:102)
at com.gnilron.monster.web.struts.plugin.MonsterPlugIn.init(MonsterPlugIn.java:28)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3880)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4141)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:603)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)

My Mappin generated by XDoclet 1.2.3
<?xml version="1.0" encoding="UTF-8"?>

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

<hibernate-mapping
>
<class
name="com.gnilron.monster.security.MonsterSecuritySettings"
table="MONSTER_SECURITY_SETTINGS"
>

<id
name="id"
column="id"
type="java.lang.Long"
unsaved-value="null"
>
<generator class="org.hibernate.id.IdentityGenerator">
<!--
To add non XDoclet generator parameters, create a file named
hibernate-generator-params-MonsterSecuritySettings.xml
containing the additional parameters and place it in your merge dir.
-->
</generator>
</id>

<timestamp
name="lastUpdatedDatetime"
column="LAST_UPDATE"
/>

<property
name="passwordMinLength"
type="int"
update="true"
insert="true"
column="PASSWORD_MIN_LENGTH"
/>

<property
name="passwordRetries"
type="int"
update="true"
insert="true"
column="PASSWORD_RETRIES"
/>

<property
name="guestEnable"
type="boolean"
update="true"
insert="true"
column="GUEST_ENABLE"
/>

<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-MonsterSecuritySettings.xml
containing the additional properties and place it in your merge dir.
-->

</class>

</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 30, 2005 9:53 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
so this is about the 117th posting with this issue ;)

Let me give you a hint:

I guess you have an Interceptor and you just implemented a new method with some random default instead of actually reading the javadocs on what it actually should do.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 30, 2005 10:37 am 
Newbie

Joined: Fri Oct 03, 2003 6:47 am
Posts: 15
Yepp,
Thanks Max! That was a nice tip. Just replaced my Interceptor usage with the EmptyInterceptor as a baseclass and things now work again! Are there any other known issues with upgrading 3.0.5 to 3.1? Or better, do you know of any "Migration guide"?

Anyway, thanks alot!

// Torben


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 30, 2005 11:07 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes http://www.hibernate.org/250.html

it also mentions how to use EmptyInterceptor.

_________________
Max
Don't forget to rate


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