Camel
  1. Camel
  2. CAMEL-4545

[WebConsole Archetype] Unable to run with "mvn jetty:run"

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.8.3, 2.9.0
    • Component/s: tooling
    • Labels:
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Novice
    • Regression:
      Regression

      Description

      If you install the camel-archetype-webconsole from the trunk (2.9-SNAPSHOT actually), and create a new project with it ("mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-webconsole -DarchetypeVersion=2.9-SNAPSHOT"), you can't run "mvn jetty:run".
      There are conflicts with slf4j-api binding as you can see in the following logs

       
      ...
      [main] ContextLoader ERROR Context initialization failed
      java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
              at org.slf4j.impl.Log4jLoggerAdapter.info(Log4jLoggerAdapter.java:323)[slf4j-log4j12-1.6.1.jar:1.6.1]
      ...
      

      Running "mvn dependencies:tree" show that two versions of slf4j are loaded.

      You can find with this issue a patch that exclude slf4j for activemq-camel, which solve the problem.

      But you then ran in the following problem

      ... 
      java.net.URISyntaxException: Illegal character in opaque part at index 22: jar:file:/mypath/.m2/repository/org/apache/camel/camel-web/2.9-SNAPSHOT/camel-web-2.9-SNAPSHOT.war!/WEB-INF/classes/
      ...
      

      Which can be solved by updating jetty-version to a more recent one (7.5.3.v20111011) in the parent pom ( issue CAMEL-4544 with patch)

        Issue Links

          Activity

          Cédric Exbrayat created issue -
          Cédric Exbrayat made changes -
          Field Original Value New Value
          Attachment webconsole-archetype-issue.patch [ 12499030 ]
          Cédric Exbrayat made changes -
          Link This issue is related to CAMEL-4544 [ CAMEL-4544 ]
          Hide
          Cédric Exbrayat added a comment -

          To completely resolve this issue, 4544 needs to be fixed

          Show
          Cédric Exbrayat added a comment - To completely resolve this issue, 4544 needs to be fixed
          Hide
          David J. M. Karlsen added a comment -

          Could it be an idea to control the slf4j version for all camel modules via the dependencyManagement section in the topmost pom?

          Show
          David J. M. Karlsen added a comment - Could it be an idea to control the slf4j version for all camel modules via the dependencyManagement section in the topmost pom?
          Cédric Exbrayat made changes -
          Attachment webconsole-archetype-issue.patch [ 12499030 ]
          Cédric Exbrayat made changes -
          Attachment webconsole-archetype-issue.patch [ 12499649 ]
          Hide
          Willem Jiang added a comment -

          I just did some test by adding the dependency of sl4j-api in the archetype pom, the webconsole can be started without any trouble.
          so I created a new JIRA CAMEL-4559 to updated all other camel archetype.

          Show
          Willem Jiang added a comment - I just did some test by adding the dependency of sl4j-api in the archetype pom, the webconsole can be started without any trouble. so I created a new JIRA CAMEL-4559 to updated all other camel archetype.
          Willem Jiang made changes -
          Assignee Willem Jiang [ njiang ]
          Willem Jiang made changes -
          Link This issue is related to CAMEL-4559 [ CAMEL-4559 ]
          Hide
          Willem Jiang added a comment -

          This issue is fixed by CAMEL-4559.

          Show
          Willem Jiang added a comment - This issue is fixed by CAMEL-4559 .
          Willem Jiang made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.8.3 [ 12318649 ]
          Fix Version/s 2.9.0 [ 12316374 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Willem Jiang
              Reporter:
              Cédric Exbrayat
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development