[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
TimeoutException and JGroupsBootstrapManager warnings  XML
Forum Index -> Ehcache
Author Message
mhaller

neo

Joined: 08/07/2012 12:36:07
Messages: 2
Offline

We have ehcache-jgroupsreplicator 1.7, ehcache 2.6, hibernate-ehcache 4.1.5SP1, jgroups 3.1.0. When we add two initial hosts to jgroups for the ehcache cluster, our cache starts throwing these warnings at bootup:

Code:
2012-08-06 15:30:19,755 WARN  [Incoming-1,Ehcache_Channel,MarkMac-37554] jgroups.JGroupsBootstrapManager - No BootstrapRequest registered for cache com.test.model.code.TestCode,
  the event will have no effect: JGroupEventMessage 
 [event=BOOTSTRAP_RESPONSE, cacheName=com.test.model.code.TestCode, serializableKey=com.test.model.code.TestCode#1040,
  element=[ key = com.test.model.code.TestCode#1040, 
 value=org.hibernate.cache.ehcache.internal.strategy.AbstractReadWriteEhcacheAccessStrategy$Item@5d651981, version=1, hitCount=0, CreationTime = 1344284873000, LastAccessTime = 1344284873000 ]]
 
 


And these errors when saving entities:

Code:
2012-08-06 16:33:34,060 ERROR [Incoming-1,Ehcache_Channel,MarkMac-35690] pbcast.NAKACK - couldn't deliver message [dst: <null>, src: firecracker-39479 (2 headers), size=18802 bytes]
 java.lang.IllegalArgumentException: java.io.InvalidObjectException: Could not find a SessionFactory [uuid=533b12b1-0e56-4761-bf18-71237dc6efcc,name=null]
         at org.jgroups.Message.getObject(Message.java:378)
         at net.sf.ehcache.distribution.jgroups.JGroupsCacheReceiver.receive(JGroupsCacheReceiver.java:64)
         at org.jgroups.JChannel.invokeCallback(JChannel.java:757)
         at org.jgroups.JChannel.up(JChannel.java:718)
         at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1020)
         at org.jgroups.protocols.pbcast.StreamingStateTransfer.up(StreamingStateTransfer.java:262)
         at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:496)
         at org.jgroups.protocols.pbcast.GMS.up(GMS.java:899)
         at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:244)
         at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:751)
         at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:572)
         at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:143)
         at org.jgroups.protocols.Discovery.up(Discovery.java:359)
         at org.jgroups.protocols.TP.passMessageUp(TP.java:1211)
         at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1775)
         at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1743)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
         at java.lang.Thread.run(Thread.java:722)
 Caused by: java.io.InvalidObjectException: Could not find a SessionFactory [uuid=533b12b1-0e56-4761-bf18-71237dc6efcc,name=null]
         at org.hibernate.internal.SessionFactoryImpl.locateSessionFactoryOnDeserialization(SessionFactoryImpl.java:1992)
         at org.hibernate.internal.SessionFactoryImpl.readResolve(SessionFactoryImpl.java:1972)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
         at java.lang.Thread.run(Thread.java:722)
 Caused by: java.io.InvalidObjectException: Could not find a SessionFactory [uuid=533b12b1-0e56-4761-bf18-71237dc6efcc,name=null]
         at org.hibernate.internal.SessionFactoryImpl.locateSessionFactoryOnDeserialization(SessionFactoryImpl.java:1992)
         at org.hibernate.internal.SessionFactoryImpl.readResolve(SessionFactoryImpl.java:1972)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:601)
         at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1091)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1780)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
         at java.util.ArrayList.readObject(ArrayList.java:733)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:601)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
         at org.jgroups.util.Util.objectFromByteBuffer(Util.java:430)
         at org.jgroups.Message.getObject(Message.java:375)
         ... 18 more
 


However, the second level cache appears to be working. I see hits and I see puts.

I can post the configs, but maybe these messages mean something to someone?
mhaller

neo

Joined: 08/07/2012 12:36:07
Messages: 2
Offline

I wound up doing two things which seems to have resolved it:

1) updated the jgroups tcp configuration for that cache. jgroups 3.x has some significant changes to their api. So, I grabbed tcp.xml from the jar and modified just the bind port and initial hosts strings. This seemed to clear up the bootstrap warnings.

Note: the example tcp unicast configs here: http://ehcache.org/documentation/replication/jgroups-replicated-caching won't work with jgroups3.

2) to deal with the sessionfactory deserialization messages, I needed to just define the hibernate. session_factory_name which sets up a jndi context and this gets rid of these messages. (which again, didn't seem to be causing a problem anyway)

I figured the latter out thanks to this fine blog post:
http://rstechjournal.blogspot.com/2012/07/hibernate-ehcache-cache-invalidation.html
rajoshi

seraphim

Joined: 07/04/2011 04:36:10
Messages: 1466
Offline

Issue seems to be resolved, closing the topic.

Rakesh Joshi
Terracotta.
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team