-->
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.  [ 9 posts ] 
Author Message
 Post subject: OGM neo4j on EAP 6.1.1 or EAP 6.2.0
PostPosted: Wed Mar 05, 2014 9:39 am 
Newbie

Joined: Wed Mar 05, 2014 9:19 am
Posts: 7
Hi,

I'm trying to use hibernate-ogm-neo4j on EAP 6.1.1. I'm using two PU and with ogm version 4.0.0.beta4 I encountered https://hibernate.atlassian.net/browse/OGM-416.
When I tried to use ogm 4.1.0.beta1 I encountered ClassNotFoundException org.hibernate.jpa.HibernatePersistenceProvider because EAP 6.1.1 uses Hibernate 4.2.0.SP1.Final.
Inspired by https://forum.hibernate.org/viewtopic.php?p=2465955#p2465955 I tried update hibernate module in EAP 6.1.1 to 4.3.4, but then it didn't even start:
Code:
Caused by: java.lang.ClassNotFoundException: org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform from [Module "org.jboss.as.jpa.hibernate:4" from local module loader @6d3f1f92 (finder: local module finder @4b31e246 (roots: /home/jbrazdil/apps/eap/jboss-eap-6.1.1-hibernate-4.3/modules,/home/jbrazdil/apps/eap/jboss-eap-6.1.1-hibernate-4.3/modules/system/layers/base))]


Is there a way how to use OGM on EAP 6.1.1 or 6.2.0 (HB 4.2.7.SP1.Final)?

Thanks
Honza


Top
 Profile  
 
 Post subject: Re: OGM neo4j on EAP 6.1.1 or EAP 6.2.0
PostPosted: Wed Mar 05, 2014 12:41 pm 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
Hi Honza,

OGM 4.1 requires ORM 4.3 (also see the release announcement for details [1]), and ORM 4.3 is supported on WildFly 8 only.

I'm not sure whether it's (easily) possible to update to ORM 4.3 in AS 7 / EAP 6. A relevant piece of information is [2], but I think you've found that already. It may be that other component updates are required as well.

Instead of updating ORM, you may consider to backport the fix for OGM-416 (which is a one-liner, see [3]) to OGM 4.0.0.Beta4 and build OGM yourself. I think that'd be the more promising approach.

Hth,

--Gunnar

[1] http://in.relation.to/Bloggers/HibernateOGM410Beta1IsOut
[2] https://docs.jboss.org/author/display/AS72/JPA+Reference+Guide#JPAReferenceGuide-ReplacingthecurrentHibernate4.0.xjarswithanewerversion
[3] https://github.com/hibernate/hibernate-ogm/pull/268

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


Top
 Profile  
 
 Post subject: Re: OGM neo4j on EAP 6.1.1 or EAP 6.2.0
PostPosted: Wed Mar 05, 2014 1:13 pm 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
That said, it would be interesting to see a complete stacktrace. Apparently there is a component in your set-up which still expects ORM 4.2.x (trying to access org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform indicates that).

--Gunnar

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


Top
 Profile  
 
 Post subject: Re: OGM neo4j on EAP 6.1.1 or EAP 6.2.0
PostPosted: Wed Apr 02, 2014 8:50 am 
Newbie

Joined: Wed Mar 05, 2014 9:19 am
Posts: 7
Hi,

I backported the OGM-416 fix and successfully built and run OGM 4.0.0.Beta4, but found out that this version doesn't support JPQL and native query for Neo4j, so this version is pretty useless.

I read OGM 4.1 should support JPQL and hopefully also the native query. Don't you know if some EAP 6 will support ORM 4.3 or is ther a possibility that OGM 4.1 would support ORM 4.2?


Top
 Profile  
 
 Post subject: Re: OGM neo4j on EAP 6.1.1 or EAP 6.2.0
PostPosted: Thu Apr 03, 2014 4:22 am 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
I'm working on the native query and JPQL query support for Neo4j in these days.
This will come with the upgrade to Neo4j 2.0.

There are some issues at the moment related to the way transactions are managed between OGM and Neo4j and I don't think it will work when used inside a container. Mainly because the Neo4j integration at the moment needs to use its own JtaPlatform implementation.

