Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Xinsheng Robert Chen
Cache replication using TCP unicasting for custom portlet
October 26, 2011 7:09 AM
Answer

Xinsheng Robert Chen

Rank: Junior Member

Posts: 45

Join Date: March 30, 2010

Recent Posts

Hi,

I have clustered two nodes of Liferay portal 6.0 SP1 in JBoss 5.1.0. I am using TCP unicasting for cache replication.

I have some problem to replicate cache of entities in custom portlets.

After the application reads the service.properties file of a custom portlet, it throws the following exceptions:

2011-10-26 08:02:57,192 ERROR [net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProvider] (main) Failed to create JGroups Channel, replication will not function. JGroups properties:
null
org.jgroups.ChannelException: unable to setup the protocol stack
at org.jgroups.JChannel.init(JChannel.java:1728)
at org.jgroups.JChannel.<init>(JChannel.java:249)
at org.jgroups.JChannel.<init>(JChannel.java:232)
at org.jgroups.JChannel.<init>(JChannel.java:173)


at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassCastException: org.jgroups.protocols.UDP cannot be cast to org.jgroups.stack.Protocol
at org.jgroups.stack.Configurator.createLayer(Configurator.java:433)
at org.jgroups.stack.Configurator.createProtocols(Configurator.java:393)
at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:88)
at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:55)
at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:534)
at org.jgroups.JChannel.init(JChannel.java:1725)

Can some experts help me with this? Thank you!
Xinsheng Robert Chen
RE: Cache replication using TCP unicasting for custom portlet
October 31, 2011 6:41 AM
Answer

Xinsheng Robert Chen

Rank: Junior Member

Posts: 45

Join Date: March 30, 2010

Recent Posts

Hi,

I would provide more information here.

Please see attached the log file and the "hibernate-clustered-node1.xml."

Thank you for your help.
Attachments: hibernate-clustered-node1.xml (3.3k), server.log (466.1k)
Xinsheng Robert Chen
RE: Cache replication using TCP unicasting for custom portlet
November 2, 2011 12:29 PM
Answer

Xinsheng Robert Chen

Rank: Junior Member

Posts: 45

Join Date: March 30, 2010

Recent Posts

Hi,

This only happens to a custom portlet with code generated by the service builder. The application server tries to initialize the "liferayHibernateSessionFactory" bean in this custom portlet. This beans wants to be hooked up with the cacheProvider. However, because the TCP unicast cache replication is custom, the application server cannot find the cacheProvider from the custom configuration. So the initialization of the "liferayHibernateSessionFactory" bean fails.

Of course, there may be other causes.

I would appreciate your help.
Sandeep Nair
RE: Cache replication using TCP unicasting for custom portlet
November 2, 2011 9:34 PM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1721

Join Date: November 5, 2008

Recent Posts

Hi Robert,

There has been some problem with Liferay 6 EE SP1/SP2 with JBoss when you use servicebuilder. I am not sure if that is the issue you might be having. Please check the following blog link and LPS. I think there is a patch available for the same too.

http://www.liferay.com/community/forums/-/message_boards/message/11289600

http://issues.liferay.com/browse/LPS-21104

Regards,
Sandeep
Xinsheng Robert Chen
RE: Cache replication using TCP unicasting for custom portlet
November 3, 2011 10:41 AM
Answer

Xinsheng Robert Chen

Rank: Junior Member

Posts: 45

Join Date: March 30, 2010

Recent Posts

Thank you, Sandeep!

You are the first one to answer my request.