Difference between revisions of "ArcEngine/Java issue"

From IMSMA Wiki
Jump to: navigation, search
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
ArcEngine 10.1 needs Java to be installed and ArcEgine finds Java by registry keys ('''not''' by environmental variables like JAVA_HOME and PATH).
+
ArcEngine 10.1 needs Java to be installed and ArcEgine finds Java by '''registry keys''' (not by environmental variables like JAVA_HOME and PATH).
  
When ArcEngine does not found Java properly there are two different error messages in the console log '''after''' ''Synchronized with "xxx" Map''
+
When ArcEngine does not find Java properly there are two different error messages in the console log '''after''' ''Synchronized with "xxx" Map''
  
1 Java Executable
+
<ol><li>Java Executable
<pre> Loading jawt.dll failed. This is normal if java.version < 1.3. If java.version is > 1.4 and if this failure has occurred on Windows,
+
Loading jawt.dll failed. This is normal if java.version < 1.3. If java.version is > 1.4 and if this failure has occurred on Windows,<br/>
 +
please ensure that this program is started with a Java executable from a JDK/JRE install location on this computer. <br/>
 +
at '''com.esri.arcgis.interop'''.NativeObjRef.getJdk13WindowsHandleNative(Native Method) </li>
 +
<li>Java HotSpot</li></ol>
  
please ensure that this program is started with a Java executable from a JDK/JRE install location on this computer.  
+
==How to fix Java issues for ArcEngine==__NOEDITSECTION__
 +
{{Note | You need to stop {{IMSMANG}} server and the IMSMA Control Centre between each change below since {{IMSMANG}} reads in the environment variables when the IMSMA Control centre is started. Open the log and verify that your changes have taken effect.}}
  
at '''com.esri.arcgis.interop'''.NativeObjRef.getJdk13WindowsHandleNative(Native Method)  
+
<ol>
</pre>
+
<li>Check in the ''Programs and Features'' in the Control Panel if the Java installed is the Java that is included in the {{IMSMANG}} installation package.
2 Java HotSpot
+
:If not, ask the user if you may uninstall the other version.</li>
 +
[[Image:Java version.png|700px|center]]
 +
<div align="center">
 +
'' Our Java ''
 +
</div>
 +
<li>If our Java already was installed check that the right version is found by Java; <br/> <br/>
 +
[[Image:Java ver.png|600px|center]]
 +
* find the Java version by typing ''Java -version'' in the Command window and click Enter.
 +
* '''[[Environment Variables | Verify that the environment variable]]''' JAVA_HOME is set to ''C:\Program Files\Java\jre7'' on 32-bits OS or ''C:\Program Files (x86)\Java\jre7'' on 64-bits OS.</li>
 +
<li>If none of the above fixed the problem, add ''''';'''%JAVA_HOME%\bin'' to the end of the PATH environment variable.
 +
<li>If it still does not work, copy the contents of the environment variable PATH to a document.</li>
 +
<li>Copy ''%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%JAVA_HOME%\bin'' to the environment variable PATH.
 +
:In this way you know that the PATH is correct and does not have any other issues.</li>
 +
<li>Test again.</li>
 +
<li>If it works, restore the PATH variable by copy back part by part back to it with ; between each part.
 +
:'''Note''': test to start the client between each change of the PATH.</ol>
  
How to fix the it
+
===Example log file from English stand-alone server===__NOEDITSECTION__
 +
System Property '''"user.language"''': en <br/>
 +
System Property '''"user.language.format"''': not set<br/>
 +
System Variable '''"AGSENGINEJAVA"''': C:\Program Files (x86)\ArcGIS\Engine10.1\<br/>
 +
System Variable '''"Path"''': C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\; c:\Program Files (x86)\Java\jre7\bin<br/>
 +
System Variable '''"Java_Home"''': c:\Program Files (x86)\Java\jre7<br/>
 +
System Variable '''"LANG"''': not set<br/>
 +
Client Configuration Variable '''"java.naming.provider.url"''': localhost<br/>
 +
Client Configuration Variable '''"AlwaysSyncGeodata"''': true<br/>
 +
