Unable to deploy SOI - Getting 'ClassFactory cannot supply requested class'

2440
2
11-21-2019 03:17 AM
SandeepKuniel1
New Contributor III

I am getting an error "0x80040111: ClassFactory cannot supply requested class" while attaching SOI to the MapServer.

System Information:

1. ArcGIS Server 10.7.1 with .NET Extension Support

2. .Net Framework Version 4.7.3062.0.

3. Used the ArcGIS Enterprise SDK 10.7.1 to create the SOI

Have tried the following:

1. Installed a .net version of the SOI -- same error

2. Installed a java version of the SOI -- same error

3. Installed Visual Studio...and uninstalled it and redeployed the SOI -- works fine

Few messages in the ArcGIS Server Log

Failed to initialize server object 'Online/Online': 0x80040111: ClassFactory cannot supply requested class


AutomationException: ClassFactory cannot supply requested class


Exception in preStart(); in com.esri.arcgis.discovery.admin.rediscovery.actors.GenericServerObjectActor for service:

Online.Online.MapServer

com.esri.arcgis.discovery.servicelib.AGSException: AutomationException: 0x80040111 - ClassFactory cannot supply requested class at com.esri.arcgis.discovery.servicelib.impl.RemoteServiceImpl.init(RemoteServiceImpl.java:69) at com.esri.arcgis.discovery.servicelib.impl.RemoteServerContext.createService(RemoteServerContext.java:221) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source) at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source) at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source) at java.rmi/sun.rmi.server.UnicastRef.invoke(Unknown Source) at java.rmi/sun.rmi.server.ActivatableRef.invoke(Unknown Source) at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source) at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source) at com.sun.proxy.$Proxy14.createService(Unknown Source) at com.esri.arcgis.discovery.admin.rediscovery.service.ArcSOCGISService.start(ArcSOCGISService.java:380) at com.esri.arcgis.discovery.admin.rediscovery.actors.GenericServerObjectActor.preStart(GenericServerObjectActor.java:95) at akka.actor.Actor$class.aroundPreStart(Actor.scala:472) at akka.actor.UntypedActor.aroundPreStart(UntypedActor.scala:97) at akka.actor.ActorCell.create(ActorCell.scala:580) at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456) at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478) at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263) at akka.dispatch.Mailbox.run(Mailbox.scala:219) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Caused by: java.lang.Exception: AutomationException: 0x80040111 - ClassFactory cannot supply requested class at com.esri.arcgis.discovery.servicelib.impl.ServiceImpl.init(ServiceImpl.java:177) at com.esri.arcgis.discovery.servicelib.impl.RemoteServiceImpl.init(RemoteServiceImpl.java:67) at com.esri.arcgis.discovery.servicelib.impl.RemoteServerContext.createService(RemoteServerContext.java:221) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source) at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: AutomationException: 0x0 - null at com.esri.arcgis.interop.NativeObjRef.nativeVtblInvokeNative(Native Method) at com.esri.arcgis.interop.NativeObjRef.nativeVtblInvoke(Unknown Source) at com.esri.arcgis.interop.NativeObjRef.invoke(Unknown Source) at com.esri.arcgis.interop.Dispatch.vtblInvoke(Unknown Source) at com.esri.arcgis.system.IObjectConstructProxy.construct(Unknown Source) at com.esri.arcgis.discovery.servicelib.impl.SOThread.run(SOThread.java:396)

2 Replies
SandeepKuniel1
New Contributor III

So, here is what i did on the first day of 2020, created a new project.
Collected all the required dlls used by the SOI into a folder, executed the following power shell script<which basically registers the dll's to GAC>

[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
$files = Get-ChildItem -Path $PSScriptRoot\* -Include "*.dll"
foreach ($file in $files) {
$filePath = Join-Path -Path $PSScriptRoot -ChildPath $file.Name
$publish.GacInstall($filePath)
}

restarted the ArcGIS Server <not sure if it was required?> .....deployed the SOI, and magically no more errors:) 

0 Kudos
David_Wilton
New Contributor II

I got this issue and I'm posting here because its the first google result. There is a knowledgebase but it doesn't include the cause of my issue

https://support.esri.com/en/technical-article/000014167

The target version was wrong in the AssemblyInfo.cs I had it as 10.8.1, but apparently it should just be 10.8