[JBoss JIRA] (DROOLS-37) Operators on java.lang.Comparable object doesn't work if JIT is enable
by stevearoonie (JIRA)
[ https://issues.jboss.org/browse/DROOLS-37?page=com.atlassian.jira.plugin.... ]
stevearoonie commented on DROOLS-37:
------------------------------------
I've been trying but have yet to reproduce this error in a development environment.
> Operators on java.lang.Comparable object doesn't work if JIT is enable
> ----------------------------------------------------------------------
>
> Key: DROOLS-37
> URL: https://issues.jboss.org/browse/DROOLS-37
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Environment: Windows XP
> Java 1.5
> joda-time 1.6.2
> Reporter: Jérémy SOULA
> Assignee: Mario Fusco
> Labels: 5.5, comparable, localDate
> Fix For: 5.5.1.Final, 6.0.0.Alpha9
>
> Attachments: drools-bugs.zip
>
>
> In my application, i have rules that used org.joda.time.LocalDate to compare date like
> {noformat}
> rule "toto"
> when
> LocalDateForDroolsTestBean(
> infDate>=supDate
> )
> then
> //Anything
> end
> {noformat}
> With Drools 5.3, all works fine.
> With Drools 5.5, an exception occured because JIT optimizer automaticaly enabled:
> {noformat}
> Exception in thread "main" java.lang.NoSuchMethodError: org.joda.time.LocalDate.compareTo(Lorg/joda/time/LocalDate;)I
> at ConditionEvaluatorf8ba8fa3003345adbf3979e901488f23.evaluate(Unknown Source)
> at org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:200)
> at org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:157)
> at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:137)
> at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
> at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
> at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
> at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
> at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
> at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
> at org.drools.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:304)
> at fr.jsoula.jboss.drools.bugs.comparable.ComparableBug.main(ComparableBug.java:39)
> {noformat}
> After search, it seems that the bytecode generated by org.drools.rule.builder.dialect.asm.ClassGenerator can't call the method public int compareTo(Object partial) of org.joda.time.LocalDate. The parameter of the method must be the same class of the current object.
--
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
10 years, 10 months
[JBoss JIRA] (DROOLS-366) ArrayIndexOutOfBoundsException when loading drools spring on tomcat eclipse
by prabuddha roy (JIRA)
[ https://issues.jboss.org/browse/DROOLS-366?page=com.atlassian.jira.plugin... ]
prabuddha roy updated DROOLS-366:
---------------------------------
Description:
Have a decision table rule which works fine with test cases under Drools-spring 5.4.0.Final or 5.5 as well.
However while deploying the code on a Tomcat Eclipse its fails to initialize the kbase bean
with the following stack trace.
{code}
java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeTypeParameters(Parser.java:7823)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6431)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9339)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9571)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9528)
at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8126)
at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:712)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:377)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:422)
at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:410)
at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:103)
at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1194)
at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:947)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:936)
at org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:449)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:713)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:113)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Dec 5, 2013 7:34:46 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kbase': Invocation of init method failed; nested exception is java.lang.
ArrayIndexOutOfBoundsException: -1
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeTypeParameters(Parser.java:7823)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6431)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9339)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9571)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9528)
at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8126)
at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:712)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:377)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:422)
at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:410)
at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:103)
at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1194)
at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:947)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:936)
at org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:449)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:713)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:113)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 27 more
{code}
Bean config xml -
{code}
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:drools-spring="http://drools.org/schema/drools-spring"
xsi:schemaLocation="http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<drools-spring:kbase id="kbase">
<drools-spring:resources>
<drools-spring:resource type="DTABLE" source="classpath:DummyRules.xls" >
<drools-spring:decisiontable-conf input-type="XLS" worksheet-name="Tables"/>
</drools-spring:resource>
</drools-spring:resources>
</drools-spring:kbase>
<drools-spring:ksession id="ksession" type="stateless" kbase="kbase" />
<bean id="connectPrivacyRule" class="foo.RulesEngine">
<property name="ksession" ref="ksession" />
<property name="kbase" ref="kbase" />
</bean>
</beans>
{code}
was:
Have a decision table rule which works fine with test cases under Drools-spring 5.4.0.Final or 5.5 as well.
However while deploying the code on a Tomcat Eclipse its fails to initialize the kbase bean
with the following stack trace.
{code}
java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeTypeParameters(Parser.java:7823)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6431)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9339)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9571)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9528)
at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8126)
at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:712)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:377)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:422)
at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:410)
at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:103)
at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1194)
at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:947)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:936)
at org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:449)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:713)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:113)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Dec 5, 2013 7:34:46 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kbase': Invocation of init method failed; nested exception is java.lang.
ArrayIndexOutOfBoundsException: -1
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeTypeParameters(Parser.java:7823)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6431)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9339)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9571)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9528)
at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8126)
at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:712)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:377)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:422)
at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:410)
at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:103)
at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1194)
at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:947)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:936)
at org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:449)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:713)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:113)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 27 more
{code}
> ArrayIndexOutOfBoundsException when loading drools spring on tomcat eclipse
> ---------------------------------------------------------------------------
>
> Key: DROOLS-366
> URL: https://issues.jboss.org/browse/DROOLS-366
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Environment: Windows 7
> Reporter: prabuddha roy
> Assignee: Mario Fusco
> Fix For: 5.5.1.Final, 6.0.0.CR1
>
>
> Have a decision table rule which works fine with test cases under Drools-spring 5.4.0.Final or 5.5 as well.
> However while deploying the code on a Tomcat Eclipse its fails to initialize the kbase bean
> with the following stack trace.
> {code}
> java.lang.ArrayIndexOutOfBoundsException: -1
> at org.eclipse.jdt.internal.compiler.parser.Parser.consumeTypeParameters(Parser.java:7823)
> at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6431)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9339)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9571)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9528)
> at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8126)
> at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:712)
> at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:377)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:422)
> at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
> at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
> at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:410)
> at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
> at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:103)
> at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1194)
> at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:947)
> at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:936)
> at org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:449)
> at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:713)
> at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
> at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:113)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
> at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)
> at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
> at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
> at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
> at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
> at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
> at org.apache.catalina.core.StandardService.start(StandardService.java:525)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
> 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:597)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Dec 5, 2013 7:34:46 PM org.apache.catalina.core.StandardContext listenerStart
> SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kbase': Invocation of init method failed; nested exception is java.lang.
> ArrayIndexOutOfBoundsException: -1
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
> at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)
> at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
> at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
> at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
> at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
> at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
> at org.apache.catalina.core.StandardService.start(StandardService.java:525)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
> 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:597)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
> at org.eclipse.jdt.internal.compiler.parser.Parser.consumeTypeParameters(Parser.java:7823)
> at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6431)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9339)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9571)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9528)
> at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8126)
> at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:712)
> at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:377)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:422)
> at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
> at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
> at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:410)
> at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
> at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:103)
> at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1194)
> at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:947)
> at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:936)
> at org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:449)
> at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:713)
> at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
> at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:113)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
> ... 27 more
> {code}
> Bean config xml -
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:drools-spring="http://drools.org/schema/drools-spring"
> xsi:schemaLocation="http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring.xsd
> http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
> <drools-spring:kbase id="kbase">
> <drools-spring:resources>
> <drools-spring:resource type="DTABLE" source="classpath:DummyRules.xls" >
> <drools-spring:decisiontable-conf input-type="XLS" worksheet-name="Tables"/>
> </drools-spring:resource>
> </drools-spring:resources>
> </drools-spring:kbase>
> <drools-spring:ksession id="ksession" type="stateless" kbase="kbase" />
> <bean id="connectPrivacyRule" class="foo.RulesEngine">
> <property name="ksession" ref="ksession" />
> <property name="kbase" ref="kbase" />
> </bean>
> </beans>
> {code}
--
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
10 years, 10 months
[JBoss JIRA] (DROOLS-366) ArrayIndexOutOfBoundsException when loading drools spring on tomcat eclipse
by prabuddha roy (JIRA)
[ https://issues.jboss.org/browse/DROOLS-366?page=com.atlassian.jira.plugin... ]
prabuddha roy updated DROOLS-366:
---------------------------------
Description:
Have a decision table rule which works fine with test cases under Drools-spring 5.4.0.Final or 5.5 as well.
However while deploying the code on a Tomcat Eclipse its fails to initialize the kbase bean
with the following stack trace.
{code}
java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeTypeParameters(Parser.java:7823)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6431)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9339)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9571)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9528)
at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8126)
at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:712)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:377)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:422)
at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:410)
at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:103)
at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1194)
at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:947)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:936)
at org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:449)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:713)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:113)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Dec 5, 2013 7:34:46 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kbase': Invocation of init method failed; nested exception is java.lang.
ArrayIndexOutOfBoundsException: -1
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeTypeParameters(Parser.java:7823)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6431)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9339)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9571)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9528)
at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8126)
at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:712)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:377)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:422)
at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:410)
at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:103)
at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1194)
at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:947)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:936)
at org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:449)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:713)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:113)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 27 more
{code}
was:
The rule
{code}Message(type == "PayloadType1", payload#PayloadType1.data.leaf == "5"){code}
gives the following Stack Trace:
{code}
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3
at org.drools.lang.MVELDumper.concatDotSeparated(MVELDumper.java:264)
at org.drools.lang.MVELDumper.splitInClassAndField(MVELDumper.java:249)
at org.drools.lang.MVELDumper.processInlineCast(MVELDumper.java:188)
at org.drools.lang.MVELDumper.processImplicitConstraints(MVELDumper.java:169)
at org.drools.lang.MVELDumper.processAtomicExpression(MVELDumper.java:120)
at org.drools.lang.MVELDumper.dump(MVELDumper.java:88)
at org.drools.lang.MVELDumper.processRelationalExpression(MVELDumper.java:141)
at org.drools.lang.MVELDumper.dump(MVELDumper.java:92)
at org.drools.lang.MVELDumper.dump(MVELDumper.java:61)
at org.drools.rule.builder.PatternBuilder.buildCcdDescr(PatternBuilder.java:641)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:629)
at org.drools.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:477)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:302)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:123)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:67)
at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:84)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:2830)
at org.drools.compiler.PackageBuilder.compileRules(PackageBuilder.java:970)
at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:879)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:871)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:466)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:694)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:40)
at nested.property.NestedPropertyTest.main(NestedPropertyTest.java:53)
{code}
> ArrayIndexOutOfBoundsException when loading drools spring on tomcat eclipse
> ---------------------------------------------------------------------------
>
> Key: DROOLS-366
> URL: https://issues.jboss.org/browse/DROOLS-366
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Environment: Windows 7
> Reporter: prabuddha roy
> Assignee: Mario Fusco
> Fix For: 5.5.1.Final, 6.0.0.CR1
>
>
> Have a decision table rule which works fine with test cases under Drools-spring 5.4.0.Final or 5.5 as well.
> However while deploying the code on a Tomcat Eclipse its fails to initialize the kbase bean
> with the following stack trace.
> {code}
> java.lang.ArrayIndexOutOfBoundsException: -1
> at org.eclipse.jdt.internal.compiler.parser.Parser.consumeTypeParameters(Parser.java:7823)
> at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6431)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9339)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9571)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9528)
> at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8126)
> at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:712)
> at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:377)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:422)
> at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
> at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
> at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:410)
> at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
> at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:103)
> at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1194)
> at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:947)
> at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:936)
> at org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:449)
> at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:713)
> at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
> at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:113)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
> at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)
> at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
> at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
> at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
> at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
> at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
> at org.apache.catalina.core.StandardService.start(StandardService.java:525)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
> 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:597)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Dec 5, 2013 7:34:46 PM org.apache.catalina.core.StandardContext listenerStart
> SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kbase': Invocation of init method failed; nested exception is java.lang.
> ArrayIndexOutOfBoundsException: -1
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
> at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)
> at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
> at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
> at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
> at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
> at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
> at org.apache.catalina.core.StandardService.start(StandardService.java:525)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
> 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:597)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
> at org.eclipse.jdt.internal.compiler.parser.Parser.consumeTypeParameters(Parser.java:7823)
> at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6431)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9339)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9571)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9528)
> at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8126)
> at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:712)
> at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:377)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:422)
> at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
> at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
> at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:410)
> at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
> at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:103)
> at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1194)
> at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:947)
> at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:936)
> at org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:449)
> at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:713)
> at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
> at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:113)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
> ... 27 more
> {code}
--
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
10 years, 10 months
[JBoss JIRA] (DROOLS-366) ArrayIndexOutOfBoundsException when loading drools spring on tomcat eclipse
by prabuddha roy (JIRA)
prabuddha roy created DROOLS-366:
------------------------------------
Summary: ArrayIndexOutOfBoundsException when loading drools spring on tomcat eclipse
Key: DROOLS-366
URL: https://issues.jboss.org/browse/DROOLS-366
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.5.0.Final
Environment: Windows 7
Reporter: prabuddha roy
Assignee: Mario Fusco
Fix For: 5.5.1.Final, 6.0.0.CR1
The rule
{code}Message(type == "PayloadType1", payload#PayloadType1.data.leaf == "5"){code}
gives the following Stack Trace:
{code}
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3
at org.drools.lang.MVELDumper.concatDotSeparated(MVELDumper.java:264)
at org.drools.lang.MVELDumper.splitInClassAndField(MVELDumper.java:249)
at org.drools.lang.MVELDumper.processInlineCast(MVELDumper.java:188)
at org.drools.lang.MVELDumper.processImplicitConstraints(MVELDumper.java:169)
at org.drools.lang.MVELDumper.processAtomicExpression(MVELDumper.java:120)
at org.drools.lang.MVELDumper.dump(MVELDumper.java:88)
at org.drools.lang.MVELDumper.processRelationalExpression(MVELDumper.java:141)
at org.drools.lang.MVELDumper.dump(MVELDumper.java:92)
at org.drools.lang.MVELDumper.dump(MVELDumper.java:61)
at org.drools.rule.builder.PatternBuilder.buildCcdDescr(PatternBuilder.java:641)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:629)
at org.drools.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:477)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:302)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:123)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:67)
at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:84)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:2830)
at org.drools.compiler.PackageBuilder.compileRules(PackageBuilder.java:970)
at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:879)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:871)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:466)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:694)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:40)
at nested.property.NestedPropertyTest.main(NestedPropertyTest.java:53)
{code}
--
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
10 years, 10 months
[JBoss JIRA] (DROOLS-366) ArrayIndexOutOfBoundsException when loading drools spring on tomcat eclipse
by prabuddha roy (JIRA)
[ https://issues.jboss.org/browse/DROOLS-366?page=com.atlassian.jira.plugin... ]
prabuddha roy updated DROOLS-366:
---------------------------------
Workaround Description: (was: A workaround is to change the imports
from:
import nested.property.messages.*;
to:
import nested.property.messages.Message;
import nested.property.messages.Payload;
import nested.property.messages.PayloadType1;
but in the real world this will get messy...)
> ArrayIndexOutOfBoundsException when loading drools spring on tomcat eclipse
> ---------------------------------------------------------------------------
>
> Key: DROOLS-366
> URL: https://issues.jboss.org/browse/DROOLS-366
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Environment: Windows 7
> Reporter: prabuddha roy
> Assignee: Mario Fusco
> Fix For: 5.5.1.Final, 6.0.0.CR1
>
>
> The rule
> {code}Message(type == "PayloadType1", payload#PayloadType1.data.leaf == "5"){code}
> gives the following Stack Trace:
> {code}
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3
> at org.drools.lang.MVELDumper.concatDotSeparated(MVELDumper.java:264)
> at org.drools.lang.MVELDumper.splitInClassAndField(MVELDumper.java:249)
> at org.drools.lang.MVELDumper.processInlineCast(MVELDumper.java:188)
> at org.drools.lang.MVELDumper.processImplicitConstraints(MVELDumper.java:169)
> at org.drools.lang.MVELDumper.processAtomicExpression(MVELDumper.java:120)
> at org.drools.lang.MVELDumper.dump(MVELDumper.java:88)
> at org.drools.lang.MVELDumper.processRelationalExpression(MVELDumper.java:141)
> at org.drools.lang.MVELDumper.dump(MVELDumper.java:92)
> at org.drools.lang.MVELDumper.dump(MVELDumper.java:61)
> at org.drools.rule.builder.PatternBuilder.buildCcdDescr(PatternBuilder.java:641)
> at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:629)
> at org.drools.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:477)
> at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:302)
> at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:123)
> at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:67)
> at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:84)
> at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:2830)
> at org.drools.compiler.PackageBuilder.compileRules(PackageBuilder.java:970)
> at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:879)
> at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:871)
> at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:466)
> at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:694)
> at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
> at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:40)
> at nested.property.NestedPropertyTest.main(NestedPropertyTest.java:53)
> {code}
--
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
10 years, 10 months
[JBoss JIRA] (DROOLS-365) Rule attribute for adding inverse of consequence as rule condition
by Adar Dembo (JIRA)
Adar Dembo created DROOLS-365:
---------------------------------
Summary: Rule attribute for adding inverse of consequence as rule condition
Key: DROOLS-365
URL: https://issues.jboss.org/browse/DROOLS-365
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 5.5.0.Final
Reporter: Adar Dembo
Assignee: Mark Proctor
I have quite a few rules that look like this:
{noformat}
rule "if foo then bar"
when
Foo($a : a, $b : b)
not Bar(a == $a, b == $b)
then
insert(new Bar($a, $b));
end
{noformat}
This is a fairly common pattern for me: a rule should not activate if the facts generated by its consequence were already asserted. It's a pattern I use extensively to generate linear (i.e. non-repeating) workflows.
Ideally I'd be able to express it as follows:
{noformat}
rule "if foo then bar"
condition-on-inverse-of-consequence
when
Foo($a : a, $b : b)
then
insert(new Bar($a, $b));
end
{noformat}
And {{condition-on-inverse-of-consequence}} would cause Drools to generate the right kind of condition, which would be the inverse of the fact changes made by the consequence.
I think {{lock-on-active}} is similar but harsher: it prevents the rule from firing a second time altogether, regardless of input. At least, that's based on my reading of the docs. In my example, that would be equivalent to {{not Bar()}} condition in the rule, which is stricter than {{not Bar(a == $a, b == $b)}}.
--
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
10 years, 10 months
[JBoss JIRA] (WFLY-2427) Launcher API
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/WFLY-2427?page=com.atlassian.jira.plugin.... ]
Ondrej Zizka reassigned WFLY-2427:
----------------------------------
Assignee: Ondrej Zizka (was: Rob Stryker)
> Launcher API
> ------------
>
> Key: WFLY-2427
> URL: https://issues.jboss.org/browse/WFLY-2427
> Project: WildFly
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Server
> Reporter: Brian Stansberry
> Assignee: Ondrej Zizka
>
> 1) The AS should have some sort of API for launching our processes so tools that want a process have a clear contract instead of having to guess at what's relevant in our ever-changing scripts.
> 2) We want the main class in our process launch to be what's invoked by java -jar jboss-modules.jar. We don't want java -jar jboss-as-launcher.jar which does some stuff and then calls org.jboss.modules.Main.
> 3) JBoss Modules itself shouldn't have a lot of the stuff in it that's relevant to an AS launcher API, because many of those things are not relevant to JBoss Modules in a generic sense.
> What we could do though is provide a launcher lib that isn't involved at all in our normal boot. Something that would only be used by tools that want to launch a separate, i.e. non-embedded, AS process.
> So, some sort of stable configuration API and then a simple
> java.lang.Process launch()
> Basically, a utility that does the ProcessBuilder stuff that everybody is doing themselves now.
> h2. HOWEVER...
> Eclipse-based tools like JBDS use Eclipse APIs for launch and would not use the above launch() method.
> So, besides that launch method, look into adding some methods to give the necessary inputs to the Eclipse API be useful. So Eclipse-based tools don't ask it for the process but can still get a standard launch configuration.
> I'd only want to do that if those methods would return something generally understandable, but a String or List<String> for classpath, List<String>s for vm/program args, some representation that "-jar jboss-modules.jar" is the way to get the main class -- those all seem generic enough.
> Any "which VM" stuff is consider out of scope; choosing the VM is the responsibility of the tool. Options that are not universally supported across VMs and are those a function of VM choice, like whether to use -server, are also out of scope.
> h2. Example of EAP 6.0 launch:
> VM arguments:
> -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true "-Dorg.jboss.boot.log.file=/Users/max/products/runtimes/jboss-eap-6.0/standalone/log/boot.log" "-Dlogging.configuration=file:/Users/max/products/runtimes/jboss-eap-6.0/standalone/configuration/logging.properties" "-Djboss.home.dir=/Users/max/products/runtimes/jboss-eap-6.0"
> Program argument:
> -mp "/Users/max/products/runtimes/jboss-eap-6.0/modules" -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -b localhost --server-config=standalone.xml
--
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
10 years, 10 months