<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">"Declares" are compiled into java
classes, so the only limitations would be posed by the JVM.<br>
I tried to run your snippet, but it works fine (you should still
follow conventions and use upper case<br>
names for the declared types). <br>
The CCE you get, moreover, seems to point to a different issue.<br>
Could you post a full reproducer, together with details on your
environment - Drools version, JVM, OS, etc...<br>
Thanks <br>
Davide<br>
<br>
On 09/30/2013 12:13 AM, richie wrote:<br>
</div>
<blockquote cite="mid:1380525217579-4026171.post@n3.nabble.com"
type="cite">Hi all,
Is there any limitation about the length of attribute's name when
declare type in drl file? <br>
<br>
I encountered a problem these days, I declared a new type in rule
file, when fire rules, it always throw <strong>java.lang.ClassCaseException:
test.obj cannot be cast to test.obj</strong>. 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.
<br>
<br>
Following is snippet of my rule file:
<br>
<pre><code>
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
</code>
</pre>
<br>
<hr align="left" width="300">
View this message in context: <a moz-do-not-send="true"
href="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">Is
there any limitation about the length of attribute's name when
declare type in drl file</a><br>
Sent from the <a moz-do-not-send="true"
href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html">Drools:
User forum mailing list archive</a> at Nabble.com.<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
</blockquote>
<br>
</body>
</html>