Esri / arcgis-enterprise-sdk-resources

Apache License 2.0
20 stars 23 forks source link

Java manual build - ClassFactory cannot supply requested class #22

Closed ope-nz closed 2 years ago

ope-nz commented 2 years ago

Hey Team

Im performing a manual build of a SOI - ie Im not using an IDE.

My jar file builds fine and (for example) if I swap out the jar in an existing SOE file it works as expected.

However if I build the SOE file myself - that is create a zip file with the Config.xml etc I get a ClassFactory cannot supply requested class when attaching it to a service. The SOE itself uploads fine and the metadata is fine.

I have tried to run the arcgis-soepackager.jar but it doesnt appear to like Java 11 (or perhaps open JDK).

Is there some secret sauce to manually building a functional SOE file?

hanhansun commented 2 years ago

For 10.8.1 or later versions (with JDK 11), you can simply run the maven command mvn install from a command prompt to build an SOI without any Java IDE. For 10.8 or previous versions (with JDK 8), you can run the soepackager tool which doesn't need any IDE either. You can't manually zip the jar files along with config.xml as it's not how SOI is packaged.

ope-nz commented 2 years ago

@hanhansun

Thanks for the reply.

Ok I see the problem now. Im using JDK11 which doesnt include wsimport so Im not able to run the packager tool.

Regarding tooling, Im not using maven either, Im literally building using Notepad++ and javac.

hanhansun commented 2 years ago

@ope-nz Maven and JDK 11 are required to use with Enterprise SDK 10.8.1 or later versions. See system requirements for different versions of Enterprise SDK: https://enterprise.arcgis.com/en/system-requirements/latest/windows/arcgis-enterprise-sdk-system-requirements.htm