当前位置: 首页 > 面试题库 >

码头:HTTP错误:503 /服务不可用

冯枫
2023-03-14
问题内容

我是Jetty的新手,我尝试在此处运行示例程序“ http://www.codeproject.com/Articles/128145/Run-
Jetty-Web-Server-Within-Your-
Application

”,但我收到了错误消息我的页面“ http:// localhost:8585 / runJetty
/ ”

"HTTP ERROR: 503
Problem accessing /runJetty/. Reason: 
    Service Unavailable
--------------------------------------------------------------------------------
Powered by Jetty:// "

我从Eclipse获取的错误日志:

2012-04-20 11:14:32.522:INFO:oejs.Server:jetty-8.1.3.v20120416
2012-04-20 11:14:32.617:WARN:oejx.XmlParser:FATAL@file:/C:/Users/***/workspace/Test/WEB-INF/web.xml line:1 col:7 : org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
2012-04-20 11:14:32.617:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/runJetty,file:/C:/Users/***/workspace/Test/}
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:199)
at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:215)
at org.eclipse.jetty.webapp.Descriptor.parse(Descriptor.java:60)
at org.eclipse.jetty.webapp.WebDescriptor.parse(WebDescriptor.java:143)
at org.eclipse.jetty.webapp.MetaData.setWebXml(MetaData.java:165)
at org.eclipse.jetty.webapp.WebXmlConfiguration.preConfigure(WebXmlConfiguration.java:55)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:417)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:453)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:262)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at blog.runjetty.server.JettyServer.start(JettyServer.java:22)
at blog.runjetty.ui.listener.ServerStartStopActionListner.actionPerformed(ServerStartStopActionListner.java:38)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2012-04-20 11:14:32.648:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8585

我的xml文件

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
version="2.4">
    <welcome-file-list>
        <welcome-file>page/index.jsp</welcome-file> 
    </welcome-file-list>
</web-app>

我的JSP文件

<%@ page language="java" contentType="text/html; charset=ISO-8859-1 pageEncoding="ISO-8859-1"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01     Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> 
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title>Embedding Jetty</title>
    </head>
    <body>
        <h2>Running Jetty web server from our application!!</h2>
    </body>
</html>

问题答案:

实际上,我解决了这个问题。我通过Eclipse Jetty插件运行它。

  1. 我的月食中没有JDK库,这就是为什么消息不断显示我需要安装完整的JDK的原因,这是主要原因。

  2. 我安装了两个版本的jetty插件,分别是jetty7和jetty8。我认为它们彼此冲突或发生某些冲突,因此我卸下了码头7,它起作用了!



 类似资料:
  • > 计数操作失败,出现以下错误消息: OriginalException:ElasticSearch.Net.ElasticSearchClientException:远程服务器返回错误:(503)服务器不可用。调用:状态代码503来自:GET/myindex/_count。ServerError:Type:search_phase_execution_exception原因:“All shard

  • 问题内容: 我一直在使用亚马逊的产品广告API来生成包含给定书籍价格的网址。我生成的一个网址如下: http://www.amazon.com/gp/offer- listing/0415376327%3FSubscriptionId%3DAKIAJZY2VTI5JQ66K7QQ%26tag%3Damaztest04-20%26linkCode%3Dxm2%26camp%3D2025%26crea

  • 当我在我的服务器上用wget、curl或python爬行谷歌搜索引擎时,我遇到了一个非常奇怪的问题。Google将我重定向到以[ipv4 | ipv6]开头的地址。谷歌。fr/抱歉/索引重定向。。。最后发送503错误,服务不可用。。。 有时抓取工作正常,有时不是在白天,我尝试了几乎所有可能的方法:强制ipv4/ipv6而不是主机名、引用者、用户代理、vpn、. com/. fr/、代理和tor,.

  • 问题内容: 我刚刚开始使用Python中的goslate库检测文本中单词的语言,但是在测试了7-8个输入后,我给出了输入,该单词用阿拉伯语和英语两种语言编写。之后,它开始给我错误。 我写的代码为: 现在它对于我之前测试过的任何输入都根本不起作用,并且给了我同样的错误。我尝试在Google上找到错误解决方法,但没有任何帮助。 我尝试使用上面链接中建议的命令对其进行更新: 但它没有帮助,因为它已经是我

  • 首先,我在google和statckoverflow中尝试了很多,但还是失败了。我希望能帮助我。谢谢你。 当从我的WebClient调用WCF服务时,我收到以下错误。 注意2:服务器和Web客户端托管在IIS中。