[JBossCache] - Initial State Transfer failing.
by rayzor
Hi Folks,
I tried searching through the archives of this forum for an answer to my issue with no success so if someone could help me out it would be great.
I'm running jboss-cache 1.4.1 sp3 on two servers both running jakarta-tomcat-5.5.9. I have a basic treecache configured on both servers in which I place an ArrayList of a java class containing config information for my frontend (strings, dates, etc.).
Starting both servers, everything works fine. I can populate the cache and the changes are replicated across the jgroups "cluster".
The problem occurs when I take down an instance of tomcat and then restart. The current state of the cache is not replicated to the recently added node. I get an initial state transfer error as follows:
INFO: returning the state for tree rooted in /(4096 bytes)
| May 29, 2007 11:37:02 AM org.jboss.cache.TreeCache viewAccepted
| INFO: viewAccepted(): [16.*.*.*:58177|2] [16.*.*.*:58177]
| May 29, 2007 11:37:20 AM org.jboss.cache.statetransfer.StateTransferGenerator_140 generateStateTransfer
| SEVERE: failed getting the in-memory (transient) state
| java.io.NotSerializableException: com.hp.esso.rstl.tsa.programmatic.AssessmentRequest
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
| at java.util.ArrayList.writeObject(ArrayList.java:578)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
| at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
| at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
| at java.util.HashMap.writeObject(HashMap.java:985)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
| at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
| at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
| at org.jboss.cache.loader.NodeData.writeExternal(NodeData.java:51)
| at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
| at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
| at org.jboss.cache.statetransfer.StateTransferGenerator_140.marshallTransientState(StateTransferGenerator_140.java:204)
| at org.jboss.cache.statetransfer.StateTransferGenerator_140.marshallTransientState(StateTransferGenerator_140.java:212)
| at org.jboss.cache.statetransfer.StateTransferGenerator_140.generateStateTransfer(StateTransferGenerator_140.java:81)
| at org.jboss.cache.TreeCache._getState(TreeCache.java:2691)
| at org.jboss.cache.TreeCache._getState(TreeCache.java:2614)
| at org.jboss.cache.TreeCache$MessageListenerAdaptor.getState(TreeCache.java:5537)
| at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.passUp(MessageDispatcher.java:671)
| at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:363)
| at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:775)
| at org.jgroups.JChannel.up(JChannel.java:1091)
| at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:377)
| at org.jgroups.stack.ProtocolStack.receiveUpEvent(ProtocolStack.java:393)
| at org.jgroups.stack.Protocol.passUp(Protocol.java:538)
| at org.jgroups.protocols.pbcast.STATE_TRANSFER.requestApplicationStates(STATE_TRANSFER.java:326)
| at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:132)
| at org.jgroups.stack.UpHandler.run(Protocol.java:60)
|
I've made the class in the ArrayList serializable and everything works fine if the cache is empty the first time it comes up.
Just a note, I've also tried to set the "FetchStateOnStartup" attribute to false in my configuration file but this does not appear to get picked up. I tested it by outputting the getFetchStateOnStartup() call in my code.
Either way I want the state fetched on startup!
Any feedback would be most appreciated,
Thanks,
Ray.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049373#4049373
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049373
18 years, 10 months
[JBoss jBPM] - tasklist and variables
by ricardomarques
Hi I'm using the following process, and I wanted to start a work on a instance of this process, and give some input to the process continues.
I access the user grover tasklist and start a work on a task instance using the class StartWorkOnTaskCommand, after this i wanna show the variables start-date and duration for user input.
My problem is that currently after I start a work on a process I get the VariableContainer without variables.
I'm bad understanding the way this works?
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.1" name="holiday-request">
| <swimlane name="initiator">
| <assignment expression="user(grover)"></assignment>
| </swimlane>
| <start-state name="enter request">
| <task name="request entry" swimlane="initiator">
| <controller>
| <variable name="start date" access="read,write,required"></variable>
| <variable name="duration" access="read,write,required"></variable>
| </controller>
| </task>
| <transition name="" to="evaluate request"></transition>
| </start-state>
| <end-state name="end"></end-state>
| <task-node name="evaluate request">
| <task name="entry evaluation" swimlane="initiator">
| <controller>
| <variable name="start date" access="read"></variable>
| <variable name="duration" access="read"></variable>
| <variable name="info" access="read"></variable>
| <variable name="decision"></variable>
| </controller>
| </task>
| <transition name="More info needed" to="give addition info"></transition>
| <transition name="approve/disapprove" to="end"></transition>
| </task-node>
| <task-node name="give addition info">
| <task name="additional info entry" swimlane="initiator">
| <controller>
| <variable name="start date" access="read"></variable>
| <variable name="duration" access="read"></variable>
| <variable name="info"></variable>
| </controller>
| </task>
| <transition name="" to="evaluate request"></transition>
| </task-node>
| </process-definition>
|
| cmd = new VariablesCommand();
| ((VariablesCommand) cmd).setTaskInstanceId(tid);
| result = getEjbClient().getCommandService().execute(cmd);
|
| this.vc = (VariableContainer) result;
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049369#4049369
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049369
18 years, 10 months