No announcement yet.

More problems with scripcase PDF

  • Filter
  • Time
  • Show
Clear All
new posts

  • More problems with scripcase PDF


    I've been struggling with scriptcase support team to sort out PDF reports issue, here is short illustration to my problem:

    1- Production server (Ubuntu 10.10 Mevrick, Apache 2, PHP 5, PostgreSQL 8.4)
    2- Java JRE installed
    3- chmod-ed folder (_lib) to 777

    4- whenever trying to print in PDF, the output file is corrupted and the its size is always 16byte.
    5- Other files like excel and photos are written normally to (tmp) folder which is an indication of proper access rights assigned to this folder.

    6- The output of the PDF log file is as follows:

    /usr/lib/jvm/java-6-sun- -Xms128m -Xmx256m -Djava.awt.headless=true -cp .d4ml.jar Pd4Php http://MYIPADDRESS/APP/_lib/tmp/sc_a...ti22qkk36.html 1280 A4 -orientation LANDSCAPE -bookmarks HEADINGS -insets 5,5,5,5,mm -permissions 2076 > /home/APP/_lib/tmp/sc_pdf_20110403113209_498_assets_tbl_cat_gro.pdf

    any help ?!

  • #2
    Re: More problems with scripcase PDF

    I have exactly the same problem. The log output is as follows:

    java -Xms128m -Xmx256m -Djava.awt.headless=true -cp .d4ml.jar Pd4Php https://MYIPADDRESS/rel1004/_lib/tmp...2qgngovc3.html 800 A4 -orientation PORTRAIT -permissions 2076 > /var/www/vhosts/MYDOMAIN/httpdocs/rel1004/_lib/tmp/sc_pdf_20110409222050_932_grid_club_x_classes.pdf

    The PDF-file is only 16 bytes (= corrupt).

    When I trigger the command manually (SSH) the server returns the following error:

    Exception in thread "main" java.lang.NoClassDefFoundError: Pd4Php
    Caused by: java.lang.ClassNotFoundException: Pd4Php
    at$ 217)
    at Method)
    at ava:205)
    at java.lang.ClassLoader.loadClass( 21)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche
    at java.lang.ClassLoader.loadClass( 66)
    Could not find the main class: Pd4Php. Program will exit.



    • #3
      Re: More problems with scripcase PDF

      the problem with PDF and Java its when you are trying to Export in a Grid App.

      see in your diagnosis file(production environment) if the java is on.
      I think the latest java jre from SUN its 1.6.00024.


      • #4
        Re: More problems with scripcase PDF

        The problem is unfortunately NOT solved!

        First: I ran the diagnosis file in the production environment and java is definitely "ON".

        Second: The app not "trying to export in a grid app". Actually, it's a pivot statistic app with no grid at all. Hence, the PDF-button is located in the summary section.

        Third: That being said, the problem persists throughout ALL apps, ALL servers and ALL linux environment we tried.

        ANY MORE IDEAS? For example: What does the error mean: "Could not find the main class: Pd4Php"?


        • #5
          Re: More problems with scripcase PDF

          To help you more, we need to know more about your environment, so we need to see the diagnosis file.


          • #6
            Re: More problems with scripcase PDF


            I have the same problem: I can't create the PDF and I have the same error as below.

            I tried to run the script found in the .log file in the shell: I ran it into the directory that contain the .jar file. The result is:

            java -Xms128m -Xmx256m -Djava.awt.headless=true -cp .d4ml.jar Pd4Php http://MYSERVERADDRESSHERE/_lib/tmp/...ip0f0ate0.html 800 A4 -orientation LANDSCAPE -permissions 2076 > /var/www/trackdb/_lib/tmp/sc_pdf_20110829164036_874_all_datiIniziali.pdf

            I suppose that is because I have an HTTPS (secure) connection and the script take a HTTP (unsecure) one here....

            I think to have find a bug here...

            Giuseppe Giardina.


            • #7
              Re: More problems with scripcase PDF

              I am having the exact same problem. I have a Linux server for deployment. All PDF's are okay on the SC Server. But not on deployment Server.
              I hope someone has fixed this problem. All PDF come as same error as below and 0 bytes. Permission 2076. I even ( just for test sake ) gave permissions to the worls for write and same problem.

              Thank you.


              • #8
                Re: More problems with scripcase PDF

                About the HTTPS,

                i think for HTTPS you have to configure Server Protocol as https://

                To do so:

                _lib/prod (or wherever you configure the connection settings) --> PRODUCTION CONFIGURATION --> Configure production environment --> Server Protocol(http://, https:// ...) : Https://

                Hope it helps.




                • #9
                  Re: More problems with scripcase PDF

                  Come on SC. We have a bug here. Please do something.

                  With many thanks.

                  Gidday! from Sydney.



                  • #10
                    Re: More problems with scripcase PDF (solved)

                    After almost giving up on Scriptcase (because so far you guys have given us no useful hint whatsoever and probably hundreds of developers have wasted thousands of hours on this, I am sure) we have finally solved the problem - at least for our servers.

                    Analyzing the error-logs and trying out endless variations of modifying the actual code scriptcase is generating the moment a PDF-request is triggered, the problem can be solved by simply changing the PDF-configuration in the production environment.

                    Log into your production environment, there is one parameter called PDF Server IP.

                    This label, unfortunately, is very misleading because we had always entered our servers IP-addresses as numeric values in this field.

                    Scriptcase uses this value to create a pathname to the html-output-file (which needs to be converted to pdf) as follows:
                    http://[PDF Server IP]/_lib/tmp/sc_grid_example_html

                    Now, this might work only if your server's IP address resolves 1:1 to your actual domain and website, hence doesn't use virtualization.

                    But if you have a server with multiple domains, the IP-address(es) are typically shared by more than one domain!
                    Even worse: if you use server management panels like Plesk or cPanel the IP-address almost NEVER resolves directly to the location of your scriptcase installation.

                    For example: If your server has the ip and hosts four domains under Ubuntu/Plesk, the locations of your Scriptcase installations are as follows:
                    Obviously, the one ip would never correctly point to the various Scriptcase installations.

                    So the trick is simply to NOT enter the numeric IP-address (e.g. in the field PDF Server IP, but rather the full alphabetical domain name (e.g.

                    Urgent advice for Scriptcase:
                    Please change the label from "PDF Server IP" to "PDF Server Domain / IP" and explain this more carefully in the manuals.


                    • #11
                      Just for anyone else coming across issues with PDF generation. Make sure you are using Java 1.6 or higher. I had similar issues to the above and turns out my java version was too old (1.5)


                      • #12
                        But this is not generally ... Java (JRE) must exist only on the development machine and even then only if sc 5.x or 6.x is used. In SC 7.x that is no longer necessary ...
                        Best regards: - Reinhard -

                        I use ScriptCase 8 Enterprise Edition, Version 8.(latest)