-->
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.  [ 7 posts ] 
Author Message
 Post subject: 4.1.0.Beta4 and wildfly-8.0.0.Final neo4j module error
PostPosted: Fri Jun 13, 2014 6:50 am 
Newbie

Joined: Fri Jun 13, 2014 6:24 am
Posts: 3
Hi, guys :) after upgrading to latest version (4.1.0.Beta4) i am unable to start my aplication when i try to deploy i get this error:

Code:
java.lang.ClassNotFoundException: org.neo4j.cypher.javacompat.ExecutionEngine from [Module "org.hibernate.ogm.neo4j:main" from local module loader ...


console output:

Code:
ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 10) MSC000001: Failed to start service jboss.persistenceunit."test.war#primary": org.jboss.msc.service.StartException in service jboss.persistenceunit."test.war#primary": java.lang.NoClassDefFoundError: org/neo4j/cypher/javacompat/ExecutionEngine
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
   at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0]
   at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474)
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0]
   at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0]
   at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.NoClassDefFoundError: org/neo4j/cypher/javacompat/ExecutionEngine
   at org.hibernate.ogm.datastore.neo4j.dialect.impl.Neo4jSequenceGenerator.<init>(Neo4jSequenceGenerator.java:76) [hibernate-ogm-neo4j-4.1.0.Beta4.jar:4.1.0.Beta4]
   at org.hibernate.ogm.datastore.neo4j.impl.Neo4jDatastoreProvider.start(Neo4jDatastoreProvider.java:74) [hibernate-ogm-neo4j-4.1.0.Beta4.jar:4.1.0.Beta4]
   at org.hibernate.service.internal.AbstractServiceRegistryImpl.startService(AbstractServiceRegistryImpl.java:301) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
   at org.hibernate.ogm.service.impl.OgmSessionFactoryServiceRegistryImpl.startService(OgmSessionFactoryServiceRegistryImpl.java:61) [hibernate-ogm-core-4.1.0.Beta4.jar:4.1.0.Beta4]
   at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:209) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
   at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:178) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
   at org.hibernate.ogm.datastore.neo4j.impl.Neo4jIntegrator.currentDialectIsNeo4j(Neo4jIntegrator.java:60) [hibernate-ogm-neo4j-4.1.0.Beta4.jar:4.1.0.Beta4]
   at org.hibernate.ogm.datastore.neo4j.impl.Neo4jIntegrator.addNeo4jObserverIfRequired(Neo4jIntegrator.java:52) [hibernate-ogm-neo4j-4.1.0.Beta4.jar:4.1.0.Beta4]
   at org.hibernate.ogm.datastore.neo4j.impl.Neo4jIntegrator.integrate(Neo4jIntegrator.java:38) [hibernate-ogm-neo4j-4.1.0.Beta4.jar:4.1.0.Beta4]
   at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:311) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1857) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
   at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
   at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
   at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:399) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
   at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
   at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:150) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
   at org.hibernate.ogm.jpa.HibernateOgmPersistence.createContainerEntityManagerFactory(HibernateOgmPersistence.java:106) [hibernate-ogm-core-4.1.0.Beta4.jar:4.1.0.Beta4]
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:318) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$1100(PersistenceUnitServiceImpl.java:67) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
   ... 8 more
Caused by: java.lang.ClassNotFoundException: org.neo4j.cypher.javacompat.ExecutionEngine from [Module "org.hibernate.ogm.neo4j:main" from local module loader @12bc6874 (finder: local module finder @de0a01f (roots: D:\_Prog\jBoss\servers\wildfly-8.0.0.Final\modules,D:\_Prog\jBoss\servers\wildfly-8.0.0.Final\modules\system\layers\base))]
   at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final]
   at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final]
   at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final]
   at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final]
   at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final]
   ... 28 more

12:18:23,589 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "test.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"test.war#primary\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"test.war#primary\": java.lang.NoClassDefFoundError: org/neo4j/cypher/javacompat/ExecutionEngine
    Caused by: java.lang.NoClassDefFoundError: org/neo4j/cypher/javacompat/ExecutionEngine
    Caused by: java.lang.ClassNotFoundException: org.neo4j.cypher.javacompat.ExecutionEngine from [Module \"org.hibernate.ogm.neo4j:main\" from local module loader @12bc6874 (finder: local module finder @de0a01f (roots: D:\\_Prog\\jBoss\\servers\\wildfly-8.0.0.Final\\modules,D:\\_Prog\\jBoss\\servers\\wildfly-8.0.0.Final\\modules\\system\\layers\\base))]"}}
12:18:23,598 ERROR [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "test.war" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.persistenceunit.\"test.war#primary\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"test.war#primary\": java.lang.NoClassDefFoundError: org/neo4j/cypher/javacompat/ExecutionEngine
    Caused by: java.lang.NoClassDefFoundError: org/neo4j/cypher/javacompat/ExecutionEngine
    Caused by: java.lang.ClassNotFoundException: org.neo4j.cypher.javacompat.ExecutionEngine from [Module \"org.hibernate.ogm.neo4j:main\" from local module loader @12bc6874 (finder: local module finder @de0a01f (roots: D:\\_Prog\\jBoss\\servers\\wildfly-8.0.0.Final\\modules,D:\\_Prog\\jBoss\\servers\\wildfly-8.0.0.Final\\modules\\system\\layers\\base))]"}}
12:18:23,933 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment test.war (runtime-name: test.war) in 321ms
12:18:23,936 INFO  [org.jboss.as.controller] (management-handler-thread - 2) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.persistenceunit."test.war#primary" (missing) dependents: [service jboss.deployment.unit."test.war".POST_MODULE]
JBAS014777:   Services which failed to start:      service jboss.persistenceunit."test.war#primary"


