2015-06-12 5 views
2

Я использовал hibernate 4, и все сработало нормально. Теперь я хочу обновить Hibernate до последней версии приложения.Не удается развернуть приложение с Hibernate 5

Применение строит успешно, но не работает на развертывании на сервере с glassfish StackTrace:

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 имеет устаревшую банку jboss-logging в папке \ glassfish \ modules. Помогла заправка банки последней версией.

+0

Обязательно укажите .jar так же, как и в зависимостях проекта. – Deegriz

+0

Спасибо, это помогло! – Rinat