<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Wolfgang,<br>
<br>
that helps. So the mistake was to place drl files in my folder. I'll
try to marshall my drl files to a brl file. Thanks.<br>
<br>
Best regards - Claus<br>
<br>
On 01.02.2011 18:48, Wolfgang Laun wrote:
<blockquote
cite="mid:AANLkTikz10pqzf31oX_dEKCy_rvUnasO9YL53zc4=wVO@mail.gmail.com"
type="cite">The exception is thrown by an ObjectInputStream
because the file begins with<br>
7061636B<br>
which appears to be "pack" and indicates that a .drl (DRL source)
is accessed instead of a .brl. (precompiled package).<br>
<br>
-W<br>
<br>
<br>
<br>
<br>
<div class="gmail_quote">On 1 February 2011 18:34, Claus Straube <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:claus.straube@catify.com">claus.straube@catify.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Hi all,<br>
<br>
I'm trying to use the resource scanner in my application
(drools 5.1.1,<br>
also tried in 5.2.0-SNAPSHOT):<br>
<br>
--snip--<br>
//resource scanner<br>
KnowledgeAgent kagent =<br>
KnowledgeAgentFactory.newKnowledgeAgent( "MyAgent" );<br>
kagent.applyChangeSet(<br>
ResourceFactory.newByteArrayResource(this.getChangeConfiguration())
);<br>
KnowledgeBase kbase = kagent.getKnowledgeBase();<br>
<br>
this.ksession = kbase.newStatefulKnowledgeSession();<br>
--snip--<br>
<br>
and getting always a 'KnowledgeAgent exception while trying to<br>
deserialize KnowledgeDefinitionsPackage' (see stacktrace
below). Of<br>
course I've googled for the problem and found that it was in
5.0.1 a<br>
incompatibility problem between drools expert and guvner. But
I'm not<br>
using guvnor at all. I want to place some *.drl files in a
directory and<br>
run an agent that automatically updates my knowledge base. The
agent<br>
finds the directory and the files, but has problems to
deserialize them.<br>
If I'm loading them directly into the knowledge base they will
work fine.<br>
<br>
Any hints to find a solution are welcome.<br>
<br>
Best regards - Claus<br>
<br>
<br>
-----<br>
java.lang.RuntimeException: KnowledgeAgent exception while
trying to<br>
deserialize KnowledgeDefinitionsPackage<br>
at<br>
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:732)<br>
at<br>
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:965)<br>
at<br>
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:774)<br>
at<br>
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:646)<br>
at<br>
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:190)<br>
at<br>
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:172)<br>
at<br>
com.catify.core.process.routers.DecisionRouter.<init>(DecisionRouter.java:32)<br>
at<br>
com.catify.core.rest.TestDecisionRouter.testRouting(TestDecisionRouter.java:27)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)<br>
at<br>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br>
at<br>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:616)<br>
at junit.framework.TestCase.runTest(TestCase.java:168)<br>
at junit.framework.TestCase.runBare(TestCase.java:134)<br>
at
org.apache.camel.test.TestSupport.runBare(TestSupport.java:65)<br>
at
junit.framework.TestResult$1.protect(TestResult.java:110)<br>
at
junit.framework.TestResult.runProtected(TestResult.java:128)<br>
at junit.framework.TestResult.run(TestResult.java:113)<br>
at junit.framework.TestCase.run(TestCase.java:124)<br>
at junit.framework.TestSuite.runTest(TestSuite.java:232)<br>
at junit.framework.TestSuite.run(TestSuite.java:227)<br>
at<br>
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)<br>
at<br>
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)<br>
at<br>
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)<br>
at<br>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)<br>
at<br>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)<br>
at<br>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)<br>
at<br>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)<br>
Caused by: java.io.StreamCorruptedException: invalid stream
header: 7061636B<br>
at<br>
java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:800)<br>
at
java.io.ObjectInputStream.<init>(ObjectInputStream.java:297)<br>
at<br>
org.drools.common.DroolsObjectInputStream.<init>(DroolsObjectInputStream.java:71)<br>
at<br>
org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:205)<br>
at<br>
org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:174)<br>
at<br>
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:721)<br>
... 27 more<br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote>
</div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>