[jboss-jira] [JBoss JIRA] (DROOLS-538) Unable to resolve class error , drools 5.5 in concurrent execution. JSR94Support and Spring

Maruthi Shanmugam (JIRA) issues at jboss.org
Thu Jul 3 13:22:24 EDT 2014


    [ https://issues.jboss.org/browse/DROOLS-538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982122#comment-12982122 ] 

Maruthi Shanmugam commented on DROOLS-538:
------------------------------------------

I guess there are lot of classes which are not thread safe. 

org.drools.util.CompositeClassLoader , do you have any specific recommendation because we cannot use synchronized due to high volume application. 

    public Class< ? > loadClass(final String name,
                                final boolean resolve) throws ClassNotFoundException {
        Class cls = loader.get().load( this,
                                       name,
                                       resolve );
        if ( cls == null ) {
            throw new ClassNotFoundException( "Unable to load class: " + name );
        }
        
        return cls;
    }

> Unable to resolve class error , drools 5.5 in concurrent execution. JSR94Support and Spring 
> --------------------------------------------------------------------------------------------
>
>                 Key: DROOLS-538
>                 URL: https://issues.jboss.org/browse/DROOLS-538
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.5.0.Final
>         Environment: Linux Red Hat , Enterprise, JDK 1.6, Drools 5.5.Final 
>            Reporter: Maruthi Shanmugam
>            Assignee: Mark Proctor
>            Priority: Blocker
>
> We use Drools 5.5 and drool implementation is done through Spring JSR94Support API>
> The Rule engine is called in concurrent mode,
> i.e , JSR94Support.executeStateless(name,list) is executed through multiple threads.
> And when the rules are executed  we randomly get the following exception
> org.drools.RuntimeDroolsException: Unable to resolve class 'someclass(this is sample)here actual class is printed>'
>         at org.drools.base.ClassFieldAccessorCache.getClass(ClassFieldAccessorCache.java:126)
>         at org.drools.base.ClassFieldAccessorCache.getClassObjectType(ClassFieldAccessorCache.java:48)
>         at org.drools.reteoo.ClassObjectTypeConf.<init>(ClassObjectTypeConf.java:83)
>         at org.drools.common.ObjectTypeConfigurationRegistry.getObjectTypeConf(ObjectTypeConfigurationRegistry.java:71)
>         at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:159)
>         at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903)
>         at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
>         at org.drools.reteoo.ReteooStatelessSession.executeWithResults(ReteooStatelessSession.java:273)
> The rules are registered every 15 minutes through RuleAdministrator.registerRuleExecutionset ,
> so whenever we refresh the rules and the subsequent thread even after the registration is completed, fails with the above message. This happens only when the rules are invoked concurrently. 



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jboss-jira mailing list