[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Messages posted by: vinnie  XML
Profile for vinnie -> Messages posted by vinnie [13]
Author Message
Well I really can't see where this is going to be fixed. There's no version target.

We fixed it for now by switching to rmi replication. This bug should be treated as critical, and seems that nobody is even looking at it. There's the patch there since version 1.4 and we are at 1.7



I think I found the answer here: https://jira.terracotta.org/jira/browse/EHC-874

So it really seems that ehcache does not have synchronous replication at all. at least it can't be configured as synchronous.

I still wonder if there's a way around this.

Regards
Hi there. I might have got this one wrong, but.

I have a traditional hibernate (4.1.6) and ehcache (2.6.2) L2 config.

My cache is configured to use synchronous replication using jgroups:

Code:
 <ehcache>
 	<cacheManagerPeerProviderFactory
 		class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"
 		properties="connect=UDP(mcast_addr=231.12.21.133;mcast_port=45566;ip_ttl=32;
     mcast_send_buf_size=150000;mcast_recv_buf_size=80000):
     PING(timeout=2000;num_initial_members=6):
     MERGE2(min_interval=5000;max_interval=10000):
     FD_SOCK:VERIFY_SUSPECT(timeout=1500):
     pbcast.NAKACK2:
     UNICAST(timeout=5000):
     pbcast.STABLE(desired_avg_gossip=20000):
     FRAG:
     pbcast.GMS(join_timeout=5000;print_local_addr=true)"
 		propertySeparator="::" />
 
 <cache name="com.model.user.User" maxElementsInMemory="10000"
 		eternal="false" timeToIdleSeconds="86400" timeToLiveSeconds="86400"
 		>
 		<cacheEventListenerFactory
 			class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"
 			properties="replicateAsynchronously=false, replicatePuts=true,
       replicateUpdates=true, replicateUpdatesViaCopy=false,
       replicateRemovals=true" />
 	</cache>
 
 


And on my entity I have:

@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL,region="com.model.user.User")


With this configuration I was really hoping I would not have any consistency issue. I expected that once a write happened inside a @Transactional method, Hibernate would only finish the transaction after the ehcache's put operation had synchronously happened on all nodes.

But this is not the case. I'm not even talking about concurrent writes here.

This is what's happening:

I have two instances of user service behind a web load balancer, The following simple test reads a lot of stale data:

Code:
 
 for(int i=0;i<100){
 //lets read user from server 1
 User user = restClient.getUser(userId);
 int newAge = user.getAge()+1;
 user.setAge(newAge);
 //later lets simulate a lb round robin and write user to server2
 restClient2.write(user);
 //now lets read from server 1 again
 User user2 = restClient.getUser(userId);
 assertEquals(newAge,user2.getAge())
 }
 


Very simple, no concurrency, just bumping from one node to another.

On my tests, this fails around 20% of the time. I'm not sure if its Hibernate that is just replicating this on a separate thread after the call was returned to the caller or some misconfiguration of Ehcache on my end.

Any thoughts?
Hi there! I'm having this exact same issue right now. So instead of opening a new topic, I'd rather bump this one.

We also need to monitor the ehcache for new entries being added. I believe my scenario is pretty much the same.

I was a bit surprised to see that disassembly object and not the entity :)

My problem is a bit tougher as I'm integrating with CDI as well

What I have is a CacheListener that fires CDI events using the bean manager and some custom annotations:

for instance:

Code:
 @Override
 	public void notifyElementPut(Ehcache cache, Element element)
 			throws CacheException {
 		Object value = element.getObjectValue();
 		Map<String, Object> props = new HashMap<String, Object>();
 		props.put("value", cache.getName());
 		beanManager.fireEvent(value, AnnotationUtils.get(CacheEntryPut.class, props));
 
 	}
 
 //And somewhere else:
 
 public void observerEntryPut(@Observers @CacheEntryPut("cachename") Model model);
 



The problem is that since I'm not firing a Model object, but instead this net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy$Item the notification on CDI never happens.

Since we use a shared cache for both hibernate and other usages, I think we will run in some nasty code trying to deal with both situations (disassembled objects and pure pojos).

Any pointers here would be welcomed

