[jboss-user] [JBossCache] - java.io.NotSerializableException POJOCache

rakeshmalpani do-not-reply at jboss.com
Mon Mar 3 15:14:33 EST 2008

Hi All,

I am using PojoCache and creating it in the following manner:
(Create configuration by passing an inputstream, and creating a pojoCache using the PojoCacheFactory)

Configuration jbossCacheConf = (new XmlConfigurationParser()
  | {
  | 	public Configuration parseInputStream(InputStream _inStream)
  | 	{
  | 		return parseStream(_inStream);
  | 	}
  | }).parseInputStream(inStream);
  | pojoCache = PojoCacheFactory.createCache(jbossCacheConf, false);
  | pojoCache.start();

In a clustered environment, when I do attach, I get the following exception java.io.NotSerializableException.

The object has the following annotation:
  | public class CacheElement{/*some stuff*/}

>From what I understand.. pojoCache does not require serialization, so am not sure why I keep getting this exception. I have seen the example configuration "META-INF/replSync-service.xml". My configuration is pretty similar except it has no cache loader + the MBean tag's attribute, code = "org.jboss.cache.pojo.jmx.PojoCacheJmxWrapper" but has the same name i.e. = "jboss.cache:service=TreeCache"

Am not sure if changing the name will cause any problem, for example to: jboss.cache:service=XYZCache, but for now am using the same name.

Can anyone please give me any pointers as to what I am doing incorrectly.

Any help is much appreciated.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133717#4133717

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133717

More information about the jboss-user mailing list