在JBoss 7.1上部署Seam 2.2应用程序时出错 [英] Error deploying Seam 2.2 app on JBoss 7.1

查看:112
本文介绍了在JBoss 7.1上部署Seam 2.2应用程序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在JBoss 7.1上部署我的JBoss Seam 2.2应用程序.我以前从我收到了一些很棒的建议和资源帖子,但是现在我遇到了一些错误.我的应用程序使用Hibernate/JPA 1.0进行持久化,同时使用Hibernate Search.当要在包含我的JPA实体的EAR中部署JAR时,我看到以下异常:

I've been trying to deploy my JBoss Seam 2.2 application on JBoss 7.1. I've received some great advice and resources from my previous post, but now I'm encountering some errors. My application is using Hibernate/JPA 1.0 for persistence, along with Hibernate Search. When it gets to deploying the JAR in the EAR that contains my JPA entities, I see the following exception:

ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.persistenceunit."MyApp-ear.ear/MyApp-entities.jar#MyApp": org.jboss.msc.service.StartException in service jboss.persistenceunit."MyApp-ear.ear/MyApp-entities.jar#MyApp": Failed to start service
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_29]
    at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_29]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: MyApp] Unable to build EntityManagerFactory
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    ... 3 more
Caused by: org.hibernate.event.service.spi.EventListenerRegistrationException: Listener did not implement expected interface [org.hibernate.event.spi.PostUpdateEventListener]
    at org.hibernate.event.service.internal.EventListenerGroupImpl.checkAgainstBaseInterface(EventListenerGroupImpl.java:168)
    at org.hibernate.event.service.internal.EventListenerGroupImpl.internalAppend(EventListenerGroupImpl.java:175)
    at org.hibernate.event.service.internal.EventListenerGroupImpl.appendListener(EventListenerGroupImpl.java:109)
    at org.hibernate.ejb.event.JpaIntegrator.integrate(JpaIntegrator.java:137)
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:294)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
    at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)

在上一个问题中提供给我的资源中,我没有提到为支持JPA 1.0而需要进行的更改.有谁知道导致此错误的原因是什么?是因为我使用了Hibernate Search吗?

I didn't see any mention of changes I needed to make to support JPA 1.0 in the resources that were provided to me in my previous question. Does anyone have any idea what is causing this error? Is it due to my usage of Hibernate Search?

编辑:我要提到的是我使用的Hibernate版本是Seam 2.2附带的版本.它是版本3.3.1.

EDIT: I should mention the version of Hibernate that I am using is the one bundled with Seam 2.2. It is version 3.3.1.

推荐答案

好的,我已经解决了这个问题.显然,Seam 2.2附带的Hibernate,Hibernate Search和Lucene版本存在一个已知问题.但是,由于JBoss 7.x具有新的类加载功能,因此升级它们很容易.我加入了Hibernate 3.6.10以及相应的Hibernate Search和Lucene库,它或多或少地起作用了.我必须对配置进行一些小调整,但是这些已记录在JBoss 7.1 JPA指南中.

Okay, I've resolved the issue. Apparently there is a known problem with the versions of Hibernate, Hibernate Search, and Lucene that are shipped with Seam 2.2. However, because of the new classloading features in JBoss 7.x it was easy to upgrade them. I dropped in Hibernate 3.6.10 and the corresponding Hibernate Search and Lucene libraries and it more or less worked. There were a couple of minor tweaks I had to make to the configuration, but those are documented in the JBoss 7.1 JPA guide.

这篇关于在JBoss 7.1上部署Seam 2.2应用程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