Are you sure, that BufferedReader-implementing classes you use are
serializable or network-aware?
Alexander Klyubin
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of René Rolander
Nygaard
Sent: Thursday, January 18, 2001 08:11
To: [EMAIL PROTECTED]
Subject: [jBoss-User] Send BufferedReader from JSP up to JBoss fails.
Hello you wise people of the JBoss community.
Since i'm unable to search for information on-line at jboss.org, and no
similar informations is present in my local JBoss mailling-list archive, i
will try this forum.
I have a upload page (JSP). In this upload page i grab the stream with all
the good information from the user.
On my JSP page i find all the "other" input information such as user-id and
password etc.
Finally there is a file, and i would like to parse the rest of the file on
to my JBoss beans where all my logic is located.
I would like to handle the input similary whether it comes from a
upload-form or from a local file - or something different.
I read the input one line at a time, and would like to use the
StreamTokenize on it because it can handle Strings and numbers quite
excellent.
My Session stateful bean got a function :
public int prepareUploadItems (BufferedReader r) throws RemoteException,
CreateException;
My bean got a function :
public int prepareUploadItems (BufferedReader r)
that only calls the above function.
I traced the error to the function calling the JBoss function:
return m_upload.prepareUploadItems (r);
The JBoss function will not start (got a System.out.println as the first
line).
The error present it-self in my browser !
This is the Explorer error :
Error: 500
Location: /administrator/butiksadm_upload.jsp
Internal Servlet Error:
javax.servlet.ServletException
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:386)
at
_0002fbutiksadm_0005fpicture_0002ejspbutiksadm_0005fpicture_jsp_52._jspServi
ce(_0002fbutiksadm_0005fpicture_0002ejspbutiksadm_0005fpicture_jsp_52.java:3
71)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.reflect.UndeclaredThrowableException:
java.io.NotSerializableException: java.io.BufferedReader
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
at java.io.ObjectOutputStream.outputArray(ObjectOutputStream.java:1098)
at
java.io.ObjectOutputStream.checkSubstitutableSpecialClasses(ObjectOutputStre
am.java:456)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at
org.jboss.ejb.plugins.jrmp.interfaces.RemoteMethodInvocation.writeExternal(R
emoteMethodInvocation.java:162)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1172)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
at java.rmi.MarshalledObject.(MarshalledObject.java:95)
at
org.jboss.ejb.plugins.jrmp.interfaces.StatefulSessionProxy.invoke(StatefulSe
ssionProxy.java:173)
at $Proxy1.prepareUploadItems(Unknown Source)
at
com.netmill.cityshop.bean.upload.UploadBean.prepareUploadItems(UploadBean.ja
va:95)
at
_0002fbutiksadm_0005fpicture_0002ejspbutiksadm_0005fpicture_jsp_52._jspServi
ce(_0002fbutiksadm_0005fpicture_0002ejspbutiksadm_0005fpicture_jsp_52.java:2
70)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
at java.lang.Thread.run(Thread.java:484)
Can JBoss not get a handle to a stream from JSP ?
Any help would be appreciated !
- René Rolander Nygaard
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]