Connect to Arcgis server 10.1 through arcobjects

4508
10
Jump to solution
07-07-2013 06:11 AM
MiraHindawi
New Contributor
Hi
   I used to have an arcobjects JSP page, hosted under sun one, that connects to an 9.3.1 Arcgis server through arcobjects. I have upgraded the server to 10.1, and upgraded the arcobjects jar file to 10.1 too. The page compiled properly but when i execute the code, I got an AutomationException: 0x5 - Access is denied. in 'Invoke' error. I restarted the server and now I am getting a new error: AutomationException: 0x80040154 - Class not registered. The same code used to work on 9.3.1 normally. I've been stuck here for two days now. Any help is highly appreciated. Below is the code that is generating the error:

//------- initialize connection to the server
try
{
  new ServerInitializer().initializeServer(GISServerName, GISServerUserName, GISServerPwd);
  con = new ServerConnection();
  con.connect(GISServerName);
}
catch (Exception err)
{
  out.println("<AnalysisResults>");
  out.println("<err>"+err.toString()+"</err>");
  out.println("</AnalysisResults>");
  return;
  
}//end

Full Error trace as generated by sun one application server:

AutomationException: 0x80040154 - Class not registered
com.esri.arcgis.server.ServerConnection.connect(Unknown Source)
org.apache.jsp.General.NetworkGeo_jsp._jspService(NetworkGeo_jsp.java:265)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
0 Kudos
10 Replies
LeoDonahue
Occasional Contributor III
Your step #3 is no longer possible in 10.2 using ArcObjects the way you did it in 10.0, specifying the host name and domain/user/password combinations.

With everything migrating to web services, I keep having this feeling in the back of my mind that in the near future, there will be no more ESRI media.  If you want ArcGIS Server, giving it to you in the cloud might be the only way you can get it some day.  At least your scripts based on web services will still work.
0 Kudos