[jboss-jira] [JBoss JIRA] (JBRULES-3670) ClassNotFound on class declared in drl file

Willem van Asperen (JIRA) jira-events at lists.jboss.org
Thu Oct 25 15:05:01 EDT 2012


Willem van Asperen created JBRULES-3670:
-------------------------------------------

             Summary: ClassNotFound on class declared in drl file
                 Key: JBRULES-3670
                 URL: https://issues.jboss.org/browse/JBRULES-3670
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-core  (expert)
    Affects Versions: 5.5.0.CR1
         Environment: linux
            Reporter: Willem van Asperen
            Assignee: Mark Proctor


I compile a .drl file and save it as object in .drl.compiled file.
Loading that file does not work if I use insert() or retract() facts that are of a type declared in the .drl file.
The way to circumvent this is to use the full class name in the insert, like this:

insert(new vcm.planner.lock.standard.PossibleSlotLock($ship, $chamber,
$side, $schedule, $eta, $schedule.getTick(), "existing"));

And cast the variable to the full class name, like this:

rule "clean up possible slot lock, when no longer to schedule"
     when
         $p : PossibleSlotLock( $ship; )
         not ToScheduleLock( mover == $ship )
     then
         retract( (vcm.planner.lock.standard.PossibleSlotLock)$p );
end

This did work in 5.4.0.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


More information about the jboss-jira mailing list