2017-01-19 2 views
0

@Indexed를 사용하여 Entity를 인덱싱하기 위해 Spring 3.2.6.RELEASE와 Hibernate 4.3.0.Final을 사용했습니다. 정상적으로 작동했습니다. 하지만 pom.xml에 Envers 버전을 추가하고 @Audited를 추가하면 예외가 발생합니다.Hibernate Envers and Lucene 검색 인덱싱

classNotFoundException: org.hibernate.boot.registry.classloading.spi.ClassLoaderService 

많은 다양한 버전을 사용해 보았습니다. Envers, Lucene Index Search에 적합한 버전은 무엇입니까?

Caused by: java.lang.NoClassDefFoundError: org/hibernate/service/spi/BasicServiceInitiator 
at java.lang.ClassLoader.defineClass1(Native Method) 
at java.lang.ClassLoader.defineClass(ClassLoader.java:763) 
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) 
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2496) 

와의 pom.xml

검색 봄, 최대 절전 envers을 포함

<properties> 
    <java-version>1.8</java-version> 
    <org.springframework-version>4.0.6.RELEASE</org.springframework-version> 
    <hibernate.version>4.3.6.Final</hibernate.version> 
</properties> 

<dependencies> 
    <dependency> 
     <groupId>antlr</groupId> 
     <artifactId>antlr</artifactId> 
     <version>2.7.7</version> 
    </dependency> 
    <dependency> 
     <groupId>aopalliance</groupId> 
     <artifactId>aopalliance</artifactId> 
     <version>1.0</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-aop</artifactId> 
     <version>${org.springframework-version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-beans</artifactId> 
     <version>${org.springframework-version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-context</artifactId> 
     <version>${org.springframework-version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-core</artifactId> 
     <version>${org.springframework-version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-expression</artifactId> 
     <version>${org.springframework-version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-jdbc</artifactId> 
     <version>${org.springframework-version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-orm</artifactId> 
     <version>${org.springframework-version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-tx</artifactId> 
     <version>${org.springframework-version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-web</artifactId> 
     <version>${org.springframework-version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-webmvc</artifactId> 
     <version>${org.springframework-version}</version> 
    </dependency> 
    <dependency> 
     <groupId>commons-dbcp</groupId> 
     <artifactId>commons-dbcp</artifactId> 
     <version>1.4</version> 
    </dependency> 
    <dependency> 
     <groupId>org.hibernate</groupId> 
     <artifactId>hibernate-envers</artifactId> 
     <version>${hibernate.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.hibernate</groupId> 
     <artifactId>hibernate-core</artifactId> 
     <version>${hibernate.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.hibernate</groupId> 
     <artifactId>hibernate-search-engine</artifactId> 
     <version>4.3.0.Final</version> 
    </dependency> 
    <dependency> 
     <groupId>org.hibernate</groupId> 
     <artifactId>hibernate-search-orm</artifactId> 
     <version>4.3.0.Final</version> 
    </dependency> 
    <dependency> 
     <groupId>org.hibernate.javax.persistence</groupId> 
     <artifactId>hibernate-jpa-2.0-api</artifactId> 
     <version>1.0.1.Final</version> 
    </dependency> 
    <dependency> 
     <groupId>javassist</groupId> 
     <artifactId>javassist</artifactId> 
     <version>3.12.1.GA</version> 
    </dependency> 
    <dependency> 
     <groupId>org.jboss.logging</groupId> 
     <artifactId>jboss-logging</artifactId> 
     <version>3.1.4.GA</version> 
    </dependency> 
    <dependency> 
     <groupId>javax.transaction</groupId> 
     <artifactId>jta</artifactId> 
     <version>1.1</version> 
    </dependency> 
    <dependency> 
     <groupId>mysql</groupId> 
     <artifactId>mysql-connector-java</artifactId> 
     <version>5.1.29</version> 
    </dependency> 
    <dependency> 
     <groupId>javax.persistence</groupId> 
     <artifactId>persistence-api</artifactId> 
     <version>1.0.2</version> 
    </dependency> 


</dependencies> 
+0

우연히 전체 스택 추적을 포함 할 수 있습니까? – Naros

+0

위의 stacktrace 및 pom.xml을 추가했습니다. – devrim

답변

0

당신이 당신의 응용 프로그램에서 사용하고있는 ORM 버전의 일치해야 사용해야 최대 절전 모드 Envers의 버전입니다. Ergo, ORM 4.3.0을 사용 중이라면 Envers 버전은 동일해야합니다. 프로젝트가 ORM 3.x 일 동안 다시 Hibernate 포트폴리오에 추가 된 이후의 사례입니다.

+0

시도했지만 작동하지 않았습니다. – devrim