-->
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: Error on JBoss AS 7.1.1 -OGM000010: GridDialect class not f
PostPosted: Tue Oct 09, 2012 8:57 am 
Newbie

Joined: Thu Oct 04, 2012 8:51 am
Posts: 6
I am getting this error:
Code:

14:49:57,715 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.persistenceunit."mongotest.war#jpajtastandalone": org.jboss.msc.service.StartException in service jboss.persistenceunit."mongotest.war#jpajtastandalone": Failed to start service
   at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_16]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_16]
   at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_16]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: jpajtastandalone] Unable to build EntityManagerFactory
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
   at org.hibernate.ogm.jpa.HibernateOgmPersistence.createContainerEntityManagerFactory(HibernateOgmPersistence.java:132)
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
   at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
   at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
   ... 3 more
Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.ogm.persister.OgmEntityPersister
   at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:185)
   at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:135)
   at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:381)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1750)
   at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
   ... 10 more
Caused by: org.hibernate.HibernateException: OGM000010: GridDialect class [org.hibernate.ogm.test.type.OverridingTypeDialect] cannot be found in classpath
   at org.hibernate.ogm.dialect.impl.GridDialectFactoryImpl.buildGridDialect(GridDialectFactoryImpl.java:53)
   at org.hibernate.ogm.datastore.impl.DatastoreServicesImpl.configure(DatastoreServicesImpl.java:54)
   at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
   at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
   at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
   at org.hibernate.ogm.persister.OgmEntityPersister.<init>(OgmEntityPersister.java:125)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_16]
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [rt.jar:1.6.0_16]
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_16]
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_16]
   at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:163)
   ... 15 more


My settings are:
Code:
13:31:07,629 INFO  [org.hibernate.Version] (MSC service thread 1-1) HHH000412: Hibernate Core {4.1.7.Final}
13:31:07,623 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-1) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
13:31:07,887 INFO  [org.hibernate.ogm.cfg.impl.Version] (MSC service thread 1-1) OGM000001: Hibernate OGM 4.0.0.Beta1
13:31:08,034 INFO  [org.hibernate.ogm.datastore.impl.DatastoreProviderInitiator] (MSC service thread 1-1) OGM000016: NoSQL Datastore provider: org.hibernate.ogm.datastore.mongodb.impl.MongoDBDatastoreProvider


Top
 Profile  
 
 Post subject: Re: Error on JBoss AS 7.1.1 -OGM000010: GridDialect class not f
PostPosted: Wed Oct 10, 2012 11:58 am 
Newbie

Joined: Thu Feb 02, 2012 12:01 pm
Posts: 4
Hello,

Regarding the post title, you run your app into Jboss AS 7.1, do you have installed OGM as JPA module right ?
And could you show us the persistence.xml and pom.xml (just the dependencies concerning OGM)
One last thing, obviously OGM tries to find
Code:
org.hibernate.ogm.test.type.OverridingTypeDialect
but it is a test class and it's not used by the MongoDB module.
You probably have something like
Code:
<property name="hibernate.ogm.datastore.grid_dialect" value="org.hibernate.ogm.test.type.OverridingTypeDialect"/>


You don't have to override the grid_dialect property because OGM will know which dialect to use thanks to this property:
Code:
hibernate.ogm.datastore.provider

It has to be set to "mongodb" if you want to use MongoDB as a datastore for your app.

Hope it helps,
Guillaume


Top
 Profile  
 
 Post subject: Re: Error on JBoss AS 7.1.1 -OGM000010: GridDialect class not f
PostPosted: Thu Oct 11, 2012 4:35 am 
Newbie

Joined: Thu Oct 04, 2012 8:51 am
Posts: 6
Ok,

It was a Copy/Paste error.
The persistence.xml:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0"
   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

   <persistence-unit name="jpajtastandalone"
      transaction-type="JTA">
      <provider>org.hibernate.ogm.jpa.HibernateOgmPersistence</provider>
      <properties>
         <property name="hibernate.transaction.jta.platform"
            value="org.hibernate.service.jta.platform.internal.JBossStandAloneJtaPlatform" />
         <property name="hibernate.ogm.datastore.provider" value="mongodb" />

         <property name="hibernate.ogm.mongodb.host" value="127.0.0.1" />
         <property name="hibernate.ogm.mongodb.port" value="27017" />
         <property name="hibernate.ogm.mongodb.database" value="mydb" />


         <property name="jboss.as.jpa.providerModule" value="org.hibernate:ogm" />
         <property name="jboss.as.jpa.adapterModule" value="org.jboss.as.jpa.hibernate:4" />

         <!-- <property name="hibernate.ogm.mongodb.username" value=""/> <property
            name="hibernate.ogm.mongodb.password" value=""/> <property name="hibernate.ogm.mongodb.safe"
            value=""/> <property name="hibernate.ogm.mongodb.connection_timeout" value=""/>
            <property name="hibernate.ogm.mongodb.associations.store" value=""/> -->
      </properties>
   </persistence-unit>
