Other thing that may be useful is that before loading the generated
class I've tried this:
ClassFieldInspector cfi = new ClassFieldInspector(c);
and a "Class not found" is thrown.
I 've also tried the approach based on changing the compiler to JANINO,
but I got the same errors.
Beto
Beto Siless wrote:
Hi Edson, I ve read your wonderful article at
http://markproctor.blogspot.com/2006/12/dynamically-generated-class-beans-as.html,
thats exactly what I was trying to do, so I followed the steps of the
article and everything seems to be ok. But when I'm compilig the drl I
get the error message: "Unable the create Field Extractor for". I've
looked deeply and I found that the underlying error was "IOException:
Class not found". I've also checked that the classloader in the type
resolver of the package builder had the dynamic lass loaded (don't know
if this is important).
Then I've checked out the code sample from
http://anonsvn.labs.jboss.com/labs/jbossrules/contrib/dynamic/, But when
I ran it, I had the same error an the same point:
Unable to create Field Extractor for 'totalAmount'
Unable to create Field Extractor for 'customer'
Unable to create Field Extractor for 'totalAmount'
Rule Compilation error The import com.sample.Order cannot be resolved
The import com.sample.LineItem cannot be resolved com.sample.Order
cannot be resolved to a type
Rule Compilation error The import com.sample.Order cannot be resolved
The import com.sample.LineItem cannot be resolved com.sample.Order
cannot be resolved to a type com.sample.LineItem cannot be resolved to a
type
Rule Compilation error The import com.sample.Order cannot be resolved
The import com.sample.LineItem cannot be resolved com.sample.Order
cannot be resolved to a type
Rule Compilation error The import com.sample.Order cannot be resolved
The import com.sample.LineItem cannot be resolved com.sample.Order
cannot be resolved to a type
at org.drools.rule.Package.checkValidity(Unknown Source)
at org.drools.common.AbstractRuleBase.addPackage(Unknown Source)
at com.sample.DroolsTest.readRule(DroolsTest.java:158)
at com.sample.DroolsTest.main(DroolsTest.java:67)
What do you think it can be?
Thanks in advance
Beto
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email