AnsweredAssumed Answered

Java ArcObjects error when creating new feature class

Question asked by peterlen on Dec 1, 2017

I have a Java application that uses the ArcObjects API for ArcGIS 10.0. In the application I am essentailly in a loop and want to create several hundred feature classes in a file geo-database. An odd error is getting thrown in the call to the IFeatureWorkspace's createFeatureClass(). The signature for this call is:

  

public IFeatureClass createFeatureClass(java.lang.String name,

IFields fields,

IUID cLSID,

IUID eXTCLSID,

int featureType,

java.lang.String shapeFieldName,

java.lang.String configKeyword)

throws java.io.IOException,

AutomationException

  

The values that I am using iclude:

- name: different for each feature class, but is plain text

- fields: a handlful of field objects

- cLSID: obtained from the IObjectClassDescription's getInstanceCLSID() call

- eXTCLSID: null

- featureType: 1

- shapeFileName: "SHAPE"

- configKeyword: ""

  

What s happening is that the scipt runs fine and will create 100+ feature classes without issue, and then it will start throwing an error during that createFeatureClass() call with the exception:

  

AutomationException: 0x80041901 - XML document must have a top level element. in 'msxml4.dll'.

  

The odd thing is that it will start to throw that error at some random point during the script and then every one will fail after that. In doing some searching, it sounds like ArcGIS likely added the msxml4.dll file to the OS because it required up (at least up until after 10.3). I can't find anything with regard to this file and the situation where it is causing an error in our application. Can anyone shed some light on what may be causing this?

Server: Windows Server 2008 R2

Java version: 1.6 and 1.8

ArcGIS version: 10.0

  

Thanks for any insight anyone might have - Peter

Outcomes