cannot run arcgis engine jar file on unix machine

1273
27
06-03-2011 01:18 PM
nhieuduong
New Contributor
we created a java program using arcgis engine 9.3 and packaged it in a jar file. when we use runtime 9.3 to execute the jar file on a windows machine , the program runs fine. however when we execute the same jar file on a unix machine (centos 5) we get a very ambigious error that points to a some code. i should add that we wrote the java program in windows..

so basically im wondering if you cant make the arcgis java program in windows and have runtime 9.3 run it in unix?

heres the error we get when we put execute it in the command line... ("java -jar Window3.jar")


Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: AutomationException: 0x800a03e8 -
        at com.esri.arcgis.interop.NativeObjRef.init(Native Method)
        at com.esri.arcgis.interop.NativeObjRef.<init>(Unknown Source)
        at com.esri.arcgis.interop.Ocx.<init>(Unknown Source)
        at com.esri.arcgis.controls.MapControl.<init>(Unknown Source)
        at com.esri.arcgis.beans.map.MapBean.a(Unknown Source)
        at com.esri.arcgis.beans.map.MapBean.<init>(Unknown Source)
        at com.aor.mapping.Map.<init>(Map.java:353)
        at com.aor.seasimgui.MainWindow.<init>(MainWindow.java:260)
        at com.aor.seasimgui.MainWindow.main(MainWindow.java:634)


we tried using some sample jar files that arcgis provides and it gave us the same error. we sourced the init_engine.sh file first and even sourced the java one as well(init_java.sh) but nothing works..im hoping someone who has encounterd this before can shed some light as to what is going on.

thanks in advance to anyone who replies. any info even if its just brainstorming ideas is much appreciated...
0 Kudos
27 Replies
nhieuduong
New Contributor
is there anywhere in the arcgis coding that "aborts" java ? i have an error while trying to troubleshoot the problem.

i type in "java -jar Splinetext.jar"
after sourcing init_engine.sh and init_java.sh AND putting arcgis/bin in LD_LIBRARY_PATH AND ldconfig a shared library(libshlwapi.so)

and i get an error message that just says "Abort" .

im wondering if arcgis is throwing this error
0 Kudos
nhieuduong
New Contributor
okay i figured some things out. dont touch LD_LIBRARY_PATH even though the error says you need to add arcgis/bin to it. it will only give you more errors..hence my "abort" error.  oh and i also tried the package, it doesnt seemt to work on either my Centos or red hat 5 OS. is there a specific version of java im supposed to get?
0 Kudos
EricBader
Occasional Contributor III
Java 1.5.0_13, 32-bit
0 Kudos
nhieuduong
New Contributor
that specific version of java? or anything above that version.

in our OS we have java 1.6.0_26
0 Kudos
EricBader
Occasional Contributor III
9.3.1 is not certified with Java 6. Only Java 5. You can go above 1.5.0_13, but not up to 1.6.x.
If you are using ArcGIS 10.0, you should use Java 1.6.0_24, or the latest, whatever it is.
0 Kudos
nhieuduong
New Contributor
i downgraded to java 1.5_22, but im getting an error that says

java.lang.ClassUnsupportedVersionError: bad version number in .class file

a google search indicates that the java used to compile the jar file is not the same as the java used to run the jar file. aka it was built from java 1.6 and when i ran it with java 1.5 it didnt like it.

also , i tried running arcgis runtime on windows with java 1.6_26 and it worked fine. so the java versions most likely is not the issue. im wondering if maybe i need to get service pack 1 for runtime 9.3 ?
0 Kudos
nhieuduong
New Contributor
i figured it out.

i reinstalled arcgis with the shell script gschalow gave me in the posts and made sure i had all the packages installed .

thanks to everyone for helping me out.
0 Kudos
EricBader
Occasional Contributor III
i figured it out.

i reinstalled arcgis with the shell script gschalow gave me in the posts and made sure i had all the packages installed .

thanks to everyone for helping me out.



GREAT news. Thanks for letting us know!
0 Kudos