File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes java.rmi.ServerException: Internal Server Error (serialization error....) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "java.rmi.ServerException: Internal Server Error (serialization error....)" Watch "java.rmi.ServerException: Internal Server Error (serialization error....)" New topic
Author

java.rmi.ServerException: Internal Server Error (serialization error....)

Angelo Giugliano
Greenhorn

Joined: Sep 22, 2004
Posts: 6
Hi to all

I have two classes.
The first is:

public class FatherBean implements Serializable {

public String name;

public int id;

/** Creates a new instance of ChildBean */
public FatherBean() {
this.name= null;
this.id = 0;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}
}


The second is :

public class ChildBean extends FatherBean implements Serializable {
public double number;

/** Creates a new instance of ChildBean */
public ChildBean() {
super();
this.number = 0.0;
}

public double getNumber() {
return number;
}

public void setNumber(double number) {
this.number = number;
}

}


A test client class implements the following method that is exposed as web service:

..........................................................
public java.util.Collection getBeans() {
java.util.Collection beans = new ArrayList();
ChildBean childBean1 = new ChildBean();
ChildBean childBean2 = new ChildBean();
childBean1.setId(100);
childBean1.setName("pippo");
childBean1.setNumber(3.9);
childBean2.setId(100000);
childBean2.setName("pluto");
childBean2.setNumber(4.7);

beans.add(childBean1);
beans.add(childBean2);

return beans;
}
.....................................................

When I invoke the web service to url:

http://localhost:8080/Prova

and invoke the correspondent method on jsp client, throws exception:

java.rmi.ServerException: Internal Server Error (serialization error: no serializer is registered for (class test.ChildBean, null))
at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
at ws.ProvaClientGenClient.ProvaRPC_Stub.getBeans(ProvaRPC_Stub.java:59)
at ws.ProvaClientGenClient.getBeans_handler.doAfterBody(getBeans_handler.java:64)
at _jasper._getBeans_TAGLIB_jsp._jspService(_getBeans_TAGLIB_jsp.java:121)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)

Where is the problem? Will be ChildBean that extends FatherBean? Which settings on Sun Java Studio Enterprise 6 2004Q1?

Thank you
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
While deploying, you have to register a serializer for the complex class ChildBean, does your documentation says something like "running webservices which uses complex type class as input output" or "Registering serializer and de-serializer" ..check the tutorial with that topic and see how it configured and deployed.


Spritle Software Blogs
Angelo Giugliano
Greenhorn

Joined: Sep 22, 2004
Posts: 6
Originally posted by Balaji Loganathan:
While deploying, you have to register a serializer for the complex class ChildBean, does your documentation says something like "running webservices which uses complex type class as input output" or "Registering serializer and de-serializer" ..check the tutorial with that topic and see how it configured and deployed.
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Guess you forgot to type/paste your reply
Angelo Giugliano
Greenhorn

Joined: Sep 22, 2004
Posts: 6
Hi to all

My problem is resolved. I had to set up the serializer class on ChildBean as You have answered to me.

Thanks Angels....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.rmi.ServerException: Internal Server Error (serialization error....)
 
Similar Threads
Help! problem while using logic:iterate with HashMap
JasperException with custom JSP tags
Whats wrong with the code ?
Exceptions while testing JAXRPC Samples in SunOne
displat:table tag pls help me