camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Taariq Levack <taar...@gmail.com>
Subject Re: org.apache.camel.spring.Main class not found exception
Date Mon, 28 Nov 2011 14:22:53 GMT
You've now mixed spring versions, you have 2.5 for spring-jdbc, for the
rest you get 3.0.5 instead.

Instead of this dependency...
<dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-spring</artifactId>
      <version>${camel-version}</version>
     </dependency>


Can you try this instead? I'm excluding spring dependencies and providing
it, you can check the maven docs for more.


        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring</artifactId>
            <version>${camel-version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>spring-context</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-aop</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-tx</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <artifactId>spring-context</artifactId>
            <groupId>org.springframework</groupId>
            <version>${spring-version}</version>
        </dependency>

        <dependency>
            <artifactId>spring-aop</artifactId>
            <groupId>org.springframework</groupId>
            <version>${spring-version}</version>
        </dependency>

        <dependency>
            <artifactId>spring-tx</artifactId>
            <groupId>org.springframework</groupId>
            <version>${spring-version}</version>
        </dependency>

BTW spring 2.5 is up to 2.5.6 / 2.5.6.SEC03 if you really want to use 2.5.

Taariq


On Mon, Nov 28, 2011 at 1:14 PM, newbiee <m_essa24@hotmail.com> wrote:

> Willem:
>
> Thanks for the reply.
>
> Here are all the dependencies defined in the pom file: (I have explicitly
> assigned the version)
>
>
>  <properties>
>    <camel-version>2.6.0</camel-version>
>    <log4j-version>1.2.16</log4j-version>
>    <jaxb-api-version>2.1</jaxb-api-version>
>    <jaxb-impl-version>2.1.13</jaxb-impl-version>
>  </properties>
>
>    <dependencies>
>
>      <dependency>
>        <groupId>org.apache.camel</groupId>
>        <artifactId>camel-core</artifactId>
>         <version>${camel-version}</version>
>      </dependency>
>
>      <dependency>
>        <groupId>org.apache.camel</groupId>
>        <artifactId>camel-jdbc</artifactId>
>        <version>${camel-version}</version>
>      </dependency>
>
>
>       <dependency>
>        <groupId>mysql</groupId>
>        <artifactId>mysql-connector-java</artifactId>
>        <version>5.1.9</version>
>      </dependency>
>
>
>       <dependency>
>        <groupId>org.springframework</groupId>
>        <artifactId>spring-jdbc</artifactId>
>        <version>2.5</version>
>      </dependency>
>
>      <dependency>
>       <groupId>org.apache.camel</groupId>
>       <artifactId>camel-spring</artifactId>
>       <version>${camel-version}</version>
>      </dependency>
>
>
>       <dependency>
>        <groupId>log4j</groupId>
>        <artifactId>log4j</artifactId>
>        <version>${log4j-version}</version>
>      </dependency>
>
>  </dependencies>
>
> Here is the result of running mvn dependency:tree:
>
> C:\timer>mvn dependency:tree
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'dependency'.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building A Camel Route
> [INFO]    task-segment: [dependency:tree]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [dependency:tree {execution: default-cli}]
> [INFO] timer:timer:jar:1.0-SNAPSHOT
> [INFO] +- org.apache.camel:camel-core:jar:2.6.0:compile
> [INFO] |  +- commons-logging:commons-logging-api:jar:1.1:compile
> [INFO] |  +- org.fusesource.commonman:commons-management:jar:1.0:compile
> [INFO] |  \- com.sun:tools:jar:1.5.0:system
> [INFO] +- org.apache.camel:camel-jdbc:jar:2.6.0:compile
> [INFO] +- mysql:mysql-connector-java:jar:5.1.9:compile
> [INFO] +- org.springframework:spring-jdbc:jar:2.5:compile
> [INFO] |  +- commons-logging:commons-logging:jar:1.1:compile
> [INFO] |  +- org.springframework:spring-beans:jar:2.5:compile
> [INFO] |  +- org.springframework:spring-context:jar:2.5:compile
> [INFO] |  |  \- aopalliance:aopalliance:jar:1.0:compile
> [INFO] |  +- org.springframework:spring-core:jar:2.5:compile
> [INFO] |  \- org.springframework:spring-tx:jar:2.5:compile
> [INFO] +- org.apache.camel:camel-spring:jar:2.6.0:compile
> [INFO] |  \- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
> [INFO] |     \- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
> [INFO] \- log4j:log4j:jar:1.2.16:compile
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Mon Nov 28 06:05:35 EST 2011
> [INFO] Final Memory: 13M/32M
> [INFO]
> ------------------------------------------------------------------------
> C:\timer>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/org-apache-camel-spring-Main-class-not-found-exception-tp5025882p5028537.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message