Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003362 [Hessian] major always 02-26-09 21:05 06-02-09 11:59
Reporter Peter Dettman View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0003362: Latest refactoring involving WriteReplaceSerializer breaks simple test case
Description Since I was looking at a few hessian-related things this week, I happened to be testing with the latest SVN code. I have attached a junit test case that is based directly on my application code. It works fine as of r5239 (and previous Hessian releases), but breaks after the subsequent refactoring r5242/5243 involving WriteReplaceSerializer class. Exception trace provided below.
Additional Information java.lang.RuntimeException: java.lang.IllegalAccessException: Class com.caucho.hessian.io.WriteReplaceSerializer can not access a member of class hessiantest.TestMessage with modifiers "private"
    at com.caucho.hessian.io.WriteReplaceSerializer.writeObject(WriteReplaceSerializer.java:165)
    at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:413)
    at hessiantest.WriteReplaceTest.basicRoundtrip(WriteReplaceTest.java:24)
    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.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
    at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
    at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
    at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
    at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
    at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
    at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
    at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
    at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
    at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
    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: java.lang.IllegalAccessException: Class com.caucho.hessian.io.WriteReplaceSerializer can not access a member of class hessiantest.TestMessage with modifiers "private"
    at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
    at java.lang.reflect.Method.invoke(Method.java:588)
    at com.caucho.hessian.io.WriteReplaceSerializer.writeObject(WriteReplaceSerializer.java:154)
    ... 22 more

Attached Files  hessiantest.jar [^] (1,346 bytes) 02-26-09 21:05
 hessian_0003362.patch [^] (441 bytes) 02-27-09 02:24

- Relationships

- Notes
(0003850)
Peter Dettman
02-27-09 02:14

The 'private' member that cannot be accessed is the writeReplace method itself, it seems.
 
(0003851)
Peter Dettman
02-27-09 02:25

Patch attached
 
(0003997)
Peter Dettman
05-09-09 02:09

This was fixed at r5312 of WriteReplaceSerializer.
 

- Issue History
Date Modified Username Field Change
02-26-09 21:05 Peter Dettman New Issue
02-26-09 21:05 Peter Dettman File Added: hessiantest.jar
02-27-09 02:14 Peter Dettman Note Added: 0003850
02-27-09 02:24 Peter Dettman File Added: hessian_0003362.patch
02-27-09 02:25 Peter Dettman Note Added: 0003851
05-09-09 02:09 Peter Dettman Note Added: 0003997
06-02-09 11:59 ferg Assigned To  => ferg
06-02-09 11:59 ferg Status new => closed
06-02-09 11:59 ferg Resolution open => fixed
06-02-09 11:59 ferg Fixed in Version  => 4.0.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
35 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker