讨论区 » AAS-V10企业版 »
V10部署ear包报java.lang.RuntimeException: Unable to open Policy file: /opt/ApusicAS/aas/domains/mydomain/generated/policy/ear20220126/calendarWeb_war/granted.policy
由 吕 鹏钦 在 超过 2 年 之前添加
报错如下:
[2022-07-12T17:18:31] [] [WARNING] [] [javax.enterprise.system.core.security] [tid: _ThreadID=86 _ThreadName=ApusicLogManager] [timeMillis: 1657617511421] [levelValue: 900] [[
unable to read repository for context - [/opt/ApusicAS/aas/domains/mydomain/generated/policy/ear20220126/missiveWeb_war]
java.lang.RuntimeException: Unable to open Policy file: /opt/ApusicAS/aas/domains/mydomain/generated/policy/ear20220126/calendarWeb_war/granted.policy
at com.sun.enterprise.security.provider.PolicyConfigurationImpl.<init>(PolicyConfigurationImpl.java:136)
at com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl.initializeRepository(PolicyConfigurationFactoryImpl.java:338)
at com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl.<init>(PolicyConfigurationFactoryImpl.java:72)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at javax.security.jacc.PolicyConfigurationFactory.getPolicyConfigurationFactory(PolicyConfigurationFactory.java:126)
at com.sun.enterprise.security.web.integration.WebSecurityManager._getPolicyFactory(WebSecurityManager.java:407)
at com.sun.enterprise.security.web.integration.WebSecurityManager.getPolicyFactory(WebSecurityManager.java:400)
at com.sun.enterprise.security.web.integration.WebSecurityManager.initialise(WebSecurityManager.java:180)
at com.sun.enterprise.security.web.integration.WebSecurityManager.<init>(WebSecurityManager.java:147)
at com.sun.enterprise.security.web.integration.WebSecurityManagerFactory.createManager(WebSecurityManagerFactory.java:270)
at com.sun.enterprise.security.ee.SecurityDeployer.loadPolicy(SecurityDeployer.java:210)
at com.sun.enterprise.security.ee.SecurityDeployer.access$000(SecurityDeployer.java:63)
at com.sun.enterprise.security.ee.SecurityDeployer$AppDeployEventListener.event(SecurityDeployer.java:111)
at com.apusic.aas.kernel.event.EventsImpl.send(EventsImpl.java:107)
at com.apusic.aas.internal.data.ModuleInfo.load(ModuleInfo.java:209)
at com.apusic.aas.internal.data.ApplicationInfo.load(ApplicationInfo.java:295)
at com.apusic.enterprise.v10.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:475)
at com.apusic.enterprise.v10.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:384)
at com.apusic.enterprise.v10.admin.adapter.InstallerThread.load(InstallerThread.java:189)
at com.apusic.enterprise.v10.admin.adapter.InstallerThread.run(InstallerThread.java:78)
]]
解决方法:将domains/mydomain/generated/目录下的整个policy目录删除即可