-->
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.  [ 5 posts ] 
Author Message
 Post subject: Hibernate Migration from 2.0 to 3.0
PostPosted: Mon Jan 08, 2007 2:33 am 
Newbie

Joined: Mon Jan 08, 2007 2:24 am
Posts: 6
Hi,

I have three classes named HibernateCommandExecutor.java
HibernateCommand.java
HibernateUtil.java
and of all the three classes am changing the hibernate 2.0 to Hibetnate 3.0 and am getting this error please help me...
what i have to do inorder to rectify this error.

------------ stringified throwable java.lang.ExceptionInInitializerError:
null
java.lang.ExceptionInInitializerError
at com.wamu.dashboard.util.hibernate.HibernateCommandExecutor.getSession(HibernateCommandExecutor.java:76)
at com.wamu.dashboard.util.hibernate.HibernateCommand.this(HibernateCommand.java:26)
at com.wamu.dashboard.util.hibernate.HibernateCommand.<init>(HibernateCommand.java:31)
at com.wamu.dashboard.security.permission.GetUserTargetedContentCommand.<init>(GetUserTargetedContentCommand.java:30)
at com.wamu.dashboard.security.permission.web.GetUserTargetedContentServlet.myService(GetUserTargetedContentServlet.java:49)
at com.wamu.dashboard.util.web.BaseServlet.service(BaseServlet.java:154)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:626)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
at jsp_servlet._admin._hotlinks.__index._jspService(__index.java:276)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6456)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: com.wamu.dashboard.util.hibernate.DashboardHibernateException: Could not instantiate dialect class
at com.wamu.dashboard.util.hibernate.HibernateUtil.init(HibernateUtil.java:313)
at com.wamu.dashboard.util.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:75)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 5:37 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
What did you put in the dialect property in your hibernate.cfg.xml file?

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Top
 Profile  
 
 Post subject: Hibernate Migration from 2.0 to 3.0
PostPosted: Tue Jan 09, 2007 12:45 am 
Newbie

Joined: Mon Jan 08, 2007 2:24 am
Posts: 6
Thanks,

You made it clear that i have defined the dialect as net.sf
and now i changed it org.hibernate. Its working fine now...

I have another doubt , i.e In my hibernate.cfg.xml file i have more than 10 hbm.xml files and is it mandatory to change the DTD version to 3.0 in all my hbm.xml files...?

here is my hibernate.cfg.xml file

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">weblogic.jdbc.jts.WAMUPool</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
<!-- <property name="show_sql">true</property> -->
<mapping resource="/com/wamu/dashboard/addressbook/Contact.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/addressbook/EmailAddress.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/addressbook/Group.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/crm/APCampaign.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/crm/APCollateral.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/crm/APLead.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/crm/APTreatment.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/crm/RTIntent.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/doforms/BrokerLfcInfo.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/hotlinks/HotLink.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/pricing/ProductPriceSheet.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/security/permission/Permission.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/security/permission/UserTargetedContent.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/newsflash/Newsflash.hbm.xml"/>
<mapping resource="/com/wamu/dashboard/newsflash/Audience.hbm.xml"/>
<mapping resource="com/wamu/dashboard/subscriptions/DashboardEmailRecord.hbm.xml"/>
<mapping resource="com/wamu/dashboard/subscriptions/DashboardEmailRecordAM.hbm.xml"/>
<mapping resource="com/wamu/dashboard/subscriptions/DashboardEmailRecordCompany.hbm.xml"/>
</session-factory>

</hibernate-configuration>

Right now i changed the DTD version for only one file named hotlink.hbm.xml...
plz tell me when migrating from hibernate 2.0 to 3.0 is it needed to change all the
hbm.xml's DTD..? Thanks in advance...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 09, 2007 4:38 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
http://www.hibernate.org/250.html#A21 :-)

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Top
 Profile  
 
 Post subject: Hibernate Migration from 2.0 to 3.0
PostPosted: Tue Jan 09, 2007 4:56 am 
Newbie

Joined: Mon Jan 08, 2007 2:24 am
Posts: 6
batmat wrote:
What did you put in the dialect property in your hibernate.cfg.xml file?



This is the dialect property which i've used in hibernate.cfg.xml
and it is mentioned below.


<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>


Still the same error is occuring...

ExceptionInInitializerError


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