• Can't get a Writer while an OutputStream is already in use

    By Naseer Mohammed 1 decade ago

    Hi,

    I tried and I am getting the above said error message. I followed the steps mentioned.

    Regards,

    Naseer

    • Some queries

      By Naveen Maurya 1 decade ago
      1. Are you running this on demo database or you incorporated Java Charts in your own database?
      2. Are there any compile errors in your database?
      3. Try checking the log.nsf if any errors are showing up there. I have put in certain messages which would print out in log.nsf if something goes wrong. It would help us to diagnose the issue.

       

      Regards,

      Naveen

      • Log entries

        By Naseer Mohammed 1 decade ago

        Hi Naveen,

        Please find below log entries for the same error.

         

        01/28/2013 02:34:13 PM  HTTP JVM: java.lang.NullPointerException
        01/28/2013 02:34:13 PM  HTTP JVM:     at org.openntf.javacharts.XJFC.getChart(XJFC.java:55)
        01/28/2013 02:34:13 PM  HTTP JVM:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        01/28/2013 02:34:13 PM  HTTP JVM:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        01/28/2013 02:34:13 PM  HTTP JVM:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        01/28/2013 02:34:13 PM  HTTP JVM:     at java.lang.reflect.Method.invoke(Method.java:611)
        01/28/2013 02:34:13 PM  HTTP JVM:     at com.ibm.jscript.types.JavaAccessObject.call(JavaAccessObject.java:321)
        01/28/2013 02:34:13 PM  HTTP JVM:     at com.ibm.jscript.types.FBSObject.call(FBSObject.java:161)
        01/28/2013 02:34:13 PM  HTTP JVM:     at com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:175)
        01/28/2013 02:34:13 PM  HTTP JVM:     at com.ibm.jscript.ASTTree.ASTBlock.interpret(ASTBlock.java:100)
        01/28/2013 02:34:13 PM  HTTP JVM:     at com.ibm.jscript.ASTTree.ASTTry.interpret(ASTTry.java:109)
        01/28/2013 02:34:13 PM  HTTP JVM:     at com.ibm.jscript.ASTTree.ASTProgram.interpret(ASTProgram.java:119)
        01/28/2013 02:34:13 PM  HTTP JVM:     at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:139)
        01/28/2013 02:34:13 PM  HTTP JVM:     at com.ibm.jscript.JSExpression._interpretExpression(JSExpression.java:435)
        01/28/2013 02:34:13 PM  HTTP JVM:     at com.ibm.jscript.JSExpression.access$1(JSExpression.java:424)
        01/28/2013 02:34:13 PM  HTTP JVM:     at com.ibm.jscript.JSExpression$2.run(JSExpression.java:414)
        01/28/2013 02:34:13 PM  HTTP JVM:     at java.security.AccessController.doPrivileged(AccessController.java:284)
        01/28/2013 02:34:13 PM  HTTP JVM:     at com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:410)
        01/28/2013 02:34:13 PM  HTTP JVM:     at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:251)

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

         

        regards,

        Naseer

        • Try recompiling the database

          By Naveen Maurya 1 decade ago

          There is an error in your log java.lang.NoClassDefFoundError: org.openntf.javacharts.Common. This error is because Java Charts cannot find the class org.openntf.javacharts.Common. Have you copied this class (from "Code > Java" section)? If you have then can you try to recompile the database using the menu "Project > Clean". Also you can see if there are any compile time errors in your database using the Problems view. To enable it use the menu option of "Window > Show Eclipse Views > Problems".

           

          Regards,

          Naveen

          • Same errors

            By Naseer Mohammed 1 decade ago

            I tried, but no luck same error.

             

            Regards,

            • It may be because of new Code/Java design element

              By Naveen Maurya 1 decade ago

              I fear this may be the issue with the new Code/Java design element. This user is having same problem as yours. Searching on Google I found this blog post where user was facing similar issue due to new Code/Java design element. Previously the Java code was kept in "WEB-INF/src" folder but in v1.3 I put it in Code/Java section for ease of use.

               

              Can you try to put the files in Code/Java inside "WEB-INF/src" to see it resolves the problem? If it does then let me know as I would probably have to fix this in next release. Also does this problem occur even in the demo database provided in ZIP file of Java Charts?

               

              Regards,

              Naveen

              • working fine

                By Naseer Mohammed 1 decade ago

                Hi,

                Thanks for the update it is working fine.

                regards,

                • What changes did you make?

                  By Naveen Maurya 1 decade ago

                  Thanks for the update. I would just like to know what changes you made that it started working? May be I would include those in next release. Smile

                   

                  Regards,

                  Naveen

                  • changes

                    By Naseer Mohammed 1 decade ago

                    I added those java files in the src folder, build the project.

                    regards,

                    Naseer

          • build and clean done

            By Naseer Mohammed 1 decade ago

            hi,

            I build and clean again same error and I am getting this error in my log

            01/28/2013 05:23:05 PM  HTTP JVM: com.ibm.xsp.webapp.FacesServlet$ExtendedServletException: java.lang.IllegalStateException: Can't get a Writer while an OutputStream is already in use

            regards,