[JBoss JIRA] (WFLY-3576) persistent-sessions fail: NotSerializableException
by Chris Ritchie (JIRA)
Chris Ritchie created WFLY-3576:
-----------------------------------
Summary: persistent-sessions fail: NotSerializableException
Key: WFLY-3576
URL: https://issues.jboss.org/browse/WFLY-3576
Project: WildFly
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Web (Undertow)
Affects Versions: 8.1.0.Final
Environment: Linux Mint 13 (based on Ubuntu 12.04), Java 1.7.0_21
Reporter: Chris Ritchie
Assignee: Stuart Douglas
When WildFly is configured to persist sessions during restart/redeploy, upon application undeployment, a NotSerializableException is thrown:
15:59:19,459 WARN [io.undertow.servlet] (MSC service thread 1-10) UT015010: Failed to persist sessions: java.io.NotSerializableException: org.wildfly.extension.undertow.AbstractPersistentSessionManager$SessionEntry
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:894)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:683)
at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)
at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:115)
at org.wildfly.extension.undertow.DiskBasedModularPersistentSessionManager.persistSerializedSessions(DiskBasedModularPersistentSessionManager.java:72)
at org.wildfly.extension.undertow.AbstractPersistentSessionManager.persistSessions(AbstractPersistentSessionManager.java:63)
at io.undertow.servlet.handlers.SessionRestoringHandler.stop(SessionRestoringHandler.java:90) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.core.DeploymentManagerImpl.stop(DeploymentManagerImpl.java:512) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.stopContext(UndertowDeploymentService.java:113)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.stop(UndertowDeploymentService.java:100)
at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:2056)
at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:2017)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
Caused by: an exception which occurred:
in object java.util.HashMap@b0096a85
The application I deployed does not do anything fancy with the session. I do not add anything to the session. It is merely a simple web page with an EJB backend.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
9 years, 11 months
[JBoss JIRA] (DROOLS-538) Unable to resolve class error , drools 5.5 in concurrent execution. JSR94Support and Spring
by Maruthi Shanmugam (JIRA)
[ https://issues.jboss.org/browse/DROOLS-538?page=com.atlassian.jira.plugin... ]
Maruthi Shanmugam commented on DROOLS-538:
------------------------------------------
Hi David,
Mean while , would you be also able to tell is there anyother piece of code which might be not be thread safe and multithreaded friendly.
Thanks
> 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)
9 years, 11 months
[JBoss JIRA] (DROOLS-538) Unable to resolve class error , drools 5.5 in concurrent execution. JSR94Support and Spring
by Maruthi Shanmugam (JIRA)
[ https://issues.jboss.org/browse/DROOLS-538?page=com.atlassian.jira.plugin... ]
Maruthi Shanmugam commented on DROOLS-538:
------------------------------------------
Hi Davide ,
Instead of using the shared classloader , if I get the classloader from the current thread, its solving the issue, because there is no concurrent access of same class from class loader during this case..
Pasted the change for your reference.
public Class getClass(String className) {
try {
return Thread.currentThread().getContextClassLoader().loadClass(className);
} catch (ClassNotFoundException e) {
System.out.println("Exception is thrown from the Custom Class" + e.getMessage());
throw new RuntimeDroolsException("Unable to resolve class '" + className + "'",e);
}
}
> 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)
9 years, 11 months
[JBoss JIRA] (DROOLS-538) Unable to resolve class error , drools 5.5 in concurrent execution. JSR94Support and Spring
by Davide Sottara (JIRA)
[ https://issues.jboss.org/browse/DROOLS-538?page=com.atlassian.jira.plugin... ]
Davide Sottara edited comment on DROOLS-538 at 7/2/14 6:45 PM:
---------------------------------------------------------------
Clone the Git repository on your dev machine
{code}
git clone https://github.com/droolsjbpm/drools.git
{code}
then switch to the 5.6 branch
{code}
git checkout 5.6.x
{code}
You can then use "mvn install" from the root directory to compile the jars
was (Author: dsotty):
Go to https://github.com/droolsjbpm/drools, select the 5.6 branch and clone it on your dev machine.
You can then use "mvn install" from the root directory to compile the jars
> 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)
9 years, 11 months
[JBoss JIRA] (DROOLS-538) Unable to resolve class error , drools 5.5 in concurrent execution. JSR94Support and Spring
by Davide Sottara (JIRA)
[ https://issues.jboss.org/browse/DROOLS-538?page=com.atlassian.jira.plugin... ]
Davide Sottara commented on DROOLS-538:
---------------------------------------
Go to https://github.com/droolsjbpm/drools, select the 5.6 branch and clone it on your dev machine.
You can then use "mvn install" from the root directory to compile the jars
> 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)
9 years, 11 months