There is also an open pull request that creates modules for EAP 6.x: https://github.com/hibernate/hibernate-ogm/pull/307


Top
 Profile  
 
 Post subject: Re: OGM neo4j on EAP 6.1.1 or EAP 6.2.0
PostPosted: Wed Apr 23, 2014 6:43 am 
Newbie

Joined: Wed Mar 05, 2014 9:19 am
Posts: 7
Hi,

I tried OGM 4.1.0.Beta2 with EAP 6.1.1, but I'm getting en exception.

I downloaded hibernate-ogm-modules-eap6-4.1.0.Beta2.zip and extracted it into modules/ and when I tried to deploy I got:
Code:
12:33:26,738 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 49) MSC000001: Failed to start service jboss.persistenceunit."build-tracker.ear#relationdbPU": org.jboss.msc.service.StartException in service jboss.persistenceunit."build-tracker.ear#relationdbPU": java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.ogm.service.impl.OgmIntegrator not a subtype
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
   at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
   at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.ogm.service.impl.OgmIntegrator not a subtype
   at java.util.ServiceLoader.fail(ServiceLoader.java:231) [rt.jar:1.7.0_51]
   at java.util.ServiceLoader.access$300(ServiceLoader.java:181) [rt.jar:1.7.0_51]
   at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:369) [rt.jar:1.7.0_51]
   at java.util.ServiceLoader$1.next(ServiceLoader.java:445) [rt.jar:1.7.0_51]
   at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:236)
   at org.hibernate.integrator.internal.IntegratorServiceImpl.<init>(IntegratorServiceImpl.java:53)
   at org.hibernate.service.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:158)
   at org.hibernate.ejb.Ejb3Configuration.buildLifecycleControledServiceRegistry(Ejb3Configuration.java:940)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:919)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:92)
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200)
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57)
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99)
   ... 4 more

persistence.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="     http://java.sun.com/xml/ns/persistence     http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  <persistence-unit name="relationdbPU">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>java:jboss/datasources/MysqlDS</jta-data-source>
    <class>...</class>
    <properties>
      <property name="org.hibernate.FlushMode" value="always"/>
      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
      <property name="hibernate.hbm2ddl.auto" value="update"/>
      <property name="hibernate.show_sql" value="false"/>
      <property name="hibernate.format_sql" value="false"/>
    </properties>
  </persistence-unit>
  <persistence-unit name="neo4jPU">
    <provider>org.hibernate.ogm.jpa.HibernateOgmPersistence</provider>
    <class>...</class>
    <properties>
      <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />
      <property name="hibernate.ogm.datastore.provider" value="neo4j_embedded" />
      <property name="hibernate.ogm.neo4j.database_path" value="tmp/hbn4jqwert" />
    </properties>
  </persistence-unit>
</persistence>


Any idea what's wrong?


Top
 Profile  
 
 Post subject: Re: OGM neo4j on EAP 6.1.1 or EAP 6.2.0
PostPosted: Tue May 06, 2014 7:17 am 
Newbie

Joined: Wed Mar 05, 2014 9:19 am
Posts: 7
Any idea about the
Code:
java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.ogm.service.impl.OgmIntegrator not a subtype
?


Top
 Profile  
 
 Post subject: Re: OGM neo4j on EAP 6.1.1 or EAP 6.2.0
PostPosted: Tue May 06, 2014 11:06 am 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
Hi,

Is there any chance you can provide me with a (minimal) test case which demonstrates the issue? You can send it to my Red Hat mail address. We tested the module ZIP on EAP 6 sucessfully, so I'm not sure why it doesn't work for you, but I really would like to find out what's the problem here.

--Gunnar

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


Top
 Profile  
 
 Post subject: Re: OGM neo4j on EAP 6.1.1 or EAP 6.2.0
PostPosted: Mon Jun 16, 2014 8:46 am 
Newbie

Joined: Wed Mar 05, 2014 9:19 am
Posts: 7
The solution was to remove services="export" from jboss-deployment-structure.xml

Change:
Code:
      <dependencies>
         <module name="org.hibernate" slot="ogm" services="export" />
      </dependencies>
to:
Code:
      <dependencies>
         <module name="org.hibernate" slot="ogm" />
      </dependencies>


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