ArcObjects 10.1 AutomationException: 0x80040154 - Class not registered

Discussion created by MiraHindawi on Jul 9, 2013
Latest reply on Feb 26, 2014 by SJoAnneF
I recently upgraded our ArcGIS server from 9.3.1 to 10.1. I used to have a JSP page, running under Sun one application server on the same machine where ArcGIS server is installed, that connects to ArcGIS server through arcobjects using the following code:

new ServerInitializer().initializeServer(DomainName, GISServerUserName, GISServerPwd);
ServerConnection con = new ServerConnection();

At the final line of this code, and when trying to connect to ArcGIS for server, the following error is taking place:
AutomationException: 0x5 - Access is denied. in 'Invoke' error

I did some modifications on the component services by granting access to the arcgis server user to these services and now the error changed to:

AutomationException: 0x80040154 - Class not registered

1- Note that I don't have any Desktop or Runtime installed on the server. So is binding to a certain product the issue here?
2- I've learnt that at ArcGIS 10.1, DCOM connections to ArcGIS server are not supported anymore. Does this apply to my case described above?
3- If this is the case, do I have to transform my whole JSP page into an SOE web service and access it through REST?

Any help is highly appreciated. Thanks..