0

我面临以下问题请帮助我..

问题:java.io.FileNotFoundException: .\config\jps-config.xml

当我使用 Jdev 部署战争时,它的工作

但是当我使用 ANT 脚本(外部)部署战争时,我遇到了以下问题..请检查..

这是我的 DefaultDomain 路径

C:\Users\Admin\AppData\Roaming\JDeveloper\system11.1.2.3.39.62.76.1\DefaultDomain\

这是服务器日志..

> oracle.security.jps.config.JpsConfigurationException:
> .\config\jps-config.xml (The system cannot find the file specified) at
> oracle.security.jps.internal.config.xml.XmlConfigurationFactory.initDefaultConfiguration(XmlConfigurationFactory.java:430)
> at
> oracle.security.jps.internal.config.xml.XmlConfigurationFactory.getDefaultConfiguration(XmlConfigurationFactory.java:329)
> at
> oracle.security.jps.internal.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:151)
> at
> oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.(JpsContextFactoryImpl.java:112)
> at sun.reflect.GeneratedConstructorAccessor59.newInstance(Unknown
> Source) at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at
> java.lang.Class.newInstance0(Class.java:355) at
> java.lang.Class.newInstance(Class.java:308) at
> oracle.security.jps.util.JpsUtil.newInstance(JpsUtil.java:190) at
> oracle.security.jps.JpsContextFactory$1.run(JpsContextFactory.java:68)
> at
> oracle.security.jps.JpsContextFactory$1.run(JpsContextFactory.java:66)
> at java.security.AccessController.doPrivileged(Native Method) at
> oracle.security.jps.JpsContextFactory.getContextFactory(JpsContextFactory.java:65)
> at
> oracle.security.jps.internal.policystore.PolicyUtil$2.run(PolicyUtil.java:2826)
> at
> oracle.security.jps.internal.policystore.PolicyUtil$2.run(PolicyUtil.java:2821)
> at java.security.AccessController.doPrivileged(Native Method) at
> oracle.security.jps.internal.policystore.PolicyUtil.getDefaultPDPService(PolicyUtil.java:2821)
> at
> oracle.security.jps.internal.policystore.PolicyUtil.getPDPService(PolicyUtil.java:3097)
> at
> oracle.security.jps.internal.policystore.PolicyUtil.getGrantedAppRoles(PolicyUtil.java:2873)
> at
> oracle.security.jps.internal.jaas.JpsAbsSubjectResolver$5.run(JpsAbsSubjectResolver.java:497)
> at
> oracle.security.jps.internal.jaas.JpsAbsSubjectResolver$5.run(JpsAbsSubjectResolver.java:487)
> at java.security.AccessController.doPrivileged(Native Method) at
> oracle.security.jps.internal.jaas.JpsAbsSubjectResolver.getApplicationRoles(JpsAbsSubjectResolver.java:487)
> at
> oracle.security.jps.internal.jaas.JpsAbsSubjectResolver.createJpsSubject(JpsAbsSubjectResolver.java:334)
> at
> oracle.security.jps.internal.jaas.JpsAbsSubjectResolver.getAnonymousSubject(JpsAbsSubjectResolver.java:319)
> at
> oracle.security.jps.internal.jaas.JpsAbsSubjectResolver.resolveJpsSubject(JpsAbsSubjectResolver.java:258)
> at
> oracle.security.jps.internal.jaas.JpsAbsSubjectResolver.resolveSubject(JpsAbsSubjectResolver.java:214)
> at
> oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
> at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
> at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> at
> oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
> at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> at
> weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
> at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> at
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
> at
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
> at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
> at
> weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
> at
> weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
> at
> weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
> at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at
> weblogic.work.ExecuteThread.run(ExecuteThread.java:178) Caused by:
> java.io.FileNotFoundException: .\config\jps-config.xml (The system
> cannot find the file specified) at java.io.FileInputStream.open(Native
> Method) at java.io.FileInputStream.(FileInputStream.java:106) at
> oracle.security.jps.internal.common.util.XmlSchemaValidationUtil.doValidation(XmlSchemaValidationUtil.java:96)
> at
> oracle.security.jps.internal.config.xml.XmlConfigurationFactory.initDefaultConfiguration(XmlConfigurationFactory.java:409)
> ... 43 more

为此,我已将我的 jsp-config.xml 从 ...DefaultDomain\config\fmwconfig 复制到 DefaultDomain\config\ 然后我能够解决这个问题.. 但我再次得到一些与策略相关的 privillageAcess 异常,可能是我需要放这个文件在正确的位置...

4

2 回答 2

0

要解决此问题:java.io.FileNotFoundException: .\config\jps-config.xml

您需要放置类似 System.setProperty("oracle.security.jps.config","C:\Users\User\AppData\Roaming\JDeveloper\system11.1.1.7.40.64.93\DefaultDomain\config\fmwconfig\jps- 的代码配置.xml"); 然后就会解决。

于 2014-05-20T11:08:39.720 回答
0

对于 ADF 应用程序,您需要部署 EAR 而不是 WAR。请参阅: https ://blogs.oracle.com/shay/entry/common_pitfalls_when_deploying

于 2013-02-20T19:09:22.197 回答