我正在研究J2EE应用程序。如果我使用本地WebLogic实例,一切都有效,但如果我将它部署到最终需要运行的远程服务器(WebLogic 10.3.3.0),则数据源将无法访问。我可以打开第一个网页,但只要按下一个触发数据库访问的按钮,我就会在浏览器中收到以下错误:
javax.faces.FacesException: #{backing_admin.loginAction}: javax.ejb.EJBException: EJB Exception: ; nested exception is:
javax.persistence.PersistenceException: Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Cannot acquire data source [PGY2].
Internal Exception: javax.naming.NameNotFoundException: Unable to resolve 'PGY2'. Resolved ''; remaining name 'PGY2'; nested exception is: javax.persistence.PersistenceException: Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Cannot acquire data source [PGY2].
Internal Exception: javax.naming.NameNotFoundException: Unable to resolve 'PGY2'. Resolved ''; remaining name 'PGY2'
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
...
如果我转到远程服务器的WebLogic控制台并尝试测试数据源,我会收到此错误:
An unexpected exception has occurred processing your request
Message:
Access not allowed for subject: principals=[wlm, AppTesters, Monitors], on ResourceType: JDBCDataSourceRuntime Action: execute, Target: testPool
Stack Trace:
weblogic.management.NoAccessRuntimeException: Access not allowed for subject: principals=[wlm, AppTesters, Monitors], on ResourceType: JDBCDataSourceRuntime Action: execute, Target: testPool
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:205)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:222)
at ...
这个错误意味着什么,以及可能导致什么?
答案 0 :(得分:1)
看起来远程服务器已定义安全策略。我不确定安全性是全局定义还是范围仅限于特定的JDBC数据源。
如果您有凭据并查看
,则可以登录到控制台主页> JDBC数据源摘要> %your_data_source%>角色>政策
角色
从日志中我可以看到您通过用户“wlm”进行了身份验证。请与管理员核实安全限制。