[JBoss JIRA] Created: (JBRULES-1596) java.lang.NoClassDefFoundError
by Jurgen Van Bouchaute (JIRA)
java.lang.NoClassDefFoundError
-------------------------------
Key: JBRULES-1596
URL: http://jira.jboss.com/jira/browse/JBRULES-1596
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.0.4
Environment: Win XP, Drools 4.0.4 , BRMS on JBOSS 4.2.1-GA , JVM Bea JRockit R27 3.1 (1.5)
Reporter: Jurgen Van Bouchaute
Assigned To: Mark Proctor
Attachments: adresDSL, packagesource.txt, Rule source.txt
Encountered following error during unit testing execution of rules :
[BeforeActivationFired: rule=Address Validation Town required; tuple=[fid:1:1:com.amadeus.mbo.msp.proto.model.AddressImpl@558fec]
]
java.lang.NoClassDefFoundError: Adres/CreateValidationErrorDSL
at ASMAccessorImpl_34195571209986950480.getValue(Unknown Source)
at org.mvel.ASTNode.getReducedValueAccelerated(ASTNode.java:174)
at org.mvel.ExecutableAccessor.getValue(ExecutableAccessor.java:50)
at ASMAccessorImpl_33632651209986950320.getValue(Unknown Source)
at org.mvel.ast.VariableDeepPropertyNode.getReducedValueAccelerated(VariableDeepPropertyNode.java:22)
at org.mvel.ast.PropertyASTNode.getReducedValueAccelerated(PropertyASTNode.java:21)
at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)
at org.mvel.MVEL.executeExpression(MVEL.java:235)
at org.drools.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:47)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:550)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:514)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:471)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:433)
at com.amadeus.mbo.commons.ruleengine.RuleManager.executeRules(RuleManager.java:158)
at com.amadeus.mbo.msp.proto.service.CustomerServiceImpl.validateAddress(CustomerServiceImpl.java:444)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy8.validateAddress(Unknown Source)
at com.amadeus.mbo.msp.proto.service.CustomerServiceImplTest.testValidateAddress(CustomerServiceImplTest.java:1139)
DSL Rule RHS executes a function that returns an object which is inserted.
No problems when building & validating the package in BRMS, only when executing the rule.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[JBoss JIRA] Created: (JBRULES-2466) Exception in hash code calculation for character attributes in alpha hashing optimization
by Olexandr Demura (JIRA)
Exception in hash code calculation for character attributes in alpha hashing optimization
-----------------------------------------------------------------------------------------
Key: JBRULES-2466
URL: https://jira.jboss.org/jira/browse/JBRULES-2466
Project: Drools
Issue Type: Sub-task
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.1.0.M1
Reporter: Olexandr Demura
Assignee: Mark Proctor
JBRULES-1348 introduces a bug in interaction between CompositeObjectSinkAdapter$HashKey and BaseObjectClassFieldReader
be following code change
- } else if ( vtype.isIntegerNumber() ) {
+ } else if ( vtype.isIntegerNumber() || vtype.isChar() ) {
this.type = LONG;
if ( !isNull ) {
this.lvalue = extractor.getLongValue( null, value );
because BaseObjectClassFieldReader.getLongValue() doesn't handle properties of Character type,
and RuntimeDroolsException is thrown with message "Conversion to double not supported from java.lang.Character".
In case BaseObjectClassFieldReader.getLongValue() returns ((Character) value).charValue() instead of throwing exception,
exception in the following form will be thrown be CompositeObjectSinkAdapter$HashKey
on equality check if other HashKey gained type OBJECT instead of LONG:
java.lang.NumberFormatException: For input string: "R"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:403)
at java.lang.Long.parseLong(Long.java:461)
at org.drools.reteoo.CompositeObjectSinkAdapter$HashKey.getLongValue(CompositeObjectSinkAdapter.java:628)
at org.drools.reteoo.CompositeObjectSinkAdapter$HashKey.equals(CompositeObjectSinkAdapter.java:692)
at org.drools.util.AbstractHashTable$EqualityEquals.equal(AbstractHashTable.java:446)
at org.drools.util.ObjectHashMap.get(ObjectHashMap.java:90)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:326)
--
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
15 years, 2 months
[JBoss JIRA] Created: (JBRULES-2651) Concurrency issue in NamedEntryPoint.insert leads to occasional hanging in Drools
by Norman Chan (JIRA)
Concurrency issue in NamedEntryPoint.insert leads to occasional hanging in Drools
---------------------------------------------------------------------------------
Key: JBRULES-2651
URL: https://jira.jboss.org/browse/JBRULES-2651
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.0.1.FINAL
Reporter: Norman Chan
Assignee: Mark Proctor
I found issue which I believe might point to a concurrency issue. My server stopped processing new requests, so I did a thread dump. In examining the dump, I found that all of the processing threads, save two, were blocking while trying to acquire the lock in NamedEntryPoint.insert. Both of the other two threads appeared to be infinitely looping in the NamedEntryPoint.insert method. Here are snippets of their stack traces:
ActiveMQ Session Task" prio=10 tid=0x00002aab0003b000 nid=0x7b98 runnable
[0x000000004c086000..0x000000004c087c90] java.lang.Thread.State: RUNNABLE
at org.drools.util.ObjectHashMap.remove(ObjectHashMap.java:121) at
org.drools.common.SingleThreadedObjectStore.removeHandle(SingleThreadedObjectStore.java:150)
at org.drools.common.NamedEntryPoint.retract(NamedEntryPoint.java:296)
at org.drools.common.NamedEntryPoint.retract(NamedEntryPoint.java:245) at
org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteExpireAction.execute(ReteooWorkingMemory.java:350)
at
org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1488)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:158)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:122) at
org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:80) at
org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:28) at
ActiveMQ Session Task" prio=10 tid=0x000000005a35cc00 nid=0xdf6 runnable
[0x000000004a268000..0x000000004a269a90] java.lang.Thread.State: RUNNABLE
at org.drools.util.AbstractHashTable.resize(AbstractHashTable.java:115) at
org.drools.util.ObjectHashMap.put(ObjectHashMap.java:78) at
org.drools.common.SingleThreadedObjectStore.addHandle(SingleThreadedObjectStore.java:136)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:113)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:80) at
org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:28) at
So it seems like while the first thread is holding the lock and attempting to remove an object handle from the object store in NamedEntryPoint, the other thread is trying to resize that same object store in response to an addHandle call that puts it over the threshold. I haven't worked out exactly how these concurrent accesses to the same object store by two different threads causes an infinite loop in both threads, but it seems like the call to SingleThreadedObjectStore.addHandle should be preceded by acquiring the lock.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[JBoss JIRA] Created: (JBRULES-2788) NPE in AbstractWorkingMemory due to session.retract(null)
by Wolfgang Laun (JIRA)
NPE in AbstractWorkingMemory due to session.retract(null)
---------------------------------------------------------
Key: JBRULES-2788
URL: https://jira.jboss.org/browse/JBRULES-2788
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.1.1.FINAL
Reporter: Wolfgang Laun
Assignee: Mark Proctor
Fix For: 5.2.0.M1
StatefulKnowledgeSession kSession = ...;
kSession.retract( null );
Notice that this might occur if kSession.getFactHandle() returns null because the fact object
is invalid or already gone etc.
The above call causes
java.lang.NullPointerException
at org.drools.common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:1261)
at org.drools.common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:1242)
at org.drools.impl.StatefulKnowledgeSessionImpl.retract(StatefulKnowledgeSessionImpl.java:255)
at resource.Main.exec(Main.java:92)
Expected: This should be ignored, or throw an Exception with a reasonable diagnostic. (Javadoc does not say that an exception may be thrown.)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[JBoss JIRA] Created: (JBRULES-1925) ClassCastException problem with reading working memory using ObjectInputStream
by Przemyslaw Rozycki (JIRA)
ClassCastException problem with reading working memory using ObjectInputStream
------------------------------------------------------------------------------
Key: JBRULES-1925
URL: https://jira.jboss.org/jira/browse/JBRULES-1925
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.0.7
Environment: JDK 1.5.0_11
Reporter: Przemyslaw Rozycki
Assignee: Mark Proctor
I experienced the problem while reading WorkingMemory using ObjectInputStream.
Here is the code:
public class DroolsTest5 {
public static void main(String[] args) {
Properties props = new Properties();
props.setProperty("file", "<<place a path to any working DRL here>>");
RuleAgent ruleAgent = RuleAgent.newRuleAgent(props);
Fact fact1 = new Fact("a","b");
RuleBase ruleBase = ruleAgent.getRuleBase();
WorkingMemory baseWm = ruleBase.newStatefulSession(false);
baseWm.insert(fact1);
Iterator iter1 = baseWm.iterateObjects();
while (iter1.hasNext()) {
System.out.println(iter1.next());
}
System.out.println("=====");
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(baseWm);
oos.close();
byte[] buf = baos.toByteArray();
ByteArrayInputStream bais = new ByteArrayInputStream(buf);
ObjectInputStream ois = new ObjectInputStream(bais);
WorkingMemory wm = (WorkingMemory) ois.readObject();
Iterator iter2 = wm.iterateObjects();
while (iter2.hasNext()) {
System.out.println(iter2.next());
}
System.out.println("=====");
} catch (Exception e) {
e.printStackTrace();
}
}
public static class Fact implements Serializable {
String name;
String id;
public Fact(String _name, String _id) {
name = _name;
id = _id;
}
public String getId() {
return id;
}
public String getName() {
return name;
}
@Override
public String toString() {
return "Name: " + name + ", Id: " + id;
}
}
}
And here is an exception I get:
java.lang.ClassCastException: java.io.ObjectInputStream
at org.drools.reteoo.Rete$ClassObjectTypeConf.readObject(Rete.java:605)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at org.drools.util.AbstractHashTable.readExternal(AbstractHashTable.java:66)
at org.drools.util.ObjectHashMap.readExternal(ObjectHashMap.java:41)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at com.sample.DroolsTest5.main(DroolsTest5.java:52)
--
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
15 years, 2 months
[JBoss JIRA] Created: (JBRULES-1996) NPE when using directory scanner and drl is incorrect.
by Przemyslaw Rozycki (JIRA)
NPE when using directory scanner and drl is incorrect.
------------------------------------------------------
Key: JBRULES-1996
URL: https://jira.jboss.org/jira/browse/JBRULES-1996
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 4.0.7
Environment: Sun JDK 1.5.0_11, Kubuntu Linux 8.10, x86, 32-bit
Reporter: Przemyslaw Rozycki
Assignee: Mark Proctor
When I use rule agent with directory scanner, and the rule that is being scanned contains a bug, then I receive a NPE instead of error message:
java.lang.NullPointerException
at org.drools.agent.FileScanner.readPackage(FileScanner.java:102)
at org.drools.agent.FileScanner.getChangeSet(FileScanner.java:79)
at org.drools.agent.FileScanner.loadPackageChanges(FileScanner.java:57)
at org.drools.agent.DirectoryScanner.loadPackageChanges(DirectoryScanner.java:43)
at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:330)
at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:298)
at org.drools.agent.RuleAgent.configure(RuleAgent.java:284)
at org.drools.agent.RuleAgent.init(RuleAgent.java:208)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:176)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:164)
... (further entries of stack trace contains my application's lines)
When I looked into code I found that DirectoryScanner object, used by the agent uses FileScanner object to scan each file in a directory. And the file scanner does not have a listener set. That's why the NPE is thrown.
--
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
15 years, 2 months