• OutputStream Already in use Issue

    By Eric Tomenga 1 decade ago

    I got the same error after working with v1.3 Java Charts for a few weeks.  Everything was working fine.  I did change to an automatic build as oppose to building manually.  I don't know if that factors into why the issue occurs after working properly.

    I tried to import the JARs into the/src directory as you suggested in another discussion without luck.  Remove the old ones?  I am not entirely sure if I did it correctly since it did not correct my problem.  If you have any instructions for that process, I would appreciate it.

    At this point I am ready to rebuild the application from scratch but I want to make sure I am importing the JARS correctly.  I followed the PDF you included before and was able to add the JARs correctly. 

    Thank you for all your obvious hard work into this project.

     

     - Eric

    • Response

      By Naveen Maurya 1 decade ago

      Hi Eric,

       

      Do not put the JARs in src directory. They are supposed to go in lib directory as the help file says. The previous discussion says that put the Java files in src directory. Previous versions (prior to v1.3) of Java Charts used to have Java files in src directory which is only accessible from Package Explorer. For v1.3 I put them in Java design element for ease of implementation, but now with so many users reporting issue with it, I think I would be going back. On how to put Java files in src folder you refer this documentation of v1.2.2 or you can download v1.2.2 from "Download/ Release" link on project page.

       

      Also please try to use "Project > Clean" to see if that works for v1.3.

       

      Regards,

      Naveen

      • Success!

        By Eric Tomenga 1 decade ago

        That was it.  I was stuck on trying to put the files in/src for some reason and must have misread the other discussion. 

         

        Thank you very much for your quick response.

      • It came back

        By Eric Tomenga 1 decade ago

        Very strange. It worked the entire day after I re-imported the Jar files into the lib directory like I indicated. 

        The next morning I get the same error again as before.  I am not working on java charts.  I configured the one chart and have left it alone.  I am working on another part of the xpage.

        03/01/2013 08:34:53 AM  HTTP JVM: java.lang.NoClassDefFoundError: org.openntf.javacharts.Common
        03/01/2013 08:34:53 AM  HTTP JVM: com.ibm.xsp.webapp.FacesServlet$ExtendedServletException: java.lang.IllegalStateException: Can't get a Writer while an OutputStream is already in use

        I tried to rebuild project and I tried to clean the project.  No luck.

        So I remove and re-import jar files, like I did yesterday, add them to the library and it starts working again.

        Our server wasn't rebooted last night.  It is zlinux (virtual) 8.53 UP1 FP2 

        Let me know if there is anything you want me to try and examine. 

         

         

         

        • Try re-saving the Java files

          By Naveen Maurya 1 decade ago

          Open the Java files (Common.java, XJFC.java, XPDF.java) and make a small edit in them, say entering and deleting a space, and save them again. Then try to run the charts. Let me know if that works.

           

          Regards,

          Naveen