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
Frank | 21 Nov 15:30 2013

How does Hessian support versioning

Dear Collegues,

how does Hessian support versioning. ZeroC guys described the problem nicely:
 
from the zeroc website

Once a distributed system is deployed, it requires maintenance to accomodate bug fixes and improvements. With conventional technologies, it is difficult to do this because changes to interfaces or data types break the existing on-the-wire contract between client and server, forcing all components of a system to be upgraded at once.

Ice provides two solutions for dealing with this problem. Using optional values, data members and operation parameters can be added and removed without breaking the on-the-wire contract. With facets, you can add new features or change existing features in an elegant and non-intrusive way. You can easily make changes such that they remain backward compatible and, therefore, upgrade a distributed system gradually.

 
How does Hessian support versioning ? Feedback would be appreciated....
 
_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest
Riccardo Cohen | 27 Sep 09:59 2013

persistence fetch group with flex

Hello
I'm testing resin 4.0.37, in particular with a flex application.
A new error occurs in flex :

Error #1056: Cannot create property _persistence_fetchGroup on 
adlresintest.Adluser.

It seems that new version of eclipselink adds a field which is not 
skipped by the serialization process.

I've added <property name="eclipselink.weaving.fetchgroups" 
value="false"/> and it solved the problem, but I'm afraid of removing 
some important optimization of eclipselink.

Is it the good workaround ?

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
Rick Mann | 27 Sep 00:44 2013

Example doc missing

I get a 404 when I try to visit the "Building Rich Internet Applications (RIAs) with Hessian" example on this page:

	http://hessian.caucho.com

Looks like that page hasn't been updated in a long time.

--

-- 
Rick
Mohd Saiful Abd Wahab | 5 Sep 21:28 2013
Picon

Invitation to connect on LinkedIn

 
 
 
 
 
From Mohd Saiful Abd Wahab
 
Managing Director at Haynik Holding
Malaysia
 
 
 
 
 
 
 

I'd like to add you to my professional network on LinkedIn.

- Mohd Saiful

 
 
 
 
 
 
 
You are receiving Invitation to Connect emails. Unsubscribe
© 2012, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA
 
_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest
yuneng xie | 3 Sep 10:20 2013
Picon

(no subject)

Hello

I encountered this problem that, after deserialization, the value of parent class's fileds might override the vlaue of child class's field.

it happens to the fields that declared in both parent and child  with the same name.
for example:

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


After deserialization, C.str will be "parent".

I found the cause is the _fieldMap structure in JavaDeserializer which is used to store all fields of the whole class hierarchy.  The _fieldMap uses field name as key. If we got tow fields with same name, only one will be kept in the map.

I fix this by changing _fieldMap from Map<String,Field> to Map<String,List<Field>>. 
Attachment is my code.

I'm not sure if it's gonna cause other problems. 

Anybody else ever encountered this problem?
Attachment (JavaDeserializer.java): application/octet-stream, 11 KiB
_______________________________________________
hessian-interest mailing list
hessian-interest@...
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Gmane