[JBoss JIRA] Created: (JBAS-4074) failing org.jboss.test.jbossmq.test.UIL2JBossMQUnitTestCase
by Dimitris Andreadis (JIRA)
failing org.jboss.test.jbossmq.test.UIL2JBossMQUnitTestCase
-----------------------------------------------------------
Key: JBAS-4074
URL: http://jira.jboss.com/jira/browse/JBAS-4074
Project: JBoss Application Server
Issue Type: Sub-task
Security Level: Public (Everyone can see)
Components: Test Suite
Environment: Java Version 1.5.0_06
Java Vendor BEA Systems, Inc.
Java VM Name BEA JRockit(R)
Java VM Version R26.4.0-63-63688-1.5.0_06-20060626-2259-linux-ia32
Java VM Info
OS Name Linux
OS Version 2.6.9-42.0.2.ELsmp
OS Arch i386
Reporter: Dimitris Andreadis
Assigned To: Dimitris Andreadis
Fix For: JBossAS-4.2.0.CR1
testTopicSelectorChange Error The durable subscription is already in use. DurableSubscription[clientId=DurableSubscriberExample name=test selector=Value = 'A']
javax.jms.IllegalStateException: The durable subscription is already in use. DurableSubscription[clientId=DurableSubscriberExample name=test selector=Value = 'A']
at org.jboss.mq.server.JMSTopic.addSubscriber(JMSTopic.java:93)
at org.jboss.mq.server.ClientConsumer.addSubscription(ClientConsumer.java:142)
at org.jboss.mq.server.JMSDestinationManager.subscribe(JMSDestinationManager.java:572)
at org.jboss.mq.server.JMSServerInterceptorSupport.subscribe(JMSServerInterceptorSupport.java:171)
at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:157)
at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:643)
at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:177)
at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:185)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:395)
at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 3 months
[JBoss JIRA] Created: (JBREM-692) Let marshallers/unmarshallers construct their preferred streams.
by Ron Sigal (JIRA)
Let marshallers/unmarshallers construct their preferred streams.
----------------------------------------------------------------
Key: JBREM-692
URL: http://jira.jboss.com/jira/browse/JBREM-692
Project: JBoss Remoting
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 2.2.0.Beta1 (Bluto)
Reporter: Ron Sigal
Assigned To: Ron Sigal
Fix For: 2.2.0.Beta1 (Bluto)
In response to JBREM-597 the socket transport was changed to provide raw socket streams to the marshaller layer. This leads to several issues:
1. JBREM-623
2. JBREM-631
3. The result of JBREM-597 is that (un)marshallers like Serializable(Un)Marshaller that use object streams need to recreate object streams with each invocation, which is time consuming.
A solution, suggested by Tom Elrod, is to allow the marshaller layer to construct the streams it prefers to work with, which can then be cached at the transport layer.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 3 months
[JBoss JIRA] Created: (JBAS-4066) failing org.jboss.test.classloader.test.CircularityUnitTestCase
by Dimitris Andreadis (JIRA)
failing org.jboss.test.classloader.test.CircularityUnitTestCase
---------------------------------------------------------------
Key: JBAS-4066
URL: http://jira.jboss.com/jira/browse/JBAS-4066
Project: JBoss Application Server
Issue Type: Sub-task
Security Level: Public (Everyone can see)
Components: Test Suite
Environment: Java Version 1.5.0_10
Java Vendor Sun Microsystems Inc.
Java VM Name Java HotSpot(TM) Client VM
Java VM Version 1.5.0_10-b03
Java VM Info mixed mode
OS Name Linux
OS Version 2.6.9-42.0.2.EL
OS Arch i386
Reporter: Dimitris Andreadis
Assigned To: Scott M Stark
Fix For: JBossAS-4.2.0.CR1
testRecursiveLoadMT Error N/A
javax.management.MBeanException
at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:180)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:266)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.Exception: Thread1 failed to load HARMIServerImpl_Stub, class=null
at org.jboss.test.classloader.circularity.test.RecursiveCCETests.testRecursiveLoadMT(RecursiveCCETests.java:99)
at org.jboss.test.classloader.circularity.Starter.testRecursiveLoadMT(Starter.java:154)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
... 42 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 3 months
[JBoss JIRA] Created: (JBAS-3973) org.jboss.test.classloader.test.CircularityUnitTestCase.testRecursiveLoadMT fails under jdk1.5.0_09
by Scott M Stark (JIRA)
org.jboss.test.classloader.test.CircularityUnitTestCase.testRecursiveLoadMT fails under jdk1.5.0_09
---------------------------------------------------------------------------------------------------
Key: JBAS-3973
URL: http://jira.jboss.com/jira/browse/JBAS-3973
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: ClassLoading, Test Suite
Affects Versions: JBossAS-4.0.5.GA
Reporter: Scott M Stark
Assigned To: Scott M Stark
[starksm@succubus testsuite]$ ant one-test -Dtest=org.jboss.test.classloader.test.CircularityUnitTestCase
Buildfile: build.xml
one-test:
[delete] Deleting: /home/svn/JBoss4.0/jboss-4.0.x/testsuite/output/log/test.log
[junit] Running org.jboss.test.classloader.test.CircularityUnitTestCase
[junit] Tests run: 7, Failures: 0, Errors: 1, Time elapsed: 5.26 sec
[junit] Test org.jboss.test.classloader.test.CircularityUnitTestCase FAILED
BUILD SUCCESSFUL
Total time: 8 seconds
21:25:07,745 INFO [Starter] Begin testRecursiveLoadMT
21:25:07,748 INFO [RecursiveCCETests] Begin testRecursiveLoadMT
21:25:07,748 INFO [RecursiveCCETests] Service origURL=file:/home/svn/JBoss4.0/jboss-4.0.x/testsuite/output/lib/circularity.sar
21:25:07,749 INFO [RecursiveCCETests] j0 = file:/home/svn/JBoss4.0/jboss-4.0.x/testsuite/output/lib/ha.jar
21:25:07,755 INFO [RecursiveCCETests] Starting T0
21:25:07,755 INFO [RecursiveCCETests] Started T0, waiting on ucl=1832413009
21:25:07,755 INFO [RecursiveCCETests$MyUCL] loadClass, name=org.jboss.test.classloader.circularity.support.HARMIServerImpl
21:25:07,756 INFO [RecursiveCCETests$MyUCL] Acquired loadClass lock
21:25:07,756 INFO [RecursiveCCETests] UCL0 notify received
21:25:07,756 INFO [RecursiveCCETests] Starting T1
21:25:07,757 INFO [RecursiveCCETests$MyUCL] notifyAll, ucl=1832413009
21:25:07,757 INFO [RecursiveCCETests] Started T1, waiting on ucl=302460636
21:25:07,757 INFO [RecursiveCCETests$MyUCL] loadClass, name=org.jboss.test.classloader.circularity.support.HARMIServerImpl_Stub
21:25:07,757 INFO [RecursiveCCETests$MyUCL] Acquired loadClass lock
21:25:07,758 INFO [RecursiveCCETests$MyUCL] notifyAll, ucl=302460636
21:25:07,758 INFO [RecursiveCCETests] UCL1 notify received
21:25:07,761 INFO [RecursiveCCETests$MyUCL] loadClass, name=org.jboss.test.classloader.circularity.support.HARMIServer
21:25:07,761 INFO [RecursiveCCETests$MyUCL] Acquired loadClass lock
21:25:07,761 INFO [RecursiveCCETests$MyUCL] notifyAll, ucl=1832413009
21:25:12,763 INFO [RecursiveCCETests$MyUCL] Passed HARMIServer barrier
21:25:12,765 INFO [RecursiveCCETests$MyUCL] Unexpected error during load of:org.jboss.test.classloader.circularity.support.HARMIServerImpl_Stub
java.lang.LinkageError: org/jboss/test/classloader/circularity/support/HARMIServer
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:672)
at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:652)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:190)
at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
at org.jboss.test.classloader.circularity.test.RecursiveCCETests$MyUCL.loadClass(RecursiveCCETests.java:199)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:672)
at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:652)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:190)
at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
at org.jboss.test.classloader.circularity.test.RecursiveCCETests$MyUCL.loadClass(RecursiveCCETests.java:199)
at org.jboss.test.classloader.circularity.test.RecursiveCCETests$MyThread.run(RecursiveCCETests.java:131)
21:25:12,766 ERROR [RecursiveCCETests] Failed to load: org.jboss.test.classloader.circularity.support.HARMIServerImpl_Stub
java.lang.ClassNotFoundException: Unexpected error during load of: org.jboss.test.classloader.circularity.support.HARMIServerImpl_Stub, msg=org/jboss/test/classloader/circularity/support/HARMIServer
at org.jboss.test.classloader.circularity.test.RecursiveCCETests$MyUCL.loadClass(RecursiveCCETests.java:228)
at org.jboss.test.classloader.circularity.test.RecursiveCCETests$MyThread.run(RecursiveCCETests.java:131)
21:25:12,766 ERROR [RecursiveCCETests] Thread1 failed to load HARMIServerImpl_Stub, class=null
java.lang.ClassNotFoundException: Unexpected error during load of: org.jboss.test.classloader.circularity.support.HARMIServerImpl_Stub, msg=org/jboss/test/classloader/circularity/support/HARMIServer
at org.jboss.test.classloader.circularity.test.RecursiveCCETests$MyUCL.loadClass(RecursiveCCETests.java:228)
at org.jboss.test.classloader.circularity.test.RecursiveCCETests$MyThread.run(RecursiveCCETests.java:131)
21:25:12,767 ERROR [Starter] testRecursiveLoadMT
java.lang.Exception: Thread1 failed to load HARMIServerImpl_Stub, class=null
at org.jboss.test.classloader.circularity.test.RecursiveCCETests.testRecursiveLoadMT(RecursiveCCETests.java:99)
at org.jboss.test.classloader.circularity.Starter.testRecursiveLoadMT(Starter.java:154)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:266)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 3 months
[JBoss JIRA] Created: (JBRULES-592) Problem with WorkingMemory serialization
by Edson Tirelli (JIRA)
Problem with WorkingMemory serialization
----------------------------------------
Key: JBRULES-592
URL: http://jira.jboss.com/jira/browse/JBRULES-592
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Reteoo
Affects Versions: 3.0.5, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0
Reporter: Edson Tirelli
Assigned To: Edson Tirelli
Fix For: 3.1-m1, 3.0.5
REPORTED BY MICHAEL SUZIO:
-----------------------------------------------
I've run into a problem. Strangely enough, I swear this worked in the past, but then we went into a long coding phase and emerged from it to find out our test cases didn't actually work "in the wild". Took some time, but eventually I figured out the why of that -- and coded better tests.
In any case, here is what is happening:
- We create a rulebase from some DRL text (doesn't matter how it gets created, my test code below is *one* example case)
- A Working Memory object is created:
WorkingMemory wm =3D3D3D rulebase.newWorkingMemory();
- The WorkingMemory is serialized to disk via normal ObjectOutputStream methods
Now, *while the VM is running*, I can create new RuleBase objects, read that WorkingMemory back in, and attach it to those new RuleBase objects, and it always works. However, if I stop the VM, and re-run the sample program below, it fails with this stack trace:
java.lang.ClassNotFoundException: [Lorg.drools.reteoo.ObjectTypeNode;
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass (ClassLoader.java:251)
at org.drools.rule.CompositePackageClassLoader.loadClass(Unknown
Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.drools.common.ObjectInputStreamWithLoader.resolveClass (Unknown
Source)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
at
java.io.ObjectInputStream.readArray (ObjectInputStream.java:1591)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at java.util.HashMap.readObject (HashMap.java:1067)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
at
java.io.ObjectInputStream.readSerialData (ObjectInputStream.java:1809)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719
)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at
java.io.ObjectInputStream.readArray (ObjectInputStream.java:1634)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at
java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
at
java.io.ObjectInputStream.readObject0 (ObjectInputStream.java:1299)
at
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
at java.io.ObjectInputStream.readOrdinaryObject (ObjectInputStream.java:1719
)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
at
java.io.ObjectInputStream.readSerialData (ObjectInputStream.java:1832)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719
)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at
java.io.ObjectInputStream.defaultReadFields (ObjectInputStream.java:1908)
at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719
)
at
java.io.ObjectInputStream.readObject0 (ObjectInputStream.java:1305)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at org.drools.common.AbstractRuleBase.newWorkingMemory(Unknown
Source)
at org.drools.common.AbstractRuleBase.newWorkingMemory (Unknown
Source)
at DroolsFailureTest.runTest(DroolsFailureTest.java:52)
at DroolsFailureTest.main(DroolsFailureTest.java:25)
So, it appears that WorkingMemory objects cannot (at least for me in this case) be serialized, then read back into a new VM. That always fails, and it's quite vexing. Our intention is to be running rules on large amounts of data that periodically come in, and we need to save our progress as we go along and be able to restore that data anywhere in the data cluster that the job gets parceled out to (so, ultimately, the WorkingMemory data is going to go into a database or possibly get written out to a shared filesystem among the drones). If I can't save/restore data transparently between runs, this is pretty much a show-stopper.
Technical details: Java 1.5.0_10 (but I tested this on 1.5.0_04, 1.5.0_06, 1.5.0_08, and 1.5.0_09 -- basically, whatever we had available on other people's workstations), all on Windows boxes. JBoss Rules 3.0.3 and 3.0.5 both seemed to fail consistently.
Here is the sample code (it's two classes, save them to appropriate files). I think these should be reproducible cases. Run the DroolsFailureTest twice, and it will work the first time (showing that reads/writes within the VM work), and then fail the second time it is run (when the cached WorkingMemory on disk then is getting read back into a new VM).
import java.io.*;
import org.drools.*;
import org.drools.compiler.*;
public class DroolsFailureTest
{
public static void main(String[] args)
{
boolean removeFile = false;
if (args.length > 0)
{
removeFile = args[0].equalsIgnoreCase("remove");
}
if (removeFile)
{
WorkingMemorySaver memSaver = getWorkingMemorySaver();
memSaver.clearWorkingMemory();
}
runTest(); // run 1 -- should always work
runTest(); // run 2 -- fails?
System.exit(0);
}
public static void runTest()
{
System.out.println ("Getting working memory handler");
WorkingMemorySaver memSaver = getWorkingMemorySaver();
RuleBase rb = getRuleBase();
// Uncomment this -- prove we get a different RuleBase object
// each time
//
// System.err.println("Rulebase hashcode = " + rb);
InputStream is = memSaver.getWorkingMemoryInputStream();
System.out.println("Got input stream " + is);
WorkingMemory wm = null;
if (is != null)
{
System.err.println("Trying to restore object from input stream");
try
{
wm = rb.newWorkingMemory(is);
System.err.println("Got " + wm);
}
catch (Exception e)
{
e.printStackTrace();
}
}
if (wm == null)
{
wm = rb.newWorkingMemory();
System.err.println("No working memory, creating new one = " + wm);
}
System.out.println("Asserted data, running the rules");
// wm.fireAllRules();
System.err.println ("Saving working memory");
memSaver.saveWorkingMemory(wm);
}
private static RuleBase getRuleBase()
{
System.setProperty("drools.compiler", "JANINO");
RuleBaseLoader rbl = RuleBaseLoader.getInstance();
String ruleText = getRuleText();
RuleBase rb = null;
try
{
rb = rbl.loadFromReader(new StringReader(ruleText));
}
catch (CheckedDroolsException e)
{
e.printStackTrace();
}
catch (IOException e)
{
e.printStackTrace();
}
return rb;
}
private static String getRuleText()
{
String ruleText =
"package test;\n" +
"rule TestRule\n" +
"when\n" +
" sObj: String()\n" +
"then\n" +
" System.out.println(\"Saw \" + sObj);\n" +
"end";
return ruleText;
}
private static WorkingMemorySaver getWorkingMemorySaver()
{
WorkingMemorySaver memSaver = new WorkingMemorySaver();
memSaver.setWorkingMemoryDir("C:\\");
return memSaver;
}
}
import java.io.*;
import org.drools.*;
/**
*
*/
public class WorkingMemorySaver
{
private File workingMemoryDir = null;
public WorkingMemorySaver()
{
}
public InputStream getWorkingMemoryInputStream()
{
File workingMemoryFile = getWorkingMemoryFile();
InputStream stream = null;
if ( workingMemoryFile.exists())
{
try
{
stream = new FileInputStream(getWorkingMemoryFile());
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
}
return stream;
}
public void saveWorkingMemory(WorkingMemory wm)
{
try
{
//noinspection IOResourceOpenedButNotSafelCuyClosed
ObjectOutputStream oStream = new ObjectOutputStream((new FileOutputStream(getWorkingMemoryFile())));
oStream.writeObject(wm);
}
catch (IOException e)
{
e.printStackTrace();
}
}
/**
* used in case the file becomes corrupted
*/
public void clearWorkingMemory()
{
try
{
File workingMemoryFile = getWorkingMemoryFile();
if (workingMemoryFile != null)
{
boolean deleted = workingMemoryFile.delete();
if (deleted)
{
System.err.println("Deleted working memory file " + workingMemoryFile.getName());
}
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
public File getWorkingMemoryDir()
{
return workingMemoryDir;
}
public void setWorkingMemoryDir(File workingMemoryDir)
{
this.workingMemoryDir = workingMemoryDir;
}
public void setWorkingMemoryDir(String workingMemoryDirName)
{
this.workingMemoryDir = new File(workingMemoryDirName);
}
private File getWorkingMemoryFile()
{
return new File(workingMemoryDir, "working_memory.bin");
}
}
A possible related bug is in this thread:
http://www.mail-archive.com/user@drools.codehaus.org/msg01731.html
Which points out this Sun bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=3D3D3D6434149
In fact, it looks like my problem is just a variant on Raffael's. Like Raffael, I've tried JBoss 3.0.5 (no help) and Java 1.6 (similar results
-- different "stream corrupted" error in my case, but essentially the same). I don't see a resolution to his bug on the archives -- Raffael, did you find a fix? Please let me know!
Sorry for such a long post, but I hope someone can point out what I can do to fix this issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 3 months
[JBoss JIRA] Created: (JBPORTAL-1221) fix distro.xml for ha-bundled distribution
by Prabhat Jha (JIRA)
fix distro.xml for ha-bundled distribution
------------------------------------------
Key: JBPORTAL-1221
URL: http://jira.jboss.com/jira/browse/JBPORTAL-1221
Project: JBoss Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.6.Alpha2
Reporter: Prabhat Jha
Assigned To: Julien Viet
Fix For: 2.6.Beta1
The jboss-portal-ha-*bundled distribution when expanded has all and default server configuration. The all configuration seems to be correct but default configuration has an empty deploy directory. I think with ha bundled distribution, we dont want default config to be there. build/distro.xml needs to be fixed to not have these directories as part of this distribution. It's just a cosmetic change.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 3 months