-->
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.  [ 11 posts ] 
Author Message
 Post subject: Store infinispan grid in filesystem
PostPosted: Thu Jan 19, 2012 7:49 pm 
Newbie

Joined: Thu Jan 12, 2012 6:28 am
Posts: 12
Hello,

I have a JEE (glassfish) application using Hibernate OGM & Infinispan for backend persistence but I do not find the way to store infnispan grid on filesystem and retrieve it after shutdown. The infinispan grid works perfectly in memory.

infinispan.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<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">
   <global>
   </global>
   <default>
      <loaders passivation="true" shared="false" preload="true">
         <loader class="org.infinispan.loaders.file.FileCacheStore"
            fetchPersistentState="true" ignoreModifications="false"
            purgerThreads="3" purgeSynchronously="true" purgeOnStartup="false">
            <properties>
               <property name="location" value="../etalab-data/store" />
            </properties>
            <singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
         </loader>
      </loaders>
   </default>
   <namedCache name="ENTITIES">
      <loaders passivation="false" shared="false" preload="true">
         <loader class="org.infinispan.loaders.file.FileCacheStore"
            fetchPersistentState="true" ignoreModifications="false"
            purgerThreads="3" purgeSynchronously="true" purgeOnStartup="false">
            <properties>
               <property name="location" value="../etalab-data/store" />
            </properties>
            <singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
         </loader>
      </loaders>
   </namedCache>
   <namedCache name="ASSOCIATIONS">
      <loaders passivation="true" shared="false" preload="true">
         <loader class="org.infinispan.loaders.file.FileCacheStore"
            fetchPersistentState="true" ignoreModifications="false"
            purgerThreads="3" purgeSynchronously="true" purgeOnStartup="false">
            <properties>
               <property name="location" value="../etalab-data/store" />
            </properties>
            <singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
         </loader>
      </loaders>
   </namedCache>
   <namedCache name="IDENTIFIERS">
      <loaders passivation="true" shared="false" preload="true">
         <loader class="org.infinispan.loaders.file.FileCacheStore"
            fetchPersistentState="true" ignoreModifications="false"
            purgerThreads="3" purgeSynchronously="true" purgeOnStartup="false">
            <properties>
               <property name="location" value="../etalab-data/store" />
            </properties>
            <singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
         </loader>
      </loaders>
   </namedCache>
</infinispan>


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="etalab_enquete"
      transaction-type="JTA">
      <provider>org.hibernate.ogm.jpa.HibernateOgmPersistence</provider>
      <jta-data-source>jdbc/etalab_enquete</jta-data-source>
      <!-- Définition des classes qui seront persistantes -->
      <class>fr.univtln.inf21.ejb.data.survey.Survey</class>
      <class>fr.univtln.inf21.ejb.data.survey.Value</class>
      <class>fr.univtln.inf21.ejb.data.survey.PersonCategory</class>
      <class>fr.univtln.inf21.ejb.data.survey.SubjectCategory</class>
      <class>fr.univtln.inf21.ejb.data.survey.PersonSubCategory</class>
      <class>fr.univtln.inf21.ejb.data.survey.SubjectSubCategory</class>
      <properties>
   <property name="hibernate.transaction.manager_lookup_class"
      value="org.hibernate.transaction.SunONETransactionManagerLookup" />
   <property name="hibernate.ogm.infinispan.configuration_resourcename"
      value="infinispan.xml" />

         <property name="hibernate.search.default.directory_provider"
            value="filesystem" />

         <property name="hibernate.search.default.indexBase" value="../etalab-data/indexes" />
      </properties>
   </persistence-unit>
</persistence>



Folders ASSOCIATIONS, ENTITIES, IDENTIFIERS are correctly created but there is no data inside.

Configuration :

Infinispan version : 5.1.0BETA5
Hibernate version : 4.0.0FINAL
Hibernate OGM version : 3.0.0-SNAPSHOT
Glassfish 3.1.1

Thank you in advance ;)


Top
 Profile  
 
 Post subject: Re: Store infinispan grid in filesystem
PostPosted: Sun Feb 05, 2012 9:19 am 
Newbie

Joined: Thu Jan 12, 2012 6:28 am
Posts: 12
Thanks for your answer Pulseaction,

I'm in a JEE environment and my goal is to abstract I/O operations.
If the automatic grid persistence storing doesn't work, i will create a facade to delegate operations but i would avoid this ;).


Top
 Profile  
 
 Post subject: Re: Store infinispan grid in filesystem
PostPosted: Sun Feb 05, 2012 8:01 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hello ziefno,

Your configuration looks like correct, I might be missing something.
Make sure you always keep passivation disabled (this option is not consistent in your configuration).

Why do you need singletonStore, Is this a clustered configuration?

Did you try this with the final version of Infinispan 5.1.1.FINAL ? There where some issues especially in the configuration parsers which might explain this, they where fixed only very recently.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Store infinispan grid in filesystem
PostPosted: Tue Feb 07, 2012 6:26 pm 
Newbie

