How to fix Error trying to access field at position 0 based exception caused in Spreadsheet based rule?

Solution Verified - Updated -

Issue

  • While executing a Spreadsheet (i.e. XLS file) based rule from the application code it throws the following error. How to fix it?
16:45:40,618 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/TestSpreadSheetRule].[welcomeServlet]] (http-localhost/127.0.0.1:8080-1) JBWEB000236: Servlet.service() for servlet welcomeServlet threw exception: java.lang.IndexOutOfBoundsException: Error trying to access field at position 0
    at org.drools.core.factmodel.ClassDefinition.getField(ClassDefinition.java:185) [drools-core-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.rule.builder.PatternBuilder.processPositional(PatternBuilder.java:605) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:514) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:325) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:136) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:67) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.rule.builder.RuleBuilder.build(RuleBuilder.java:90) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.compiler.PackageBuilder.addRule(PackageBuilder.java:3326) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.compiler.PackageBuilder.compileRules(PackageBuilder.java:1076) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:965) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.compiler.PackageBuilder.addPackage(PackageBuilder.java:956) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:461) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:734) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:40) [drools-compiler-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.jbpm.runtime.manager.impl.SimpleRuntimeEnvironment.addAsset(SimpleRuntimeEnvironment.java:104) [jbpm-runtime-manager-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder.addAsset(RuntimeEnvironmentBuilder.java:273) [jbpm-runtime-manager-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    at org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder.addAsset(RuntimeEnvironmentBuilder.java:56) [jbpm-runtime-manager-6.0.0-redhat-6.jar:6.0.0-redhat-6]
    ...

Environment

  • Red Hat JBoss BPM Suite (BPMS)
    • 6.0.0
  • Red Hat JBoss BRMS (BRMS)
    • 6.0.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In