drools-legacy

Functions in java semantics drl files cannot be found

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.5
  • Fix Version/s: None
  • Component/s: semantics.java
  • Labels:
    None
  • Environment:
    Red Hat Linux, JBoss 4.0.3, jdk1.4.2_09
  • Number of attachments :
    0

Description

In Drools 2.1 I had some .drl files with <java:functions></java:functions> in them. These functions were working fine. When I switched to 2.5 I now get errors stating that those functions cannot be found. I saw an old bug from 2.0 relating to the serialization of rules losing functions. Is this bug back.

Note: I am using the JNDI to point to the rulebases which does serialize them.

Activity

Hide
Geoffrey Wiseman added a comment -

I've seen a couple postings for 2.5 where these needed to be static; might want to check if that's the problem.

Show
Geoffrey Wiseman added a comment - I've seen a couple postings for 2.5 where these needed to be static; might want to check if that's the problem.
Hide
Michael Neale added a comment -

yes need to be static, and should be serializable if you are loading the rule base the normal way.

Most app servers do serialize the first time you bind to JNDI.

Show
Michael Neale added a comment - yes need to be static, and should be serializable if you are loading the rule base the normal way. Most app servers do serialize the first time you bind to JNDI.
Hide
Bruce Haugland added a comment -

The functions are marked public static. I am not sure what you mean by the function must be serializable.

Show
Bruce Haugland added a comment - The functions are marked public static. I am not sure what you mean by the function must be serializable.
Hide
Michael Neale added a comment -

Can you do a integration test that tries the rulebase without serializing it? (ie just directly invokes it)?

Show
Michael Neale added a comment - Can you do a integration test that tries the rulebase without serializing it? (ie just directly invokes it)?

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: