[JBoss JIRA] Created: (JBAS-8796) Hot deployment scanner interval setting needs to be documented for AS6
by jaikiran pai (JIRA)
Hot deployment scanner interval setting needs to be documented for AS6
----------------------------------------------------------------------
Key: JBAS-8796
URL: https://issues.jboss.org/browse/JBAS-8796
Project: JBoss Application Server
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Docs/Administration and Configuration Guide
Affects Versions: 6.0.0.Final
Reporter: jaikiran pai
Apparently, the hot deployment scanning interval is no longer set in the JBOSS_HOME/server/<servername>/deploy/hdscanner-jboss-beans.xml. This change needs to be documented so that the users will know where/how to change the default value. Please see the referenced forum thread for details.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 10 months
[JBoss JIRA] Created: (JBRULES-2800) Issue with literals in Drools Verifier 5.1.1
by Nathan Bell (JIRA)
Issue with literals in Drools Verifier 5.1.1
--------------------------------------------
Key: JBRULES-2800
URL: https://jira.jboss.org/browse/JBRULES-2800
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-verifier
Affects Versions: 5.1.1.FINAL
Reporter: Nathan Bell
Assignee: Mark Proctor
Priority: Minor
I posted this to the "rules-users" list, and did not get a response. That leads me to believe it is a bug, so I'm submitting it here. Below is the text of my email.
Using org.drools.verifier found in "drools-verifier-5.1.1.jar" I get an org.drools.RuntimeDroolsException if a pattern in a rule LHS contains a comparison to a literal value using the equals operator.
Please consider the following rule I created solely for the purposes of isolating this issue.
package com.simple.test.rule
import com.p1s.mps.rulevalidator.TestFact;
rule "TestRule"
when
$fact : TestFact(value == 1)
then
System.out.println($fact.getValue());
end
The following class definition for the TestFact.
package com.p1s.mps.rulevalidator;
public class TestFact
{
private int value;
public TestFact(int value) {
this.value = value;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + value;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
TestFact other = (TestFact) obj;
if (value != other.value)
return false;
return true;
}
}
The following unit test which attempts to use Verifier.
@Test
public final void testVerifierOnLiteral()
{
VerifierBuilder verBuilder = VerifierBuilderFactory.newVerifierBuilder();
Verifier ver = verBuilder.newVerifier();
String ruleText = getRuleFromResource(TEST_RULE);
ver.addResourcesToVerify( ResourceFactory.newReaderResource(
new StringReader( ruleText ) ), ResourceType.DRL );
Assert.assertTrue(ver.fireAnalysis());
}
Running the test with JUnit produces the following exception.
java.lang.RuntimeException: org.drools.RuntimeDroolsException: Exception executing ReturnValue constraint org.drools.rule.ReturnValueRestriction@589f81 : [Error: cannot convert <1> to a numeric type: class java.lang.Integer [0]]
[Near : {... Unknown ....}]
^
[Line: 1, Column: 0]
at org.drools.verifier.builder.VerifierImpl.analyse(VerifierImpl.java:148)
at org.drools.verifier.builder.VerifierImpl.fireAnalysis(VerifierImpl.java:117)
at com.p1s.mps.rulevalidator.NumericConversionTest.testVerifierOnLiteral(NumericConversionTest.java:64)
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.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
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: org.drools.RuntimeDroolsException: Exception executing ReturnValue constraint org.drools.rule.ReturnValueRestriction@589f81 : [Error: cannot convert <1> to a numeric type: class java.lang.Integer [0]]
[Near : {... Unknown ....}]
^
[Line: 1, Column: 0]
at org.drools.rule.ReturnValueConstraint.isAllowedCachedRight(ReturnValueConstraint.java:168)
at org.drools.common.TripleBetaConstraints.isAllowedCachedRight(TripleBetaConstraints.java:211)
at org.drools.reteoo.NotNode.assertObject(NotNode.java:140)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:450)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:378)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:190)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:145)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1174)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1123)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:917)
at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:251)
at org.drools.verifier.builder.VerifierImpl.analyse(VerifierImpl.java:136)
... 26 more
Caused by: org.drools.RuntimeDroolsException: [Error: cannot convert <1> to a numeric type: class java.lang.Integer [0]]
[Near : {... Unknown ....}]
^
[Line: 1, Column: 0]
at org.drools.rule.ReturnValueRestriction.isAllowed(ReturnValueRestriction.java:236)
at org.drools.rule.ReturnValueConstraint.isAllowedCachedRight(ReturnValueConstraint.java:162)
... 39 more
Caused by: [Error: cannot convert <1> to a numeric type: class java.lang.Integer [0]]
[Near : {... Unknown ....}]
^
[Line: 1, Column: 0]
at org.mvel2.math.MathProcessor.getInternalNumberFromType(MathProcessor.java:577)
at org.mvel2.math.MathProcessor._doOperations(MathProcessor.java:155)
at org.mvel2.math.MathProcessor.doOperations(MathProcessor.java:79)
at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:102)
at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:104)
at org.mvel2.MVEL.executeExpression(MVEL.java:978)
at org.drools.base.mvel.MVELReturnValueExpression.evaluate(MVELReturnValueExpression.java:92)
at org.drools.rule.ReturnValueRestriction.isAllowed(ReturnValueRestriction.java:226)
... 40 more
However, if I use the following version of the same rule where I have added parentheses it works.
package com.simple.test.rule
import com.p1s.mps.rulevalidator.TestFact;
rule "TestRule"
when
$fact : TestFact(value == (1))
then
System.out.println($fact.getValue());
end
Note that both versions of the DRL file compile, run, and produce the correct results.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 10 months
[JBoss JIRA] Created: (JBRULES-2230) DecisionTable added to KnowledgeAgent via change-set throws a NullPointerException
by Steve Ronderos (JIRA)
DecisionTable added to KnowledgeAgent via change-set throws a NullPointerException
----------------------------------------------------------------------------------
Key: JBRULES-2230
URL: https://jira.jboss.org/jira/browse/JBRULES-2230
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler, drools-core
Affects Versions: 5.0.1.FINAL
Environment: Windows XP
Java 1.5
Reporter: Steve Ronderos
Assignee: Mark Proctor
When adding a change-set which contains a decision table to a KnowledgeAgent I receive the following error:
Exception in thread "main" java.lang.NullPointerException
at org.drools.decisiontable.DecisionTableProviderImpl.compileStream(DecisionTableProviderImpl.java:26)
at org.drools.decisiontable.DecisionTableProviderImpl.loadFromInputStream(DecisionTableProviderImpl.java:19)
at org.drools.compiler.DecisionTableFactory.loadFromInputStream(DecisionTableFactory.java:16)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:508)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)
at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:386)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:120)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:109)
at org.drools.bug.AgentDecisionTableBug.main(AgentDecisionTableBug.java:12)
I tested with 5.0.1 and 5.1.0.SNAPSHOT. I looked into the code a little and it appears that KnowledgeAgentImpl.rebuildResources does not parse the DecisionTable's configuration and pass it to the overloaded KnowledgeBuilderImpl.add method.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 10 months
[JBoss JIRA] Created: (JBRULES-2104) KnowledgeAgentImpl cannot build Resources with paramatereised ResourceConfiguration's
by Graham Gear (JIRA)
KnowledgeAgentImpl cannot build Resources with paramatereised ResourceConfiguration's
-------------------------------------------------------------------------------------
Key: JBRULES-2104
URL: https://jira.jboss.org/jira/browse/JBRULES-2104
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.0.1.FINAL
Reporter: Graham Gear
Assignee: Mark Proctor
The KnowledgeAgentImpl does not pass through ResourceConfiguration's through to KnowledgeBuilderImpl, making the building of configuration parametrised Resources not possible. Eg, trying to compile a DecisionTable (XLS) results in a NPE:
Caused by: java.lang.NullPointerException
at org.drools.decisiontable.DecisionTableProviderImpl.compileStream(DecisionTableProviderImpl.java:26)
at org.drools.decisiontable.DecisionTableProviderImpl.loadFromInputStream(DecisionTableProviderImpl.java:19)
at org.drools.compiler.DecisionTableFactory.loadFromInputStream(DecisionTableFactory.java:16)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:508)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)
at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:385)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:119)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:108)
at com.jboss.brms.poc.KnowledgeBaseManager.loadChangeSet(KnowledgeBaseManager.java:78)
at com.jboss.brms.poc.test.rule.DecisionTableBRLClassPathRuleTest.<clinit>(DecisionTableBRLClassPathRuleTest.java:18)
... 17 more
In general it would be good if the KnowledgeAgent would behave exactly as the KnowledgeBuilder under the same ChangeSet configuration.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 10 months