Bug 724374 (BRMS-320) - Creating packages with Guvnor 5.1
Summary: Creating packages with Guvnor 5.1
Keywords:
Status: CLOSED NEXTRELEASE
Alias: BRMS-320
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor)
Version: 5.1.0 GA
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: ---
Assignee: Default User
QA Contact:
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-28 07:11 UTC by Mohamed BEN AYED
Modified: 2010-09-03 09:57 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Drools 5.1 SNAPSHOT
Last Closed: 2010-06-08 15:36:44 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker BRMS-320 0 Major Closed Creating packages with Guvnor 5.1 2013-01-09 12:32:56 UTC

Description Mohamed BEN AYED 2010-05-28 07:11:20 UTC
Date of First Response: 2010-05-29 11:09:12
securitylevel_name: Public

when I want to access to a PKG file depployed with Guvnor from a KnowledgeAgent, I get this exception:

java.lang.RuntimeException: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage   
        at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:586) 
        at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:541) 
        at org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:731) 
        at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:515) 
        at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:145) 
        at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:130) 
        at com.cylande.MainKAgent.main(MainKAgent.java:171) 
Caused by: java.io.InvalidClassException: org.drools.rule.DialectRuntimeRegistry; local class incompatible: stream classdesc serialVersionUID = 5308493362083281112, local class serialVersionUID = 2297533903900118816 
        at java.io.ObjectStreamClass.initNonProxy(Unknown Source) 
        at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source) 
        at java.io.ObjectInputStream.readClassDesc(Unknown Source) 
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) 
        at java.io.ObjectInputStream.readObject0(Unknown Source) 
        at java.io.ObjectInputStream.readObject(Unknown Source) 
        at org.drools.rule.Package.readExternal(Package.java:198) 
        at java.io.ObjectInputStream.readExternalData(Unknown Source) 
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) 
        at java.io.ObjectInputStream.readObject0(Unknown Source) 
        at java.io.ObjectInputStream.readObject(Unknown Source) 
        at org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:189) 
        at org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:158) 
        at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:575) 
        ... 6 more

Comment 1 Esteban Aliverti 2010-05-29 15:09:12 UTC
I have the exact same issue when adding a pkg file created by guvnor into kbuilder. So Knowledge Agent has nothing to do here. 
KAgent is failing in the following lines:
                is = resource.getInputStream();
                Object object = DroolsStreamUtils.streamIn(is);

Comment 2 Anatoly Polinsky 2010-05-29 18:42:46 UTC
I do not have an access to the source code right now, but does "DialectRuntimeRegistry" have a "private static final long serialVersionUID" defined?

The error you are experiencing usually happens when the Java class compiled by the client is different (have a different serialVersionUID) from the same Java class compiled by the server. You have two options:

1. To define "private static final long serialVersionUID" with a constant number in that Java class, this way the client and the server compiled class will be identical

2. Compile both, the client and the server Java class on the server, and copy the .class to the client ( dirty option )

/Anatoly 

Comment 3 Esteban Aliverti 2010-05-29 18:57:32 UTC
org.drools.rule.DialectRuntimeRegistry doesn't define serialVersionUID. 
The error seems to be fixed after declare serialVersionUID field. I'm running a full build to make sure this fix doesn't break any test.


Note You need to log in before you can comment on or make changes to this bug.