Regards
Yeah, thanks. Sorry for the dummy post. Hope it helps someone else with same issue. Now that we are using the SingletonEhCache, it's the same cache for the JVM, and that was what we expected
Duh, nevermind. Checked my persistence.xml and we were not using SingletonRegionFactory. That's why.

Querying will be kinda annoying since hibernate uses the CacheKey type as its keys.

Cheers
Hello there! This may sound a bit ackward, but I believe we have some reasons why to ask it :)

Is it possible to access the CacheManager created by Hibernate when using Hibernate L2 and EhCache integration?

We have 2 reasons for that:

1st - we would like to subscribe to some events on that cache. I know I could do this via cache.xml, but we would rather use programmatic approach to avoid that any developer "forgets" to add the listeners

2nd- We would also be want to be able to query this cache, either by keys or by turning some of the caches into searchable objects.

Since the creation of this cache manager is inside Hibernate Session Factory, I could not find a way to access it.

For instance, I believe that the old JBossCache would allow the cache to be registered on JNDI and one could fetch it from there to access it.

I was looking at the RMI replication, but I'm not sure would be the way to go with ehcache.

Anyways, is this possible? To register the cache (Hibernate L2 in this case) somewhere that it could be accessed?

Regards
Yep, I did follow that doc. turns out, that I found in this forum, that for some reason you need to remove a -J ...jetty.xml parameter from the startup.bat script, this was not on the docs however.

We will reach the sales team, but before that we would need at least something running.

Next phase is to run the same tests on different providers, and then contact vendor about advice and pricing on our topology.

Regards
Hi there! I've decided to move from terracotta to plain ehcache for a while, after 2 days of pain trying to get terracotta to work in our environment.

Since we do require some monitoring, I'm trying to get the ehcache monitor to work.

I've downloaded it and when I run the startup I get some exception on connect timeout. So I'm assuming that at least one probe should be running right?

So I start my app server, and get loads messages of monitor on localhost 9889 not being found.

I start the monitor again, and none of them seem to be talking to each other.
The monitor timesout on connect and the probe can't connect to the monitor.

What could be the problem?

I'm sorry, but I must admit, I'm running some evaluation for my company and I'm pretty sure I'm going to get in touch with sales soon, but it has been really frustrating trying to get anything from terracotta to run. I had used it on the past and I was somehow simpler.

Just in a comparison note, It took me 2 hours so setup gemfire in our environment. Really disappointed on the setup of terracotta product

Just my 2 cents on a (so far) unbiased comparison between two vendors.
Nope, that was with the 2.4.6 version. Going to check the nigthly build later.
Hi, I followed the docs on the express setup, but I can't get it working.

I've started the terracotta server with defaults (start-tc-server.bat)

I've bundled into my ear file all the required jars

Here's my 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="pciPU" >
 		<provider>org.hibernate.ejb.HibernatePersistence</provider>
 		<jta-data-source>java:/pciDS</jta-data-source>
 		<properties>
 			<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>			
 			<property name="hibernate.show_sql" value="true" />
 			<property name="hibernate.format_sql" value="true" />
 			<property name="hibernate.cache.region.factory_class" value="net.sf.ehcache.hibernate.EhCacheRegionFactory" />
 			<property name="hibernate.cache.use_second_level_cache" value="true" />
 			
 		</properties>
 	</persistence-unit>
 </persistence>
 


And here's my ehcache config:

Code:
<?xml version="1.0" encoding="UTF-8"?>
 <ehcache name="pciCache">
 <terracottaConfig url="localhost:9510" />
 	<defaultCache
       maxElementsInMemory="1000"
       eternal="false"
       timeToIdleSeconds="120"
       timeToLiveSeconds="120">
       <terracotta/>
     </defaultCache>
 	<cache name="com.ericsson.oss.one.pci.model.Cell"
 		maxElementsInMemory="10000" eternal="true">
 	<terracotta/>
 	</cache>
 	<cache name="com.ericsson.oss.one.pci.model.Cell.outgoingRelations"
 		maxElementsInMemory="100000" eternal="true" >
 	<terracotta/>
 	</cache>
 	<cache name="com.ericsson.oss.one.pci.model.Cell.incomingRelations"
 		maxElementsInMemory="100000" eternal="true" >
 	<terracotta/>
 	</cache>
 </ehcache>
 


I've put the license file inside my ejbjar so it can be loaded by the classloader

When I deploy the application I get this error:

Code:
 
 Caused by: org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory. Initial cause was null
 	at net.sf.ehcache.hibernate.EhCacheRegionFactory.start(EhCacheRegionFactory.java:89)
 	at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:238) [:3.6.6.Final]
 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872) [:3.6.6.Final]
 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906) [:3.6.6.Final]
 	... 73 more
 Caused by: net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory. Initial cause was null
 	at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:109)
 	at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:178)
 	at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:201)
 	at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:153)
 	at net.sf.ehcache.CacheManager.init(CacheManager.java:343)
 	at net.sf.ehcache.CacheManager.<init>(CacheManager.java:230)
 	at net.sf.ehcache.hibernate.EhCacheRegionFactory.start(EhCacheRegionFactory.java:70)
 	... 76 more
 Caused by: java.lang.ExceptionInInitializerError
 	at net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory.<init>(ExpressEnterpriseTerracottaClusteredInstanceFactory.java:37)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_21]
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_21]
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_21]
 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_21]
 	at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:92)
 	... 82 more
 Caused by: java.lang.RuntimeException: java.lang.NullPointerException: bootJarUrl is null
 	at org.terracotta.express.ClientFactoryImpl.<init>(ClientFactoryImpl.java:85)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_21]
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_21]
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_21]
 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_21]
 	at java.lang.Class.newInstance0(Class.java:355) [:1.6.0_21]
 	at java.lang.Class.newInstance(Class.java:308) [:1.6.0_21]
 	at org.terracotta.express.Util.getImplInstance(Util.java:11)
 	at org.terracotta.express.ClientFactory.<clinit>(ClientFactory.java:12)
 	... 88 more
 Caused by: java.lang.NullPointerException: bootJarUrl is null
 	at org.terracotta.express.ClientFactoryImpl.<init>(ClientFactoryImpl.java:79)
 	... 96 more
 


Can't find what I'm missing here. From what I read, bootjar should not be needed for the express setup (without DSO) right? All I need is a distributed cache, I think I would not need DSO right?

We are evaluating terracotta vs gemfire vs coherence. Any help would be great.
Hi, I managed to get it working by putting an exploded version of my ear libs on $SERVER_HOME\bin\content\$EAR_NAME

but I then bump into problems with Hibernate-Ehcache module 4.0Beta5. It complains that can not open the SessionFactory.

So, I moved my app to JBoss 6.x (tried 6.0.0 Final and 6.1.0 Final) both I get the same error: bootJar was null.

How can I fix this?

Here's the stack trace

