Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Hessian 4.0.1 with Spring 3.0 [SPR-6041] #10710

Closed
spring-projects-issues opened this issue Aug 25, 2009 · 7 comments
Closed

Support Hessian 4.0.1 with Spring 3.0 [SPR-6041] #10710

spring-projects-issues opened this issue Aug 25, 2009 · 7 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Aug 25, 2009

Peter Dettman opened SPR-6041 and commented

The Caucho hessian lib has now stabilised its v2.0 protocol and rounded up several regressions, with the release of v4.0.1 (http://caucho.com/download/hessian-4.0.1.jar).

In 4.0.1, the HessianSkeleton class provides a ready-made invoke method that Spring's HessianExporter can call (instead of duplicating its code). I am attaching a patch that modifies HessianExporter.java to do so. The debugging output part of the code is still duplicated of necessity until some suitable refactoring of HessianSkeleton is done.

As far as backward compatibility is concerned, I believe users should avoid using Hessian 2.0 protocol from previous versions (that may be an overly strict interpretation). Hessian 1.0 protocol should work fine with a v4.0.1 server. I understand that there could be problems if people are using HessianOutput/Hessian2Output or streaming versions directly.

I recommend Caucho's Hessian 4.0.1 be used for Spring 3.0, a fresh start of sorts.

See also:
http://maillist.caucho.com/pipermail/hessian-interest/2009-June/000750.html (and surrounding discussion on that list)
http://jira.springframework.org/browse/SPR-5469
http://bugs.caucho.com/view.php?id=3646


Affects: 3.0 M4

Attachments:

Issue Links:

2 votes, 4 watchers

@spring-projects-issues
Copy link
Collaborator Author

Peter Dettman commented

Patch against r1748. Requires the Hessian dependency to be updated to 4.0.1.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

The problem here is that Resin 3.x (the server) keeps shipping with Hessian 3.x. We require 3.2 or higher there now for Spring 3.0 but I'm afraid we can't raise this any higher, since Resin cannot be upgraded to a new Hessian version without upgrading the entire server (as far as I'm aware).

I expect Caucho to fix any critical bugs in Hessian 3.x as well, or at least in Hessian as shipped with Resin 3.x. After all, many people are on Resin 3.x now and will likely stay there for a while.

Are there any issues with Spring 3.0 M4's Hessian support against Hessian 4.0.1, actually? In other words, is there any need for using the new Hessian 4 API? It seems to work fine with the old API (i.e. Spring 3.0 M4's code) in my tests... in which case we could still support Hessian 3.2, while recommending the use of Hessian 4.0 or higher with Spring 3.0.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Yanming Zhou commented

hessian-4.0.1 doesn't works with spring2.5.6 neither

Exception in thread "main" org.springframework.remoting.RemoteAccessException: Cannot access Hessian remote service at http://localhost:8080/remoting/userManager; nested exception is com.caucho.hessian.io.HessianProtocolException: '�' is an unknown code
at org.springframework.remoting.caucho.HessianClientInterceptor.convertHessianAccessException(HessianClientInterceptor.java:254)
at org.springframework.remoting.caucho.HessianClientInterceptor.invoke(HessianClientInterceptor.java:225)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy1.suggestName(Unknown Source)
at org.ironrhino.Main.main(Main.java:12)
Caused by: com.caucho.hessian.io.HessianProtocolException: '�' is an unknown code
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:266)
at $Proxy0.suggestName(Unknown Source)
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.springframework.remoting.caucho.HessianClientInterceptor.invoke(HessianClientInterceptor.java:219)
... 4 more

@spring-projects-issues
Copy link
Collaborator Author

Greg Ferguson commented

Juergen, what version of Hessian (from http://hessian.caucho.com/index.xtp#Java) does the
Spring team recommend to use with 3.0.0.RELEASE, assuming client compatibility is not an
issue (we strictly enforce this).

  1. Are they any known issues with using the latest available release (hessian-4.0.2)?

  2. It seemed as though 3.1.6 still worked properly (w/3.0.0.RELEASE), although it sounds as though
    it is not recommended for use w/the Spring 3.0.0.RELEASE (hessian protocol v2 vs. v1 issue)?

Thanks in advance.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Greg, as far as my own tests went back in the Spring 3.0 RC phase, things worked just fine with Hessian 4.0.1 - so I assume Spring 3.0 GA will work with Hessian 4.0.2 as well. We're going to re-test this for Spring 3.0.1 and officially declared Hessian 4.0.x to be supported then.

With respect to Hessian 3.1.6, while it might work, we are not officially supporting it anymore. Spring 3.0 requires Hessian 3.2 or above.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Greg Ferguson commented

Thanks...that's exactly what I needed to know.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

We verified that Hessian 4.0.3 works fine with Spring 3.0.1. The Hessian2 protocol (to be activated through HessianProxyFactoryBean's "hessian2" flag) seems to work fine as well now, in contrast to the issues that we had with Hessian 3.2.1 back then. From that perspective, I'd recommend using Hessian 4.0.x now, even if we need to preserve compatibility with Hessian 3.2.x as well.

Juergen

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0.1 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants