尝试使用wildfly13进行部署时出现“ NoSuchException”异常

时间:2018-06-28 14:31:10

标签: hibernate wildfly nosuchmethoderror

我已经编写了一个应用程序,该应用程序在运行wildfly 10时没有任何问题。现在,我终于想升级到wildfly 13,但出现以下异常:

    16:20:26,336 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 72) MSC000001: Failed to start service jboss.persistenceunit."accident-wildfly13-DVLP.war#accident": org.jboss.msc.service.StartException in service jboss.persistenceunit."accident-wildfly13-DVLP.war#accident": java.lang.NoSuchMethodError: org.hibernate.search.store.spi.LockFactoryCreator.createLockFactory(Ljava/nio/file/Path;Ljava/util/Properties;)Lorg/apache/lucene/store/LockFactory;
        at org.jboss.as.jpa@13.0.0.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:195)
        at org.jboss.as.jpa@13.0.0.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:125)
        at org.wildfly.security.elytron-private@1.3.3.Final//org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:650)
        at org.jboss.as.jpa@13.0.0.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:209)
        at org.jboss.threads@2.3.2.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
        at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
        at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
        at java.base/java.lang.Thread.run(Thread.java:844)
        at org.jboss.threads@2.3.2.Final//org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.NoSuchMethodError: org.hibernate.search.store.spi.LockFactoryCreator.createLockFactory(Ljava/nio/file/Path;Ljava/util/Properties;)Lorg/apache/lucene/store/LockFactory;
        at org.infinispan.hibernate-search.directory-provider:for-hibernatesearch-5.5@9.2.4.Final//org.infinispan.hibernate.search.spi.InfinispanDirectoryProvider.getLockFactory(InfinispanDirectoryProvider.java:97)
        at org.infinispan.hibernate-search.directory-provider:for-hibernatesearch-5.5@9.2.4.Final//org.infinispan.hibernate.search.spi.InfinispanDirectoryProvider.initialize(InfinispanDirectoryProvider.java:90)
        at org.hibernate.search.engine@5.5.8.Final//org.hibernate.search.store.spi.BaseDirectoryProviderService.initialize(BaseDirectoryProviderService.java:64)
        at org.hibernate.search.engine@5.5.8.Final//org.hibernate.search.store.spi.BaseDirectoryProviderService.create(BaseDirectoryProviderService.java:52)
        at org.hibernate.search.engine@5.5.8.Final//org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.createDirectoryProvider(DirectoryBasedIndexManager.java:230)
        at org.hibernate.search.engine@5.5.8.Final//org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.initialize(DirectoryBasedIndexManager.java:90)
        at org.hibernate.search.engine@5.5.8.Final//org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:256)
        at org.hibernate.search.engine@5.5.8.Final//org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:513)
        at org.hibernate.search.engine@5.5.8.Final//org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManagers(IndexManagerHolder.java:482)
        at org.hibernate.search.engine@5.5.8.Final//org.hibernate.search.indexes.impl.IndexManagerHolder.buildEntityIndexBinding(IndexManagerHolder.java:91)
        at org.hibernate.search.engine@5.5.8.Final//org.hibernate.search.spi.SearchIntegratorBuilder.initDocumentBuilders(SearchIntegratorBuilder.java:358)
        at org.hibernate.search.engine@5.5.8.Final//org.hibernate.search.spi.SearchIntegratorBuilder.buildNewSearchFactory(SearchIntegratorBuilder.java:199)
        at org.hibernate.search.engine@5.5.8.Final//org.hibernate.search.spi.SearchIntegratorBuilder.buildSearchIntegrator(SearchIntegratorBuilder.java:117)
        at org.hibernate.search.orm@5.5.8.Final//org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:75)
        at org.hibernate@5.1.14.Final//org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35)
        at org.hibernate@5.1.14.Final//org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:540)
        at org.hibernate@5.1.14.Final//org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:423)
        at org.hibernate@5.1.14.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:880)
        at org.hibernate.jipijapa-hibernate5@13.0.0.Final//org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
        at org.jboss.as.jpa@13.0.0.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167)
        ... 9 more

我认为与hibernate / infinispan的某种版本冲突导致了此错误,但我无法对其进行跟踪。

有人可以帮助我吗? 预先感谢

1 个答案:

答案 0 :(得分:0)

尝试将hibernate-search-engine升级到5.8.0.Beta4或更高版本。

您的问题是由this change引起的:

另请参阅: https://hibernate.atlassian.net/browse/HSEARCH-2775