eZ Community » Forums » Developer » Java issue on Mac Lion with Paradox PDF
expandshrink

Java issue on Mac Lion with Paradox PDF

Java issue on Mac Lion with Paradox PDF

Wednesday 12 October 2011 3:16:44 pm - 4 replies

Hi

When I try to generate a PDF file on Mac Snow Leopard with Java 1.6.0_24, it works fine. But on Mac Lion with Java 1.6.0_26, I get this error :

 [ Oct 12 2011 15:02:58 ] Failed executing command : /usr/bin/java -Djava.awt.headless=true -jar extension/paradoxpdf/bin/paradoxpdf.jar var/tnt/paradoxpdf/aef35d21b915bb7bffe3dbdf602c82d3.xhtml var/tnt/paradoxpdf/aef35d21b915bb7bffe3dbdf602c82d3.pdf  2>&1 , 
 Output : Error occurred during initialization of VM
Unable to load native library: libjava.jnilib

The file aef35d21b915bb7bffe3dbdf602c82d3.xhtml exists and a PDF file is generated when I execute the command line in a shell. So it seems to be an issue from ParadoxPDF or eZ Publish.

Any idea would be great. Thanks for your help.

Vince

Wednesday 12 October 2011 4:33:10 pm

Hello Vincent,

Welcome to the eZ Community!

I'm sorry but I have not yet used this extension but I did find the following references which

seem to point to this being a Java related problem and not an eZ Publish one.

http://stackoverflow.com/questions/1482450/broken-java-mac-10-6

https://discussions.apple.com/thread/2089136?start=0&tstart=0

http://therichwebexperience.com/blog/ken_sipe/2009/12/more_trouble_with_java_and_apple

http://stackoverflow.com/questions/6850624/mac-os-x-lion-error-occurred-during-initialization-of-vm-unable-to-load-native-l

 

 

 

I hope this helps.

Cheers,

Heath

Modified on Wednesday 12 October 2011 4:35:53 pm by // Heath

Thursday 13 October 2011 11:15:56 am

Hi Heath. Thanks for your answer.

I already found these links. The first three ones are about the same issue, but when executing

 java -version

I can execute Java in a shell, it works fine. That's why I think the problem is from eZ or more likely from my MAMP server which can't execute Java.

The last link is more interesting, but I can't run

 otool -L <binary>

since Paradox PDF executable is a Jar file, not a binary, it returns "paradoxpdf.jar is not an object file".

The DYLD_LIBRARY_PATH is not set, so it doesn't make any change when I try to unset it. I found a "jnilib.java" located in

 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/

Then I set DYLD_LIBRARY_PATH this way :

 export DYLD_LIBRARY_PATH=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/

But it doesn't do the trick sad.gif Emoticon

Vince

Thursday 13 October 2011 7:47:34 pm

Hello Vince,

Sorry your still having troubles with Java.

But again, this is a -Java- problem and not an eZ Publish one (and in all likelyhood also not a paradoxpdf problem either).

You really should take this problem to a more appropriate forum that specializes in java support problems.

Not that we wouldn't like to help you just that we may not be able to help you since this is prolly a java problem and outside most folks experiences.

Also the first link I shared actually told you to -NOT- set the env var DYLD_LIBRARY_PATH (and others were saying that you should even try unsetting it). I don't know for certain but I would try this again.

Also the example

otool -L /usr/bin/java
/usr/bin/java:
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.42.0)
/System/Library/PrivateFrameworks/JavaLaunching.framework/Versions/A/JavaLaunching (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)

I think was a reference to running otool -L /path/to/java, you might want to try this to find out what libs are being called by java as a way to trace this (what looks like) libs path problem at runtime. I've never done this before

Best wishes ...

Cheers,

Heath 

Modified on Thursday 13 October 2011 7:53:09 pm by // Heath

Friday 14 October 2011 8:50:54 am

Edit : I downgraded MAMP from MAMP PRO 2.0.3 to MAMP PRO 1.9.6.1 and it solved my problem.

Modified on Monday 07 November 2011 2:24:38 pm by Vincent Robic

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from