我正在尝试实现并运行SWORD V2 Server API,但是一直收到错误消息。
我正在使用IntellijIdea2018。
当我第一次打开项目时,我尝试两件事:
自述文件中提到的 1-。我从以下命令开始:mvn clean package
然后,将Intellij构建工具的配置配置为:Maven -> run maven goal -> site:run
。当我运行它时,我有这个:
INFO] Relativizing decoration links with respect to project URL: http://www.swordapp.org/
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Starting Jetty on http://localhost:8080/
[INFO] jetty-6.1.25
[INFO] NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
[WARNING] failed SelectChannelConnector@0.0.0.0:8080: java.net.BindException: Address already in use: bind
[WARNING] failed Server@187e5235: java.net.BindException: Address already in use: bind
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.173 s
[INFO] Finished at: 2018-11-22T10:04:06+13:00
[INFO] Final Memory: 23M/325M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:run (default-cli) on project sword2-server: Error executing Jetty: Address already in use: bind -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO] Shutdown hook executing
[INFO] Stopped SelectChannelConnector@0.0.0.0:8080
[INFO] Shutdown hook complete
[ERROR] Maven execution terminated abnormally (exit code 1)
之后,localhost:8080
我有:
screenshot for localhost:8080
并调用servlet http://localhost:8080/swordv2/servicedocument
:
404 servlet screenshot
2-我在其中配置了现有工件的tomcat(默认情况下,它有两个,我都尝试了两次,但都没有成功)。有时它给了我Caused by: java.lang.NoClassDefFoundError: Lorg/apache/log4j/Logger;
,有时候我可以使用tomcat部署war文件,但是当我调用任何servlet时,它甚至无法运行任何servlet,也无法为error 404
或`localhost:8080 / [servletnames]提供相同的localhost:8080
。
我正在寻找的只是可以实现并将该服务器用作示例(如果我可以将其安装在非默认端口(例如8787)上可能会更好。
如果有人能给我实现目标的步骤,我将不胜感激。
谢谢。