My persistence.xml looks like this:

Code:
<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="primary" transaction-type="JTA">
        <provider>org.hibernate.ogm.jpa.HibernateOgmPersistence</provider>
        <class>org.civmmo.persistence.model.Region</class>
        <class>org.civmmo.persistence.model.Civilization</class>
        <class>org.civmmo.persistence.model.SocialPolicy</class>
        <class>org.civmmo.persistence.model.Policy</class>
        <class>org.civmmo.persistence.model.Technology</class>
        <class>org.civmmo.persistence.model.City</class>
        <class>org.civmmo.persistence.model.Tile</class>
        <class>org.civmmo.persistence.model.TerrainType</class>
        <class>org.civmmo.persistence.model.CombatModifier</class>
        <class>org.civmmo.persistence.model.TerrainFeature</class>
        <class>org.civmmo.persistence.model.TradeRoute</class>
        <class>org.civmmo.persistence.model.River</class>
        <class>org.civmmo.persistence.model.Resource</class>
        <class>org.civmmo.persistence.model.Improvement</class>
        <class>org.civmmo.persistence.model.Unit</class>
        <class>org.civmmo.persistence.model.Promotion</class>
        <class>org.civmmo.persistence.model.UnitType</class>
        <class>org.civmmo.persistence.model.Action</class>
        <class>org.civmmo.persistence.model.Building</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="D:\_Prog\Neo4j\_DB"/>
        </properties>
    </persistence-unit>
   
</persistence>


Is module missing a library, if so which one?

My project: https://github.com/mattysek/Civ-mmo


Top
 Profile  
 
 Post subject: Re: 4.1.0.Beta4 and wildfly-8.0.0.Final neo4j module error
PostPosted: Fri Jun 13, 2014 7:04 am 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
It seems that the module for Neo4j is missing the neo4j-cypher-2.0.1.jar: http://m2.neo4j.org/content/repositories/releases/org/neo4j/neo4j-cypher/2.0.1/neo4j-cypher-2.0.1.jar

I'm going to fix this but in the meanwhile you can include the library in:
<jboss_home>/module/org/hibernate/ogm/neo4j/main

and update the module/org/hibernate/ogm/neo4j/main/module.xml
adding:
Code:
<resource-root path="neo4j-cypher-2.0.1.jar" />


Sorry for the inconvinience,
Davide


Top
 Profile  
 
 Post subject: Re: 4.1.0.Beta4 and wildfly-8.0.0.Final neo4j module error
PostPosted: Fri Jun 13, 2014 8:27 am 
Newbie

Joined: Fri Jun 13, 2014 6:24 am
Posts: 3
Hi again, and many thanks for your guick reply. Adding neo4j-cypher-2.0.1.jar did not help but it set me to the correct path final result looks like this:

neo4j:main module.xml
Code:
<resource-root path="neo4j-cypher-2.0.1.jar" />
<resource-root path="neo4j-cypher-commons-2.0.1.jar" />
<resource-root path="neo4j-cypher-compiler-1.9-2.0.1.jar" />
<resource-root path="neo4j-cypher-compiler-2.0-2.0.1.jar" />

org.parboiled:main module.xml
Code:
<resource-root path="parboiled-scala_2.10-1.1.6.jar" />
<resource-root path="scala-library-2.11.1.jar" />

I am not sure if i got the best versions of parboiled-scala and scala-library, but it works now :) Yay! :D


Top
 Profile  
 
 Post subject: Re: 4.1.0.Beta4 and wildfly-8.0.0.Final neo4j module error
PostPosted: Fri Jun 13, 2014 9:11 am 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
Thanks Mattysek,
that is very helpful.

I will check the versions and send a patch soon (unless you want to contribute to the project and fix the issue yourself).
Usually we spot this kind of errors using integration tests, but we haven't got one for neo4j yet.

Cheers,
Davide


Top
 Profile  
 
 Post subject: Re: 4.1.0.Beta4 and wildfly-8.0.0.Final neo4j module error
PostPosted: Mon Jun 16, 2014 8:18 am 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
Thanks for reporting the issue and a solution, Mattysek!

As Davide said, we're still lacking an integration test for Neo4j. If you like, send a pull request with your fix (and if you like and integration test for the Neo4j backend running on WildFly, e.g. based on the ones we have for MongoDB and CouchDB), we'd be more than happy to integrate it.

--Gunnar

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


Top
 Profile  
 
 Post subject: Re: 4.1.0.Beta4 and wildfly-8.0.0.Final neo4j module error
PostPosted: Mon Jun 16, 2014 4:31 pm 
Newbie

Joined: Fri Jun 13, 2014 6:24 am
Posts: 3
Hi, thanks, no problem :)

I can certainly try and fix issues with missing dependencies in neo4j module. I also very briefly looked on integration tests but unless i am missing something neo4j test extending ModuleMemberRegistrationScenario would fail on not being executed inside a transaction when executed using arqullian in container, so what could i try to make it work? :D


Top
 Profile  
 
 Post subject: Re: 4.1.0.Beta4 and wildfly-8.0.0.Final neo4j module error
PostPosted: Wed Jun 18, 2014 6:49 am 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
Hi Mattysek,
I've seen your reply only today and I've actually start to wokr on the issue already.

This should be the branch with the fixed modules: https://github.com/DavideD/hibernate-ogm/compare/hibernate:master...DavideD:OGM-553-Neo4j-missing-dependecies?expand=1
I'm actually writing the integration test right now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.