Hello Folks, Today I was working with ARCGIS Server Java ADF. I was trying to create a shapefile out of the XY component file(LAT,Long). In that process
I declared and tried to instantiate the IWorkspaceFactory and IFeatureWorkspace class like I did with the ARCGIS Engine Java ADF. But as usual I got exception that "Automated Exception : Class not Registered". I Quickly realized that in the arcgis server we should instantiate the objects on the server. I used the magic line "serverContext.createObject(shapefileWorkspaceFactory.getClsid())" like this..
IServerContext serverContext = agsContext.getServerContext();Even after this I'm getting "Automated Exception - Unspecified error". Have you
IWorkspaceFactory WSFactory = new IWorkspaceFactoryProxy(
serverContext.createObject(ShapefileWorkspaceFactory.getClsid()));
IFeatureWorkspace opFeatureWorkspace =
new IFeatureWorkspaceProxy(WSFactory.openFromFile(wsDir, 0));
ever faced the situation having the keys in your pocket and search for it?? Oh man
I was in the same situation ..I knew that something really really trivial mistake is
behind this exception.Finally I found the reason, When we create the wsDir we
should edit the permissions on it and grant write permission to the arcgis user
with which we are accessing the arcgis server object.
I've also seen many ESRI forum Questions in which people try to register the DLL
files manually using regserv32 when they get the "Automated Exception - Class not
Registered". Most of the times the reason will be when you try to Instantiate a
class not on the server i.e instantiating the object without passing the magic sentence serverContext.createObject((Place the class name).getClsid()) as an argument to the class constructor.
I'm going to start working with Microsoft Visual Studio 2005 and ARCGIS server .Net
ADF ...I havent heard of this combination till now.we will see how it works.
Until then Bye..

