cannot run arcgis engine jar file on unix machine

266
27
06-03-2011 01:18 PM
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...
Reply
0 Kudos
27 Replies
Regular Contributor II
Yes, your app built and compiled on WIndows should work on your Linux or Solaris machine.
If you used Java 6 u 21, make sure the JRE on the Unix machine is the same version.
Make sure that the ArcGIS Runtime on the Unix machine is properly licensed and the init scripts are executing successfully so that the jars link to the arcobjects runtime libs properly.

What is your target Unix platform? Linux? Solaris? What versions of these operating systems are you trying to run on?

Thanks!
Reply
0 Kudos
New Contributor
thanks for replying so quickly..

our unix machine is Red Hat , specifically Centos 5. we checked the init files and they do run successfully. It creates the ARCGIS_HOME variable in the right place and points to the correct arcobjects.jar file. We checked the autorization summery and the we do have the right licenses.

can you explain what java 6 u 21 mean? i dont reconize the acronym or what the numbers stand for?
Reply
0 Kudos
Regular Contributor II
Sorry, by this I mean: Java 1.6, update 21 (Java 1.6.0_21)
Reply
0 Kudos
New Contributor
we wrote our program in java 6 update 23...our unix machine is java 6 update 25. and the separate windows computer we tested our jar file on is java 6 update 24. it appears we did everything correctly
(run the init scripts..both the engine and java shell scripts) . am i missing something?
Reply
0 Kudos
New Contributor
i should add that the unix machine is actuall a virtual machine.

basically its on a host mac computer and we used VMWare to run a centos 5 virtual machine on it.
Reply
0 Kudos
New Contributor
I dont know this helps you out or not but i am working on version 10 and firstly it is not working but with bootstraping and initilizevisulalbeans solve our most problems. why not you first try it with jre packaged with engine or developmentkit. and i think u already know it must be 32 bit.
Reply
0 Kudos
New Contributor
we used a sample jar file that arcgis devolopment kit 9.3 came with and those jar files dont work on the unix machine either. they work on the windows machine. what do you mean by version 10? arcgis engine runtime 10? can you explain further what yo mean by "jre packaged with engine or devlopmentkit" ?
Reply
0 Kudos
New Contributor
oh also we used bootstrapping. the same code that arcgis recommends using. it is staight out of arcgis website. as to the init visual beans, we have that too in our code too.
Reply
0 Kudos
Regular Contributor II
Wow. CentOS....haven't tried that, since it is not a supported Linux flavor for the Engine Runtime.
Sounds like you are doing everything correctly. It could just be a problem with the Runtime running on CentOS. I'm surprised the installation completed successfully.
Do you have a non-virtualized Red Hat Linux 5 machine that your could try it on? That would eliminate a lot of confusion right from the start.
Reply
0 Kudos