Use ArcGIS for Server license with ArcObject process

985
4
12-18-2012 06:18 AM
MathieuVILLEMONT1
Occasional Contributor
Hi,

Is it still possible to use an ArcGIS for Server license in a ArcObject Java program?
If yes, how to do so?

What has been tried:
EngineInitializer.initializeServer(esriProductCode.esriProductCodeServerStandardEdition);
            
EngineInitializer.initLicensing(esriProductCode.esriProductCodeServerStandardEdition, "C:\\Program Files\\ArcGIS\\Server\\bin");


The result:
Exception in thread "main" AutomationException: 0x80040228 - The Product License has not been initialized. in 'Esri GeoDatabase'
      at com.esri.arcgis.datasourcesGDB.FileGDBWorkspaceFactory.openFromFile(Unknown Source)
      at TestLicense.main(TestLicense.java:60)
0 Kudos
4 Replies
LeoDonahue
Occasional Contributor III
Hi,
Is it still possible to use an ArcGIS for Server license in a ArcObject Java program?

Yes, but how you do it depends on your version of ArcGIS Server.

In order to find help in Java, you have to go back to the 9.3.1 Engine help, located here:
http://resources.esri.com/help/9.3/ArcGISengine/java/concepts_start.htm

Under the section "Getting Started with ArcObjects", click on the Overview of Libraries and find the Server library, then click on the "Server" link on that page.  There are code samples there on how to make connections to ArcGIS Server, which should work up to version 10.0

ESRI would rather you start using SOE's, because they are dropping this kind of connection to ArcGIS Server at 10.1

Good luck, have fun!
0 Kudos
LeoDonahue
Occasional Contributor III
You can also find help in version 10.  Sorry about that.

http://help.arcgis.com/en/sdk/10.0/java_ao_adf/conceptualhelp/engine/index.html

Under:
Developing desktop Applications
  Programming with ArcObjects Java
    ArcObjects package overviews
      Server

Or just click this:  http://help.arcgis.com/en/sdk/10.0/java_ao_adf/conceptualhelp/engine/0001/00010000049t000000.htm
0 Kudos
MathieuVILLEMONT1
Occasional Contributor
Thanls! My question was for 10.1 so that's why I could not find any examples for this version 🙂
0 Kudos
LeoDonahue
Occasional Contributor III
ESRI, can you chime in here.

I've told this person that you can't make local DCOM connections to ArcGIS Server at version 10.1, because it says that in the 10.1 deprecation plan located here, on page 5.
http://downloads2.esri.com/support/TechArticles/ArcGIS10and101Deprecation_Plan.pdf

�?� [Correction 8/18/2011] ArcGIS Server 10.1 will no longer support local connections (DCOM connections). ArcGIS Server 10.1 will be a web services (REST, SOAP, and OGC) server only.


And yet the ArcObjects 10.1 Javadocs contain code examples for connecting to ArcGIS Server.
http://resources.arcgis.com/en/help/arcobjects-java/concepts/engine/0001/000100000715000000.htm

Is "ServerInitializer" and "ServerConnection" not making a DCOM connection?
0 Kudos