Bug 779537 (SOA-1914) - org.drools.RuntimeDroolsException: unable to determine ValueType for Class [class MyClass] on IBM JVM with JIT enabled
Summary: org.drools.RuntimeDroolsException: unable to determine ValueType for Class [c...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-1914
Deadline: 2010-03-08
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: JBoss Rules
Version: 4.3 GA,4.2 CP03,4.3 CP01,4.2 CP04,4.3 CP02
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.3 CP04 ER1
Assignee: Tihomir Surdilovic
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-02 21:31 UTC by Tihomir Surdilovic
Modified: 2010-03-24 12:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-24 12:21:33 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-1914 0 None None None Never

Description Tihomir Surdilovic 2010-02-02 21:31:32 UTC
Date of First Response: 2010-02-04 05:07:57
Help Desk Ticket Reference: https://enterprise.redhat.com/issue-tracker/442503
project_key: SOA

On IBM JVM with JIT enabled using Drools 4.0.7 often the following exception occurs:

org.drools.RuntimeDroolsException: unable to determine ValueType for Class [class MyClass]
       at org.drools.base.ValueType.determineValueType(ValueType.java:222)
       at org.drools.base.ClassObjectType.<init>(ClassObjectType.java:56)
       at org.drools.reteoo.Rete$ClassObjectTypeConf.<init>(Rete.java:442)
       at org.drools.reteoo.Rete.assertObject(Rete.java:152)
...

We have determined that in the IBM JVN with JIT enabled, the expression "XXXX instanceof Object" fails sometimes. On the other hand expression "XXXX isAssignableFrom(YYYYYY) ... " works as expected. The code change required here is in org.drools.base.ValueType change:

...
} else if ( clazz instanceof Object ) {
return ValueType.OBJECT_TYPE;
...

to

...
else if ( Object.class.isAssignableFrom( clazz ) ) {
          return ValueType.OBJECT_TYPE;
...

Comment 1 Tihomir Surdilovic 2010-02-02 21:37:42 UTC
Link: Added: This issue depends JBRULES-2421


Comment 2 Darran Lofthouse 2010-02-04 10:07:57 UTC
Re-opening as we still need to track the component upgrade stage of Drools so that the fix is incorporated in the release.


Comment 3 Anne-Louise Tangring 2010-02-25 16:12:11 UTC
Approved but not required for SOA 4.3 CP03. If it is not resolved by Due Date, it will be moved out.

Comment 4 trev 2010-03-05 16:31:40 UTC
  fix confirmed in http://anonsvn.jboss.org/repos/labs/labs/jbossrules/soa_branches/SOA_JDK6/drools-core/src/main/java/org/drools/base/ValueType.java, will create tag and include in this release

Comment 5 David Le Sage 2010-03-15 00:20:22 UTC
Draft text for the Resolved Issues section of the Release Notes:


https://jira.jboss.org/jira/browse/JBRULES-2421

    If the user was running JBoss Rules 4.0.7 on an IBM virtual machine with JIT enabled, an
    org.drools.RuntimeDroolsException: unable to determine ValueType for
    Class exception would occur.. This was because of a problem with regard to the way in which
    XXXX instanceof Object expressions were handled.

    The code in the org.drools.base.ValueType class which handles these expressions has
    been modified. As a result, JBoss Rules can now be run on IBM virtual machines with JIT enabled,
    without it causing exceptions.


Comment 6 Martin Vecera 2010-03-24 12:21:33 UTC
Verified 4.3.CP03 ER1


Note You need to log in before you can comment on or make changes to this bug.