我通过Eclipse运行动态Web应用程序,我认为Tomcat在它下工作正常,我从Eclipse中的tomcat服务器浏览了servlet,出现了servlet的欢迎页面但是当我尝试访问它的不同之处时函数,我不断收到这样的错误:
Etat HTTP 500-
type Rapport d'exception HTTP
message
description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.
exception
javax.servlet.ServletException
org.n52.oxf.rest.sos.RestSosFrontend.oldURLSchema(RestSosFrontend.java:986)
org.n52.oxf.rest.sos.RestSosFrontend.doGet(RestSosFrontend.java:482)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
cause mère
javax.servlet.ServletException
org.n52.oxf.rest.sos.RestSosFrontend.showResultsInPreferredMIMEType(RestSosFrontend.java:696)
org.n52.oxf.rest.sos.RestSosFrontend.oldURLSchema(RestSosFrontend.java:982)
org.n52.oxf.rest.sos.RestSosFrontend.doGet(RestSosFrontend.java:482)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
cause mère
org.n52.oxf.OXFException
org.n52.oxf.rest.sos.RestSosFrontend.showResultsInPreferredMIMEType(RestSosFrontend.java:696)
org.n52.oxf.rest.sos.RestSosFrontend.oldURLSchema(RestSosFrontend.java:982)
org.n52.oxf.rest.sos.RestSosFrontend.doGet(RestSosFrontend.java:482)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
In the console, it outputed:
2011-05-25 12:48:50,000 INFO RestSosFrontend:197 Request URL:<a href="http://localhost:8080/52n-OXF-WS/RESTful/sos/Weather_SOS/observations/ATMOSPHERIC_PRESSURE/urn:ogc:object:feature:OSIRIS-HWS:3d3b239f-7696-4864-9d07-15447eae2b93/urn:ogc:def:property:OGC::BarometricPressure/2008/12/20/02/29/27/01/2011/05/25/12/31/00/02/Measurement" target="_blank">http://localhost:8080/52n-OXF-WS/RES...02/Measurement</a>
2011-05-25 12:49:39,921 ERROR [REST-SOS]:253 "Servlet.service()" pour la servlet REST-SOS a généré une exception
org.n52.oxf.OXFException
at org.n52.oxf.feature.sos.SOSObservationStore.unmarshalFeatures100(SOSObservationStore.java:114)
at org.n52.oxf.feature.sos.SOSObservationStore.unmarshalFeatures(SOSObservationStore.java:63)
at org.n52.oxf.rest.sos.RestSosFrontend.showResultsInPreferredMIMEType(RestSosFrontend.java:669)
at org.n52.oxf.rest.sos.RestSosFrontend.oldURLSchema(RestSosFrontend.java:982)
at org.n52.oxf.rest.sos.RestSosFrontend.doGet(RestSosFrontend.java:482)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.xmlbeans.XmlException: error: </body> does not close tag <HR>.
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3471)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1270)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1257)
at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
at net.opengis.om.x10.ObservationCollectionDocument$Factory.parse(Unknown Source)
at org.n52.oxf.feature.sos.SOSObservationStore.unmarshalFeatures100(SOSObservationStore.java:100)
... 20 more
Caused by: org.xml.sax.SAXParseException: </body> does not close tag <HR>.
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3439)
... 25 more
请问,问题是什么?我该如何解决?我在网上搜索了这个问题,但没有找到适合我的解决方案。
感谢您真正需要的快速回答。
答案 0 :(得分:1)
查看迹线的最底部。异常的根本原因是最重要的部分。
Caused by: org.xml.sax.SAXParseException: </body> does not close tag <HR>.
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3439)
... 25 more
<HR>
不是XML格式良好。在XML中,您需要关闭所有标记。将<HR>
替换为<hr/>
。
答案 1 :(得分:0)
您的部署不正确或连接URL错误。如果servlet正在运行,则表示您没有正确指向它。