[JBoss JIRA] (JBRULES-3675) java.lang.LinkageError, but only sometimes (multithreading issue)
by kenneth westelinck (JIRA)
kenneth westelinck created JBRULES-3675:
-------------------------------------------
Summary: java.lang.LinkageError, but only sometimes (multithreading issue)
Key: JBRULES-3675
URL: https://issues.jboss.org/browse/JBRULES-3675
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.4.0.Final
Environment: - JBoss 7.1.1
- drools 5.4.0.Final
- jdk 1.6u30
- Windows 7 64 bit
Reporter: kenneth westelinck
Assignee: Mark Proctor
See mail on mailinglist:
{noformat}
We have an application (A) deployed on JBoss 7.1.1 accepting commands (CQRS,
but only C and Q :) ). A console application (B) is sending a large volume
of commands to create entities in A. Entities in A are validated by Drools
(plain drl files, configured in spring using drools-spring). Most of the
time this works just fine. But sometimes, we get the following exception:
java.lang.LinkageError: loader (instance of
org/drools/rule/JavaDialectRuntimeData$PackageClassLoader): attempted
duplicate class definition for name:
"a/b/c/Rule_person_unique___name_656ee3db19d34e689d95e2d6b2be67b6"
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_30]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_30]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_30]
at org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615) [drools-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254) [knowledge-api-5.4.0.Final.jar:5.4.0.Final]
at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237) [knowledge-api-5.4.0.Final.jar:5.4.0.Final]
at org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88) [knowledge-api-5.4.0.Final.jar:5.4.0.Final]
at java.lang.ClassLoader.loadClass(ClassLoader.java:295) [rt.jar:1.6.0_30]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) [rt.jar:1.6.0_30]
at a.b.c.Rule_person___unique___name_656ee3db19d34e689d95e2d6b2be67b6Eval0InvokerGenerated.evaluate(Unknown Source)
at a.b.c.Rule_person___unique___name_656ee3db19d34e689d95e2d6b2be67b6Eval0Invoker.evaluate(Unknown Source)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114) [drools-core-5.4.0.Final.jar:5.4.0.Final]
Any idea where this is coming from or what's causing this.
{noformat}
And the answer:
{noformat}
I have never experienced this myself, but after having a quick look at the code I believe this could be a multi-threading problem. In the abstract class java.lang.ClassLoader the method loadClass(String, boolean) is synchronized, but both org.drools.util.CompositeClassLoader and org.drools.rule.JavaDialectRuntimeData$PackageClassLoader override this method without the use of "synchronized".
I would suggest you create a JIRA issue for this.
{noformat}
--
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
[JBoss JIRA] (JBRULES-3646) Add tooltip on condition in ruleflow to show the code of it
by Jérémie Lagarde (JIRA)
Jérémie Lagarde created JBRULES-3646:
----------------------------------------
Summary: Add tooltip on condition in ruleflow to show the code of it
Key: JBRULES-3646
URL: https://issues.jboss.org/browse/JBRULES-3646
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-eclipse
Reporter: Jérémie Lagarde
Assignee: Mark Proctor
To know the condition code you must open the "constraints" property and then open the constraint itself.
It would be interesting to have a tooltip to see it directly by passing the cursor over the condition.
--
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
[JBoss JIRA] (JBRULES-3671) NPE in SlidingLengthWindow.assertFact when some event in window expired
by Marek Winkler (JIRA)
Marek Winkler created JBRULES-3671:
--------------------------------------
Summary: NPE in SlidingLengthWindow.assertFact when some event in window expired
Key: JBRULES-3671
URL: https://issues.jboss.org/browse/JBRULES-3671
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (fusion)
Affects Versions: 5.5.0.Beta1, 5.4.0.Final
Reporter: Marek Winkler
Assignee: Mark Proctor
Consider the following DRL (taken from the CepEspTest integration test, the only modification is commenting out the {{@expires}} declaration):
{code:title=test_CEP_collectWithWindows.drl}
package org.drools;
import java.util.List
global List timeResults;
global List lengthResults;
declare OrderEvent
@role( event )
//@expires( 2m )
end
rule "collect with time window"
when
$list : List( empty == false ) from collect(
$o : OrderEvent() over window:time(30s) )
then
timeResults.add( $list.size() );
end
rule "collect with length window"
when
$list : List( empty == false ) from collect(
$o : OrderEvent() over window:length(3) )
then
lengthResults.add( $list.size() );
end
{code}
When you insert more than 3 events and advance pseudo clock time such that an event in the length window expires, a NPE at {{org.drools.rule.SlidingLengthWindow.assertFact(SlidingLengthWindow.java:115)}} is thrown. See the attachment for complete stack trace.
The original test with the {{@expires}} declaration uncommented passes.
The problem seems not to be present in Drools 5.3.3.Final.
--
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
[JBoss JIRA] (JBRULES-3673) Fact metadata declared in a POJO are lost when declaring fact metadata in DRL
by Mario Fusco (JIRA)
Mario Fusco created JBRULES-3673:
------------------------------------
Summary: Fact metadata declared in a POJO are lost when declaring fact metadata in DRL
Key: JBRULES-3673
URL: https://issues.jboss.org/browse/JBRULES-3673
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Mario Fusco
Assignee: Mario Fusco
Assume a POJO is used as a fact and annotated with @Position as follows:
public class PositionAnnotatedEvent {
@Position(1)
private String arg1;
@Position(0)
private String arg0;
// getters and setters
}
When I add some metadata to this class in DRL, for example:
declare org.jboss.qa.brms.bre.regression.POJOAnnotationMergeTest.PositionAnnotatedEvent
@role(event)
end
Then the following rule using positional arguments does not compile, producing an IndexOutOfBoundsException with message 'Error trying to access field at position 0'. The same rule with named arguments compiles:
rule 'sample rule'
when
org.jboss.qa.brms.bre.regression.POJOAnnotationMergeTest.PositionAnnotatedEvent( 'value1', 'value2'; )
then
end
The relevant stack trace follows:
java.lang.IndexOutOfBoundsException: Error trying to access field at position 0
at org.drools.factmodel.ClassDefinition.getField(ClassDefinition.java:162)
at org.drools.rule.builder.PatternBuilder.processPositional(PatternBuilder.java:432)
at org.drools.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:392)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:310)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:131)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:65)
at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:80)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:2578)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:970)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:456)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:643)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:41)
--
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
[JBoss JIRA] (AS7-5770) EJB2 entity bean creation exceptions are wrapped with InvocationTargetException
by Lucas Galfaso (JIRA)
Lucas Galfaso created AS7-5770:
----------------------------------
Summary: EJB2 entity bean creation exceptions are wrapped with InvocationTargetException
Key: AS7-5770
URL: https://issues.jboss.org/browse/AS7-5770
Project: Application Server 7
Issue Type: Feature Request
Components: EJB
Affects Versions: 7.1.1.Final
Environment: Mac OSX, Java 7
Reporter: Lucas Galfaso
Assignee: jaikiran pai
When ejbCreate throws an exception, the exception is wrapped in InvocationTargetException. The root cause looks like it is at
CmpEntityBeanEjbCreateMethodInterceptorFactory::invokeEjbCreate
and the line
ejbCreate.invoke(instance.getInstance(), params);
this class overrided this method from EntityBeanEjbCreateMethodInterceptorFactory that does handle this case, so it might be possible to just replace this line with
super.invokeEjbCreate(context, ejbCreate, instance, params)ejbCreate.invoke(instance.getInstance(), params);
--
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