<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AoInitialize and binding in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635192#M17113</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you share the workaround to this problem please.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It seems that the code in AoInitialize has some dependencies that don't like when you are pointing to an arcobjects.jar file that is not in the standard location.&amp;nbsp; I had bundled the jar file in a war file that was deployed to a particular location but that caused me to have all sorts of problems.&amp;nbsp; I removed the arcobjects.jar file from my war file and added the bootstrapping code that I eventually stumbled across on this site and have been able to successfully initialize my license.&amp;nbsp; Now on to my next issue...&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Apr 2011 04:29:19 GMT</pubDate>
    <dc:creator>RodelVelasco</dc:creator>
    <dc:date>2011-04-11T04:29:19Z</dc:date>
    <item>
      <title>AoInitialize and binding</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635188#M17109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;With ArcGIS 10, I decided to convert some code from using the C++ API to using the Java API.&amp;nbsp; With Arc installed on my personal machine with a node locked liscense (and no previous version installed) I was able call the EngineInitializer.Initialize method and then the AoInitialize method and it worked fine.&amp;nbsp; I then tried to run this same code on a machine that has floating licenses and may have had previous versions of Arc installed and I get an exception thrown from the AoInitialize call.&amp;nbsp; I don't have the error in front of me but it indicated that I need to bind to a specific version before calling AoInitialize.&amp;nbsp; I've seen VB.Net and C++ versions of this posted but nothing for java, not even in the sample code that I found here: &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/java_ao_adf/conceptualhelp/engine/index.html#/A_visual_Hello_World_Application/0001000003sp000000/"&gt;http://help.arcgis.com/en/sdk/10.0/java_ao_adf/conceptualhelp/engine/index.html#/A_visual_Hello_World_Application/0001000003sp000000/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know of an example of this or had any success doing this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 23:06:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635188#M17109</guid>
      <dc:creator>KenSimoncic</dc:creator>
      <dc:date>2011-02-16T23:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: AoInitialize and binding</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635189#M17110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure if this will help, but I had found this somewhere to check out licenses and it has worked for me so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This will initialize the lowest available license&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
package org.lacsd.services.helpers;

import java.io.IOException;
import java.net.UnknownHostException;

import com.esri.arcgis.system.AoInitialize;
import com.esri.arcgis.system.EngineInitializer;
import com.esri.arcgis.system.esriLicenseProductCode;
import com.esri.arcgis.system.esriLicenseStatus;