</persistence>




Now I get a TransactionManager error. How can we get the ajurna dependency?
Code:
java.lang.ClassNotFoundException: Could not load requested class : com.arjuna.ats.jta.TransactionManager
   org.hibernate.service.classloading.internal.ClassLoaderServiceImpl$1.findClass(ClassLoaderServiceImpl.java:99)
   java.lang.ClassLoader.loadClass(ClassLoader.java:307)
   java.lang.ClassLoader.loadClass(ClassLoader.java:252)
   java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
   java.lang.Class.forName0(Native Method)
   java.lang.Class.forName(Class.java:247)
   org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:138)
   org.hibernate.service.jta.platform.internal.JBossStandAloneJtaPlatform.locateTransactionManager(JBossStandAloneJtaPlatform.java:46)
   org.hibernate.service.jta.platform.internal.AbstractJtaPlatform.retrieveTransactionManager(AbstractJtaPlatform.java:104)
   org.hibernate.service.jta.platform.internal.AbstractJtaPlatform.getTransactionManager(AbstractJtaPlatform.java:115)
   org.hibernate.service.jta.platform.internal.TransactionManagerBasedSynchronizationStrategy.canRegisterSynchronization(TransactionManagerBasedSynchronizationStrategy.java:56)
   org.hibernate.service.jta.platform.internal.AbstractJtaPlatform.canRegisterSynchronization(AbstractJtaPlatform.java:148)
   org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.attemptToRegisterJtaSync(TransactionCoordinatorImpl.java:240)
   org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.pulse(TransactionCoordinatorImpl.java:268)
   org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1202)
   org.hibernate.ejb.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:178)
   org.hibernate.ejb.EntityManagerImpl.<init>(EntityManagerImpl.java:89)
   org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:179)
   org.hibernate.ogm.jpa.impl.OgmEntityManagerFactory.createEntityManager(OgmEntityManagerFactory.java:56)
   org.jboss.as.jpa.injectors.PersistenceContextInjectionSource$PersistenceContextJndiInjectable.getReference(PersistenceContextInjectionSource.java:151)
   org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:104)
   org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
   org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
   org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
   org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95)
   org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
   org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
   org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
   org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
   org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
   org.jboss.as.jpa.interceptor.SFSBPreCreateInterceptor.processInvocation(SFSBPreCreateInterceptor.java:46)
   org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
   org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
   org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
   org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
   org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
   org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
   org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161)
   org.jboss.as.ejb3.component.stateful.StatefulSessionComponent.constructComponentInstance(StatefulSessionComponent.java:137)
   org.jboss.as.ejb3.component.stateful.StatefulSessionComponent.constructComponentInstance(StatefulSessionComponent.java:69)
   org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85)
   org.jboss.as.ejb3.component.stateful.StatefulSessionComponent.createInstance(StatefulSessionComponent.java:126)
   org.jboss.as.ejb3.component.stateful.StatefulSessionComponent.createInstance(StatefulSessionComponent.java:69)
   org.jboss.as.ejb3.cache.TransactionAwareObjectFactory.createInstance(TransactionAwareObjectFactory.java:52)
   org.jboss.as.ejb3.cache.impl.backing.NonPassivatingBackingCacheImpl.create(NonPassivatingBackingCacheImpl.java:97)
   org.jboss.as.ejb3.cache.impl.backing.NonPassivatingBackingCacheImpl.create(NonPassivatingBackingCacheImpl.java:56)
   org.jboss.as.ejb3.cache.spi.impl.AbstractCache.create(AbstractCache.java:48)
   org.jboss.as.ejb3.cache.impl.SimpleCache.create(SimpleCache.java:69)
   org.jboss.as.ejb3.cache.impl.SimpleCache.create(SimpleCache.java:40)
   org.jboss.as.ejb3.component.stateful.StatefulSessionComponent.createSession(StatefulSessionComponent.java:224)
   org.jboss.as.weld.ejb.StatefulSessionObjectReferenceImpl.<init>(StatefulSessionObjectReferenceImpl.java:69)
   org.jboss.as.weld.services.bootstrap.WeldEjbServices.resolveEjb(WeldEjbServices.java:60)
   org.jboss.weld.bean.SessionBean.createReference(SessionBean.java:408)
   org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.<init>(EnterpriseBeanProxyMethodHandler.java:69)
   org.jboss.weld.bean.SessionBean.create(SessionBean.java:296)


Thanks


Top
 Profile  
 
 Post subject: Re: Error on JBoss AS 7.1.1 -OGM000010: GridDialect class not f
PostPosted: Thu Oct 11, 2012 4:50 am 
Newbie

Joined: Thu Oct 04, 2012 8:51 am
Posts: 6
Hi,

Excuse me, I had to remove:
<property name="hibernate.transaction.jta.platform"
value="org.hibernate.service.jta.platform.internal.JBossStandAloneJtaPlatform" />

From persistence.xml as you told me in another post.

Thanks


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.