-->
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: JBoss 4.0.2 + Hibernate Startup Problem
PostPosted: Mon Jun 20, 2005 5:12 pm 
Newbie

Joined: Thu Apr 15, 2004 10:17 am
Posts: 14
Location: Manhattan
I'm trying to port our applications from 3.2.6 to 4.0.2 using the built-in Hibernate feature of 4.0.2. I followed the directions about building a HAR file but when I start up I get an error that the MySQLDialect can't be found. Has anyone else encountered this error? Since Hibernate is already integrated, should I have to include the Hibernate3.jar in my $JBOSS_DIR/server/app/lib directory? I tried doing that and it didn't work. Any help would be great. My error log is below. Thanks!

Code:
16:49:03,661 INFO  [DatasourceConnectionProvider] Using datasource: java:/jdbc/conn/MYSQL
16:49:04,902 INFO  [SettingsFactory] RDBMS: MySQL, version: 4.1.12-standard-log
16:49:04,902 INFO  [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-jav
a-3.0.16-ga ( $Date: 2004/09/30 07:35:03 $, $Revision: 1.27.2.44 $ )
16:49:04,998 ERROR [Hibernate] Starting failed jboss.har:service=Hibernate
org.hibernate.HibernateException: Dialect class not found: net.sf.hibernate.dialect.MySQLDialect
        at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:81)
        at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:42)
        at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:374)
        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:110)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
        at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:611)
        at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:578)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)

        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
        at $Proxy0.start(Unknown Source)
        at org.jboss.system.ServiceController.start(ServiceController.java:418)
        at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
        at $Proxy4.start(Unknown Source)
        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
        at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterce
ptor.java:127)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
        at $Proxy8.deploy(Unknown Source)

_________________
4 9 7 23 5 5 4


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 20, 2005 5:18 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
org.hibernate.dialect.MySQLDialect


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 20, 2005 5:53 pm 
Newbie

Joined: Thu Apr 15, 2004 10:17 am
Posts: 14
Location: Manhattan
Oi! That's it. Thanks.

One more question, do I need to place mapped Hibernate classes inside the HAR? Or, can the mapped classes be inside a JAR outside the HAR? I only ask because now I'm getting this exception:

Code:
17:53:11,058 ERROR [Hibernate] Starting failed jboss.har:service=Hibernate
org.hibernate.MappingException: entity class not found: com.somedomain.entity.Member
        at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:89)
        at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:160)
        at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:42)
        at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:108)
        at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:400)
        at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:104)
        at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:211)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
        at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:611)
        at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:578)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
        at $Proxy0.start(Unknown Source)
        at org.jboss.system.ServiceController.start(ServiceController.java:418)
        at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
        at $Proxy4.start(Unknown Source)
        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)

_________________
4 9 7 23 5 5 4


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 21, 2005 10:56 am 
Newbie

Joined: Thu Apr 15, 2004 10:17 am
Posts: 14
Location: Manhattan
I solved my problem by building two separate JARs. The first JAR contains only my Hibernate classes and that's put inside my HAR (had to tweak the MANIFEST file to allow a JAR inside a HAR). The 2nd JAR is my application JAR and that gets deployed outside the HAR.

_________________
4 9 7 23 5 5 4


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.