[rules-users] Problem with declare event

Demian Calcaprina calcacuervo at gmail.com
Tue Jan 14 16:56:56 EST 2014


Hey Guys, I am having a drools compilation error when declaring an error.

I tried to isolate this as much as possible.

https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L43

I just added after the given line, this:
header = header + " declare Message\n "+
        " @role(event) \n " +
         " end \n ";

And I get this exception:
java.lang.NullPointerException
at java.io.FilterOutputStream.write(FilterOutputStream.java:97)
at
org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeJarEntries(MemoryFileSystem.java:437)
at
org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeJarEntries(MemoryFileSystem.java:430)
at
org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeJarEntries(MemoryFileSystem.java:430)
at
org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeJarEntries(MemoryFileSystem.java:430)
at
org.drools.compiler.compiler.io.memory.MemoryFileSystem.zip(MemoryFileSystem.java:387)
at
org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeAsBytes(MemoryFileSystem.java:365)
at
org.drools.compiler.kie.builder.impl.MemoryKieModule.getBytes(MemoryKieModule.java:64)
at
org.drools.compiler.CommonTestMethodBase.createKJar(CommonTestMethodBase.java:421)
at
org.drools.compiler.integrationtests.IncrementalCompilationTest.createAndDeployJar(IncrementalCompilationTest.java:205)
at
org.drools.compiler.integrationtests.IncrementalCompilationTest.testLoadOrderAfterRuleRemoval(IncrementalCompilationTest.java:70)
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:601)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
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)

Any idea on how to declare an event on the drl?

Thanks!

Demian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140114/f87795bb/attachment.html 


More information about the rules-users mailing list