Joined: Thu Jan 12, 2012 6:28 am
Posts: 12
Hello Sanne,

I use singletonStore because it's a simple academic demonstration running on a single computer (everything works except the persistence).

My OGM version was checkout on 18 january 2012 and I have not tried with the 5.1.1.FINAL version of Infinispan.
I will update my versions and give you feebacks this weekend.

Thank you again ;).


Top
 Profile  
 
 Post subject: Re: Store infinispan grid in filesystem
PostPosted: Wed Feb 08, 2012 5:52 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Ok, then you don't need singleton store, there will be only one anyway.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Store infinispan grid in filesystem
PostPosted: Sun Mar 04, 2012 12:35 pm 
Newbie

Joined: Thu Jan 12, 2012 6:28 am
Posts: 12
Hello, sorry for the delay (passed my exams :p).

I just upgrade to the last versions of hibernate ogm (4.0.0-SNAPSHOT) and infinispan (5.1.1-FINAL).

It's work in memory but when i try to store my cache in filesystem (by adding loaders elements in infinispan.xml), i have this exception (the last part) :

Code:
Caused by: org.hibernate.MappingException: Could not instantiate persister org.hibernate.ogm.persister.OgmEntityPersister
   at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:169)
   at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:131)
   at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:346)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
   at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:76)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
   ... 47 more
Caused by: java.lang.NullPointerException
   at org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider.putInLocalCache(InfinispanDatastoreProvider.java:129)
   at org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider.eagerlyInitializeCaches(InfinispanDatastoreProvider.java:123)
   at org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider.start(InfinispanDatastoreProvider.java:108)
   at org.hibernate.service.internal.AbstractServiceRegistryImpl.startService(AbstractServiceRegistryImpl.java:255)
   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:116)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
   at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:158)
   ... 52 more


Thank you ;)


Last edited by ziefno on Mon Mar 05, 2012 5:25 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Store infinispan grid in filesystem
PostPosted: Mon Mar 05, 2012 6:17 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
congrats for you exams ;)

About 4.0.0-FINAL .. we never release it, I guess you mean Hibernate OGM 4.0.0-SNAPSHOT ? Please build it from sources by cloning the git repository at https://github.com/hibernate/hibernate-ogm

About the NullPointerException: it means Infinispan failed to start for some reason. You should have more errors in your log before this one? I'm going to change the code to avoid the NPE and fail early if Infinispan doesn't boot.

https://hibernate.onjira.com/browse/OGM-124

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Store infinispan grid in filesystem
PostPosted: Mon Mar 05, 2012 6:02 pm 
Newbie

Joined: Thu Jan 12, 2012 6:28 am
Posts: 12
Thank you ;),

Yes, for the version it was a mistake and i use 4.0.0-SNAPSHOT (i edit my previous post).

My OGM build was freshly cloned and compiled at March 4, 2012 and i update my OGM version as soon as possible (as soon as i learned git, i will integrate the project in my IDE ;)).

This is the full message about my error :
Code:
[#|2012-03-04T15:55:55.926+0100|SEVERE|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=81;_ThreadName=Thread-2;|[PersistenceUnit: etalab_enquete] Unable to build EntityManagerFactory
org.glassfish.deployment.common.DeploymentException: [PersistenceUnit: etalab_enquete] Unable to build EntityManagerFactory
   at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:166)
   at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:872)
   at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
   at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
   at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
   at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
   at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
   at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
   at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
   at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
   at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
   at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
   at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
   at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
   at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
   at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
   at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
   at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
   at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
   at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
   at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
   at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
   at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
   at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
   at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
   at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
   at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
   at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
   at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
   at java.lang.Thread.run(Thread.java:722)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: etalab_enquete] Unable to build EntityManagerFactory
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
   at org.hibernate.ogm.jpa.HibernateOgmPersistence.createContainerEntityManagerFactory(HibernateOgmPersistence.java:125)
   at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:205)
   at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:119)
   at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:214)
   at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:483)
   at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:221)
   at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:167)
   at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:872)
   at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:290)
   at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:86)
   at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:141)
   at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:138)
   at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:215)
   at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:224)
   at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:250)
   at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:138)
   ... 29 more
Caused by: org.hibernate.MappingException: Could not instantiate persister org.hibernate.ogm.persister.OgmEntityPersister
   at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:169)
   at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:131)
   at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:346)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
   at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:76)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
   ... 47 more
Caused by: java.lang.NullPointerException
   at org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider.putInLocalCache(InfinispanDatastoreProvider.java:129)
   at org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider.eagerlyInitializeCaches(InfinispanDatastoreProvider.java:123)
   at org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider.start(InfinispanDatastoreProvider.java:108)
   at org.hibernate.service.internal.AbstractServiceRegistryImpl.startService(AbstractServiceRegistryImpl.java:255)
   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:116)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
   at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:158)
   ... 52 more
|#]