Client Configuration Variable '''"isClientOnly"''': false<br/>
 +
Connecting to GIS Service ...
 +
Starting session with '''GIS Service''' at "/C:/IMSMAng//server/gis" ...
 +
GIS Service starting ...<br/>
 +
'''fileServerURI''' = file:/C:/IMSMAng/server/gis/<br/>
 +
'''map.name''' = World<br/>
 +
Building Map Configuration ...<br/>
 +
'''Connected''' to GIS Service<br/>
 +
Synchronizing with "World" Map cached in "C:\IMSMAng\client\gis\sandbox\World" ...<br/>
 +
'''Synchronized''' with "World" Map<br/>
  
1 Install the Java that is included in the {{IMSMANG}} installation package
+
{{Note| There is another '''[[Java error during installation | Java error]]''' that has occurred during {{IMSMANG}} installaion.}}
 
+
{{NavBox Technical Notes}}
2 If Java already was installed;
 
 
 
2A verify Java version by
 
 
 
2B Verify that the registry key XX is set to YY
 
 
 
{{NavBox Hub}}
 
 
 
[[Category:NoPublic]]
 
 
[[Category:NAA]]
 
[[Category:NAA]]

Latest revision as of 16:43, 31 March 2017

ArcEngine 10.1 needs Java to be installed and ArcEgine finds Java by registry keys (not by environmental variables like JAVA_HOME and PATH).

When ArcEngine does not find Java properly there are two different error messages in the console log after Synchronized with "xxx" Map

  1. Java Executable Loading jawt.dll failed. This is normal if java.version < 1.3. If java.version is > 1.4 and if this failure has occurred on Windows,
    please ensure that this program is started with a Java executable from a JDK/JRE install location on this computer.
    at com.esri.arcgis.interop.NativeObjRef.getJdk13WindowsHandleNative(Native Method)
  2. Java HotSpot

How to fix Java issues for ArcEngine

Note.jpg You need to stop IMSMANG server and the IMSMA Control Centre between each change below since IMSMANG reads in the environment variables when the IMSMA Control centre is started. Open the log and verify that your changes have taken effect.
  1. Check in the Programs and Features in the Control Panel if the Java installed is the Java that is included in the IMSMANG installation package.
    If not, ask the user if you may uninstall the other version.
  2. Java version.png

    Our Java

  3. If our Java already was installed check that the right version is found by Java;

    Java ver.png
    • find the Java version by typing Java -version in the Command window and click Enter.
    • Verify that the environment variable JAVA_HOME is set to C:\Program Files\Java\jre7 on 32-bits OS or C:\Program Files (x86)\Java\jre7 on 64-bits OS.
  4. If none of the above fixed the problem, add ;%JAVA_HOME%\bin to the end of the PATH environment variable.
  5. If it still does not work, copy the contents of the environment variable PATH to a document.
  6. Copy %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%JAVA_HOME%\bin to the environment variable PATH.
    In this way you know that the PATH is correct and does not have any other issues.
  7. Test again.
  8. If it works, restore the PATH variable by copy back part by part back to it with ; between each part.
    Note: test to start the client between each change of the PATH.

Example log file from English stand-alone server

System Property "user.language": en
System Property "user.language.format": not set
System Variable "AGSENGINEJAVA": C:\Program Files (x86)\ArcGIS\Engine10.1\
System Variable "Path": C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\; c:\Program Files (x86)\Java\jre7\bin
System Variable "Java_Home": c:\Program Files (x86)\Java\jre7
System Variable "LANG": not set
Client Configuration Variable "java.naming.provider.url": localhost
Client Configuration Variable "AlwaysSyncGeodata": true
Client Configuration Variable "isClientOnly": false
Connecting to GIS Service ... Starting session with GIS Service at "/C:/IMSMAng//server/gis" ... GIS Service starting ...
fileServerURI = file:/C:/IMSMAng/server/gis/
map.name = World
Building Map Configuration ...
Connected to GIS Service
Synchronizing with "World" Map cached in "C:\IMSMAng\client\gis\sandbox\World" ...
Synchronized with "World" Map

Note.jpg There is another Java error that has occurred during IMSMANG installaion.