Running SWORD 2 server example Java












0















I'm trying to implement and run SWORD V2 Server API but all the time I received the error.



I'm using IntellijIdea 2018.



When I open the project for the first time I try two things :



1 - as it mentioned in ReadMe. I start with this command : mvn clean package

Then I configure Intellij build tool Configuration as : Maven -> run maven goal -> site:run. when I run it I have this :



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)


after that for localhost:8080 I have :
screenshot for localhost:8080
and for calling servlet http://localhost:8080/swordv2/servicedocument:
404 servlet screenshot



2- I configure tomcat with the existing artifact there ( it has two by default, I've tried both and no success).Sometimes it gives me the Caused by: java.lang.NoClassDefFoundError: Lorg/apache/log4j/Logger; and some times I could deploy war file with tomcat but it couldn't run any servlet and gives me the same error 404 for even localhost:8080 or `localhost:8080/[servletnames] when I call any servlets.



What I'm looking for is simply could implement and using this server as a sample (could be better if I could have it on no-default port (e.g. 8787).



I would be grateful if anyone could give me the steps that I could reach my aim.



Thanks in advance.










share|improve this question





























    0















    I'm trying to implement and run SWORD V2 Server API but all the time I received the error.



    I'm using IntellijIdea 2018.



    When I open the project for the first time I try two things :



    1 - as it mentioned in ReadMe. I start with this command : mvn clean package

    Then I configure Intellij build tool Configuration as : Maven -> run maven goal -> site:run. when I run it I have this :



    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)


    after that for localhost:8080 I have :
    screenshot for localhost:8080
    and for calling servlet http://localhost:8080/swordv2/servicedocument:
    404 servlet screenshot



    2- I configure tomcat with the existing artifact there ( it has two by default, I've tried both and no success).Sometimes it gives me the Caused by: java.lang.NoClassDefFoundError: Lorg/apache/log4j/Logger; and some times I could deploy war file with tomcat but it couldn't run any servlet and gives me the same error 404 for even localhost:8080 or `localhost:8080/[servletnames] when I call any servlets.



    What I'm looking for is simply could implement and using this server as a sample (could be better if I could have it on no-default port (e.g. 8787).



    I would be grateful if anyone could give me the steps that I could reach my aim.



    Thanks in advance.










    share|improve this question



























      0












      0








      0








      I'm trying to implement and run SWORD V2 Server API but all the time I received the error.



      I'm using IntellijIdea 2018.



      When I open the project for the first time I try two things :



      1 - as it mentioned in ReadMe. I start with this command : mvn clean package

      Then I configure Intellij build tool Configuration as : Maven -> run maven goal -> site:run. when I run it I have this :



      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)


      after that for localhost:8080 I have :
      screenshot for localhost:8080
      and for calling servlet http://localhost:8080/swordv2/servicedocument:
      404 servlet screenshot



      2- I configure tomcat with the existing artifact there ( it has two by default, I've tried both and no success).Sometimes it gives me the Caused by: java.lang.NoClassDefFoundError: Lorg/apache/log4j/Logger; and some times I could deploy war file with tomcat but it couldn't run any servlet and gives me the same error 404 for even localhost:8080 or `localhost:8080/[servletnames] when I call any servlets.



      What I'm looking for is simply could implement and using this server as a sample (could be better if I could have it on no-default port (e.g. 8787).



      I would be grateful if anyone could give me the steps that I could reach my aim.



      Thanks in advance.










      share|improve this question
















      I'm trying to implement and run SWORD V2 Server API but all the time I received the error.



      I'm using IntellijIdea 2018.



      When I open the project for the first time I try two things :



      1 - as it mentioned in ReadMe. I start with this command : mvn clean package

      Then I configure Intellij build tool Configuration as : Maven -> run maven goal -> site:run. when I run it I have this :



      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)


      after that for localhost:8080 I have :
      screenshot for localhost:8080
      and for calling servlet http://localhost:8080/swordv2/servicedocument:
      404 servlet screenshot



      2- I configure tomcat with the existing artifact there ( it has two by default, I've tried both and no success).Sometimes it gives me the Caused by: java.lang.NoClassDefFoundError: Lorg/apache/log4j/Logger; and some times I could deploy war file with tomcat but it couldn't run any servlet and gives me the same error 404 for even localhost:8080 or `localhost:8080/[servletnames] when I call any servlets.



      What I'm looking for is simply could implement and using this server as a sample (could be better if I could have it on no-default port (e.g. 8787).



      I would be grateful if anyone could give me the steps that I could reach my aim.



      Thanks in advance.







      java maven tomcat intellij-idea-2018 atompub






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 '18 at 20:05







      Far Zad

















      asked Nov 21 '18 at 21:28









      Far ZadFar Zad

      45




      45
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53420704%2frunning-sword-2-server-example-java%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53420704%2frunning-sword-2-server-example-java%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Wiesbaden

          Marschland

          Dieringhausen