public class LicenseHelper {
 /**
&amp;nbsp; * Initializes the lowest available ArcGIS License
&amp;nbsp; */
 public static AoInitialize initializeArcGISLicenses()
 {
&amp;nbsp; EngineInitializer.initializeEngine();
&amp;nbsp; AoInitialize aoInit = null;
&amp;nbsp; try {
&amp;nbsp;&amp;nbsp; aoInit = new AoInitialize();
&amp;nbsp; } catch (UnknownHostException e) {
&amp;nbsp;&amp;nbsp; // TODO Auto-generated catch block
&amp;nbsp;&amp;nbsp; e.printStackTrace();
&amp;nbsp; } catch (IOException e) {
&amp;nbsp;&amp;nbsp; // TODO Auto-generated catch block
&amp;nbsp;&amp;nbsp; e.printStackTrace();
&amp;nbsp; }
&amp;nbsp; try
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; System.out.println("license type: " + esriLicenseStatus.esriLicenseAvailable);
&amp;nbsp;&amp;nbsp; if (aoInit.isProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeEngine) == esriLicenseStatus.esriLicenseAvailable)
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; aoInit.initialize(esriLicenseProductCode.esriLicenseProductCodeEngine);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; else if (aoInit.isProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeArcServer) == esriLicenseStatus.esriLicenseAvailable)
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; aoInit.initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; else if (aoInit.isProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeArcInfo) == esriLicenseStatus.esriLicenseAvailable)
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; aoInit.initialize(esriLicenseProductCode.esriLicenseProductCodeArcInfo);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.err.println("Could not initialize an Engine or ArcView license. Exiting application.");
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.exit(-1);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; // do any extra checkouts here, could probably expand to make sure extension available
&amp;nbsp;&amp;nbsp; // aoInit.checkOutExtension(com.esri.arcgis.system.esriLicenseExtensionCode.esriLicenseExtensionCodeNetwork);
&amp;nbsp; }
&amp;nbsp; catch (Exception e)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; e.printStackTrace();
&amp;nbsp; }
&amp;nbsp; 
&amp;nbsp; return aoInit;
 }
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:01:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635189#M17110</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-12-12T03:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: AoInitialize and binding</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635190#M17111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your code is very similar to what I am doing.&amp;nbsp; The problem is that when I call AoInitialize(), I catch an AutomationException that says "ArcGIS product not specified.&amp;nbsp; You must first bind to an ArcGIS version prior to using any ArcGIS components."&amp;nbsp; I added code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VersionManager vm = new VersionManager();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vm.loadVersion(com.esri.arcgis.version.esriProductCode.esriArcGISDesktop,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "10.0");
 &lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;But now I'm getting an UnsatisfiedLinkError : com.esri.arcgis.interop.NativeAuth.getNegociateMessage()[B&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the Java console it indicates that it is looking for a ntvauth dll which doesn't exist.&amp;nbsp; I'm wondering if I'm going down a path that was not intended due to an incomplete backout of the 9.3 version that was on this machine before.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:01:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635190#M17111</guid>
      <dc:creator>KenSimoncic</dc:creator>
      <dc:date>2021-12-12T03:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: AoInitialize and binding</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635191#M17112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems that the code in AoInitialize has some dependencies that don't like when you are pointing to an arcobjects.jar file that is not in the standard location.&amp;nbsp; I had bundled the jar file in a war file that was deployed to a particular location but that caused me to have all sorts of problems.&amp;nbsp; I removed the arcobjects.jar file from my war file and added the bootstrapping code that I eventually stumbled across on this site and have been able to successfully initialize my license.&amp;nbsp; Now on to my next issue...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 23:37:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635191#M17112</guid>
      <dc:creator>KenSimoncic</dc:creator>
      <dc:date>2011-02-18T23:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: AoInitialize and binding</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635192#M17113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you share the workaround to this problem please.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It seems that the code in AoInitialize has some dependencies that don't like when you are pointing to an arcobjects.jar file that is not in the standard location.&amp;nbsp; I had bundled the jar file in a war file that was deployed to a particular location but that caused me to have all sorts of problems.&amp;nbsp; I removed the arcobjects.jar file from my war file and added the bootstrapping code that I eventually stumbled across on this site and have been able to successfully initialize my license.&amp;nbsp; Now on to my next issue...&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 04:29:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635192#M17113</guid>
      <dc:creator>RodelVelasco</dc:creator>
      <dc:date>2011-04-11T04:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: AoInitialize and binding</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635193#M17114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;could you try to use the JRE included in your ArcGIS installation?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 06:15:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635193#M17114</guid>
      <dc:creator>TomSchuller</dc:creator>
      <dc:date>2011-04-11T06:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: AoInitialize and binding</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635194#M17115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm having a similar issue &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/27524-ArcEngine-app-fails-on-creating-AxMapControl-window-when-using-a-ArcView-l0-license.?p=92930#post92930"&gt;http://forums.arcgis.com/threads/27524-ArcEngine-app-fails-on-creating-AxMapControl-window-when-using-a-ArcView-l0-license.?p=92930#post92930&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 20:25:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635194#M17115</guid>
      <dc:creator>AdityaTadakaluru</dc:creator>
      <dc:date>2011-04-15T20:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: AoInitialize and binding</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635195#M17116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Added code before call to AOInitialize that went something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;File jarFile = new File(&amp;lt;put the full path to arcobjects.jar here&amp;gt;);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;URLClassLoader sysloader = (URLClassLoader)ClassLoader.getSystemClassLoader();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Class &amp;lt;URLClassLoader&amp;gt; sysclass = URLClassLoader.class;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Method method = sysclass.getDeclaredMethod("addURL", new Class[]{ URL.class} );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; method.setAccessible(true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; method.invoke(sysloader, new Object[]{ jarFile.toURI().toURL() } );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;catch{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; // handle error in here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 14:30:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/aoinitialize-and-binding/m-p/635195#M17116</guid>
      <dc:creator>KenSimoncic</dc:creator>
      <dc:date>2011-10-13T14:30:24Z</dc:date>
    </item>
  </channel>
</rss>

