-->
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: Running OGM in JBoss AS 7.2.0.Final
PostPosted: Wed Apr 24, 2013 8:26 am 
Newbie

Joined: Wed Apr 24, 2013 8:11 am
Posts: 3
I'm trying to configure OGM under JBoss 7.2.0.Final using the instructions at: https://docs.jboss.org/author/display/AS72/JPA+Reference+Guide#JPAReferenceGuide-UsingHibernateOGM

When I deploy my application I get the following error:

Code:
14:05:00,291 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 48) MSC00001: Failed to start service jboss.persistenceunit."XXX.ear#XXXDomainPU": org.jboss.msc.service.StartException in service jboss.persistenceunit."XXX.ear#XXXDomainPU": javax.persistence.PersistenceException: [PersistenceUnit: XXXDomainPU] Unable to build EntityManagerFactory           
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: XXXDomainPU] Unable to build EntityManagerFactory                                                                           
Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.ogm.persister.OgmEntityPersister                                                                             
Caused by: org.hibernate.HibernateException: OGM000004: Unable to find or initialize Infinispan CacheManager                                                                                         
        at org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider.start(InfinispanDatastoreProvider.java:115)
        at org.hibernate.service.internal.AbstractServiceRegistryImpl.startService(AbstractServiceRegistryImpl.java:254)
        at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:162)
        at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
        at org.hibernate.ogm.datastore.impl.DatastoreServicesImpl.configure(DatastoreServicesImpl.java:53)
        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:127)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_09]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_09]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_09]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525) [rt.jar:1.7.0_09]
        at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:163)
        ... 15 more
Caused by: org.hibernate.HibernateException: Could not start Infinispan CacheManager using as configuration file: org/hibernate/ogm/datastore/infinispan/default-config.xml
        at org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider.raiseConfigurationError(InfinispanDatastoreProvider.java:195)
        at org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider.createCustomCacheManager(InfinispanDatastoreProvider.java:172)
        at org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider.start(InfinispanDatastoreProvider.java:105)
        ... 28 more
Caused by: org.infinispan.config.ConfigurationException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[22,1]
Message: Unexpected element '{urn:infinispan:config:5.1}infinispan'
        at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:87)
        at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:353)
        at org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider.createCustomCacheManager(InfinispanDatastoreProvider.java:151)
        ... 29 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[22,1]
Message: Unexpected element '{urn:infinispan:config:5.1}infinispan'
        at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:108) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
        at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
        at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:77)
        ... 31 more

14:05:00,513 ERROR [org.jboss.as.server] (management-handler-thread - 1) JBAS015870: Deploy of deployment "XXX.ear" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.persistenceunit.\"XXX.ear#XXXDomainPU\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"XXX.ear#XXXDomainPU\": javax.persistence.PersistenceException: [PersistenceUnit: XXXDomainPU] Unable to build EntityManagerFactory
    Caused by: javax.persistence.PersistenceException: [PersistenceUnit: XXXDomainPU] Unable to build EntityManagerFactory
    Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.ogm.persister.OgmEntityPersister
    Caused by: org.hibernate.HibernateException: OGM000004: Unable to find or initialize Infinispan CacheManager
    Caused by: org.hibernate.HibernateException: Could not start Infinispan CacheManager using as configuration file: org/hibernate/ogm/datastore/infinispan/default-config.xml
    Caused by: org.infinispan.config.ConfigurationException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[22,1]
Message: Unexpected element '{urn:infinispan:config:5.1}infinispan'
    Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[22,1]
Message: Unexpected element '{urn:infinispan:config:5.1}infinispan'"}}


I can't see what is wrong with the "infinispan" tag in "org/hibernate/ogm/datastore/infinispan/default-config.xml"

Code:
<infinispan
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"
    xmlns="urn:infinispan:config:5.1">


Top
 Profile  
 
 Post subject: Re: Running OGM in JBoss AS 7.2.0.Final
PostPosted: Thu Apr 25, 2013 7:27 am 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
Hi,
I think you can fix it adding

Code:
<module name="org.infinispan" services="export" export="true" optional="true" />


in <jboss_home>/modules/org/hibernate/ogm/module.xml

At the moment the line with infinispan is missing the services="export" attribute.
This should be fixed in the next release.

Cheers,
Davide


Top
 Profile  
 
 Post subject: Re: Running OGM in JBoss AS 7.2.0.Final
PostPosted: Fri Apr 26, 2013 6:43 am 
Newbie

Joined: Wed Apr 24, 2013 8:11 am
Posts: 3
Sorry! It didn't help, I still get the same error.


Top
 Profile  
 
 Post subject: Re: Running OGM in JBoss AS 7.2.0.Final
PostPosted: Wed May 01, 2013 12:39 pm 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
Could you give me more detail about the archive you are deploying?


Top
 Profile  
 
 Post subject: Re: Running OGM in JBoss AS 7.2.0.Final
PostPosted: Thu May 02, 2013 3:28 am 
Newbie

Joined: Wed Apr 24, 2013 8:11 am
Posts: 3
It's a very simple test application with 3 entities (A, B and C)

A has one-to-many relationship with B
B has many-to-many relationship with C

I'm using the following PU

Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence 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"
             version="2.0">

    <!-- PU for OMG domain -->
    <persistence-unit name="myTestPU" transaction-type="JTA">
        <provider>org.hibernate.ogm.jpa.HibernateOgmPersistence</provider>
        <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
        <class>se.myTest.A</class>
        <class>se.myTest.B</class>
        <class>se.myTest.C</class>
        <properties>
            <property name="jboss.as.jpa.providerModule"
                      value="org.hibernate:ogm" />
            <property name="hibernate.ogm.datastore.provider"
                     value="org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider" />
            <property name="hibernate.transaction.jta.platform"
                      value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />
        </properties>
    </persistence-unit>
</persistence>


Top
 Profile  
 
 Post subject: Re: Running OGM in JBoss AS 7.2.0.Final
PostPosted: Thu May 02, 2013 7:00 am 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
I've created a branch on my repository that test an archive on JBoss AS 7.2 and it seems to work (branch OGM-276-284): https://github.com/DavideD/hibernate-ogm/commits/OGM-276-284
You could try to use the modules generated by that project and see if it works.

The problem should be related to the dependencies on the classpath. I would also need to know the structure of the archive you are deploying.
If you could put your test project somewhere where I can download it (github would be great) I'm going to take a look at it.


Top
 Profile  
 
 Post subject: Re: Running OGM in JBoss AS 7.2.0.Final
PostPosted: Tue May 07, 2013 6:17 am 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
The patch that test the integration with JBoss AS 7 is now integrated in master: https://github.com/hibernate/hibernate-ogm


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.