Entity自動生成でエラー その2

作業メモ

出てるエラーメッセージの全文は以下。

java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
    at org.apache.commons.logging.impl.SLF4JLocationAwareLog.info(SLF4JLocationAwareLog.java:159)
    at org.hibernate.cfg.reveng.OverrideRepository.addFile(OverrideRepository.java:113)
    at org.jboss.tools.hibernate3_5.console.ConsoleExtension3_5$2.execute(ConsoleExtension3_5.java:234)
    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
    at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
    at org.jboss.tools.hibernate3_5.console.ConsoleExtension3_5.buildConfiguration(ConsoleExtension3_5.java:223)
    at org.jboss.tools.hibernate3_5.console.ConsoleExtension3_5.runExporters(ConsoleExtension3_5.java:155)
    at org.jboss.tools.hibernate3_5.console.ConsoleExtension3_5.launchExporters(ConsoleExtension3_5.java:114)
    at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:270)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

単純にorg.slf4j.spi.LocationAwareLogger.log()メソッドが見つからないよというエラー。

project-coreのslf4j-api-1.7.5.jarに上記クラスは存在するがIF。

つまりIFの先の実体がないと言っている?

今回はlog4jを利用しているため、その先はlog4jのメソッドがくる?

これを見るとslf4j-log412.jarの後にlog4j.jarが呼ばれる。

現状の依存関係は以下。

[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ project ---
[INFO] jp.nbgi.amnet:project:jar:1.0.0
[INFO] +- org.springframework:spring-jdbc:jar:3.2.8.RELEASE:compile
[INFO] |  +- org.springframework:spring-beans:jar:3.2.8.RELEASE:compile
[INFO] |  \- org.springframework:spring-core:jar:3.2.8.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:3.2.8.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:3.2.8.RELEASE:compile
[INFO] +- org.hibernate:hibernate-ehcache:jar:3.6.10.Final:compile
[INFO] |  +- org.hibernate:hibernate-core:jar:3.6.10.Final:compile
[INFO] |  |  +- antlr:antlr:jar:2.7.6:compile
[INFO] |  |  +- commons-collections:commons-collections:jar:3.1:compile
[INFO] |  |  +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |  |  +- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
[INFO] |  |  \- javax.transaction:jta:jar:1.1:compile
[INFO] |  +- net.sf.ehcache:ehcache-core:jar:2.4.3:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO] +- org.hibernate:hibernate-entitymanager:jar:3.6.10.Final:compile
[INFO] |  +- cglib:cglib:jar:2.2:compile
[INFO] |  |  \- asm:asm:jar:3.1:compile
[INFO] |  +- javassist:javassist:jar:3.12.0.GA:compile
[INFO] |  \- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile
[INFO] +- org.hibernate:hibernate-c3p0:jar:3.6.10.Final:compile
[INFO] |  \- c3p0:c3p0:jar:0.9.1:compile
[INFO] +- mysql:mysql-connector-java:jar:5.1.30:compile
[INFO] +- jp.nbgi.amnet.project:project-core:jar:0.0.1-SNAPSHOT:compile
[INFO] |  +- org.springframework:spring-context:jar:3.2.8.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-aop:jar:3.2.8.RELEASE:compile
[INFO] |  |  |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  |  \- org.springframework:spring-expression:jar:3.2.8.RELEASE:compile
[INFO] |  +- org.aspectj:aspectjrt:jar:1.7.1:compile
[INFO] |  +- org.aspectj:aspectjweaver:jar:1.7.1:compile
[INFO] |  +- javax.inject:javax.inject:jar:1:compile
[INFO] |  +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.7.5:compile
[INFO] |  +- org.slf4j:slf4j-log4j12:jar:1.7.5:compile
[INFO] |  +- log4j:log4j:jar:1.2.17:compile
[INFO] |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] |  +- org.hibernate:hibernate-validator:jar:4.3.1.Final:compile
[INFO] |  |  \- org.jboss.logging:jboss-logging:jar:3.1.0.CR2:compile
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] |  \- commons-io:commons-io:jar:2.4:compile
[INFO] +- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] +- joda-time:joda-time:jar:2.2:compile
[INFO] +- junit:junit:jar:4.11:test
[INFO] +- commons-configuration:commons-configuration:jar:1.9:compile
[INFO] |  \- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.mockito:mockito-all:jar:1.9.5:compile
[INFO] +- org.springframework:spring-test:jar:3.2.8.RELEASE:compile
[INFO] \- jp.nbgi.amnet:project-test:jar:0.0.1-SNAPSHOT:compile

org.hibernate:hibernate-ehcache に org.slf4j:slf4j-api:jar:1.6.1:compile

jp.nbgi.amnet.project:project-core に org.slf4j:jcl-over-slf4j:jar:1.7.5:compileorg.slf4j:slf4j-log4j12:jar:1.7.5:compile

log4j:log4j:jar:1.2.17:compile もproject-coreにいる。

構成的には問題なさそうに見える。(実際少し前までは正常にentityを生成していた。)