[#|2012-03-04T15:55:55.934+0100|WARNING|glassfish3.1.1|javax.enterprise.system.core.classloading.com.sun.enterprise.loader|_ThreadID=81;_ThreadName=Thread-2;|Input stream has been finalized or forced closed without being explicitly closed; stream instantiation reported in following stack trace
java.lang.Throwable
   at com.sun.enterprise.loader.ASURLClassLoader$SentinelInputStream.<init>(ASURLClassLoader.java:1230)
   at com.sun.enterprise.loader.ASURLClassLoader$InternalJarURLConnection.getInputStream(ASURLClassLoader.java:1338)
   at java.net.URL.openStream(URL.java:1035)
   at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:433)
   at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)
   at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:264)
   at org.jboss.logging.LoggerProviders.tryLog4j(LoggerProviders.java:95)
   at org.jboss.logging.LoggerProviders.findProvider(LoggerProviders.java:72)
   at org.jboss.logging.LoggerProviders.find(LoggerProviders.java:35)
   at org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:32)
   at org.jboss.logging.Logger.getLogger(Logger.java:2163)
   at org.jboss.logging.Logger.getMessageLogger(Logger.java:2259)
   at org.jboss.logging.Logger.getMessageLogger(Logger.java:2214)
   at org.hibernate.ogm.util.impl.LoggerFactory.make(LoggerFactory.java:34)
   at org.hibernate.ogm.jpa.HibernateOgmPersistence.<clinit>(HibernateOgmPersistence.java:59)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
   at java.lang.Class.newInstance0(Class.java:372)
   at java.lang.Class.newInstance(Class.java:325)
   at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:173)
   at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:119)
   at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:214)
   at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:483)
   at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:221)
   at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:167)
   at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:872)
   at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:290)
   at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:86)
   at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:141)
   at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:138)
   at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:215)
   at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:224)
   at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:250)
   at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:138)
   at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:872)
   at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
   at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
   at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
   at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
   at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
   at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
   at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
   at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
   at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
   at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
   at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
   at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
   at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
   at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
   at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
   at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
   at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
   at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
   at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
   at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
   at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
   at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
   at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
   at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
   at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
   at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
   at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
   at java.lang.Thread.run(Thread.java:722)
|#]
|#]


I'm not familiar with JBoss AS but i will try this application on it to see if it's work (may be i have a conflict...).

Thanks for the jira ticket ;)


Top
 Profile  
 
 Post subject: Re: Store infinispan grid in filesystem
PostPosted: Mon Mar 05, 2012 6:16 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
the bug you found is actually hiding with a NullPointerE any configuration problem in Infinispan. pretty bad from our part!

I've committed a fix on my git repository git://github.com/Sanne/hibernate-ogm.git as branch OGM-124 if you want to try it out already.. otherwise it should be merged in master I hope tomorrow.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Store infinispan grid in filesystem
PostPosted: Mon Mar 05, 2012 7:16 pm 
Newbie

Joined: Thu Jan 12, 2012 6:28 am
Posts: 12
Thanks for the commit, i installed your modifications and i will retry tomorrow with full concentration :p.


Top
 Profile  
 
 Post subject: Re: Store infinispan grid in filesystem
PostPosted: Tue Mar 06, 2012 7:34 pm 
Newbie

Joined: Thu Jan 12, 2012 6:28 am
Posts: 12
Hi,

Thanks for the fix. The message is now more explicit and helped me to understand that the problem was with infinispan.xml file. I use this example to modify my configuraton. Now the program is deployed and infinispan creates the directory structure (for my 3 named caches).

I looked at the files created by infinispan and it has saved a small amount of data among all the ones I recorded. This is the raised exception :


Code:
Caused by: javax.persistence.PersistenceException: error during managed flush
   at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1481)
   at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109)
   at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53)
   at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:435)
   ... 100 more
Caused by: org.infinispan.CacheException: Unable to start batch
   at org.infinispan.batch.BatchContainer.startBatch(BatchContainer.java:81)
   at org.infinispan.batch.AutoBatchSupport.startAtomic(AutoBatchSupport.java:45)
   at org.infinispan.atomic.FineGrainedAtomicHashMapProxy.put(FineGrainedAtomicHashMapProxy.java:205)
   at org.hibernate.ogm.datastore.impl.MapHelpers.applyTupleOpsOnMap(MapHelpers.java:50)
   at org.hibernate.ogm.dialect.infinispan.InfinispanDialect.updateTuple(InfinispanDialect.java:117)
   at org.hibernate.ogm.persister.OgmEntityPersister.insert(OgmEntityPersister.java:875)
   at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:80)
   at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:273)
   at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:265)
   at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:186)
   at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:323)
   at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
   at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1081)
   at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:315)
   at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104)
   ... 102 more
Caused by: java.lang.NullPointerException
   at org.infinispan.batch.BatchContainer.startBatch(BatchContainer.java:61)
   ... 116 more


I think it's more a problem with my hibernate (jpa) configuration (but it's work with a database backend) or with my infinispan.xml...

I will search and inform you ;)


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