0

我一直在尝试通过管理控制台在 Weblogic 上部署/启动爆炸的 EAR,但失败并出现以下错误:

BEA-149004> <Failures were detected while initiating start task for application 'xyz'.> 
####<Sep 1, 2013 4:10:51 AM CDT> <Warning> <Deployer>  <AdminServer> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1378026651456> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: 
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate    
...
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused By: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:626)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
        at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225)
        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
 ....
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)

我无法找出这些日志问题的原因。

分解后的 EAR 有这样的文件夹结构:1)lib 目录——由 jars 组成 2)META-INF 目录——由 application.xml、weblogic-application.xml 组成 3)war 目录——有 jsps、WEB-INF 文件夹(有 weblogic. xml)

如果您需要更多详细信息,请告诉我。请帮忙!

4

1 回答 1

0

我设法自己解决了这个问题。以下是详细信息,以防有人感兴趣:

我修改了 weblogic-application.xml(位于我的应用程序 EAR>META-INF 文件夹下)以包含 org.hibernate.* 和 javax.persistence.* 包。重新启动服务器并重新部署 EAR(已爆炸)。我不再看到错误并且部署成功。

 .....
<prefer-application-packages>
     ......
            <package-name>org.hibernate.*</package-name>
            <package-name>javax.persistence.*</package-name>
        </prefer-application-packages>

    .......
于 2013-09-01T15:25:55.807 回答