Java 驼峰格式错误的ParameterizedTypeException

Java 驼峰格式错误的ParameterizedTypeException,java,maven-3,apache-camel,Java,Maven 3,Apache Camel,如果不抛出异常MalformedParameterizedTypeException,我无法获取空的camel上下文来运行 以下是我的应用程序上下文: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="ht

如果不抛出异常MalformedParameterizedTypeException,我无法获取空的camel上下文来运行

以下是我的应用程序上下文:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://camel.apache.org/schema/cxf"
xmlns:camel="http://camel.apache.org/schema/spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans 
                        http://www.springframework.org/schema/beans/spring-beans.xsd
                    http://camel.apache.org/schema/cxf 
                    http://camel.apache.org/schema/cxf/camel-cxf.xsd
                    http://camel.apache.org/schema/spring 
                    http://camel.apache.org/schema/spring/camel-spring.xsd"
default-init-method="init" default-lazy-init="false">

<!-- Camel Configuration -->
<camel:camelContext id="camel-1"
    xmlns="http://camel.apache.org/schema/spring">

</camel:camelContext>

</beans>

以下是我的pom依赖项:

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
                    http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>com.mycomp.stuff</groupId>
<artifactId>aggregate-delivery</artifactId>
<packaging>jar</packaging>
<name>aggregate-delivery</name>
<version>0.0.0.0.01</version>

<properties>
    <camel.version>2.12.0</camel.version>
    <spring.version>2.5.6.SEC03</spring.version>
</properties>
<dependencies>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring</artifactId>
        <version>${spring.version}</version>
        <exclusions>
        <exclusion>
        <artifactId>commons-logging</artifactId>
        <groupId>commons-logging</groupId>
        </exclusion>
            <exclusion>
        <artifactId>commons-logging-api</artifactId>
        <groupId>commons-logging</groupId>
        </exclusion>
    </exclusions>
    </dependency>
    <!-- Camel -->
    <dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-core</artifactId>
    <version>${camel.version}</version>
    </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring</artifactId>
            <version>${camel.version}</version>
        </dependency>
    </dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-maven-plugin</artifactId>
            <version>${camel.version}</version>

            <configuration>
                <applicationContextUri>META-INF/spring/application-context.xml</applicationContextUri>

            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
    <pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <configuration>
                    <wtpversion>2.0</wtpversion>
                    <wtpapplicationxml>true</wtpapplicationxml>
                    <wtpmanifest>true</wtpmanifest>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                    <projectNameTemplate>[artifactId]-[version]</projectNameTemplate>
                    <manifest>${basedir}/src/main/resources/META-INF/MANIFEST.MF</manifest>
                </configuration>
            </plugin>

        </plugins>
    </pluginManagement>
    <finalName>aggregate-delivery</finalName>
</build>
mvn archetype:generate \
    -DarchetypeGroupId=org.apache.camel.archetypes \
    -DarchetypeArtifactId=camel-archetype-spring  \
    -DarchetypeVersion=2.9.0  \
    -DgroupId=ch.test.camel \
    -DartifactId=cameltest77  \
    -Dversion=0.0.1

4.0.0
com.mycop.stuff
总交付量
罐子
总交付量
0.0.0.0.01
2.12.0
2.5.6.03
org.springframework
春天
${spring.version}
公用记录
公用记录
通用日志api
公用记录
org.apache.camel
驼芯
${camel.version}
org.apache.camel
骆驼泉
${camel.version}
org.apache.camel
驼峰maven插件
${camel.version}
META-INF/spring/application-context.xml
org.apache.maven.plugins
maven编译器插件
1.6
1.6
maven eclipse插件
2
真的
真的
真的
真的
[工件ID]-[版本]
${basedir}/src/main/resources/META-INF/MANIFEST.MF
总交付量

我声明了其他bean,但是我开始得到这个错误,我删除了它们以查看是什么导致了异常

因为我在我的驼峰上下文中没有任何东西,所以问题不可能是我造成的,它似乎是一个驼峰配置问题

我看到其他帖子说这是一个lib兼容性问题。我该怎么解决这个问题呢

我已经用pom将问题缩减为一个空的驼峰上下文

克劳德,你的pom会是什么样子

欢迎所有建议

谢谢


Andrew

调用
mvn原型:generate
以创建具有所有所需依赖项的Maven项目:

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
                    http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>com.mycomp.stuff</groupId>
<artifactId>aggregate-delivery</artifactId>
<packaging>jar</packaging>
<name>aggregate-delivery</name>
<version>0.0.0.0.01</version>

<properties>
    <camel.version>2.12.0</camel.version>
    <spring.version>2.5.6.SEC03</spring.version>
</properties>
<dependencies>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring</artifactId>
        <version>${spring.version}</version>
        <exclusions>
        <exclusion>
        <artifactId>commons-logging</artifactId>
        <groupId>commons-logging</groupId>
        </exclusion>
            <exclusion>
        <artifactId>commons-logging-api</artifactId>
        <groupId>commons-logging</groupId>
        </exclusion>
    </exclusions>
    </dependency>
    <!-- Camel -->
    <dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-core</artifactId>
    <version>${camel.version}</version>
    </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring</artifactId>
            <version>${camel.version}</version>
        </dependency>
    </dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-maven-plugin</artifactId>
            <version>${camel.version}</version>

            <configuration>
                <applicationContextUri>META-INF/spring/application-context.xml</applicationContextUri>

            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
    <pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <configuration>
                    <wtpversion>2.0</wtpversion>
                    <wtpapplicationxml>true</wtpapplicationxml>
                    <wtpmanifest>true</wtpmanifest>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                    <projectNameTemplate>[artifactId]-[version]</projectNameTemplate>
                    <manifest>${basedir}/src/main/resources/META-INF/MANIFEST.MF</manifest>
                </configuration>
            </plugin>

        </plugins>
    </pluginManagement>
    <finalName>aggregate-delivery</finalName>
</build>
mvn archetype:generate \
    -DarchetypeGroupId=org.apache.camel.archetypes \
    -DarchetypeArtifactId=camel-archetype-spring  \
    -DarchetypeVersion=2.9.0  \
    -DgroupId=ch.test.camel \
    -DartifactId=cameltest77  \
    -Dversion=0.0.1

可以找到不同原型的列表。

请提供完整的
pom.xml
,谢谢。谢谢Peter。我希望我上周已经发布了这篇文章。:-)