从别人的拿了一个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

重新启动,不再报错,启动成功。


个人主页: https://www.howardliu.cn
个人博文: weblogic启动报weblogic.application.ModuleException
CSDN主页: http://blog.csdn.net/liuxinghao
CSDN博文: weblogic启动报weblogic.application.ModuleException