[
https://issues.jboss.org/browse/JBRULES-3102?page=com.atlassian.jira.plug...
]
Antoine Toulme commented on JBRULES-3102:
-----------------------------------------
Discussed on #droolsdev
{quote}
[1:54pm] toulmean: conan: JBRULES-3102 ? any idea how to address the problem ?
[2:15pm] conan: toulmean: packages are cached objects. they are not usable across
different versions of drools
[2:16pm] conan: toulmean: I assume you are trying to serialise an old Package instance?
[2:16pm] toulmean: right
[2:16pm] conan: what guvnor does is have a rebuild button
[2:16pm] conan: so it recompiles cached packages
[2:17pm] conan: longer term we would like it to be version independant
[2:17pm] conan: we just aren't there yet
[2:18pm] toulmean: conan: that's a big hole
[2:18pm] toulmean: how do you migrate customers ?
[2:18pm] conan: Packages are just a cache
[2:18pm] conan: you can recompile them
[2:18pm] conan: that's what guvnor does
[2:18pm] conan: so you press a button
[2:18pm] toulmean: ok.
[2:18pm] conan: and everything is updated
[2:19pm] toulmean: need to think then, there should be a failsafe
[2:19pm] conan: toulmean: the reason being is we just took a pojo structure that is quite
complex
[2:19pm] conan: and exposed it's serialisation "as is"
[2:19pm] conan: to help avoid rebuilding a Package on the client
[2:19pm] toulmean: I get that.
[2:19pm] conan: maintaining compatability across versions of serialised objects is
incredible expensive
[2:19pm] conan: in man hours
[2:20pm] conan: so we left it
[2:20pm] toulmean: yep.
[2:20pm] conan: what we do plan to do instead
[2:20pm] conan: is work towards some sort of intermediate state
[2:20pm] conan: tbh for processes if you don't have a lot of compiled java code
[2:20pm] conan: then you don't need to pre-cache your packages
[2:22pm] conan: toulmean: so I want to do two thigns
[2:22pm] conan: moved to a jar as a deployment unit
[2:22pm] conan: and support some intermediate state
[2:22pm] conan: that is version independant (to some degree)
[2:22pm] toulmean: executable rules, packaged and running on any version ?
[2:22pm] conan: toulmean: good thign is we got our hirings
[2:23pm] conan: so we'll be getting 3 to 4 people over next 6 months
[2:23pm] conan: so this sort of thing becomes more do-able
[2:23pm] conan: toulmean: any version (within reason"
[2:23pm] conan: (within reason)
[2:34pm] toulmean: conan: I guess you just need to comment that on the bug.
[2:34pm] conan: will do
[2:34pm] toulmean: it was probably not obvious enough to us if that was a cache or
something needed.
{quote}
InvalidClassException while deserialize knowledgeBase
-----------------------------------------------------
Key: JBRULES-3102
URL:
https://issues.jboss.org/browse/JBRULES-3102
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core
Reporter: winton xu
Assignee: Mark Proctor
Priority: Critical
org.drools.rule.MVELDialectRuntimeData have not serialVersionUID defined
Error:
{noformat}
java.io.InvalidClassException: org.drools.rule.MVELDialectRuntimeData; local class
incompatible: stream classdesc serialVersionUID = 2609855281272796208, local class
serialVersionUID = 5166066541265170937
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562) ~[na:1.6.0_20]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
~[na:1.6.0_20]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496) ~[na:1.6.0_20]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
~[na:1.6.0_20]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) ~[na:1.6.0_20]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) ~[na:1.6.0_20]
at java.util.HashMap.readObject(HashMap.java:1030) ~[na:1.6.0_20]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_20]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
~[na:1.6.0_20]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
~[na:1.6.0_20]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_20]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
~[na:1.6.0_20]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) ~[na:1.6.0_20]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
~[na:1.6.0_20]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) ~[na:1.6.0_20]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) ~[na:1.6.0_20]
at org.drools.rule.DialectRuntimeRegistry.readExternal(DialectRuntimeRegistry.java:59)
~[org.drools.core_5.3.0.SNAPSHOT.jar:5.3.0-SNAPSHOT]
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
~[na:1.6.0_20]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
~[na:1.6.0_20]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) ~[na:1.6.0_20]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) ~[na:1.6.0_20]
at org.drools.rule.Package.readExternal(Package.java:191)
~[org.drools.core_5.3.0.SNAPSHOT.jar:5.3.0-SNAPSHOT]
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
~[na:1.6.0_20]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
~[na:1.6.0_20]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) ~[na:1.6.0_20]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) ~[na:1.6.0_20]
at java.util.HashMap.readObject(HashMap.java:1030) ~[na:1.6.0_20]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_20]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
~[na:1.6.0_20]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
~[na:1.6.0_20]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_20]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
~[na:1.6.0_20]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) ~[na:1.6.0_20]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
~[na:1.6.0_20]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) ~[na:1.6.0_20]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) ~[na:1.6.0_20]
at org.drools.common.AbstractRuleBase.readExternal(AbstractRuleBase.java:270)
~[org.drools.core_5.3.0.SNAPSHOT.jar:5.3.0-SNAPSHOT]
at org.drools.reteoo.ReteooRuleBase.readExternal(ReteooRuleBase.java:217)
~[org.drools.core_5.3.0.SNAPSHOT.jar:5.3.0-SNAPSHOT]
at org.drools.impl.KnowledgeBaseImpl.readExternal(KnowledgeBaseImpl.java:115)
~[org.drools.core_5.3.0.SNAPSHOT.jar:5.3.0-SNAPSHOT]
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
~[na:1.6.0_20]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
~[na:1.6.0_20]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) ~[na:1.6.0_20]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) ~[na:1.6.0_20]
{noformat}
Detail:
we serialize the KnowledgeBase by the following code.
{noformat}
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(byteStream);
out.writeObject(_kbase);
out.close();
setKnowledgeBaseContents(byteStream.toByteArray());
{noformat}
we deserialize the knowledgebase by the following code.
{noformat}
ByteArrayInputStream bi = new ByteArrayInputStream(info.getData());
ObjectInputStream oi = new ObjectInputStream(bi);
kbase = (KnowledgeBase) oi.readObject();
bi.close();
oi.close();
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira