Daniel Plappert | 17 Jun 23:07 2014
Picon

Support for Java 1.8 and new Date-API (LocalDate, LocalTime)

Hi,

I have recently discovered a problem while using hessian and Java 1.8. A property was of type java.time.LocalDate and causes a stack overflow exception. I had to change its type to either Date (or String) to avoid this exception. Are there any plans for Java 1.8 support in the near future? Is anyone aware of a(n other) workaround for this problem?

Best regards
Daniel
_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest
Frank | 7 May 12:08 2014

META-INF/hessian/Deserializer

 
Hi,
 
does anyone know how i can set the Deserializer programmatically. We are using OSGI, and these settings are not being picked up. How would I code these settings in my code that i find in my META-INF/hessian/Deserializer file ?
 

java.io.File=com.caucho.hessian.io.FileDeserializer

java.math.BigDecimal=com.caucho.hessian.io.BigDecimalDeserializer

javax.management.ObjectName=com.caucho.hessian.io.ObjectNameDeserializer

 

Thanks a lot

Frank

_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest
Joel Garcia | 4 May 20:05 2014

Re: hessian-interest Digest, Vol 75, Issue 2

Ari,

Thanks for responding. 

There is a caveat. For certain operations, the Load Balancer type component is supposed to route the request to a specific server using Hessian. For this reason, we've written our own Load Balancer.

Today, our Load Balancer code looks like the following to handle a request.  We've put the variable to determine which server to route the request to into the binary data. 

LoadBalancer code for handling doFindByLogin

    private def doFindByLogin(byte[] bytes) {

        //Create a fake inputStream so hessian can decode for us
        def fakeInput = new ByteArrayInputStream((byte[]) bytes.clone())

        // Find the server that matches the given login
        HessianInput input = new HessianInput(fakeInput);
        input.readCall()
        input.readMethod()
        input.readString()
        // retrieve the context were the operation is performed so we can route it to the right server
        Long contextId = input.readLong()

        Server server = Context.get(contextId)?.server

        if (!server) {
            server = Server.get(1)
        }

        //Execute the server call
        byte[] responseBytes = serverService.sendClientRequest(server.url, USER_SERVICE, bytes)

        // Send the response to the client
        serverService.sendServerResponse(responseBytes, response)

    }

The problem with this implementation is all of the data is funneled back and forth through the Load Balancer. We're also cloning the incoming bytes. Ideally, we'd redirect the request to the correct server, but I do not have a good example for how to do a Hessian redirect. 

Do you have any thoughts for how to effectively do a redirect with Hessian?

Thanks,
Joel


On Sun, May 4, 2014 at 10:00 AM, <hessian-interest-request-p4ZHcaHNc0TQT0dZR+AlfA@public.gmane.org> wrote:
Send hessian-interest mailing list submissions to
        hessian-interest-p4ZHcaHNc0TQT0dZR+AlfA@public.gmane.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://maillist.caucho.com/mailman/listinfo/hessian-interest
or, via email, send a message with subject or body 'help' to
        hessian-interest-request-p4ZHcaHNc0TQT0dZR+AlfA@public.gmane.org

You can reach the person managing the list at
        hessian-interest-owner-p4ZHcaHNc0TQT0dZR+AlfA@public.gmane.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of hessian-interest digest..."


Today's Topics:

   1. Hessian Load Balancer (Joel Garcia)
   2. Re: Hessian Load Balancer (Aristedes Maniatis)


----------------------------------------------------------------------

Message: 1
Date: Sat, 3 May 2014 16:54:12 -0700
From: Joel Garcia <joelgarcia-aUsY32t8Heh9TpRU15l4Ew@public.gmane.org>
Subject: [Hessian-interest] Hessian Load Balancer
To: hessian-interest <at> caucho.com
Message-ID:
        <CAKChHL9Bq6JfMm1PeOqJ04hKKmU2tqwS2jL6rqF6i9Pro-y8ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Content-Type: text/plain; charset="utf-8"

What's the best way to have a Java Spring client communicate with multiple
Java Spring servers via the Hessian protocol.

Ideally, I'd like to introduce a Load Balancer component to function as a
Proxy, but I'd prefer for the request to be proxied to one of the Java
Spring servers as opposed to having the Load Balancer function as a middle
man for all communication.

Does anyone know of a good solution for this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://maillist.caucho.com/pipermail/hessian-interest/attachments/20140503/a1f5b5f2/attachment-0001.html

------------------------------

