Error importing classes from external jar in BRMS or BPMS 6.0.0

Solution Verified - Updated -


  • Having created a rule project in BRMS or BPMS 6.0.0 which uses an external jar as dependent library and importing classes from that jar in rule authoring and JUnit test cases causes the error shown below.
package com.sample;
import org.kie.api.KieServices;
import org.kie.api.runtime.KieContainer;
import org.kie.api.runtime.KieSession;
import com.sample.redhat.Foo;
 .. . 

It fails with exception:

Error at line# 5: Only a type can be imported. com.sample.redhat.Foo resolves to a package

How to fix this issue ?


  • Red Hat JBoss BRMS (BRMS)
    • 6.0.0
  • Red Hat JBoss BPM Suite (BPMS)
    • 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

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content