2015-06-12 52 views
2

我用hibernate 4,一切正常。現在我想將Hibernate更新到應用程序中的最新版本。無法用Hibernate部署應用程序5

應用構建成功,但未能上部署到glassfish服務器堆棧跟蹤:

java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V 
    at org.hibernate.internal.NamedQueryRepository.checkNamedQueries(NamedQueryRepository.java:149) 
    at org.hibernate.internal.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:756) 
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:487) 
    at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:445) 
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:779) 
    at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:135) 
    at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:199) 
    at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107) 
    at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223) 
    at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510) 
    at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230) 
    at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168) 
    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925) 
    at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:309) 
    at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:88) 
    at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:155) 
    at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:152) 
    at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:232) 
    at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:241) 
    at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:267) 
    at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:152) 
    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925) 
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434) 
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) 
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) 
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539) 
... and more.. 

我怎樣才能解決這個問題?我沒有使用任何jboss日誌記錄。

回答

12

問題已解決。 Glassfish已經過時了\ glassfish \ modules文件夾中的jboss日誌記錄罐。 替換最新版本的jar幫助。

+0

一定要將.jar命名爲與項目依賴項中相同的名稱 – Deegriz

+0

謝謝,這有幫助! – Rinat

相關問題