[rules-users] Is there any limitation about the length of attribute's name when declare type in drl file

Davide Sottara dsotty at gmail.com
Mon Sep 30 04:13:44 EDT 2013


"Declares" are compiled into java classes, so the only limitations would
be posed by the JVM.
I tried to run your snippet, but it works fine (you should still follow
conventions and use upper case
names for the declared types).
The CCE you get, moreover, seems to point to a different issue.
Could you post a full reproducer, together with details on your
environment - Drools version, JVM, OS, etc...
Thanks
Davide

On 09/30/2013 12:13 AM, richie wrote:
> Hi all, Is there any limitation about the length of attribute's name
> when declare type in drl file?
>
> I encountered a problem these days, I declared a new type in rule
> file, when fire rules, it always throw *java.lang.ClassCaseException:
> test.obj cannot be cast to test.obj*. As I inspected, this is caused
> by the length of an attribute's name is too long, it's 35 characters,
> if I remove this attribute, there's no exception.
>
> Following is snippet of my rule file:
> |
> package test
>
> declare obj
> @propertyReactive
> type : String
> name : String
> attribute_name_too_long_reach_limitation: Boolean
> end
>
> rule "a"
> dialect "mvel"
> salience 0
> no-loop
> when
> $obj:obj(type == "a")
> then
> modify ($obj) {name = "abc"};
> end
> |
>
> ------------------------------------------------------------------------
> View this message in context: Is there any limitation about the length
> of attribute's name when declare type in drl file
> <http://drools.46999.n3.nabble.com/Is-there-any-limitation-about-the-length-of-attribute-s-name-when-declare-type-in-drl-file-tp4026171.html>
> Sent from the Drools: User forum mailing list archive
> <http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html> at
> Nabble.com.
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130930/87336425/attachment.html 


More information about the rules-users mailing list