feisishui

mxd read in  servlet

Discussion created by feisishui on May 2, 2012
i user IMapDocument or IMapReader operate a mxd document

i reader map infomation  and layer infomation of mxd document??and put it???s into a hashmap,

such as:
   IMapDocument document = new MapDocument();
     document.open(url, "");
     for(int i=0;i<document.getMapCount();i++){
      IMap map =document.getMap(i);
      System.out.println(map.getName());
      layersKV(result,btms, document, map, i);
     }

but in  IMap map =document.getMap(i);

my appserver error:

<2012-5-3 ????02???00???26?? CST> <Error> <Console> <BEA-240003> <Console encountered the following error java.io.FileNotFoundException: .\servers\AdminServer\data\console\ConsolePreferences.xml (????????????????????????)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at com.bea.console.preferences.spi.FilePreferencesProvider.ensurePreferencesFileExists(FilePreferencesProvider.java:114)
at com.bea.console.preferences.spi.FilePreferencesProvider.<init>(FilePreferencesProvider.java:73)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.bea.portlet.prefs.spi.ProviderFactory.createInstance(ProviderFactory.java:79)
at com.bea.portlet.prefs.spi.ProviderFactory.setDefaultProviderClass(ProviderFactory.java:47)
at com.bea.portlet.prefs.spi.IPreferenceStore$Factory.registerDefaultProvider(IPreferenceStore.java:128)
at com.bea.netuix.servlets.manager.SingleFileServlet.reinitInternal(SingleFileServlet.java:135)
at com.bea.netuix.servlets.manager.SingleFileServlet.initInternal(SingleFileServlet.java:86)
at com.bea.netuix.servlets.manager.SingleFileServlet.access$100(SingleFileServlet.java:52)
at com.bea.netuix.servlets.manager.SingleFileServlet$ServletLifecycleListenerImpl.init(SingleFileServlet.java:287)
at com.bea.netuix.util.ServletLifecycleListener.initOrReinitInternal(ServletLifecycleListener.java:131)
at com.bea.netuix.util.ServletLifecycleService.addServletLifecycleListener(ServletLifecycleService.java:251)
at com.bea.netuix.util.ServletLifecycleService.addServletLifecycleListener(ServletLifecycleService.java:182)
at com.bea.netuix.servlets.manager.SingleFileServlet.init(SingleFileServlet.java:79)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at weblogic.servlet.AsyncInitServlet.initDelegate(AsyncInitServlet.java:94)
at weblogic.servlet.internal.WebAppServletContext$AsyncInitRequest.run(WebAppServletContext.java:1651)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
.....

can u  tell me  why?   thx

Outcomes