[JBoss JIRA] (JBRULES-3527) NullPointerException when marshalling InsertObjectCmd with XStream without setting entry point
by Chang Li (JIRA)
Chang Li created JBRULES-3527:
---------------------------------
Summary: NullPointerException when marshalling InsertObjectCmd with XStream without setting entry point
Key: JBRULES-3527
URL: https://issues.jboss.org/browse/JBRULES-3527
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.4.0.Final
Environment: Windows
Reporter: Chang Li
Assignee: Mark Proctor
The following code result in NullPointerException in the last step
ArrayList<Command> commands = new ArrayList<Command>();
BatchExecutionCommand batchCmd = CommandFactory.newBatchExecution(commands, "ksession1");
MyObject myobj = new MyObject("name of object"); // just an example, not important to the bug.
Command command = CommandFactory.newInsert(myobj, "myobject");
commands.add(command);
XStream marshaller = BatchExecutionHelper.newXStreamMarshaller();
String xml = marshaller.toXML(batchCmd);
The null pointer exception is caused by the "entry point" parameter not being set on teh InesrtObjectCommand.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (JBRULES-3310) drools-camel osgi bundle
by surya aditya (Created) (JIRA)
drools-camel osgi bundle
------------------------
Key: JBRULES-3310
URL: https://issues.jboss.org/browse/JBRULES-3310
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-camel
Affects Versions: 5.3.0.Final
Environment: window, linux
Reporter: surya aditya
Assignee: Mark Proctor
Priority: Minor
Fix For: 5.3.1.Final
drools-camel is not osgi compatible i.e not an osgi bundle yet. can this be enhanced in next releases to be osgi ready? many of the apache camel components fits very well in osgi environment and drools-camel is missing this functionality. it would help if upgraded to osgi bundle like drools-core etc.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (JBRULES-3520) CamelServerApp.class missing, camel-client.xml wrong for Drools and jBPM integration camel server war on Tomcat
by Ryley Gahagan (JIRA)
Ryley Gahagan created JBRULES-3520:
--------------------------------------
Summary: CamelServerApp.class missing, camel-client.xml wrong for Drools and jBPM integration camel server war on Tomcat
Key: JBRULES-3520
URL: https://issues.jboss.org/browse/JBRULES-3520
Project: Drools
Issue Type: Release
Security Level: Public (Everyone can see)
Components: drools-camel
Affects Versions: 5.4.0.Final, 5.4.0.CR1
Environment: Tomcat 6.x
Reporter: Ryley Gahagan
Assignee: Mark Proctor
Priority: Minor
Fix For: 5.4.0.Final, 5.4.0.CR1
The CamelServerApp.class file is missing from the war. Also, the camel-client.xml has, as default:
<to uri="cxfrs://http://localhost:8080/drools-server/kservice/rest"/>
<to uri="cxfrs://http://localhost:8080/drools-server/kservice/soap"/>
Which Tomcat deploys out of the box as
<to uri="cxfrs://http://localhost:8080/drools-camel-server-5.4.0.Final/kservice/rest"/>
<to uri="cxfrs://http://localhost:8080/drools-camel-server-5.4.0.Final/kservice/soap"/>
(...5.4.0.CR1 for that dist)
Has existed for awhile, apparently.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (JBRULES-3574) Split package org.drools.rule.builder.dialect.asm in org.drools.core and org.drools.compiler causes OSGi problems
by Tillmann Seidel (JIRA)
Tillmann Seidel created JBRULES-3574:
----------------------------------------
Summary: Split package org.drools.rule.builder.dialect.asm in org.drools.core and org.drools.compiler causes OSGi problems
Key: JBRULES-3574
URL: https://issues.jboss.org/browse/JBRULES-3574
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler, drools-core
Affects Versions: 5.4.0.Final
Reporter: Tillmann Seidel
Assignee: Mark Proctor
The package {{org.drools.rule.builder.dialect.asm}} has been split between the OSGi bundles {{org.drools.core}} and {{org.drools.compiler}}. This leads to class loader problems when used in an OSGi environment:
{code}
java.lang.IllegalAccessError: tried to access method org.drools.rule.builder.dialect.asm.GeneratorHelper.createInvokerClassGenerator(Ljava/lang/String;Lorg/drools/rule/builder/dialect/asm/InvokerDataProvider;Lorg/drools/util/CompositeClassLoader;Lorg/drools/base/TypeResolver;)Lorg/drools/rule/builder/dialect/asm/ClassGenerator; from class org.drools.rule.builder.dialect.asm.InvokerGenerator
{code}
Ideally split packages should not be used at all. If they cannot be avoided, they should be declared as such in the OSGi manifest.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (JBRULES-3541) FactHandle has marshalling problems with JAXB
by Mark Proctor (JIRA)
Mark Proctor created JBRULES-3541:
-------------------------------------
Summary: FactHandle has marshalling problems with JAXB
Key: JBRULES-3541
URL: https://issues.jboss.org/browse/JBRULES-3541
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Mark Proctor
Assignee: Mark Proctor
There are two issues when serialising the FactHandle. The first is that there is no setExternalForm, on older JAXB this throws an exception, on newer one's it just doesn't set the field.
The other issue is with XmlAdapter, when the FactHandle is nested. It seems JAXB is not picking up it has annotations and renders it as a generic xsi:type, which is ugly verbose. This may be a limitation of XmlAdapter and it's generics arguments.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (JBRULES-3388) KnowledgeAgent custom classloader not working for PKG resources
by Herman Post (JIRA)
Herman Post created JBRULES-3388:
------------------------------------
Summary: KnowledgeAgent custom classloader not working for PKG resources
Key: JBRULES-3388
URL: https://issues.jboss.org/browse/JBRULES-3388
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.3.1.Final
Environment: Windows 7, Java7-5, JBoss AS7.1
Reporter: Herman Post
Assignee: Mark Proctor
I believe there may be a bug when trying to use a custom class loader with the KnowledgeAgent and the KnowledgeBuilderConfiguration, and when the ChangeSet is a PKG resource.
I have been trying to get the knowledge-agent-classloader sample from the new Drools Cookbook to work with a PKG resource. The sample works fine for a DRL resource, but when I convert it to use my fact jar, and a PKG resource containing my rules, which I downloaded from Guvnor, it throws a ClassNotFoundException for my fact model. If I put my fact model in the classpath, the error goes away and my rules can be added to the KnowledgeAgent and run correctly. Following is the code from the sample that I have converted, and I have attached a zip file with a complete project demonstrating the problem. Also, I can get my rules and fact model to work if I use a DRL ChangeSet.knowledge-agent-classloader.zip
URL modelJarURL = getClass().getResource("Patient-1.0.jar");
URLClassLoader customURLClassloader = new URLClassLoader(new URL[] {modelJarURL });
KnowledgeBuilderConfiguration kbuilderConfig = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(null,
customURLClassloader);
KnowledgeBaseConfiguration kbaseConfig = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(null, customURLClassloader);
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(kbaseConfig);
KnowledgeAgentConfiguration aconf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("test", kbase, aconf, kbuilderConfig);
// kagent.applyChangeSet(new ClassPathResource("change-set.xml", getClass())); // this goes with model.jar
// kagent.applyChangeSet(new ClassPathResource("drl-change-set.xml", getClass())); // this goes with Patient.jar
kagent.applyChangeSet(new ClassPathResource("pkg-change-set.xml", getClass())); // this goes with Patient.jar
return kagent.getKnowledgeBase();
Following is the stack trace from the error:
java.lang.NullPointerException
at org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:148)
at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1016)
at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:785)
at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:657)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:190)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:169)
at drools.cookbook.chapter02.KnowledgeAgentClassloaderTest.createKnowledgeBase(KnowledgeAgentClassloaderTest.java:59)
at drools.cookbook.chapter02.KnowledgeAgentClassloaderTest.customClassloaderTest(KnowledgeAgentClassloaderTest.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
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)
I have been having the exact same problem when trying to use a custom class loader with just a KnowldegeBuilder and no KnowledgeAgent.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (JBRULES-3626) Add support for strong negation
by Davide Sottara (JIRA)
Davide Sottara created JBRULES-3626:
---------------------------------------
Summary: Add support for strong negation
Key: JBRULES-3626
URL: https://issues.jboss.org/browse/JBRULES-3626
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Davide Sottara
Assignee: Davide Sottara
Priority: Minor
Drools "not" operator implements a type of "negation by failure", i.e. not X() behaves as the negation of "exists" or, in other words, translates as "it is NOT asserted that ...".
However, another form of stronger negation is needed to express conditionals such as "it is asserted that NOT ..."
It should be possible, then, to assert facts both in a "positive" and "negative" way, to assert THAT and THAT NOT.
The language should also support a "neg" CE to create "negative" patterns which will match with negative facts. I.e. it should be possible to write rules such as:
when $p : Person() and Car( owner == $p ) then
// a positive, matching Car is present in the WM
when $p : Person() and neg Car( owner == $p ) then
// a negative, matching Car is present in the WM
when $p : Person() and not Car( owner == $p ) then
// neither a positive nor a negative fact exists in the WM
For a more detailed description and motivation see e.g.:
https://oxygen.informatik.tu-cottbus.de/publications/wagner/WebRules2Neg.pdf
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months