Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002118 [Resin] feature always 10-26-07 09:51 11-01-07 15:07
Reporter westrupp View Status public  
Assigned To ferg
Priority high Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.1.4 Product Version 3.1.3
  Product Build
Summary 0002118: hessian serialization issue: ArrayList declared as Collection
Description (rep by Daniel Spangler)

// Bean to be serialized as a parameter to the service below.
@Entity
@Table(name="patient")
public class Patient implements Serializable {
...
   @OneToMany(mappedBy="patient", fetch=FetchType.LAZY)
   private Collection<Order> orders = new ArrayList<Order>();

Serializing a Patient object to an EJB service as a parameter, causes the issue below.

// EJB service
@Stateless
@Local(OrderSubmissionService.class)
public class OrderSubmissionServiceBean implements OrderSubmissionService {

    // service with "Patient" as a parameter
    public Long createOrder(final Patient patient) throws ServiceException {
      ...
    }
}


In the Patient object the "orders" is an ArrayList and the target is java.util.Collection, which should work, but seems to be confusing Hessian for some reason.

[16:19:08.734] FINE com.caucho.hessian.io.SerializerFactory hessian: expected 'java.util.Collection' at ''


More info:

[16:19:08.718] FINE com.caucho.server.http.HttpRequest Http[6] POST /pathwork-webapp-0.1-SNAPSHOT/hessian/ordersubmission HTTP/1.1
[16:19:08.718] FINE com.caucho.server.http.HttpRequest Http[6] Remote-IP: 127.0.0.1:2369
[16:19:08.718] FINE com.caucho.server.http.HttpRequest Http[6] Content-Type: x-application/hessian
[16:19:08.718] FINE com.caucho.server.http.HttpRequest Http[6] User-Agent: Java/1.6.0_02
[16:19:08.718] FINE com.caucho.server.http.HttpRequest Http[6] Host: localhost:8080
[16:19:08.718] FINE com.caucho.server.http.HttpRequest Http[6] Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
[16:19:08.718] FINE com.caucho.server.http.HttpRequest Http[6] Connection: keep-alive
[16:19:08.718] FINE com.caucho.server.http.HttpRequest Http[6] Content-Length: 343
[16:19:08.718] FINE com.caucho.hessian.server.HessianServlet call 1.0
[16:19:08.718]
[16:19:08.718] FINE com.caucho.hessian.server.HessianServlet method "createOrder"
[16:19:08.718]
[16:19:08.718] FINE com.caucho.hessian.server.HessianServlet map com.amirsys.pathwork.entity.Patient(0)
[16:19:08.718]
[16:19:08.718] FINE com.caucho.hessian.server.HessianServlet "id" => null
[16:19:08.718]
[16:19:08.718] FINE com.caucho.hessian.server.HessianServlet "clientProvidedPatientId" => "MyId"
[16:19:08.718]
[16:19:08.718] FINE com.caucho.hessian.server.HessianServlet "firstName" => null
[16:19:08.718]
[16:19:08.718] FINE com.caucho.hessian.server.HessianServlet "lastName" => null
[16:19:08.718]
[16:19:08.718] FINE com.caucho.hessian.server.HessianServlet "ssn" => null
[16:19:08.718]
[16:19:08.718] FINE com.caucho.hessian.server.HessianServlet "nonExistentSSN" => null
[16:19:08.718]
[16:19:08.718] FINE com.caucho.hessian.server.HessianServlet "sex" => null
[16:19:08.718]
[16:19:08.734] FINE com.caucho.hessian.server.HessianServlet "middleInitial" => null
[16:19:08.734]
[16:19:08.734] FINE com.caucho.hessian.server.HessianServlet "homePhone" => null
[16:19:08.734]
[16:19:08.734] FINE com.caucho.hessian.server.HessianServlet "workPhone" => null
[16:19:08.734]
[16:19:08.734] FINE com.caucho.hessian.server.HessianServlet "workExt" => null
[16:19:08.734]
[16:19:08.734] FINE com.caucho.hessian.server.HessianServlet "mobilePhone" => null
[16:19:08.734]
[16:19:08.734] FINE com.caucho.hessian.server.HessianServlet "dob" => null
[16:19:08.734]
[16:19:08.734] FINE com.caucho.hessian.server.HessianServlet "address" => null
[16:19:08.734]
[16:19:08.734] FINE com.caucho.hessian.server.HessianServlet "orders" => list (0000001)
[16:19:08.734]
[16:19:08.734] FINE com.caucho.hessian.io.SerializerFactory hessian: expected 'java.util.Collection' at ''
[16:19:08.734] FINE com.caucho.hessian.server.HessianServlet 0: map com.amirsys.pathwork.entity.Order(0000002)
[16:19:08.734]
[16:19:08.734] FINE com.caucho.hessian.server.HessianServlet "id" => null
[16:19:08.734]
[16:19:08.734] FINE com.caucho.hessian.server.HessianServlet "finalDiagnosis" => null
[16:19:08.734]
[16:19:08.734] FINE com.caucho.hessian.server.HessianServlet "patient" => null
[16:19:08.734]
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0002435)
ferg
11-01-07 15:07

jpa/0j70

This is an Amber issue rather than a Hessian one.
 

- Issue History
Date Modified Username Field Change
10-26-07 09:51 westrupp New Issue
11-01-07 15:07 ferg Note Added: 0002435
11-01-07 15:07 ferg Assigned To  => ferg
11-01-07 15:07 ferg Status new => closed
11-01-07 15:07 ferg Resolution open => fixed
11-01-07 15:07 ferg Fixed in Version  => 3.1.4


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