2017-08-20 17 views
1

eventuateプログラムで、以下のエラーが発生すると、いくつかの依存関係が存在しないか、バージョンの問題が発生する可能性があります。eventuateプログラムでnoClassDefFoundErrorを取得する

実際に私はhttps://github.com/eventuate-examples/eventuate-examples-java-spring-todo-listに続き、mavenを使ってプロジェクトを構築しようとしましたが、うまくいきません。

もしかしたら、あなたはイベントの「イベント駆動型」のサンプルプロジェクトを持っているのですが、私にそれを教えてください。

エラー:

Caused by: java.lang.IllegalStateException: Failed to introspect annotated methods on class io.eventuate.javaclient.spring.common.EventuateCommonConfiguration 
at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:163) 
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:292) 
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:232) 
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:510) 
Caused by: java.lang.NoClassDefFoundError: io/eventuate/MissingApplyEventMethodStrategy 
at java.lang.Class.getDeclaredMethods0(Native Method) 
at java.lang.Class.privateGetDeclaredMethods(Unknown Source) 
at java.lang.Class.getDeclaredMethods(Unknown Source) 
at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:152) 
Caused by: java.lang.ClassNotFoundException: io.eventuate.MissingApplyEventMethodStrategy 
at java.net.URLClassLoader.findClass(Unknown Source) 
at java.lang.ClassLoader.loadClass(Unknown Source) 
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) 
at java.lang.ClassLoader.loadClass(Unknown Source) 

以下のpom.xml

ある
<?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/xsd/maven-4.0.0.xsd"> 
<modelVersion>4.0.0</modelVersion> 

<groupId>org.xyz.services</groupId> 
<artifactId>rest-stub</artifactId> 
<version>0.1.0</version> 
<packaging>war</packaging> 
<parent> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-starter-parent</artifactId> 
    <version>1.3.5.RELEASE</version> 
</parent> 

<dependencies> 
    <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot --> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot</artifactId> 
     <version>1.0.0.RELEASE</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-web</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-test</artifactId> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-tomcat</artifactId> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>com.jayway.jsonpath</groupId> 
     <artifactId>json-path</artifactId> 
     <scope>test</scope> 
    </dependency> 

    <dependency> 
     <groupId>io.eventuate.local.java</groupId> 
     <artifactId>eventuate-local-java-cdc-mysql-autoconfigure</artifactId> 
     <version>0.13.0.RELEASE</version> 
     <type>pom</type> 
    </dependency> 

    <!-- https://mvnrepository.com/artifact/org.springframework.hateoas/spring-hateoas --> 
    <dependency> 
     <groupId>org.springframework.hateoas</groupId> 
     <artifactId>spring-hateoas</artifactId> 
     <version>0.15.0.RELEASE</version> 
    </dependency> 
    <!-- https://mvnrepository.com/artifact/javax.persistence/persistence-api --> 
    <dependency> 
     <groupId>javax.persistence</groupId> 
     <artifactId>persistence-api</artifactId> 
     <version>1.0.2</version> 
    </dependency> 
    <!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa --> 
    <!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-rest-webmvc --> 
    <dependency> 
     <groupId>org.springframework.data</groupId> 
     <artifactId>spring-data-rest-webmvc</artifactId> 
     <version>1.0.0.RELEASE</version> 
    </dependency> 
    <!-- https://mvnrepository.com/artifact/com.networknt/eventuate-cdccore --> 
    <dependency> 
     <groupId>com.networknt</groupId> 
     <artifactId>eventuate-cdccore</artifactId> 
     <version>0.1.0</version> 
    </dependency> 

    <dependency> 
     <groupId>io.eventuate.client.java</groupId> 
     <artifactId>eventuate-client-java-spring</artifactId> 
     <version>0.11.0.RELEASE</version> 
    </dependency> 


    <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 --> 
    <dependency> 
     <groupId>io.springfox</groupId> 
     <artifactId>springfox-swagger2</artifactId> 
     <version>2.7.0</version> 
    </dependency> 


</dependencies> 

<properties> 
    <java.version>1.8</java.version> 
</properties> 


<build> 
    <resources> 
     <resource> 
      <directory>src/main/resources</directory> 
      <filtering>true</filtering> 
     </resource> 
    </resources> 
    <plugins> 
     <plugin> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-maven-plugin</artifactId> 
     </plugin> 
    </plugins> 
</build> 

<repositories> 
    <repository> 
     <id>spring-releases</id> 
     <url>https://repo.spring.io/libs-release</url> 
    </repository> 
    <repository> 
     <id>eventuate-release</id> 
     <url>http://mavenrepo.eventuate.io/release</url> 
    </repository> 
</repositories> 
<pluginRepositories> 
    <pluginRepository> 
     <id>spring-releases</id> 
     <url>https://repo.spring.io/libs-release</url> 
    </pluginRepository> 
</pluginRepositories></project> 

答えて

1

私は何とかあなたが(新しい(MissingApplyEventMethodStrategyを必要とする)と古いの混合物を使用していることを推測していますMissingApplyEventMethodStrategyを提供しません)Eventuate libraries。

特に、0.11.0.RELEASEはかなり古いです。最新の0.17.0.RELEASEにアップグレードしてみてください

+0

ありがとうございます。この問題は解決しましたが、別の問題が確認されました。 –

関連する問題