I think this answers your question: https://issues.jboss.org/browse/JBRULES-3621

You could try 5.5.0.Beta1 which includes the fix.

On 2 October 2012 10:56, Phani Saripalli <saripalli.phani@gmail.com> wrote:
Hi.
I am using declared types in .drl rule rule. When I kept the number of
fields in a declared type low, drools works fine. When I am increasing the
number of fields in a declared type to 300 or even more, drools raising an
exception.
Particularly, it is giving this.


ava.lang.ClassFormatError: Too many arguments in method signature in class
file com/sample/Project
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at
org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615)
        at
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254)
        at
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
        at
org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at
org.drools.base.ClassTypeResolver.resolveType(ClassTypeResolver.java:155)
        at
org.drools.compiler.PackageBuilder.processTypeDeclarations(PackageBuilder.java:2049)
        at
org.drools.compiler.PackageBuilder.mergePackage(PackageBuilder.java:1218)
        at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:829)
        at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:467)
        at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:673)
        at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:45)
        at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:34)
        at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:67)
        at com.sample.DroolsTest.main(DroolsTest.java:24)


I suspect, it is something to do with creating class, constructor with so
many arguments at run time. I am looking for a solution, something like
declared types, or a workaround. The purpose for which I am using Drools
limits to use the traditional Java classes, or defining a Java class.
Also, is there any way, to perform calculations, or value propagations.
That, Drools could assume some value to a variable given a certain
constraint on it.

For example, x > 6 && x < 9, Drools could assume x as 7 or 8 and fire rules?

Thank you.
Phani



--
View this message in context: http://drools.46999.n3.nabble.com/Declared-Types-with-large-number-of-fields-tp4020076.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users