[JBoss JIRA] Created: (JBCOMMON-25) MarshalledValueInputStream and MarshalledValueOutputStream breaks when used with JDK 6
by Manik Surtani (JIRA)
MarshalledValueInputStream and MarshalledValueOutputStream breaks when used with JDK 6
--------------------------------------------------------------------------------------
Key: JBCOMMON-25
URL: http://jira.jboss.com/jira/browse/JBCOMMON-25
Project: JBoss Common
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: core
Affects Versions: 2.0.4.GA
Reporter: Manik Surtani
Assigned To: Dimitris Andreadis
Trying to serialize and deserialize a custom Map implementation using o.j.util.stream.MarshalledValue{Input | Output}Stream when using JDK 6 causes failures trying to find Map.Entry
See org.jboss.cache.util.MapCopyTest#testSerializableWithMarshalledValueStream()
Test available here:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jboss/JBossCache/tests/functio...
MapCopy srcs avbl here:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jboss/JBossCache/src/org/jboss...
Stack trace when running test:
java.lang.ClassNotFoundException: [Ljava.util.Map$Entry;
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:316)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:287)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.jboss.util.stream.MarshalledValueInputStream.resolveClass(MarshalledValueInputStream.java:58)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
at org.jboss.cache.util.MapCopy.readObject(MapCopy.java:103)
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.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1846)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.jboss.cache.util.MapCopyTest.testSerializableWithMarshalledValueStream(MapCopyTest.java:44)
Note that this does not happen when using JDK 5 - only JDK 6.
--
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
[JBoss JIRA] Created: (JBRULES-1012) Dot is removed while substituting variables with values in DSL
by Oleg Iavorskyi (JIRA)
Dot is removed while substituting variables with values in DSL
--------------------------------------------------------------
Key: JBRULES-1012
URL: http://jira.jboss.com/jira/browse/JBRULES-1012
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 4.0.0.MR3
Environment: Windows XP, JDK 1.5.0_12
Reporter: Oleg Iavorskyi
Assigned To: Mark Proctor
There is DSL file with next content:
[when] There is a {type} named {name} = {name} : {type}()
[when] - {prop} is {val} = {prop} == {val}
And DRL which uses this DSL:
package prototype
import com.test.types.ClientServiceTypeType;
import com.test.ClientService;
expander ValidationCasesPrototype.dsl
rule "Bug with dot reduction"
when
There is a ClientService named cs
- type is ClientServiceTypeType.GOLD
then
# Then part
end
ClientServiceTypeType.GOLD is a public static final ClientServiceTypeType field.
When building package from this DRL file I've got next exception:
java.lang.RuntimeException: org.drools.rule.InvalidRulePackage: Unable to return Declaration for identifier 'ClientServiceTypeTypeGOLD' : [Rule name=Bug with dot reduction, agendaGroup=MAIN, salience=0, no-loop=false]
at com.prototype.parser.BaseRuleLoader.readRule(BaseRuleLoader.java:54)
at com.prototype.parser.BaseRuleLoader.<init>(BaseRuleLoader.java:17)
at com.prototype.HierarchyProcessor.<init>(HierarchyProcessor.java:11)
at com.prototype.parser.ValidationCasesRunnerTest.setUp(ValidationCasesRunnerTest.java:18)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.drools.rule.InvalidRulePackage: Unable to return Declaration for identifier 'ClientServiceTypeTypeGOLD' : [Rule name=Bug with dot reduction, agendaGroup=MAIN, salience=0, no-loop=false]
at org.drools.rule.Package.checkValidity(Package.java:409)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:262)
at com.prototype.parser.BaseRuleLoader.readRule(BaseRuleLoader.java:51)
... 16 more
It seems that substitution for variables in DSL works incorrectly and simply ignores ".". Quick workaround is to use "\" before dot. In that case rules are loaded correctly.
Same code worked in version 3.0.6.
--
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