如下图,我已经重新启动了SOM和SMS两个服务进程,但是打开http://service:8399/arcgis/rest/时,还是显示404错误:
我又试着打开http://service:8399/manager/html,仍然是如下结果:
然后我进入C:\Program Files\ArcGIS\Server10.0\java\manager\service\logs查看系统的log日志,
2013-2-28 22:16:32 com.esri.arcgis.manager.server.ManagerConfig getBaseDir
信息: Manager Base Directory: C:\Program Files\ArcGIS\Server10.0\java\manager\service\lib\..\..\config
2013-2-28 22:16:32 com.esri.arcgis.manager.server.MBeanManager b
信息: Creating MBeanServer
2013-2-28 22:16:33 com.esri.arcgis.manager.admin.beans.SoeManager <clinit>
信息: Server Directory : C:\Program Files\ArcGIS\Server10.0\
2013-2-28 22:16:33 com.esri.arcgis.manager.admin.beans.SoeManager <clinit>
信息: SOE Directory : C:\Program Files\ArcGIS\Server10.0\java\lib\ext
2013-2-28 22:16:33 com.esri.arcgis.manager.admin.beans.SoeManager <clinit>
信息: Java Cmd : "../../../jre/bin/java" -cp "C:\Program Files\ArcGIS\Server10.0\java\lib\ext\../arcobjects.jar;SOEManager.jar" com.esri.arcgis.tools.SOEManager
[Fatal Error] :1:1: Content is not allowed in prolog.
2013-2-28 22:16:33 com.esri.arcgis.manager.applications.mbeans.SiteBuilder <init>
信息: File is of zero size : C:\Program Files\ArcGIS\Server10.0\java\manager\service\lib\..\..\config\applications\kmllinks.xml
2013-2-28 22:16:33 com.esri.arcgis.manager.applications.mbeans.SBUtil loadAvailableServices
警告: Servers file name not found: C:\Program Files\ArcGIS\Server10.0\java\manager\service\lib\..\..\config\applications\servers.xml
[Fatal Error] :1:1: Content is not allowed in prolog.
2013-2-28 22:16:33 com.esri.arcgis.manager.applications.mbeans.SBUtil loadServers
严重: Unable to read servers file: C:\Program Files\ArcGIS\Server10.0\java\manager\service\lib\..\..\config\applications\defaultservers.xml
com.esri.arcgis.manager.ManagerException: Unable to read XML file: C:\Program Files\ArcGIS\Server10.0\java\manager\service\lib\..\..\config\applications\defaultservers.xml
at com.esri.arcgis.manager.util.XmlUtil.readXmlFile(Unknown Source)
at com.esri.arcgis.manager.applications.mbeans.SBUtil.loadServers(Unknown Source)
at com.esri.arcgis.manager.applications.mbeans.SiteBuilder.<init>(Unknown Source)
at com.esri.arcgis.manager.server.MBeanManager.createMBeans(Unknown Source)
at com.esri.arcgis.manager.server.Main.start(Unknown Source)
at com.esri.arcgis.manager.server.Main.main(Unknown Source)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:239)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
... 6 more
2013-2-28 22:16:34 com.esri.arcgis.manager.anttasks.UnDeployADFTask execute
信息: baseDir C:\Program Files\ArcGIS\Server10.0\java\manager\config\applications\tasks\deploy
2013-2-28 22:16:34 com.esri.arcgis.manager.anttasks.UnDeployADFTask execute
信息: taskentry.xml C:\Program Files\ArcGIS\Server10.0\java\manager\config\applications\tasks\build/taskentry.xml
2013-2-28 22:16:35 com.esri.arcgis.manager.security.mbeans.ApplicationConfiguration b
信息: Security Config path: C:\Program Files\ArcGIS\Server10.0\java\manager\service\lib\..\..\config\security
2013-2-28 22:16:35 com.esri.arcgis.manager.security.securitystore.util.DBServerUtil get
信息: DB Dir = C:\Program Files\ArcGIS\Server10.0\java\manager\service\lib\..\..\service\derby
2013-2-28 22:16:35 com.esri.arcgis.manager.security.securitystore.util.DBServerUtil get
信息: DB start command :../../../jre/bin/java -Xrs -Dderby.system.home="C:\Program Files\ArcGIS\Server10.0\java\manager\service\lib\..\..\service\derby" -classpath "C:\Program Files\ArcGIS\Server10.0\java\manager\service\lib\..\..\service\derby\lib\derby.jar;C:\Program
Files\ArcGIS\Server10.0\java\manager\service\lib\..\..\service\derby\lib\derbynet.jar;C:\Program Files\ArcGIS\Server10.0\java\manager\service\lib\..\..\service\derby\lib\derbyclient.jar;C:\Program Files\ArcGIS\Server10.0\java\manager\service\lib\..\..\service\derby\lib\derbytools.jar"
org.apache.derby.drda.NetworkServerControl -p 8621 -h 0.0.0.0 start
2013-2-28 22:16:35 com.esri.arcgis.manager.security.securitystore.util.DBServerUtil startDB
信息: Starting DB thread
2013-2-28 22:16:36 com.esri.arcgis.manager.security.securitystore.util.c run
信息: Apache Derby Network Server - 10.2.2.0 - (485682) 已启动并且已准备好 2013-02-28 14:16:36.152 GMT 时在端口 8621 上接受连接
2013-2-28 22:16:39 com.esri.arcgis.manager.server.RMIAdapterFactory start
信息: URL : service:jmx:rmi:///jndi/rmi://service:2099/arcgisconnector
2013-2-28 22:16:39 com.esri.arcgis.manager.server.RMIAdapterFactory start
信息: Server up and running on 2099
2013-2-28 22:16:39 com.esri.arcgis.manager.server.TomcatUtility startDeployerTomcat
信息: Starting tomcat thread
2013-2-28 22:16:40 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.14.
2013-2-28 22:16:40 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2013-2-28 22:16:41 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8099
2013-2-28 22:16:41 org.apache.coyote.ajp.AjpAprProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8109
2013-2-28 22:16:41 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1959 ms
2013-2-28 22:16:41 org.apache.tomcat.util.digester.Digester fatalError
严重: Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1039)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1663)
at org.apache.catalina.users.MemoryUserDatabase.open(MemoryUserDatabase.java:402)
at org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:103)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:140)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:113)
at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:137)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:109)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:
前段时间研究了下JS动态加载和执行顺序依赖的东东,把LABJS的源码从头扒了下:LABJS浅析。对于JS加载执行以及下载监控这,项目组在这块做的东西不少,但对于CSS加载这块的质量监控,力度就小得多了。原因很简单:JS下载失败或出错,这个页面基本就废了。CSS下载失败,大部分情况下页面还是可用的,虽然会比较臭。
但对于OPA来说,情况可能就完全不同了,CSS文件加载失败的影响相对就比较大了。
本着生命不息折腾不已的精神,又倒腾了下CSS加载这块的内容,成果如下,鉴于今天晚上11点才下班回家现在已经很困,就直接上代码了,详细分析后面补上~
删掉注释空行其实代码很少,关于如何测试、API调用都在开头声明了,demo可下载 附件 :)
2 * CSS文件加载器,主要功能:动态加载CSS文件,支持加载完成时候的回调(成功 and 失败 情况下)
3 * 源码实现借鉴:https://github.com/rgrove/lazyload/commit/6caf58525532ee8046c78a1b026f066bad46d32d
4 * 更多关于CSS加载的坑的讨论,见:http://www.phpied.com/when-is-a-stylesheet-really-loaded/
5 *
6 * 测试方法:1)将文件解压到服务器上(或用fiddler等本地文件替换) 2)访问demo.html即可
7 *
8 * @example
9 * loadCSS.load('style.css');
10 * loadCSS.load('style.css', function(){ alert('style.css loaded'); });
11 * loadCSS.load('style.css', function(obj){ alert('age is '+obj.age); }, {age: 24});
12 * loadCSS.load(['a.css', 'b.css'], function(){ alert('a.css and b.css are all loaded'); });
13 *
14 * 更多说明:目前只能判断CSS文件加载事件是否完成,至于是否出现404、5XX等,还判断不了
15 * 曲线救国:回调里判断CSS里定义的某个样式是否存在/生效,借此判断CSS是否下载成功,如下
16 * loadCSS.load('sytle.css', function(){
17 * var div = document.createElement('div');
18 * div.className = 'pre_defined_class'; //pre_defined_class 为测试用的预定义类,假设为 .pre_defined_class{display:none;}
19 * var value = getStyle(div, 'display');
20 * if(value=='none'){
21 * //成功
22 * }else{
23 * //失败
24 * }
25 * })
26 *
27 * @version 1.0
28 * @TODO: 1)静态加载的CSS文件的检测(是否成功加载)2)加载配置项
29 * @author casper chyingp@gmail.com
30 * http://www.cnblogs.com/chyingp
31 * http://www.zcool.com.cn/u/346408
32 *
33 */
34 var LoadCSS = (function () {
35
36 //配置项,未实现
37 var CFG = {
38 POLL_INTERVAL: 50,
39 MAX_TIME: 10
40 };
41
42 var head = document.head || document.getElementsByTagName('head')[0];
43 var styleSheets = document.styleSheets
44 var env = getEnv(); //获取用户代理信息,为浏览器差异化加载提供判断依据
45 var queue = []; //CSS加载队列
46 /*
47 @格式1 queue队列内元素格式
48 {
49 urls: ['a.css', 'b.css', 'd.css'],
50 callback: function(param){}, //urls里面所有CSS文件加载完成后的回调方法,可选
51 obj: {age:24} //callback回调方法传入的实参
52 }
53 */
54
55
56 function indexOf(arr, ele){
57 var ret = -1;
58 for(var i=0,len=arr.length; i<len; i++){
59 if(arr[i]==ele) ret = i;
60 }
61 return ret;
62 }
63
64 /**
65 * @private
66 * @description 返回用户浏览器代理信息,为判断不同浏览器提供依据
67 * @return {Object} 格式见内部代码
68 */
69 function getEnv() {
70 var ua
intege:"^-?[1-9]\\d*$", //整数
intege1:"^[1-9]\\d*$", //正整数
intege2:"^-[1-9]\\d*$", //负整数
num:"^([+-]?)\\d*\\.?\\d+$", //数字
num1:"^[1-9]\\d*|0$", //正数(正整数 + 0)
num2:"^-[1-9]\\d*|0$", //负数(负整数 + 0)
decmal:"^([+-]?)\\d*\\.\\d+$", //浮点数
decmal1:"^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*$", //正浮点数
decmal2:"^-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*)$", //负浮点数
decmal3:"^-?([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0)$", //浮点数
decmal4:"^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0$", //非负浮点数(正浮点数 + 0)
decmal5:"^(-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*))|0?.0+|0$", //非正浮点数(负浮点数 + 0)
email:"^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$",
//邮件
color:"^[a-fA-F0-9]{6}$", //颜色
url:"^http[s]?:\\/\\/([\\w-]+\\.)+[\\w-]+([\\w-./?%&=]*)?$", //url
chinese:"[\\u4E00-\\u9FA5\\uF900-\\uFA2D]+$", //仅中文
chAndEngAndNumEct:"^[\\u4E00-\\u9FA5\\uF900-\\uFA2D\\w+]+$",
ascii:"^[\\x00-\\xFF]+$", //仅ACSII字符
zipcode:"^\\d{6}$", //邮编
mobile:"^(13|15)[0-9]{9}$", //手机
ip4:"^(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)$", //ip地址
notempty:"^\\S+$", //非空
picture:"(.*)\\.(jpg|bmp|gif|ico|pcx|jpeg|tif|png|raw|tga)$", //图片
rar:"(.*)\\.(rar|zip|7zip|tgz)$", //压缩文件
xls:"(.*)\\.(xls)$", //excel
date:"^\\d{4}(\\-|\\/|\.)\\d{1,2}\\1\\d{1,2}$", //日期
qq:"^[1-9]*[1-9][0-9]*$", //QQ号码
tel:"^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", //电话号码的函数(包括验证国内区号,国际区号,分机号)
netfaxno:"^[2-9][0-9]{6,7}",
username:"^\\w+$", //用来用户注册。匹配由数字、26个英文字母或者下划线组成的字符串
letter:"^[A-Za-z]+$", //字母
letter_u:"^[A-Z]+$", //大写字母
letter_l:"^[a-z]+$", //小写字母
idcard:"^[1-9]([0-9]{14}|[0-9]{17})$" //身份证