Message: 2
Date: Sun, 04 May 2014 11:58:55 +1000
From: Aristedes Maniatis <ari-WeiC9bTY98E@public.gmane.orgau>
Subject: Re: [Hessian-interest] Hessian Load Balancer
To: Discussion of the Hessian protocol <hessian-interest-p4ZHcaHNc0TQT0dZR+AlfA@public.gmane.org>
Message-ID: <53659EDF.7080408-WeiC9bTY98EQrrorzV6ljw@public.gmane.org>
Content-Type: text/plain; charset=ISO-8859-1

Why does this have anything to do with Hessian at all? Push hessian data over http and then use one of the million http load balancer solutions available.

Ari

On 4/05/2014 9:54am, Joel Garcia wrote:
> What's the best way to have a Java Spring client communicate with multiple Java Spring servers via the Hessian protocol.
>
> Ideally, I'd like to introduce a Load Balancer component to function as a Proxy, but I'd prefer for the request to be proxied to one of the Java Spring servers as opposed to having the Load Balancer function as a middle man for all communication.
>
> Does anyone know of a good solution for this?
>
>
> _______________________________________________
> hessian-interest mailing list
> hessian-interest <at> caucho.com
> http://maillist.caucho.com/mailman/listinfo/hessian-interest
>

--
-------------------------->
Aristedes Maniatis
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A



------------------------------

_______________________________________________
hessian-interest mailing list
hessian-interest-p4ZHcaHNc0TQT0dZR+AlfA@public.gmane.org
http://maillist.caucho.com/mailman/listinfo/hessian-interest


End of hessian-interest Digest, Vol 75, Issue 2
***********************************************



--
Joel Garcia, COO
TidalWave Interactive, LLC.
101 California, Suite 2450
San Francisco, CA, 94111
(415) 244-0933
Twitter: joelphilipgarcia

_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest
Joel Garcia | 4 May 01:54 2014

Hessian Load Balancer

What's the best way to have a Java Spring client communicate with multiple Java Spring servers via the Hessian protocol.

Ideally, I'd like to introduce a Load Balancer component to function as a Proxy, but I'd prefer for the request to be proxied to one of the Java Spring servers as opposed to having the Load Balancer function as a middle man for all communication.

Does anyone know of a good solution for this?
_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest
Riccardo Cohen | 2 May 22:26 2014

should I give up with Hessian on Android ?

Hello

I had many many problems with Hessian on Android, and wonder if it 
reasonable to use it. I seriously consider replacing with JSon, even if 
I will have to write my own serialization.

For those who would like to read it, here are some details :

I built a small sample to let my Android app communicate with resin 
hessian servlet, like I used to do with my flex applications. I use 
Resin 4.0.38 with java 6 on server, and the java client is built on 
Android 2.1 platform and java 6 (which I use very well with many projects).

PB1 : hessian 4.0.37 jar did not work on android 
(java.lang.NoClassDefFoundError: 
com.caucho.hessian.client.HessianProxyFactory)

===> So I used Hessdroid jar from http://code.google.com/p/hessdroid/

PB2 : wrong hessian protocol (by default the client used hessian 2 while 
resin 4.0.38 uses hessian 1)

===> So I forced version 1 on client's factory

PB3 : emulator has network problem at the second call. On usb device it 
works all right (samsung galaxy tab 1 with android 2.2). But on emulator 
(emulating NexusS4p with android 2.1), the second call freezes for about 
2 minutes and fails with the following exception : W/System.err﹕ 
com.caucho.hessian.client.HessianConnectionException: -1:

===> no real solution (setting Debug mode on the factory helped a little 
but freeze continues on other calls)

Source for the test is here : 
http://realty-property.com/zdev/02-testutf8fandroid.zip

Thanks a lot.

--

-- 
Riccardo Cohen
+33 (0)6 09 83 64 49
Société Realty-Property.com
16 rue de Belle Isle
37100 Tours
France

<http://www.appartement-maison.fr>

_______________________________________________
hessian-interest mailing list
hessian-interest <at> caucho.com
http://maillist.caucho.com/mailman/listinfo/hessian-interest
Matthew Serrano | 9 Apr 18:18 2014

Classloader issue?

I have a simple program that submits electronic returns to the IRS via an SDK they provide. The underlying technology in their service is SOAP. I also have a hessian service for getting objects from a remote data store.

