Jetty: HTTP ERROR: 503/ Service Unavailable

后端 未结 5 2220
遥遥无期
遥遥无期 2020-12-18 22:06

I\'m new to Jetty, I tried to run the sample program here \"http://www.codeproject.com/Articles/128145/Run-Jetty-Web-Server-Within-Your-Application\" but I got error messag

相关标签:
5条回答
  • 2020-12-18 22:41

    I had the same problem. I solved it by removing the line break from the xml file. I did

    <operationBindings>
        <OperationBinding>
            <operationType>update</operationType>
            <operationId>makePdf</operationId>
            <serverObject>
                <className>com.myclass</className>
                <lookupStyle>new</lookupStyle>
            </serverObject>
            <serverMethod>makePdf</serverMethod>
        </OperationBinding>
    </operationBindings>
    

    instead of ...

    <serverObject>
                <className>com.myclass
    </className>
                <lookupStyle>new</lookupStyle>
    </serverObject>
    
    0 讨论(0)
  • 2020-12-18 22:46

    Remove/Delete the project from workspace. and Reimport the project to the workspace. This method worked for me.

    0 讨论(0)
  • 2020-12-18 22:49

    Actually, I solved the problem. I run it by eclipse jetty plugin.

    1. I didn't have the JDK lib in my eclipse, that's why the message keep showing that I need the full JDK installed, that's the main reason.

    2. I installed two versions of jetty plugin, wich is jetty7 and jetty8. I think they conflict with each other or something, so I removed the jetty7, and it works!

    0 讨论(0)
  • 2020-12-18 22:59

    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.

    You Log says, that you web.xml is malformed. Line 1, colum 7. It may be a UTF-8 Byte-Order-Marker

    Try to verify, that your xml is wellformed and does not have a BOM. Java doesn't use BOMs.

    0 讨论(0)
  • 2020-12-18 23:00

    None of these answers worked for me.

    I had to remove all deployed java web app:

    • Windows/Show View/Other...
    • Go the the Server folder and select "Servers"
    • Right-click on the J2EE Preview at localhost
    • Click to Add and Remove... Click Remove all

    Then run the project on the server

    The Error is gone!

    You will have to stop the server before deploying another project because it will not be found by the server. Otherwise you will get a 404 error

    0 讨论(0)
提交回复
热议问题