I am verifying JfileUpload + JFileDownload + JBatchUpload + JSPUpload script to understand how to implement this functionality into my application. Everything works fine, I can upload files, download files BUT i have found in my Application server (IBM WebSphere) std.out log that I get some error messages when downloading files.
Seems that I have some problem within process.jsp.
Any ideas?
Thanks in advance.
//Stefan
Code: Select all
WebSpehere server output
[9/26/11 16:10:48:944 CEST] 000011ea ServletWrappe E SRVE0068E: Could not invoke the service() method on servlet /jspupload/process.jsp. Exception thrown : java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
at java.lang.Throwable.(Throwable.java:195)
at java.lang.Exception.(Exception.java:41)
at java.lang.RuntimeException.(RuntimeException.java:43)
at java.lang.IllegalStateException.(IllegalStateException.java:38)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:478)
at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:170)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:163)
at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:227)
at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:172)
at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:140)
at com.ibm._jsp._process._jspService(_process.java:535)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:673)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:178)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:89)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1897)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1447)
[9/26/11 16:10:49:065 CEST] 000011ea ServletWrappe E SRVE0014E: Uncaught service() exception root cause /jspupload/process.jsp: SRVE0199E: OutputStream already obtained
[9/26/11 16:10:49:104 CEST] 000011ea LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[9/26/11 16:10:49:144 CEST] 000011ea WebApp E SRVE0026E: [Servlet Error]-[/jspupload/process.jsp]: java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
at java.lang.Throwable.(Throwable.java:195)
at java.lang.Exception.(Exception.java:41)
at java.lang.RuntimeException.(RuntimeException.java:43)
at java.lang.IllegalStateException.(IllegalStateException.java:38)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:478)
at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:170)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:163)
at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:227)
at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:172)
at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:140)
at com.ibm._jsp._process._jspService(_process.java:535)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:673)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:178)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:89)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1897)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1447)
[9/26/11 16:10:49:190 CEST] 000011ea SRTServletRes W WARNING: Cannot set status. Response already committed.
[9/26/11 16:10:49:252 CEST] 000011ea SRTServletRes W WARNING: Cannot set header. Response already committed.
[9/26/11 16:10:49:313 CEST] 000011ea WebApp A SRVE0180I: [JFileUpload.war] [/JFile] [Servlet.LOG]: Error page exception The server cannot use the error page specified for your application because of the exception printed below.
[9/26/11 16:10:49:344 CEST] 000011ea WebApp A SRVE0181I: [JFileUpload.war] [/JFile] [Servlet.LOG]: Error Page Exception: : com.ibm.ws.webcontainer.webapp.WebAppErrorReport: SRVE0199E: OutputStream already obtained
at java.lang.Throwable.(Throwable.java:195)
at java.lang.Exception.(Exception.java:41)
at javax.servlet.ServletException.(ServletException.java:161)
at com.ibm.websphere.servlet.error.ServletErrorReport.(ServletErrorReport.java:81)
at com.ibm.ws.webcontainer.webapp.WebAppErrorReport.(WebAppErrorReport.java:62)
at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:2647)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:110)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1897)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1447)
Caused by: java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
at java.lang.Throwable.(Throwable.java:195)
at java.lang.Exception.(Exception.java:41)
at java.lang.RuntimeException.(RuntimeException.java:43)
at java.lang.IllegalStateException.(IllegalStateException.java:38)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:478)
at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:2597)
... 11 more
Code: Select all
Download parameters used:
document.writeln('<PARAM NAME=CODE VALUE="jfileupload.upload.client.MApplet.class">');
document.writeln('<PARAM NAME=CODEBASE VALUE="./">');
document.writeln('<PARAM NAME=ARCHIVE VALUE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/download.jar">');
document.writeln('<PARAM NAME=NAME VALUE="fileupload">');
document.writeln('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">');
document.writeln('<PARAM NAME="scriptable" VALUE="true">');
document.writeln('<PARAM NAME="url" VALUE="http://sac04607.thn.se.eds.com/JFile/jspupload/process.jsp">');
document.writeln('<PARAM NAME="item1" VALUE="MKD2010026.TXT">');
document.writeln('<PARAM NAME="param2" VALUE="relativefilename">');
document.writeln('<PARAM NAME="value2" VALUE="true">');
document.writeln('<PARAM NAME="param3" VALUE="account">');
document.writeln('<PARAM NAME="value3" VALUE="out">');
document.writeln('<PARAM NAME="folderdepth" VALUE="-1">');
document.writeln('<PARAM NAME="verbosemode" VALUE="trace">');
document.writeln('<PARAM NAME="encoding" VALUE="ISO-8859-1">');
document.writeln('<PARAM NAME="transferui" VALUE="jfileupload.download.ui.DownloadTransferUI">');
document.writeln('<PARAM NAME="resources" VALUE="i18n_bar">');
document.writeln('<PARAM NAME="transferuiresources" VALUE="i18n_pane">');
document.writeln('<PARAM NAME="mode" VALUE="jfileupload.download.http.HTTPDownloadTransfer">');
Code: Select all
Java console output
Java Plug-in 1.5.0_22
Använder JRE-version 1.5.0_22 Java HotSpot(TM) Client VM
Användarens hemkatalog = C:\Users\engstrom
----------------------------------------------------
c: töm systemfönster
f: slutför objekt i slutföringskö
g: skräpinsamling
h: visa det här hjälpmeddelandet
l: dumpa classloader-lista
m: skriv ut minnesförbrukning
o: utlösarloggning
p: ladda proxykonfiguration på nytt
q: dölj konsol
r: ladda policykonfiguration på nytt
s: dumpa system- och distributionsegenskaper
t: dumpa trådlista
v: dumpa trådstack
x: töm classloader-cache
0-5: ange spårningsnivån till <n>
----------------------------------------------------
[INFO] MApplet - JFileUpload 2.8 Build FINAL.001
[DEBUG] DefaultHttpParams - Set parameter http.useragent = Jakarta Commons-HttpClient/3.1
[DEBUG] DefaultHttpParams - Set parameter http.protocol.version = HTTP/1.1
[DEBUG] DefaultHttpParams - Set parameter http.connection-manager.class = class org.apache.commons.httpclient.SimpleHttpConnectionManager
[DEBUG] DefaultHttpParams - Set parameter http.protocol.cookie-policy = default
[DEBUG] DefaultHttpParams - Set parameter http.protocol.element-charset = US-ASCII
[DEBUG] DefaultHttpParams - Set parameter http.protocol.content-charset = ISO-8859-1
[DEBUG] DefaultHttpParams - Set parameter http.method.retry-handler = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@f62eba
[DEBUG] DefaultHttpParams - Set parameter http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]
[DEBUG] HttpClient - Java version: 1.5.0_22
[DEBUG] HttpClient - Java vendor: Sun Microsystems Inc.
[DEBUG] HttpClient - Java class path: C:\PROGRA~1\Java\JRE15~1.0_2\classes
[DEBUG] HttpClient - Operating system name: Windows Vista
[DEBUG] HttpClient - Operating system architecture: x86
[DEBUG] HttpClient - Operating system version: 6.0
[DEBUG] HttpClient - SUN 1.5: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores)
[DEBUG] HttpClient - SunRsaSign 1.5: Sun RSA signature provider
[DEBUG] HttpClient - SunJSSE 1.5: Sun JSSE provider(PKCS12, SunX509 key/trust factories, SSLv3, TLSv1)
[DEBUG] HttpClient - SunJCE 1.5: SunJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
[DEBUG] HttpClient - SunJGSS 1.0: Sun (Kerberos v5)
[DEBUG] HttpClient - SunSASL 1.5: Sun SASL provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)
[DEBUG] DefaultHttpParams - Set parameter http.useragent = JFileUpload
[DEBUG] DefaultHttpParams - Set parameter http.protocol.element-charset = ISO-8859-1
[DEBUG] DefaultHttpParams - Set parameter http.method.retry-handler = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@151dcd6
[DEBUG] F - Auto-detect proxy settings : http.proxyHost = null
[DEBUG] F - Auto-detect proxy settings : http.proxyPort = -1
[INFO] F - Auto-detect proxy settings (ps): DIRECT
[INFO] F - Auto-detect proxy settings : host = null
[INFO] F - Auto-detect proxy settings : port = -1
[DEBUG] F - relativefilename:true
[DEBUG] F - account:out
[INFO] Conf - TransferUI instantiated : jfileupload.download.ui.DownloadTransferUI
[INFO] DownloadTransferUI - JFileDownload 2.8 FINAL.001
[DEBUG] DefaultHttpParams - Set parameter http.useragent = JFileUpload
[DEBUG] DefaultHttpParams - Set parameter http.protocol.element-charset = ISO-8859-1
[DEBUG] DefaultHttpParams - Set parameter http.method.retry-handler = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@c3c44
[DEBUG] F - Auto-detect proxy settings : http.proxyHost = null
[DEBUG] F - Auto-detect proxy settings : http.proxyPort = -1
[INFO] F - Auto-detect proxy settings (ps): DIRECT
[INFO] F - Auto-detect proxy settings : host = null
[INFO] F - Auto-detect proxy settings : port = -1
[DEBUG] F - relativefilename:true
[DEBUG] F - account:out
[DEBUG] HttpConnection - Open connection to sac04607.thn.se.eds.com:80
[DEBUG] header - >> "POST /JFile/jspupload/process.jsp HTTP/1.1[\r][\n]"
[DEBUG] HttpMethodBase - Adding Host request header
[DEBUG] header - >> "filesystem: jfileupload.download.http.HTTPRemoteTFileSystem[\r][\n]"
[DEBUG] header - >> "User-Agent: JFileUpload[\r][\n]"
[DEBUG] header - >> "Host: sac04607.thn.se.eds.com[\r][\n]"
[DEBUG] header - >> "Content-Length: 20[\r][\n]"
[DEBUG] header - >> "Content-Type: application/x-www-form-urlencoded[\r][\n]"
[DEBUG] header - >> "[\r][\n]"
[DEBUG] content - >> "cmd=list&val1=%2Fout"
[DEBUG] EntityEnclosingMethod - Request body sent
[DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] header - << "Date: Mon, 26 Sep 2011 14:10:46 GMT[\r][\n]"
[DEBUG] header - << "Server: WebSphere Application Server/6.0[\r][\n]"
[DEBUG] header - << "Content-Length: 429[\r][\n]"
[DEBUG] header - << "Set-Cookie: JSESSIONID=0000psW7iG8ccDxk2R51beA-to9:-1; Path=/[\r][\n]"
[DEBUG] header - << "Content-Type: text/html; charset=ISO-8859-1[\r][\n]"
[DEBUG] header - << "Content-Language: en-SE[\r][\n]"
[DEBUG] header - << "[\r][\n]"
[DEBUG] HttpMethodBase - Cookie accepted: "$Version=0; JSESSIONID=0000psW7iG8ccDxk2R51beA-to9:-1; $Path=/"
[DEBUG] HttpMethodBase - Buffering response body
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[0x9][\r][\n]"
[DEBUG] content - << "[0x9][\r][\n]"
[DEBUG] content - << "[0x9][\r][\n]"
[DEBUG] content - << "[0x9][\r][\n]"
[DEBUG] content - << "[0x9][\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "<pre>[\n]"
[DEBUG] content - << "file 1190618946000 84 MKD2006026.TXT<br>[\n]"
[DEBUG] content - << "file 1306411199000 496786 FTS2Iusr1.pdf<br>[\n]"
[DEBUG] content - << "file 1140512069000 2600 HYTPDC_2006022110542947.TXT<br>[\n]"
[DEBUG] content - << "file 1189772279000 84 MKD2010025.TXT<br>[\n]"
[DEBUG] content - << "file 1190618946000 84 MKD2010026.TXT<br>[\n]"
[DEBUG] content - << "file 1142507944000 2600 HYTPDC_2006031613190404.TXT<br>[\n]"
[DEBUG] content - << "file 1189772280000 84 MKD2006025.TXT<br>[\n]"
[DEBUG] content - << "file 1139908732000 10400 HYTPDC_2006021411185141.TXT<br>[\n]"
[DEBUG] content - << "</pre>[\n]"
[DEBUG] HttpMethodBase - Resorting to protocol version default close connection policy
[DEBUG] HttpMethodBase - Should NOT close connection, using HTTP/1.1
[DEBUG] HttpConnection - Releasing connection back to connection manager.
[DEBUG] HTTPDownloadTransfer - relativefilename:true
[DEBUG] HTTPDownloadTransfer - localfolder:C:\Temp
[DEBUG] HTTPDownloadTransfer - account:C:\Temp
[INFO] HTTPDownloadTransfer - Download (POST) started : /out/MKD2010026.TXT
[DEBUG] HttpConnection - Open connection to sac04607.thn.se.eds.com:80
[DEBUG] header - >> "POST /JFile/jspupload/process.jsp HTTP/1.1[\r][\n]"
[DEBUG] HttpMethodBase - Adding Host request header
[DEBUG] header - >> "filesystem: jfileupload.download.http.HTTPDownloadTransfer[\r][\n]"
[DEBUG] header - >> "relativefilename: true[\r][\n]"
[DEBUG] header - >> "localfolder: C:\Temp[\r][\n]"
[DEBUG] header - >> "account: C:\Temp[\r][\n]"
[DEBUG] header - >> "User-Agent: JFileUpload[\r][\n]"
[DEBUG] header - >> "Host: sac04607.thn.se.eds.com[\r][\n]"
[DEBUG] header - >> "Content-Length: 41[\r][\n]"
[DEBUG] header - >> "Content-Type: application/x-www-form-urlencoded[\r][\n]"
[DEBUG] header - >> "[\r][\n]"
[DEBUG] content - >> "cmd=download&val1=%2Fout%2FMKD2010026.TXT"
[DEBUG] EntityEnclosingMethod - Request body sent
[DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] header - << "Date: Mon, 26 Sep 2011 14:10:48 GMT[\r][\n]"
[DEBUG] header - << "Server: WebSphere Application Server/6.0[\r][\n]"
[DEBUG] header - << "Content-Length: 84[\r][\n]"
[DEBUG] header - << "Set-Cookie: JSESSIONID=00002d1U4699yJNJYqxAuURi7Zy:-1; Path=/[\r][\n]"
[DEBUG] header - << "Content-Type: text/html; charset=ISO-8859-1[\r][\n]"
[DEBUG] header - << "Content-Language: en-SE[\r][\n]"
[DEBUG] header - << "[\r][\n]"
[DEBUG] HttpMethodBase - Cookie accepted: "$Version=0; JSESSIONID=00002d1U4699yJNJYqxAuURi7Zy:-1; $Path=/"
[INFO] HTTPDownloadTransfer - Status code = 200
[DEBUG] content - << "Record 1 for dealer 378023[\r][\n]"
[DEBUG] content - << "record 2 for dealer 378023[\r][\n]"
[DEBUG] content - << "record 3 for dealer 378023[\r][\n]"
[DEBUG] HttpMethodBase - Resorting to protocol version default close connection policy
[DEBUG] HttpMethodBase - Should NOT close connection, using HTTP/1.1
[DEBUG] HttpConnection - Releasing connection back to connection manager.
[INFO] HTTPDownloadTransfer - Download completed