天天看點

weblogic啟動報weblogic.application.ModuleException

從别人的拿了一個EJB的demo,一個基礎java工程作為工具jar包,三個ejb項目作為ejb基礎庫,一個web應用作為前端,另外加一個Enterprise Application Project作為統一的EAR項目。

三個ejb基礎庫安裝完成,準備安裝ear的時候,一直報下面這個錯誤:

<2015-4-15 上午09時14分44秒 CST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application "empweb".
weblogic.application.ModuleException: com.tangosol.net.RequestPolicyException: No storage-enabled nodes exist for service oracle.coherence.web:DistributedSessions
    at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)
    at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
    at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:195)
    at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:190)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
    Truncated. see log file for complete stacktrace
Caused By: com.tangosol.net.RequestPolicyException: No storage-enabled nodes exist for service oracle.coherence.web:DistributedSessions
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap.onMissingStorage(PartitionedCache.CDB:27)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap.sendStorageRequest(PartitionedCache.CDB:13)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap.addIndex(PartitionedCache.CDB:9)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.addIndex(PartitionedCache.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.addIndex(SafeNamedCache.CDB:1)
    Truncated. see log file for complete stacktrace
> 
      

查了半天,才發現,weblogic中coherence會話的本地存儲開關預設是關閉的,需要明确指定為true。

在目前環境的domain域中,修改startWebLogic.cmd檔案(Linux對應修改startWebLogic.sh檔案),在call "%DOMAIN_HOME%\bin\startWebLogic.cmd" %*前面添加如下指令:

set JAVA_OPTIONS=-Dtangosol.coherence.session.localstorage=true
      

重新啟動,不再報錯,啟動成功。