Code:
 10:35:03,713 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=pci-ear-0.0.1-SNAPSHOT.ear/pci-services-0.0.1-SNAPSHOT.jar#pciPU state=Create: javax.persistence.PersistenceException: [PersistenceUnit: pciPU] Unable to build EntityManagerFactory
 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915) [:3.6.6.Final]
 	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) [:3.6.6.Final]
 	at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:47) [:1.0.2-alpha-4]
 	at org.jboss.as.jpa.scanner.HackCEMFBuilder.build(HackCEMFBuilder.java:49) [:6.1.0.Final]
 	at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275) [:1.0.2-alpha-4]
 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]
 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]
 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
 	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
 	at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.1.SP1]
 	at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.1.SP1]
 	at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.1.SP1]
 	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.SP2]
 	at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.SP2]
 	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:2.2.0.SP2]
 	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.SP2]
 	at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202) [jboss-kernel.jar:2.2.0.SP2]
 	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.SP2]
 	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182) [:2.2.2.GA]
 	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58) [:2.2.2.GA]
 	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:63) [:2.2.2.GA]
 	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.2.GA]
 	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.2.GA]
 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.2.GA]
 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.2.GA]
 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.2.GA]
 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.2.GA]
 	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.2.GA]
 	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]
 	at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.2.GA]
 	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.2.GA]
 	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.2.GA]
 	at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.1.0.Final]
 	at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
 	at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240) [:0.2.2]
 	at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]
 	at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]
 	at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]
 	at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]
 	at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
 	at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
 	at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
 	at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
 	at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]
 	at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
 	at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_21]
 	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_21]
 	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_21]
 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_21]
 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) [:1.6.0_21]
 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) [:1.6.0_21]
 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_21]
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21]
 	at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
 Caused by: org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory. Initial cause was null
 	at net.sf.ehcache.hibernate.EhCacheRegionFactory.start(EhCacheRegionFactory.java:89)
 	at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:238) [:3.6.6.Final]
 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872) [:3.6.6.Final]
 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906) [:3.6.6.Final]
 	... 73 more
 Caused by: net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory. Initial cause was null
 	at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:109)
 	at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:178)
 	at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:201)
 	at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:153)
 	at net.sf.ehcache.CacheManager.init(CacheManager.java:343)
 	at net.sf.ehcache.CacheManager.<init>(CacheManager.java:230)
 	at net.sf.ehcache.hibernate.EhCacheRegionFactory.start(EhCacheRegionFactory.java:70)
 	... 76 more
 Caused by: java.lang.ExceptionInInitializerError
 	at net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory.<init>(ExpressEnterpriseTerracottaClusteredInstanceFactory.java:37)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_21]
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_21]
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_21]
 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_21]
 	at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:92)
 	... 82 more
 Caused by: java.lang.RuntimeException: java.lang.NullPointerException: bootJarUrl is null
 	at org.terracotta.express.ClientFactoryImpl.<init>(ClientFactoryImpl.java:85)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_21]
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_21]
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_21]
 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_21]
 	at java.lang.Class.newInstance0(Class.java:355) [:1.6.0_21]
 	at java.lang.Class.newInstance(Class.java:308) [:1.6.0_21]
 	at org.terracotta.express.Util.getImplInstance(Util.java:11)
 	at org.terracotta.express.ClientFactory.<clinit>(ClientFactory.java:12)
 	... 88 more
 Caused by: java.lang.NullPointerException: bootJarUrl is null
 	at org.terracotta.express.ClientFactoryImpl.<init>(ClientFactoryImpl.java:79)
 	... 96 more
 

Hi, we are evaluating the Terracotta platform. I'm running our app inside JBoss AS 7. I have all jars setup, using Hibernate 4 new SPI and Hibernate-ehcache module.

Problem:
Code:
 Caused by: org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory. Initial cause was null
 	at org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory.start(SingletonEhCacheRegionFactory.java:97)
 	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:271)
 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1722)
 	at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:76)
 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
 	... 9 more
 Caused by: net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory. Initial cause was null
 	at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:109)
 	at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:178)
 	at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:201)
 	at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:153)
 	at net.sf.ehcache.CacheManager.init(CacheManager.java:347)
 	at net.sf.ehcache.CacheManager.<init>(CacheManager.java:302)
 	at net.sf.ehcache.CacheManager.create(CacheManager.java:716)
 	at org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory.start(SingletonEhCacheRegionFactory.java:72)
 	... 13 more
 Caused by: java.lang.ExceptionInInitializerError
 	at net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory.<init>(ExpressEnterpriseTerracottaClusteredInstanceFactory.java:37)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_21]
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_21]
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_21]
 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_21]
 	at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:92)
 	... 20 more
 Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: C:\java\jboss-as-7.0.2.Final\bin\content\pci-ear-0.0.1-SNAPSHOT.ear\lib\terracotta-toolkit-1.3-runtime-ee-3.3.0.jar (The system cannot find the path specified)
 	at org.terracotta.express.ClientFactoryImpl.<init>(ClientFactoryImpl.java:85)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_21]
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_21]
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_21]
 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_21]
 	at java.lang.Class.newInstance0(Class.java:355) [:1.6.0_21]
 	at java.lang.Class.newInstance(Class.java:308) [:1.6.0_21]
 	at org.terracotta.express.Util.getImplInstance(Util.java:11)
 


It seems that a jar tries to load this terracotta-toolkit jar, but AFAIK JBoss 7 class loader is complete different and URL resolution may be a problem.

Any ideas on how to fix this?

Regards
 
Profile for vinnie -> Messages posted by vinnie [13]
Go to:   
Powered by JForum 2.1.7 © JForum Team