More problems with scripcase PDF

Amigos,

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 1.6.0.24 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-1.6.0.24/jre/bin/java -Xms128m -Xmx256m -Djava.awt.headless=true -cp .:pd4ml.jar Pd4Php http://MYIPADDRESS/APP/_lib/tmp/sc_assets_tbl_cat_gro_html_oe76r68jnhl4hcnj8ti22qkk36.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 ?!

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 .:pd4ml.jar Pd4Php https://MYIPADDRESS/rel1004/_lib/tmp/sc_grid_club_x_classes_html_46u1ho86vv16jb43t2qgngovc3.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 java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: Pd4Php. Program will exit.

SCRIPTCASE TEAM, PLEASE HELP!

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.

Re: More problems with scripcase PDF

[b]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”?[/b]

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.

Re: More problems with scripcase PDF

Dears,

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 .:pd4ml.jar Pd4Php http://MYSERVERADDRESSHERE/_lib/tmp/sc_all_datiIniziali_html_bmbc8heojn5labqr4ip0f0ate0.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…

Bye,
Giuseppe Giardina.

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.

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.

Re: More problems with scripcase PDF

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

With many thanks.

Gidday! from Sydney.

Paul

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 91.92.93.94 and hosts four domains under Ubuntu/Plesk, the locations of your Scriptcase installations are as follows:
/var/www/vhosts/mywebsite1.com/httpdocs/[scriptcase]
/var/www/vhosts/mywebsite2.com/httpdocs/[scriptcase]
/var/www/vhosts/mywebsite3.com/httpdocs/[scriptcase]
/var/www/vhosts/mywebsite4.com/httpdocs/[scriptcase]
Obviously, the one ip 91.92.93.94 would never correctly point to the various Scriptcase installations.

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

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.

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)

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 …