Java issues with pgdbg on Mac

You usually shouldn’t have to set PGI_JAVA at all, but it doesn’t look like that is the problem you are running into. Java is starting up, because you are getting a Java exception. It’s not finding the first Java class that is run when the debugger starts up.

Are you setting any other Java-related environment variables (CLASSPATH, JAVA_HOME, JAVA_TOOL_OPTIONS, …)?

Is your PGI installation complete - does /opt/pgi/osx86-64/13.4/bin/jpgdbg.jar exist?

–Don

Don - to answer your questions…
(1) I do not believe I am setting any other Java-related environment variables (at least not in my .cshrc)

(2) Yes, /opt/pgi/osx86-64/13.4/bin/jpgdbg.jar does exist.

Incidentally, I get the same error whether I include “setenv PGI_JAVA …” or I don’t.

I don’t know if this matters at all, but here is the version info for my regular java app:
java version “1.6.0_51”
Java™ SE Runtime Environment (build 1.6.0_51-b11-456-11M4508)
Java HotSpot™ 64-Bit Server VM (build 20.51-b01-456, mixed mode)

Thanks,
Jim

James,

A couple more things:

We made big improvements to the debugger on OSX in 13.6. Those improvements don’t affect the error that you are seeing, but I’d recommend upgrading to at least that release if you plan to do much debugging on OSX. Further improvements related to debugging OSX shared libs are coming in 13.9.

Regarding your current problem, however: would you please invoke pgdbg like you usually do, but also use the “-v” option (lowercase ‘v’) and post the output?
thanks
–Don

Don,

Thanks for the info on the newer debugger releases.

  • For 13.4, when I do not have setenv PGI_JAVA set in .cshrc:
    /Users/xxx> pgdbg -v
    pgdbg-Error-Required tool bin was not found

  • When I have setenv PGI_JAVA /usr/bin/java (my regular java version):
    /Users/xxx> pgdbg -v
    Action(java_version_check(/usr/bin/java,1,6,0,21,64))
    Action(sighand_setup())

/usr/bin/java -cp /opt/pgi/osx86-64/13.4/binjpgdbg.jar/opt/pgi/osx86-64/13.4/binPGcomp.jar/opt/pgi/osx86-64/13.4/binPGlaf.jar/opt/pgi/osx86-64/13.4/binPGutil.jar/opt/pgi/osx86-64/13.4/binjide-common.jar/opt/pgi/osx86-64/13.4/binjide-dock.jar/opt/pgi/osx86-64/13.4/binrsyntaxtextarea.jar/opt/pgi/osx86-64/13.4/binganymed-ssh2-build251.jar SplashLoader PGDBGsplash.jpg jpgdbg localhost -v mpiexec +mpiexec_args -mpiexec_args +pgserv_args -pgserv_args -program_args
Exception in thread “main” java.lang.NoClassDefFoundError: SplashLoader
Caused by: java.lang.ClassNotFoundException: SplashLoader
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
pgdbg-Fatal-jpgdbg completed with exit code 1

  • When I have setenv PGI_JAVA /opt/pgi/osx86-64/13.4/bin:
    /Users/xxx> pgdbg -v
    pgdbg-Error-Required tool bin was not found
    pgdbg… looked for bin at /opt/pgi/osx86-64/13.4/bin

– Jim

Jim,
I checked further and it turns out that this is a known bug that was present only in 13.4. Probably the best solution is to upgrade to the latest release since there are other OSX debugging improvements there. If that’s not an option, I can provide you with a patch for your installation. If you really need the patch, send email to trs@pgroup.com and ask them to forward it to Don in tools engineering.
–Don

Jim
BTW, please let us know when you get things working, or if you have any more trouble. We want to make sure that you are up and running!

Also, when using PGI_JAVA, it should always be set to the path of the Java executable, not the directory containing the Java executable (e.g. ‘bin’).

–Don

Don,

My subscription ended right after pgdbg v13.6 came out, so I was able to upgrade for free. The pgdbg 13.6 version on Mac OSX worked without any problems. (Also, no PGI_JAVA environment had to be set in .cshrc, as you mentioned.)

Thanks for your help!
Jim