Java.io.EOFException: Unexpected end of ZLIB input stream

Hi,
I am reading .gz file in servlet and writing it in output stream. It works fine for smaller files. For larger file when I reading file and writing output I am getting exceptions as below in order.
8/6/09 9:52:28:953 CDT] 00000029 ServletWrappe E SRVE0068E: Could not invoke the service() method on servlet /WEB-INF/pages/TilesTemplate/layouttemplate.jsp. Exception thrown : java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
     at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:489)
     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)
---- Begin backtrace for Nested Throwables
java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
     at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:489)
     at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:170)
     at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:163)
*[8/6/09 9:52:28:625 CDT] 00000029 SystemErr R java.io.EOFException: Unexpected end of ZLIB input stream*
*[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:238)*
*[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:157)*
*[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:109)*
*[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.io.FilterInputStream.read(FilterInputStream.java:110)*
*[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:325)*
*[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223)*
*[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.io.InputStreamReader.read(InputStreamReader.java:208)*
*[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.io.BufferedReader.fill(BufferedReader.java:153)*
*[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.io.BufferedReader.readLine(BufferedReader.java:316)*
*[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.io.BufferedReader.readLine(BufferedReader.java:379)*
*[8/*

My suggestion would be to run your code as a plain old Java application. Why use a servlet environment to test the problem? There's just too many things going on. So first see if it works the same way in a Java application. If it does, or if it doesn't, you then know where to go next.

Similar Messages

  • ExecTask - java.io.EOFException: Unexpected end of ZLIB input stream

    BOXI 3.1 FP 7 deployed on AIX environment with all the lang packs. Trying to install SP2 on AIX, when it comes to deploying the war files, AnalyticalReporting, the install encounters error. This error appears to be with size of the war file.  Anyone came across this issue?
    2010-03-30 10:10:00,633   Target - Target "expand_and_package" started.
    2010-03-30 10:10:00,634   Delete - Deleting directory /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/web/AnalyticalReporting
    2010-03-30 10:10:00,798    Mkdir - Created dir: /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/web/AnalyticalReporting
    2010-03-30 10:10:00,828    Mkdir - Created dir: /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/AnalyticalReporting
    2010-03-30 10:19:32,016 *ExecTask - java.io.EOFException: Unexpected end of ZLIB input stream
    2010-03-30 10:19:32,016 ExecTask -      at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java(Compiled Code))
    2010-03-30 10:19:32,017 ExecTask -      at java.util.zip.InflaterInputStream.read(InflaterInputStream.java(Compiled Code))
    2010-03-30 10:19:32,017 ExecTask -      at java.util.zip.ZipInputStream.read(ZipInputStream.java(Compiled Code))
    2010-03-30 10:19:32,017 ExecTask -      at sun.tools.jar.Main.extractFile(Main.java(Compiled Code))
    2010-03-30 10:19:32,017 ExecTask -      at sun.tools.jar.Main.extract(Main.java(Compiled Code))
    2010-03-30 10:19:32,025 ExecTask -      at sun.tools.jar.Main.run(Main.java:228)
    2010-03-30 10:19:32,025 ExecTask -      at sun.tools.jar.Main.main(Main.java:944)
    2010-03-30 10:19:32,051 ExecTask - Result: 1
    2010-03-30 10:19:32,162     Echo - Adding 'webiApplet/**' to the content to bundle with AnalyticalReporting's war file
    2010-03-30 10:19:32,302      Jar - error while reading original manifest: Error opening zip file /export/home/Business_Objects/global/deployment/workdir/tomc
    at55/application/AnalyticalReporting.war
    2010-03-30 10:19:35,354      Jar - Building jar: /export/home/Business_Objects/global/deployment/workdir/tomcat55/application/AnalyticalReporting.war
    2010-03-30 10:20:29,036      Zip - Building zip: /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/AnalyticalReporting.zip
    2010-03-30 10:23:58,561    Mkdir - Created dir: /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/web/AnalyticalReporting/WEB-INF
    2010-03-30 10:23:58,564     Copy - Copying 1 file to /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/web/AnalyticalReporting/WEB-I
    NF
    2010-03-30 10:23:58,597   Delete - Deleting directory /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/AnalyticalReporting
    2010-03-30 10:35:00,636   Target - Target "expand_and_package" finished.

    Hi,
    Don't know which of this factors solved the problem:
    1. Error server:
    AIX 5.2
    jdk 1.3.17 (minimum from docu: 1.3.11)
    $ORACLE_HOME wasn't in the begining of $PATH
    2. success server:
    AIX 5.3
    jdk 1.4.02
    $ORACLE_HOME is now in the begining of $PATH
    cheers Lao De

  • Unexpected end of ZLIB input stream error while compiling

    Hello
    I am getting errors when i run RMIC and JAR apps in the same window, i've tried to close and open the input stream in between, tried delaying between the two , tried /I paramaeter, any one ?
    Rmic stage pass OK
    but i get Unexpected end of ZLIB input stream exception i some of the file on the jar stage :
    Main batch :
    start /B %SWIFT_LOCAL_HOME%\scripts\rmicAll.bat
    start /B %SWIFT_LOCAL_HOME%\scripts\create_jar.bat
    Jar exception :
    adding: CVS/(in = 0) (out= 0)(stored 0%)
    adding: CVS/Entries(in = 383) (out= 168)(deflated 56%)
    adding: CVS/Repository(in = 13) (out= 15)(deflated -15%)
    adding: CVS/Root(in = 60) (out= 60)(deflated 0%)
    java.io.EOFException: Unexpected end of ZLIB input stream
    at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:223)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
    at java.util.zip.ZipInputStream.read(ZipInputStream.java:146)
    at sun.tools.jar.Main.update(Main.java:508)
    at sun.tools.jar.Main.run(Main.java:184)
    at sun.tools.jar.Main.main(Main.java:1022)
    C:\Eclipse_Workspace\Swift\scripts>date /T 1>>C:\Eclipse_Workspace\Swift\swift_build.txt
    C:\Eclipse_Workspace\Swift\scripts>time /T 1>>C:\Eclipse_Workspace\Swift\swift_build.txt
    C:\Eclipse_Workspace\Swift\scripts>echo Swift.jar Build Time : 1>C:\Eclipse_Workspace\Swift\swift_build.txt
    C:\Eclipse_Workspace\Swift\scripts>"C:\Program Files\Java\jdk1.6.0_02\bin\jar" -uvf C:\Eclipse_Workspace\Swift\jars\swift.jar -C C:\Eclipse_Workspace\Swift swift_build.txt
    java.io.EOFException: Unexpected end of ZLIB input stream
    at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:223)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
    at java.util.zip.ZipInputStream.read(ZipInputStream.java:146)
    at sun.tools.jar.Main.update(Main.java:508)
    at sun.tools.jar.Main.run(Main.java:184)
    at sun.tools.jar.Main.main(Main.java:1022)

    You seem to be adding the contents of CVS directories to the jar file. CVS directories contain internal information used by CVS. This suggests to me that you are either deliberately doing something really really strange, or you are doing something stupid out of ignorance.
    The CVS directories suggest you are making a jar from your source code. Generally you compile the source code 'tree' and place the output (.class files etc) in another tree and create the jar from that second tree.
    And PaulMiner is correct, you'll definitely need to change 'start' to 'call'. Do that first, then take a look at what is source code, and what it is that you want in your jar file and make sure it is all sensible, I suspect it isn't.

  • Unexpected end of ZLIB input stream.

    Hello everyone.
    I have a problem which I was unable to solve so far. Any suggestion is very welcome.
    The scenario.
    My process worked on a previously installed default install 10.1.3.1 platform.
    I installed the SOA Suite (same, very default set with olite) on a different computer and copied all files of the project dir. Modified file paths and URLs in all files in the folder and deployed the process with jdeveloper.
    Symptoms.
    Flow viewer gets stuck at Loading audit trail. Messages from a java call get to manual recovery, and will not recover.
    I start the process with a java call:
    Locator locator = new Locator("default","bpel");
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload", xml );
    deliveryService.post("OrderFlow", "initiate", nm);
    it starts without any problems and runs until a callback (receive) activity, where it is waiting for a message using the same java api calls as above.
    This runs well on the previous system, however the new system will not deliver the message.
    Log output.
    After trying to access the flow viewer:
    <2008-03-19 20:13:12,120> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "instance manager": Cannot uncompress data stream.
    Cannot uncompress data stream with GZIP algorithm; exception is Unexpected end of ZLIB input stream.
    ORABPEL-02018
    Cannot uncompress data stream.
    Cannot uncompress data stream with GZIP algorithm; exception is Unexpected end of ZLIB input stream.
         at com.collaxa.cube.engine.util.CompressUtils.uncompressStream(CompressUtils.java:184)
         at com.collaxa.cube.engine.util.DBUtils.getUncompressedBLOB(DBUtils.java:358)
         at com.collaxa.cube.engine.util.DBUtils.getUncompressedBLOB(DBUtils.java:310)
         at com.collaxa.cube.engine.adaptors.common.BaseCubeInstancePersistenceAdaptor$BaseScopeHandler.load(BaseCubeInstancePersistenceAdaptor.java:1268)
         at com.collaxa.cube.engine.adaptors.common.BaseCubeInstancePersistenceAdaptor.load(BaseCubeInstancePersistenceAdaptor.java:348)
         at com.collaxa.cube.engine.adaptors.common.BaseCubeInstancePersistenceAdaptor.load(BaseCubeInstancePersistenceAdaptor.java:251)
         at com.collaxa.cube.engine.data.CubeInstancePersistenceMgr.__load(CubeInstancePersistenceMgr.java:252)
         at com.collaxa.cube.engine.data.CubeInstancePersistenceMgr.load(CubeInstancePersistenceMgr.java:136)
         at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:4859)
         at com.collaxa.cube.engine.CubeEngine.getInstanceTrace(CubeEngine.java:2415)
         at com.collaxa.cube.ejb.impl.InstanceManagerBean.getInstanceTrace(InstanceManagerBean.java:168)
         at sun.reflect.GeneratedMethodAccessor275.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
         at com.evermind.server.ThreadState.runAs(ThreadState.java:620)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxNotSupportedInterceptor.invoke(TxNotSupportedInterceptor.java:43)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at InstanceManagerBean_RemoteProxy_4bin6i8.getInstanceTrace(Unknown Source)
         at com.oracle.bpel.client.InstanceHandle.getInstanceTrace(InstanceHandle.java:267)
         at xmlGetInstanceTrace.jspService(_xmlGetInstanceTrace.java:56)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
         at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:50)
         at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
         at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
         at com.collaxa.cube.fe.DomainFilter.doFilter(DomainFilter.java:131)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:619)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    After sending the message
    <2008-03-19 15:20:58,984> <ERROR> <default.collaxa.cube.engine.dispatch> <DispatchHelper::handleMessage> failed to handle message
    ORABPEL-02018
    Cannot uncompress data stream.
    Cannot uncompress data stream with GZIP algorithm; exception is Unexpected end of ZLIB input stream.
    ... and ...
    <2008-03-19 15:20:58,994> <ERROR> <default.collaxa.cube.engine> Attempt (1/2): caught non-fatal connection exception ... retry
    <2008-03-19 15:21:00,075> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "cube delivery": Cannot uncompress data stream.
    Cannot uncompress data stream with GZIP algorithm; exception is Unexpected end of ZLIB input stream.
    ORABPEL-02018
    Cannot uncompress data stream.
    Cannot uncompress data stream with GZIP algorithm; exception is Unexpected end of ZLIB input stream.
    ===================
    THANK YOU

    Some update on the issue.
    I have a quite complicated BPEL process, which has this symptom.
    I figured out however, that if I dont use the TaskService, it does run well.
    So I just created a test bpel process with nothing but a human task.
    It failed with the same unexpected end of zlib ... problem.
    What I also noticed is that the task appears in the worklist app, but the reply gets into the callback manual recovery pool. there must be some kind of communication failure from the taskservice in the direction of the bpel process.
    Any advice is welcome,
    thx,
    tg

  • Unexpected end of ZLIB input stream - While Importing SAP_BUILDT

    Hello All,
    We are trying to import the SAP_BUILDT file into the CMS track. But encounter the following error when we try to import in the "Development" tab. All the three steps: "Repository-Import", "CBS-make", "SDM-Deploy" have the same error message in the log.
    May 14, 2008 8:28:45 AM  Error  : error during loading of propagation request Exc=com.sap.cms.tcs.interfaces.exceptions.TCSFileLoadException: cannot load file: /usr/sap/trans/CMS/archives/sap.comSAP_BUILDTSAP AG20071117141300.sca Error: Could not extract file BUILDARCHIVES/sap.comtcbijlincbs_compdcia.zip from archive /usr/sap/trans/CMS/archives/sap.comSAP_BUILDTSAP AG~20071117141300.scaAdditional error message is:Unexpected end of ZLIB input stream
    May 14, 2008 8:28:45 AM  Error  : stack trace:
    [EXCEPTION]
    com.sap.cms.tcs.interfaces.exceptions.TCSFileLoadException: cannot load file: /usr/sap/trans/CMS/archives/sap.comSAP_BUILDTSAP AG20071117141300.sca Error: Could not extract file BUILDARCHIVES/sap.comtcbijlincbs_compdcia.zip from archive /usr/sap/trans/CMS/archives/sap.comSAP_BUILDTSAP AG~20071117141300.scaAdditional error message is:Unexpected end of ZLIB input stream
         at com.sap.cms.tcs.core.PropagationRequest.PropagationRequestData.load(PropagationRequestData.java:2464)
         at com.sap.cms.tcs.core.TCSManager.importPropagationRequests(TCSManager.java:355)
    The sp level we are trying to import is 7.00 SP14.
    We found some posts which said that the file may be corrupted. So we downloaded a couple of times from the service market place and tried. But still the same error.
    The following is the file that we downloaded from SMP:
      SAPBUILDT14_0-10003479.SCA   SP14 for DI BUILD TOOL 7.00
    Could anyone tell us what the problem could be?
    Thanks and Regards,
    Reena
    Edited by: Reena Prabhakar on May 21, 2008 11:51 AM

    Hi Purush,
    We used the same files as the ones we had used in the "Inbox" folder and copied them to the "archives" folder as well. These files we downloaded from the SAP service Marketplace. I am sure you would be aware of the right location in SMP for your files.
    However, you could also do one more thing. Make sure that you delete all the files similar to the ones that are giving an error in the "Archives" folder. I mean, if there is more than one version of the file that is giving the error, delete all these files from the archives folder. Then, do a check-in and an import again. This will copy the right version of the file to the archives folder automatically. This way, you won't have to copy paste the files manually to the archives folder.
    To explain this in more detail... here is the response I got from SAP regarding this issue:
    The "archives" folder is normally only used internally by the CMS to store a backup copy of the imported files.
    After you place a file in the "inbox" and check it in, CMS first extracts the SCA name, vendor and version and checks if it is already contained in the archive. If the file is new, it is copied from "inbox" to the "archives" folder. Already existing files are not copied. Later, during import, the import file is read from the "archives" folder. In your case I assume that the fixed SCA file had the same version, so just by comparing the SCA name, vendor and version, the CMS did not realize that it has to update the file in "archives".
    Usually you don't have to care about the "archives" folder.
    Hope this helps.
    Thanks and Regards,
    Reena

  • Java.io.IOException: Cannot close the same input stream twice

    I m writing a servlet that trigger by java URLConnection. Below is my code.
    When i use request.getParameter I encounter Exception but if i remove my request.getParameter. is run without Exception.
    Thank You
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    String nnfileName = request.getParameter("FileName");
    try
    InputStream is = request.getInputStream();
    File thisFile = new File("../webapps/chunb/MonitorTool.zip");
    FileOutputStream fileOut = new FileOutputStream(thisFile);
    copy(is, fileOut);
    is.close();
    fileOut.flush();
    fileOut.close();
    catch (Exception e)
    System.out.println("Exception in reading Input :" + e.toString());
    }

    I m not sure which line that throws the Exception, but if i remove the request.getPArameter the code work fine.
    Anyone have this problem before???
    Thank.

  • Got java.io.EOFException error in Safari

    I got this error when trying to access My Ebay.
    Request failed.
    Got java.io.EOFException (Unexpected end of ZLIB input stream): http://my.ebay.com/ws/eBayISAPI.dll?MyEbay&gbh=1
    I've fixed this problem by configuring the Proxy server to No Proxy in Firefox, but I don't know where to find that in Safari.
    Help please. Thanks.

    Safari is set to Web Proxies under the Network prefPane, and I've never make changes to it. But the Request failed error just started happening recently.

  • Mac OS X MySQL Connect throws Unexpected end of input stream

    With java version 1.4.2_05 I'm attempting to run an application which retrieves information from a MySQL database version 4.1 on Mac OS X Panther 10.3.6 The application operates without error on Windows and Linux using MySQL v4.0. Relevant Code appears below..
              private static final String DRIVER = "com.mysql.jdbc.Driver";
         private static final String URL = "jdbc:mysql://localhost:3306";
         boolean openConnection() throws SQLException, DatabaseException {
              try {
                   if (con == null) {
                        StringBuffer sb = new StringBuffer(URL);
                        sb.append("/").append(getDatabase());
                        Class.forName(DRIVER);
                        /* Failure occurs here while calling getConnection on the
                        DriverManager class. */
                        con = DriverManager.getConnection(sb.toString(), getUser(), getPassword());
              } catch(SQLException sle) {
                   sle.printStackTrace();
         } But on Mac X I'm seeing an exception thrown.
    java.sql.SQLException: Communication link failure: java.io.IOException, underlying cause:
    Unexpected end of input stream
    ** BEGIN NESTED EXCEPTION **
    java.io.IOException
    MESSAGE: Unexpected end of input stream
    STACKTRACE:
    java.io.IOException: Unexpected end of input stream
            at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:1096)
            at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:626)
            at com.mysql.jdbc.Connection.createNewIO(Connection.java:1562)
            at com.mysql.jdbc.Connection.<init>(Connection.java:491)
            at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
            at java.sql.DriverManager.getConnection(DriverManager.java:512)
            at java.sql.DriverManager.getConnection(DriverManager.java:171)I have checked to see that the proper permissions are established in the database. I've used the GRANT statement etc. It's unclear to me why I am having difficulty with the newer MySQL on Mac OS X. Any feedback is appreciated thanks.

    I managed to solve this by having the MySQL server run as a service rather than attempting to start it via the application. So now the application can retrieve from the database without error.

  • Quick par upload NWDS ERROR   Unexpected end of file from server

    Hi:
    I can´t deploy my par file from NWDS, this is the error:
    28.04.09 / 08:24] #ERROR LEVEL# com.sap.portal.developmentTools.ideSpecific.eclipse.wizards.sapmakepar.SAPMPWizard$1 > No Information
    java.net.SocketException: Unexpected end of file from server
         at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:763)
         at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:626)
         at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:760)
         at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:626)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:957)
         at com.sap.portal.developmentTools.general.wizards.upload.DeployEngine.readResponse(DeployEngine.java:363)
         at com.sap.portal.developmentTools.general.wizards.upload.DeployEngine.uploadPar(DeployEngine.java:435)
         at com.sap.portal.developmentTools.general.wizards.upload.DeployEngine.deploy(DeployEngine.java:221)
         at com.sap.portal.developmentTools.ideSpecific.eclipse.wizards.sapmakepar.SAPMPWizard$1.processUpload(SAPMPWizard.java:416)
         at com.sap.portal.developmentTools.ideSpecific.eclipse.wizards.sapmakepar.SAPMPWizard$1.run(SAPMPWizard.java:350)
         at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:302)
         at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:252)
         at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:758)
         at com.sap.portal.developmentTools.ideSpecific.eclipse.wizards.sapmakepar.SAPMPWizard.performFinish(SAPMPWizard.java:531)
         at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:608)
         at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:321)
         at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
         at org.eclipse.jface.window.Window.runEventLoop(Window.java:583)
         at org.eclipse.jface.window.Window.open(Window.java:563)
         at com.sap.portal.developmentTools.general.uploader.QuickPARUploader.run(QuickPARUploader.java:146)
         at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
         at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456)
         at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403)
         at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397)
         at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
         at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
         at com.tssap.util.startup.WBLauncher.run(WBLauncher.java:79)
         at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
         at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sap.ide.eclipse.startup.Main.basicRun(Main.java:291)
         at com.sap.ide.eclipse.startup.Main.run(Main.java:789)
         at com.sap.ide.eclipse.startup.Main.main(Main.java:607)
    Any idea?
    Thanks a lot for your time on this thread.
    Rocío.

    Hi Rocio,
    Check the proxy settings in NWDS and use JAVA RUNTIME 1.5.0_06-b05.
    Please refer to the links below where similar problems have been resolved:
    Cannot deploy par from NWDS
    Can not download SOAP CLIENT TOOL
    Another way of deploying the .par file is from System Administration -> Support -> Portal Runtime -> Administration Console.
    Hope this resolves your issue.
    Regards,
    Seema Rane.
    Edited by: Seema Rane on Apr 29, 2009 8:57 AM

  • File upoad proiblem in servlet...... Unexpected end of part exception

    Hi Friends,
    I am developing a small web application using jsp, spring, and tomcat 5.0. In my application i need to to up-load one file at add page. it also contains some form fields. In servlet i am using the multipartformdatarequest. its work fine when i am running it locally. but it gives exception when it runs on the main server on uploading.
    code i used for parsing the MultiPartFormDataRequest is :
    public ModelandView addFile(HttpServletRequest request,HttpServletReqponse response)
          MultipartFormDataRequest mrequest = null;
         if(MultipartFormDataRequest.isMultipartFormData(request))
                try
                         mrequest = new MultipartFormDataRequest(request);
                 catch(Exception e){
                          e.printstacktrace();
    }the code inside the try block generates an exception. so i m not able to get the mrequest object for further operation. This code sometime work fine. but most time it fails.
    the exception stack trace is :
    java.io.IOException: unexpected end of part
    at com.oreilly.servlet.multipart.PartInputStream.fill(PartInputStream.java:96)
    at com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:179)
    at com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:152)
    at com.oreilly.servlet.multipart.ParamPart.<init>(ParamPart.java:49)
    at
    com.oreilly.servlet.multipart.MultipartParser.readNextPart(MultipartParser.java:280)
    at javazoom.upload.parsing.CosMultipartParser.handleRequest(Unknown Source)
    at javazoom.upload.MultipartFormDataRequest.<init>(Unknown Source)
    at javazoom.upload.MultipartFormDataRequest.<init>(Unknown Source)
    at
    com.jkt.intranet.rms.controller.ResumeController.setPersonalDetails(ResumeController.java:176)
    at
    com.jkt.intranet.rms.controller.ResumeController.addResume(ResumeController.java:106)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at
    org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:351)
    at
    org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:305)
    at
    org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:128)
    at
    org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
    at
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
    at
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
    at
    org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:386)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:355)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:768)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
    at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)Please reply as soon as possible.....
    Urgently need....

    O'Reilly's Multipart thing is dead since 2005. To exclude it from being suspect, consider using [Apache Commons FileUpload|http://commons.apache.org/fileupload] which is still in active development and is rock solid. There's excellent documentation, examples and FAQ available at the homepage behind the 'User Guide' and 'Frequently Asked Questions' links. If this gives roughly the same problem, then the cause may lie in your environment. Good luck.

  • How to resolve Unexpected End of file error in Web Crawling

    how to resolve Unexpected End of file error in Web Crawling....
    I am getting java.net.SocketException :Unexpected End of file error in Web Crawling.
    How to get rid of this error.
    Please help anybody ASAP.

    1. Handle this exception - not recommended since you will be creating an exception handling overhead unnecessarily.
    2. Check for EOF using available() method in InputStream. It returns 0 if there are no bytes to read.

  • Unexpected end of file from server

    Can someone confirm if this is an issue with the code being passed or if it is an issue with the applet?
    It seems that I may be receiving this message when I have more than one web app open that uses java.
    I am not a java developer but I am just looking for some help, tell me if more detail is needed please.
    Failed to parse the response with XML stream: java.net.SocketException: Unexpected end of file from server
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
         at com.kronos.wfc.platform.uiframework.framework.xml.SerializationClient.getResponse(SerializationClient.java:170)
         at com.kronos.wfc.platform.uiframework.applet.datamanager.RetrieveObjectsFromServer.run(RetrieveObjectsFromServer.java:172)
    Caused by: java.net.SocketException: Unexpected end of file from server
         at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderField(Unknown Source)
         at com.kronos.wfc.platform.uiframework.framework.xml.SerializationClient.getResponse(SerializationClient.java:132)
         ... 1 more
    UIDefaults.getUI() failed: no ComponentUI class for: javax.swing.JOptionPane[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,icon=,initialValue=,message=The application could not get data from the server.
    Please log off and try again.,messageType=ERROR_MESSAGE,optionType=DEFAULT_OPTION,wantsInput=false]
    java.lang.Error
         at javax.swing.UIDefaults.getUIError(Unknown Source)
         at javax.swing.MultiUIDefaults.getUIError(Unknown Source)
         at javax.swing.UIDefaults.getUI(Unknown Source)
         at javax.swing.UIManager.getUI(Unknown Source)
         at javax.swing.JOptionPane.updateUI(Unknown Source)
         at javax.swing.JOptionPane.<init>(Unknown Source)
         at javax.swing.JOptionPane.showOptionDialog(Unknown Source)
         at javax.swing.JOptionPane.showMessageDialog(Unknown Source)
         at javax.swing.JOptionPane.showMessageDialog(Unknown Source)
         at com.kronos.wfc.platform.uiframework.applet.baseapplet.KronosApplet.private_showErrorMessage(KronosApplet.java:3225)
         at com.kronos.wfc.platform.uiframework.applet.baseapplet.KronosApplet.showErrorMessage(KronosApplet.java:3193)
         at com.kronos.wfc.platform.uiframework.applet.baseapplet.KronosDataManager.showError(KronosDataManager.java:859)
         at com.kronos.wfc.platform.uiframework.applet.baseapplet.KronosDataManager.processNotification(KronosDataManager.java:429)
         at com.kronos.wfc.platform.uiframework.applet.baseapplet.KronosDataManager.update(KronosDataManager.java:741)
         at com.kronos.wfc.platform.uiframework.applet.datamanager.ServerConnectionObject.setRetrievedObject(ServerConnectionObject.java:195)
         at com.kronos.wfc.platform.uiframework.applet.datamanager.RetrieveObjectsFromServer.run(RetrieveObjectsFromServer.java:190)

    System.getProperties().put("proxySet", "true");You'll have to show what else you get from the server, but the above line does nothing.

  • Error Unexpected end of file from server with HTTP POST

    Hi everyone,
    I'm coding a simple client to download some information from a local machine in my LAN.
    I have to do this with an http post request.
    When i try to parse the http response the program catch an exception, this one:
    java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(...)
    the parameter is a JSON request, and of course the response is a JSON formatted.
    i put the http request code:
    import java.io.BufferedInputStream;
    import java.io.BufferedReader;
    import java.io.ByteArrayOutputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.net.HttpURLConnection;
    import java.net.URL;
    public class HttpDownloaderThread  extends Thread{
         private String url;
            private String param;
         private HttpDownloadListener listener;
         private HttpURLConnection connection=null;
         private InputStream is;
            private OutputStreamWriter wr;
         public HttpDownloaderThread(String _url,String param, HttpDownloadListener _listener){
              url = _url;
              listener = _listener;
                    this.param=param;
         public void run(){
              try{
                   connection=(HttpURLConnection)new URL(url).openConnection();
                            connection.setRequestMethod("POST");
                            connection.setReadTimeout(5000);
                            connection.setRequestProperty("Content-Type", "application/jsonrequest");
                            connection.setDoOutput(true);
                            wr = new OutputStreamWriter(connection.getOutputStream());
                            wr.write(param, 0, param.length());
                            wr.flush();
                            int responseCode=0;
                   System.out.println();
                            try{
                             responseCode= connection.getResponseCode();
                            }catch(Exception e){
                                e.printStackTrace();
                   if (responseCode == HttpURLConnection.HTTP_OK){
                        is = connection.getInputStream();
                                     BufferedReader rd = new BufferedReader(new InputStreamReader(is));
                                    String line;
                                    while ((line = rd.readLine()) != null) {
                                        System.out.println(line);
                        closeHttpConnection();
                        listener.resourceDownloaded(url, null);
                                else{
                                closeHttpConnection();
                                listener.downloadFailed(url, new Exception("Http error: " + Integer.toString(responseCode)));
              }catch(Exception e){
                   e.printStackTrace();
                   listener.downloadFailed(url, e);
              }finally{
         public void closeHttpConnection(){
              if (is != null){
                   try{
                        is.close();
                                    wr.close();
                   }catch (Exception e){
                   }finally{
                        is = null;
                                    wr=null;
              if (connection != null){
                   try{
                        connection.disconnect();
                   }catch (Exception e){
                   }finally{
                        connection = null;
    }there's someone who know's why??
    Thanks to everyone :)
    Thomas.

    jole_star wrote:
    this problem also happen to me,.So since you provided actually no information about your problem you are going to get exactly the same response.
    Please don't hijack old threads. Start your own and provide much much much more information.
    I shall lock this thread.

  • Unexpected end fo file from server exception

    Hi all,
    When I try to run any of JWS demo application shipped with JRE, after a very long 'checking new version' message, the app ends up throwing the following exception :
    JNLPException[category: Download Error : Exception: java.net.SocketException: Unexpected end of file from server : LaunchDesc: null ]
         at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.isLaunchFileUpdateAvailable(Unknown Source)
         at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)
         at com.sun.javaws.Launcher.downloadResources(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)What's wrong ?
    Thanks in advance
    Setya

    I am having the same problem...Seyta, did the you
    find an answer?Not yet, another thread suggested that I check my proxy setting, I already do that with no luck, actually the my proxy setting at the JWS Console is the same as in my browser.
    Would u please inform me if u find solution.
    Thanks in advance.
    Setya

  • Support Assistant, Can't register plugin, Unexpected end of file from server

    Hi, i have a problem with registration plugin with strange error "Unexpected end of file from server"
    All resolves perfectly for both sides.I add lines with vCenter into /etc/hosts and to vCenter %windir%/system32/././hosts.
    Test from Support Assistant, ip of vCenter was masked:
    enrck-suppass-01:/logs # wget https://1.2.3.4 --no-check-certificate
    --2013-02-05 06:08:22--  https://1.2.3.4/
    Connecting to 1.2.3.4:443... connected.
    WARNING: cannot verify 1.2.3.4's certificate, issued by `/O=VMware Installer':
      Unable to locally verify the issuer's authority.
    WARNING: certificate common name `VMware default certificate' doesn't match requested host name `1.2.3.4'.
    HTTP request sent, awaiting response... 200 OK
    Length: 3514 (3.4K) [text/html]
    Saving to: `index.html.2'
    100%[==========================================================================>] 3,514       --.-K/s   in 0s
    2013-02-05 06:08:22 (32.1 MB/s) - `index.html.2' saved [3514/3514]
    enrck-suppass-01:/logs #
    While registration process i wasn't saw any lines with my Assistant ip's into vpxd.log
    Debugging level -> Trace
    While registration i have:
    2013-02-05 05:30:07,011 ERROR com.vmware.gss.phonehome.util.PhoneHomePluginRegister - Can't register plugin
    com.sun.xml.ws.client.ClientTransportException: HTTP transport error: java.net.SocketException: Unexpected end of file from server
            at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:132)
            at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:153)
            at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:94)
            at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:116)
    While registration i haven't any working firewalls and antiviruses.

    Additional info, for support:
    enrck-supass-01:/logs # wget https://supportassistant.vmware.com
    --2013-02-07 03:41:22--  https://supportassistant.vmware.com/
    Connecting to 10.5.8.4:8080... connected.
    Proxy request sent, awaiting response... 401 Unauthorized
    Authorization failed.
    enrck-supass-01:/logs # 

Maybe you are looking for