Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316416

Summary: Remote communication fails, server receives only hash map.
Product: [RT] Riena Reporter: Dirk Steiner <dirk.steiner>
Component: communicationAssignee: Project Inbox <riena.communication-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: ralf.heilek
Version: 1.2.0   
Target Milestone: 2.0.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Class to be serialized and sent to remote service none

Description Dirk Steiner CLA 2010-06-10 02:25:32 EDT
Created attachment 171605 [details]
Class to be serialized and sent to remote service

We are using the hessian protocol.

Example:

Try to send instance of class CountryLanguageDTO to service. Service recieves only a hash map, containing all properties and values.

Renmed class CountryLanguageDTO to CountryLangDTO. Now, all works fine; sever recieves the sent instance.

Same problem with class named RateDTO. Other DTOs like UserDTO, GroupDTO etc work fine.
Comment 1 Christian Campo CLA 2010-06-10 09:56:26 EDT
I am unsure about the word "Renmed" :-)

Are you saying that renaming a java class solves a problem that you have in the data serialization ? 

Thats hard to believe but on the other who know what hessian is doing :-).

We need to have a little more info:

- Have you tried to use the Riena 2.0.0.RC4 version ?
- The class has some super classes that you didnt provide, I would need them
- Are you passing the instance as parameter or as a return value (I know it should be the same, but hessian has some tricky corners and distingueshes the two cases)
- I need the interface for the remote service or at least the method signature that you are using where that error occurs.
Comment 2 Christian Campo CLA 2010-06-30 09:10:26 EDT
Unfortunatelly you did not send us all the classes, so we are missing the superclass of CountryLanguageDTO named AbstractCheckable. So I had to reduce a testcase to only use CountryLanguageDTO.

I ran this testcase:

public void testCountryLanguage() {
		final CountryLanguageDTO countryLanguage2 = new CountryLanguageDTO();
		countryLanguage2.setActive(true);
		countryLanguage2.setLastChangeLogin("testssss");
		countryLanguage2.setLanguageId(125L);
		final CountryLanguageDTO countryLanguage = testcasesService.getCountryLanguage(countryLanguage2);
		assertNotNull(countryLanguage);
	}

And while there are not many asserts in it, I could see in the debugger, that the return value contains all the expected values (the service just returns in the input parameter). I also saw in the debugger that the service received the correct input value.

I tested this with Riena 2.0 which contains a newer version of hessian. I highly recommend that you do this tooo.

Please test this again and if it persists with Riena 2.0 please attach AbstractCheckable to this bug and REOPEN this bug. I am closing it until then as WORKSFORME.