2017-01-12 10 views
0

私は自分のプロジェクトでliquigraphを実装しようとしています。この例ではhttps://github.com/fbiville/liquigraph-spring-boot-exampleを使用しています。私はスタンフォードNLPから2つの依存関係を追加しようとするまでの例では、正常に動作:スタンフォードnlpとliquigraphを一緒に使用することによって発生したエラーを修正するにはどうすればよいですか?

<dependency> 
     <groupId>edu.stanford.nlp</groupId> 
     <artifactId>stanford-corenlp</artifactId> 
     <version>3.6.0</version> 
    </dependency> 
    <dependency> 
     <groupId>edu.stanford.nlp</groupId> 
     <artifactId>stanford-corenlp</artifactId> 
     <version>3.6.0</version> 
     <classifier>models</classifier> 
    </dependency> 

私は、これら2つの依存関係を追加した後、私はこのエラーを得た:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquigraph' defined in class path resource [org/liquigraph/spring/starter/LiquigraphAutoConfiguration$LiquigraphConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 
cvc-elt.1: Cannot find the declaration of element 'changelog'. 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1583) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] 
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] 
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] 
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] 
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] 
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] 
at org.liquigraph.examples.spring.SampleController.main(SampleController.java:48) [classes/:na] 

Caused by: java.lang.IllegalArgumentException: 
    cvc-elt.1: Cannot find the declaration of element 'changelog'. 
    at org.liquigraph.core.io.xml.ChangelogParser.parseChangelog(ChangelogParser.java:67) ~[liquigraph-core-3.0.2-SNAPSHOT.jar:na] 
    at org.liquigraph.core.io.xml.ChangelogParser.parse(ChangelogParser.java:59) ~[liquigraph-core-3.0.2-SNAPSHOT.jar:na] 
    at org.liquigraph.core.api.MigrationRunner.parseChangesets(MigrationRunner.java:87) ~[liquigraph-core-3.0.2-SNAPSHOT.jar:na] 
    at org.liquigraph.core.api.MigrationRunner.runMigrations(MigrationRunner.java:68) ~[liquigraph-core-3.0.2-SNAPSHOT.jar:na] 
    at org.liquigraph.core.api.Liquigraph.runMigrations(Liquigraph.java:63) ~[liquigraph-core-3.0.2-SNAPSHOT.jar:na] 
    at org.liquigraph.spring.SpringLiquigraph.afterPropertiesSet(SpringLiquigraph.java:52) ~[liquigraph-spring-boot-starter-3.0.2-SNAPSHOT.jar:na] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1642) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    ... 16 common frames omitted 

このエラーを修正する方法は?

+0

プロジェクトでのchangelogファイルを持っていますか?パスを正しく定義しましたか? –

+0

@DavidVincentもちろん私はそれを持っています。 Changelog.xmlはgithubのサンプルファイルに含まれています –

+0

私はちょうどGithubの問題への参照で回答しました。答えを受け入れることを自由に感じてください:) – Rolf

答えて

0

これはfiledされていると理由スタンフォードNLPの依存関係の推移フェッチされるのXerces-のimplを除外することで固定しています

<dependency> 
    <groupId>edu.stanford.nlp</groupId> 
    <artifactId>stanford-corenlp</artifactId> 
    <version>3.6.0</version> 
    <exclusions> 
     <exclusion> 
      <groupId>xerces</groupId> 
      <artifactId>xercesImpl</artifactId> 
     </exclusion> 
    </exclusions> 
</dependency> 
関連する問題