KnowledgeAgent exception
by Claus Straube
Hi all,
I'm trying to use the resource scanner in my application (drools 5.1.1,
also tried in 5.2.0-SNAPSHOT):
--snip--
//resource scanner
KnowledgeAgent kagent =
KnowledgeAgentFactory.newKnowledgeAgent( "MyAgent" );
kagent.applyChangeSet(
ResourceFactory.newByteArrayResource(this.getChangeConfiguration()) );
KnowledgeBase kbase = kagent.getKnowledgeBase();
this.ksession = kbase.newStatefulKnowledgeSession();
--snip--
and getting always a 'KnowledgeAgent exception while trying to
deserialize KnowledgeDefinitionsPackage' (see stacktrace below). Of
course I've googled for the problem and found that it was in 5.0.1 a
incompatibility problem between drools expert and guvner. But I'm not
using guvnor at all. I want to place some *.drl files in a directory and
run an agent that automatically updates my knowledge base. The agent
finds the directory and the files, but has problems to deserialize them.
If I'm loading them directly into the knowledge base they will work fine.
Any hints to find a solution are welcome.
Best regards - Claus
-----
java.lang.RuntimeException: KnowledgeAgent exception while trying to
deserialize KnowledgeDefinitionsPackage
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:732)
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:965)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:774)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:646)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:190)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:172)
at
com.catify.core.process.routers.DecisionRouter.<init>(DecisionRouter.java:32)
at
com.catify.core.rest.TestDecisionRouter.testRouting(TestDecisionRouter.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at org.apache.camel.test.TestSupport.runBare(TestSupport.java:65)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.io.StreamCorruptedException: invalid stream header: 7061636B
at
java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:800)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:297)
at
org.drools.common.DroolsObjectInputStream.<init>(DroolsObjectInputStream.java:71)
at
org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:205)
at
org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:174)
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:721)
... 27 more
13 years, 9 months
Fwd: Upload POJO Model
by Michael Anstis
---------- Forwarded message ----------
From: <ptazbaz(a)yahoo.com>
Date: 1 February 2011 20:38
Subject: Upload POJO Model
Hi,
It sounds like you know Drools fairly well and I wanted to confirm if upon
uploading the POJO model, one could edit via the Guvnor to add new
objects\attributes. We want to start by uploading a POJO model into the
Guvnor, but let business analysts add new attributes to the existing objects
via the wizards in the Guvnor. These jar files seem locked down once
uploaded and cannot be edited by general users. Any thoughts? Thanks in
advance.
Paul
13 years, 9 months
Guvnor error after creating data
by thuffman00@aol.com
I'm having a problem with Guvnor after I create a single category, package, and rule. After completion, I logout and attempt to reenter the GUI but get an error box instead of the login prompt. The error has no data associated with ti and there are no exceptions in the log nor on the jboss console. At first I thought this was due to the version I was using ( from jboss,org and not jboss.com). I've since downloaded the dotcom version of BRMS standalone and still having the same problem. Another factor is that I'm attempting to use PostgreSQL 8.04 instead of Derby. The version of Java is 1.6 and I tried upgrading Jackrabbit from 2.1.0 to 2.2.1 with no help. The environment is Ubuntu 10.04. Both the Workspace and Version in the repository.xml use the same DB with different schemaObjectPrefix. Here's an example:
<PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
<param name="url" value="jdbc:postgresql://localhost:5432/Guvnor"/>
<param name="user" value="postgres"/>
<param name="password" value="XXXXXX"/>
<param name="driver" value="org.postgresql.Driver"/>
<param name="schema" value="postgresql" />
<!--<param name="schemaCheckEnabled" value="false"/>-->
<!-- <param name="copyWhenReading" value="true"/> -->
<param name="schemaObjectPrefix" value="version_" />
</PersistenceManager>
Has anyone else come across this?
TIA
13 years, 9 months
Guvnor - Limitation for number of classes or fields?
by Dean Whisnant
My class model contains in the neighborhood of 2,400 fields which we have broken down into the imported classes below. The breakdown is based upon repeatable loops within an EDI transaction. This allows our users to first select the LOOP (or class from below) and then choose from a smaller number of fields when building their rules.
When creating a rule in Guvnor, the WHEN class/field choosers work very quickly. But then when you do the THEN side, a message pops up saying that A Script on the page is causing the web browser to run slowly. You have to answer NO to this question approximately 3 times before it then brings up the "add new action" dialog. The field chooser then works fine, though you get the script message again when you go to add another action.
Is there a limitation to Guvnor for the number of classes or fields in the model? Is there a memory setting that needs to be configured differently?
Thank you in advance!
Dean
import com.hipaa837p.Loop2420B_Segment_REF
import com.hipaa837p.Loop2420D_Segment_REF
import com.hipaa837p.Loop2330B_Segment_DTP
import com.hipaa837p.Loop2010CA_Segment_NM1
import com.hipaa837p.Loop2010BA_Segment_NM1
import com.hipaa837p.Loop2400_Segment_K3
import com.hipaa837p.Loop2300_Segment_SV5
import com.hipaa837p.Loop2330C_Segment_REF
import com.hipaa837p.Loop2400_Segment_HCP
import com.hipaa837p.Loop2300_Segment_SV1
import com.hipaa837p.Loop2400_Segment_SV1
import com.hipaa837p.Loop2400_Segment_DTP
import com.hipaa837p.Loop2000B_Segment_SBR
import com.hipaa837p.Loop2300_Segment_QTY
import com.hipaa837p.Loop2420H_Segment_N4
import com.hipaa837p.Loop2310E_Segment_NM1
import com.hipaa837p.Loop2010CA_Segment_REF
import com.hipaa837p.Loop2400_Segment_CR3
import com.hipaa837p.TransactionTrailer_Segment_SE
import com.hipaa837p.Loop2310A_Segment_NM1
import com.hipaa837p.Loop2420H_Segment_N3
import com.hipaa837p.Loop2400_Segment_CR1
import com.hipaa837p.Loop2400_Segment_PWK
import com.hipaa837p.Loop2300_Segment_CRC
import com.hipaa837p.Loop2420G_Segment_NM1
import com.hipaa837p.Loop2010BB_Segment_NM1
import com.hipaa837p.Loop2300_Segment_SBR
import com.hipaa837p.Loop2410_Segment_CTP
import com.hipaa837p.Loop2320_Segment_AMT
import com.hipaa837p.Loop2010AA_Segment_REF
import com.hipaa837p.Loop2420C_Segment_N3
import com.hipaa837p.Loop2310B_Segment_PRV
import com.hipaa837p.Loop2420E_Segment_PER
import com.hipaa837p.Loop2420C_Segment_N4
import com.hipaa837p.Loop2330F_Segment_REF
import com.hipaa837p.Loop2310C_Segment_PER
import com.hipaa837p.Loop2420F_Segment_NM1
import com.hipaa837p.Loop2330D_Segment_REF
import com.hipaa837p.Loop2300_Segment_PAT
import com.hipaa837p.Loop2300_Segment_AMT
import com.hipaa837p.Loop2010AC_Segment_N3
import com.hipaa837p.Loop2300_Segment_CUR
import com.hipaa837p.Loop2420G_Segment_N4
import com.hipaa837p.Loop2420G_Segment_N3
import com.hipaa837p.Loop2010AC_Segment_N4
import com.hipaa837p.Loop2320_Segment_MOA
import com.hipaa837p.Loop2310E_Segment_N3
import com.hipaa837p.Loop2300_Segment_FRM
import com.hipaa837p.Loop2300_Segment_CN1
import com.hipaa837p.Loop2310E_Segment_N4
import com.hipaa837p.Loop2330A_Segment_REF
import com.hipaa837p.Loop2010AC_Segment_NM1
import com.hipaa837p.Loop2420H_Segment_NM1
import com.hipaa837p.Loop2310D_Segment_NM1
import com.hipaa837p.Loop2300_Segment_PRV
import com.hipaa.CLM_PendInformation
import com.hipaa837p.Loop2400_Segment_CRC
import com.hipaa837p.Loop2010AA_Segment_PER
import com.hipaa837p.Loop2000A_Segment_CUR
import com.hipaa837p.Loop2310C_Segment_NM1
import com.hipaa837p.Loop2000A_Segment_PRV
import com.hipaa837p.Loop1000B_Segment_NM1
import com.hipaa837p.Loop2000B_Segment_HL
import com.hipaa837p.Loop2300_Segment_MEA
import com.hipaa837p.Loop2410_Segment_LIN
import com.hipaa837p.Loop2330F_Segment_NM1
import com.hipaa837p.Loop2300_Segment_DMG
import com.hipaa837p.Loop2330E_Segment_REF
import com.hipaa837p.Loop2300_Segment_CTP
import com.hipaa837p.Loop2300_Segment_DTP
import com.hipaa837p.Loop2010AA_Segment_N3
import com.hipaa837p.Loop2300_Segment_LIN
import com.hipaa837p.Loop2010AA_Segment_N4
import com.hipaa837p.Loop2300_Segment_PS1
import com.hipaa837p.Loop2330C_Segment_NM1
import com.hipaa837p.Loop2300_Segment_CLM
import com.hipaa837p.Loop2400_Segment_SV5
import com.hipaa837p.Loop2420D_Segment_NM1
import com.hipaa837p.Loop2400_Segment_REF
import com.hipaa837p.Loop2330E_Segment_NM1
import com.hipaa837p.Loop2320_Segment_OI
import com.hipaa837p.Loop2420C_Segment_NM1
import com.hipaa837p.Loop2010BA_Segment_REF
import com.hipaa837p.Loop2400_Segment_QTY
import com.hipaa837p.Loop2300_Segment_SE
import com.hipaa837p.Loop2420A_Segment_REF
import com.hipaa837p.Loop2010BA_Segment_DMG
import com.hipaa837p.Loop2300_Segment_LX
import com.hipaa837p.Loop2010AB_Segment_NM1
import com.hipaa837p.Loop2300_Segment_LQ
import com.hipaa837p.Loop2430_Segment_SVD
import com.hipaa837p.Loop2000C_Segment_HL
import com.hipaa837p.Loop2000C_Segment_PAT
import com.hipaa837p.Loop2330B_Segment_REF
import com.hipaa837p.TransactionHeader_Segment_BHT
import com.hipaa837p.Loop2400_Segment_PS1
import com.hipaa837p.Loop2410_Segment_REF
import com.hipaa837p.TransactionHeader_Segment_ST
import com.hipaa837p.Loop2310A_Segment_REF
import com.hipaa837p.Loop2330G_Segment_REF
import com.hipaa837p.Loop2310B_Segment_REF
import com.hipaa.HipaaDroolsObject
import com.hipaa837p.Loop2310D_Segment_REF
import com.hipaa837p.Loop2420A_Segment_NM1
import com.hipaa837p.Loop2300_Segment_K3
import com.hipaa837p.Loop2300_Segment_N4
import com.hipaa837p.Loop2320_Segment_CAS
import com.hipaa837p.Loop2300_Segment_N3
import com.hipaa837p.Loop2330D_Segment_NM1
import com.hipaa837p.Loop1000A_Segment_PER
import com.hipaa837p.Loop2400_Segment_CN1
import com.hipaa837p.Loop2330A_Segment_N3
import com.hipaa837p.Loop1000A_Segment_NM1
import com.hipaa837p.Loop2330A_Segment_N4
import com.hipaa837p.Loop2330A_Segment_NM1
import com.hipaa837p.Loop2400_Segment_MEA
import com.hipaa837p.Loop2010BB_Segment_REF
import com.hipaa837p.Loop2310C_Segment_N3
import com.hipaa837p.Loop2310C_Segment_N4
import com.hipaa837p.Loop2000B_Segment_PAT
import com.hipaa837p.Loop2330G_Segment_NM1
import com.hipaa837p.Loop2430_Segment_CAS
import com.hipaa837p.Loop2010BA_Segment_PER
import com.hipaa837p.Loop2300_Segment_NM1
import com.hipaa837p.Loop2300_Segment_NTE
import com.hipaa837p.Loop2300_Segment_MOA
import com.hipaa837p.Loop2310C_Segment_REF
import com.hipaa837p.Loop2300_Segment_SVD
import com.hipaa837p.Loop2400_Segment_LX
import com.hipaa837p.Loop2420E_Segment_REF
import com.hipaa837p.Loop2310B_Segment_NM1
import com.hipaa837p.Loop2000A_Segment_HL
import com.hipaa837p.Loop2420C_Segment_REF
import com.hipaa837p.Loop2300_Segment_PWK
import com.hipaa.CLM_ClaimLineItem
import com.hipaa837p.Loop2300_Segment_CR1
import com.hipaa837p.Loop2420E_Segment_N4
import com.hipaa837p.Loop2420E_Segment_N3
import com.hipaa837p.Loop2010AB_Segment_N3
import com.hipaa837p.Loop2300_Segment_CR3
import com.hipaa837p.Loop2400_Segment_AMT
import com.hipaa837p.Loop2300_Segment_CR2
import com.hipaa837p.Loop2300_Segment_CAS
import com.hipaa837p.Loop2310F_Segment_N4
import com.hipaa837p.Loop2300_Segment_PER
import com.hipaa837p.Loop2010BA_Segment_N3
import com.hipaa837p.Loop2010BA_Segment_N4
import com.hipaa837p.Loop2310F_Segment_N3
import com.hipaa837p.Loop2010AB_Segment_N4
import com.hipaa837p.Loop2420B_Segment_NM1
import com.hipaa837p.Loop2330B_Segment_N3
import com.hipaa837p.Loop2330B_Segment_N4
import com.hipaa837p.Loop2010CA_Segment_N4
import com.hipaa837p.Loop2010CA_Segment_N3
import com.hipaa837p.Loop2320_Segment_SBR
import com.hipaa837p.Loop2010CA_Segment_PER
import com.hipaa837p.Loop2430_Segment_AMT
import com.hipaa837p.Loop2010BB_Segment_N4
import com.hipaa837p.Loop2420E_Segment_NM1
import com.hipaa837p.Loop2300_Segment_REF
import com.hipaa837p.Loop2420F_Segment_REF
import com.hipaa837p.Loop2010AC_Segment_REF
import com.hipaa837p.Loop2010BB_Segment_N3
import com.hipaa837p.Loop2330B_Segment_NM1
import com.hipaa837p.Loop2420A_Segment_PRV
import com.hipaa837p.Loop2430_Segment_DTP
import com.hipaa837p.Loop2010AA_Segment_NM1
import com.hipaa837p.Loop2010CA_Segment_DMG
import com.hipaa837p.Loop2300_Segment_HL
import com.hipaa837p.Loop2300_Segment_HI
import com.hipaa837p.Loop2400_Segment_NTE
import com.hipaa837p.Loop2300_Segment_OI
import com.hipaa837p.Loop2310F_Segment_NM1
import com.hipaa837p.Loop2300_Segment_HCP
13 years, 9 months
Designer and saving process...
by bob.breitling
I an running the latest drools software and I had to run the designer by
setting a System property for designer.dev inorder to get around a
JavaScript compression issue. Alas, I got the designer to come up and I can
edit a process, but when I try to save the process, I get this....
JSNI method callSave() threw an exception:
com.google.gwt.core.client.JavaScriptException: (TypeError):
this.c.W.contentWindow.document.defaultView.ORYX.EDITOR is undefined
stack:
CAe()@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:7407
hff([object
Object],"Initial.")@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:6763
kgf()@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:7413
K3e([object
Object])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:3872
U3e([object
Object])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:7413
PZ([object
Object])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:7383
u2([object Object],[object
Object])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:6873
y2([object Object],[object
Object])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:4417
g2([object Object],[object
Object])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:5813
ITb([object Object],[object
Object])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:3488
kZ([object MouseEvent],[object Object],[object
HTMLButtonElement])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:6037
LTb([object Object],[object
MouseEvent])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:5865
ZTb([object
MouseEvent])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:7383
G_b([object MouseEvent],[object HTMLButtonElement],[object
Object])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:5558
([object
MouseEvent])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:7299
SN((function (b) {var c, d = this;while (d && !(c = d.__listener)) {d =
d.parentNode;}d && d.nodeType != 1 && (d = null);c && o1b(c) && G_b(b, d,
c);}),[object HTMLButtonElement],[object
Object])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:5452
([object
MouseEvent])@http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA209EBD32A8C3EF4A1E29.cache.html:5389
fileName:
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/1840F97166EA...
lineNumber: 7407
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Designer-and-saving-p...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
Class Cast Exception with
by jschmied
Hi!
Currently I'm testing with drool's build 111 and jbpm build 72 and when
using a workitem together with persistence I get:
java.lang.ClassCastException: org.hibernate.ejb.EntityManagerFactoryImpl
cannot be cast to org.drools.persistence.PersistenceContextManager
at
org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalAbortWorkItem(JPAWorkItemManager.java:67)
at
org.jbpm.workflow.instance.node.WorkItemNodeInstance.cancel(WorkItemNodeInstance.java:216)
at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:256)
at
org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105)
at
org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
at
org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)
at
org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)
Processes without workitems are getting persisted orderly.
Any ideas?
Thanks
juergen
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Class-Cast-Exception-...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
Question on Drools upgrade from 2 to 5
by Steve Floridas
Hi,
We are an insurance company employing drools ( version 2 currently) for
policy validation rules and for reading policy specific rates from
spreadsheet using drools. We are currently running in to memory issues when
we execute the compiled JAR ( including the drools compiled files), as there
are lot of rules fired for different versions of policy rating. My question
here is :-
Is there any scope of resolving this memory issue with upgrade of drools
package from version 2 to version 5? Will the compiled DRLs in Drools 5 be
more compressed compared to Drools 2?
I have been trying to upgrade to Drools 5 by adding the necessary jars for
compilation. But unfortunately I am gettng few errors on spreadsheet and DRL
compilation. Is there more to work on the upgrade?
One of the errors I frequently get for spreadsheet comparison is something
like below:
*Invalid character input "?" (character code 65533)*
Please clarify my above questions.
Thank you much,
Steve
**
13 years, 9 months