If I load my hessian client in the main method, I can retrieve an object from my remote hessian service without any issues. However, as soon as I initialize the IRS SDK, making the same call to my hessian service results in:
(for “bean” type)
com.caucho.hessian.io.HessianFieldException: com.aplos.afs.protocol.AfsFile.fileData: [B cannot be assigned from null

(for “byte” type)
java.lang.IndexOutOfBoundsException: Index: 9, Size: 0


The logic looks like:
String hessianTestType = "bean;
// WORKING
try {
if ("bean".equals(hessianTestType)) {
// get container object
AfsFile afsFile = afsClient.download("5344701de4b09ccea4ade50d");
logger.debug("AFS File: " + afsFile);
} else {
// get file data
byte[] fd = afsClient.downloadFile("5344701de4b09ccea4ade50d");
logger.debug("File data: " + fd.length);
}
} catch (Throwable t) {
logger.error(t.getMessage(), t);
}

// Initializing IRS classes seems to cause hessian issues
submitter = Irs990ezSubmitter.initialize(con);

// FAILING
try {
if ("bean".equals(hessianTestType)) {
// get container object
AfsFile afsFile = afsClient.download("5344701de4b09ccea4ade50d");
logger.debug("AFS File: " + afsFile);
} else {
// get file data
byte[] fd = afsClient.downloadFile("5344701de4b09ccea4ade50d");
logger.debug("File data: " + fd.length);
}
} catch (Throwable t) {
logger.error(t.getMessage(), t);
}

IRS990ezSubmitter is a sub-class; the super constructor calls two IRS classes:
ApplicationContext.setToolkitHome(MEF_TOOLKIT_HOME.getAbsolutePath());
context = new ServiceContext(new ETIN(irsEfileConfig.getEtin()), irsEfileConfig.getAsid(), irsEfileConfig.getTestIndicatorType());

I know this isn’t much to go on but is there something I can look for that could cause hessian to fail after loading some other classes into memory?

Thanks
matt

_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest
Rick Mann | 16 Mar 11:22 2014

Testing a Hessian servlet with Spring's mock testing tools?

Is it possible to test a Hessian servlet with Spring MockMvc? It's not immediately obvious to me how to do it.
Most of my Spring app is  <at> Controllers, but I have this legacy Hessian servlet I still depend on (I suppose I
should learn how to integrate it into Spring's MVC).

--

-- 
Rick

_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest
Frank | 12 Feb 17:27 2014

Hessian serialization/deserialization : List<Customer> ==> List<HashMap<K, V>>

Hi,
 
does anybody has a clue how to fix this ?
 
1. We call HessianService. The interface 
 

    public

interface CustomerSerivce {

        void updateCustomers(List<Customer>);

}

2. Customer is as simple as
 
   class Customer implements Serializable {
 
        public String customerNo;
        public String rating;
        get ...
        set..
 
    }
 
3. On the receiving side, we get
 
    ArrayList<HashMap<K,V>> where we have 1 entry in ArrayList of type HashMap
    The hashmap has two entries
            
    customerNo=> "cust12344"
    rating    => "Good"
 
 
Why on earth does this happen ?
 
We are using Hessian 4.0.37 on Java 1.7
    
Any suggestions would be highly appreciated
Thanks a lot in advance
Frank
_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest
yuneng xie | 7 Jan 15:44 2014
Picon

bug report : hessian-4.0.7

Hello

I encountered this problem that, after deserialization, a filed's value of a child class will be covered by the field's vlaue of its parent class, if the name of two fileds is the same.

for example:

class P{
String str="parent";
}
class C extends P{
String str="child;
}


After deserialization, C.str will be covered by P.str.

I find the cause is that the _fieldMap structure in JavaDeserializer.java which is used to store all fields of the whole class hierarchy.  The _fieldMap use field name as key. If there are two fields with same name in the class hierarchy, only one will be kept in the map.

I tried to fix this by changing _fieldMap from Map<String,Field> to Map<String,List<Field>> and it worked fine for simple test. but I'm not sure if it will cause other problems. 

Anybody else ever encountered this problem?
_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest
Rick Mann | 24 Nov 06:21 2013

Protocol spec and latest version?

Is the latest Hessian 3.1.3? If so, is there a protocol spec for it?

--

-- 
Rick

_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest
Rick Mann | 24 Nov 06:12 2013

Reducing exception verbosity

If my server-side Hessian method throws an exception, what gets sent back to my client is very verbose,
complete with a stack trace.

Is there any way to prevent Hessian from doing this? I'd like to throw a simple, custom exception, and have
only the data contained in that exception get sent back to the client; not the entire call stack that led to it.

--

-- 
Rick

_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Gmane