PostgreSQL上的Weblogic安全存储

我正试图将Weblogic环境从Oracle移植到PostgreSQL。 当我使用PostgreSQL上的安全存储configuration一个域时,它无法启动。

Weblogic 12c,Java 7,PostgreSQL 9.3.4这里在Mac OS X上,但在Linux上同样的问题。

该域是使用安全存储数据源作为PostgreSQL创build的(可从下拉菜单中select),并已正确configuration。

该模式是基于Derby模式通过用BYTEAreplaceBLOB而创build的。

startWeblogic给出:

<Aug 7, 2014 5:48:02 PM CEST> <Warning> <Security> <BEA-090076> <A failure occurred attempting to load LDIF for provider Authorizer from file /Users/darcher/Dev/wls/wlserver/server/lib/XACMLAuthorizerInit.ldift.> <Aug 7, 2014 5:48:02 PM CEST> <Error> <Security> <BEA-090870> <The realm "myrealm" failed to be loaded: weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: weblogic.security.spi.ProviderInitializationException: A failure occurred attempting to load LDIF for provider Authorizer from file /Users/darcher/Dev/wls/wlserver/server/lib/XACMLAuthorizerInit.ldift.. weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: weblogic.security.spi.ProviderInitializationException: A failure occurred attempting to load LDIF for provider Authorizer from file /Users/darcher/Dev/wls/wlserver/server/lib/XACMLAuthorizerInit.ldift. at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initializeRealm(CommonSecurityServiceManagerDelegateImpl.java:466) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadRealm(CommonSecurityServiceManagerDelegateImpl.java:841) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initializeRealms(CommonSecurityServiceManagerDelegateImpl.java:870) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1032) at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:873) Truncated. see log file for complete stacktrace Caused By: com.bea.common.engine.ServiceInitializationException: weblogic.security.spi.ProviderInitializationException: A failure occurred attempting to load LDIF for provider Authorizer from file /Users/darcher/Dev/wls/wlserver/server/lib/XACMLAuthorizerInit.ldift. at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:365) at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:315) at com.bea.common.engine.internal.ServiceEngineImpl.lookupService(ServiceEngineImpl.java:257) at com.bea.common.engine.internal.ServicesImpl.getService(ServicesImpl.java:72) at weblogic.security.service.CSSWLSDelegateImpl.getService(CSSWLSDelegateImpl.java:155) Truncated. see log file for complete stacktrace Caused By: weblogic.security.spi.ProviderInitializationException: A failure occurred attempting to load LDIF for provider Authorizer from file /Users/darcher/Dev/wls/wlserver/server/lib/XACMLAuthorizerInit.ldift. at com.bea.common.store.bootstrap.internal.BootStrapServiceImpl.loadFullLDIFTemplate(BootStrapServiceImpl.java:910) at com.bea.common.store.bootstrap.internal.BootStrapServiceImpl.loadLDIFTemplate(BootStrapServiceImpl.java:688) at com.bea.common.store.bootstrap.internal.BootStrapServiceImpl.loadLDIFXACMLAuthorizerTemplate(BootStrapServiceImpl.java:176) at com.bea.common.store.bootstrap.internal.BootStrapServiceImpl.loadLDIFXACMLAuthorizerTemplate(BootStrapServiceImpl.java:160) at com.bea.common.security.internal.service.BootStrapServiceImpl.loadLDIFXACMLAuthorizerTemplate(BootStrapServiceImpl.java:106) Truncated. see log file for complete stacktrace Caused By: <openjpa-1.1.1-SNAPSHOT-r422266:957329 fatal store error> kodo.jdo.FatalDataStoreException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2170) at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2017) at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1915) at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1833) at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81) Truncated. see log file for complete stacktrace Caused By: <openjpa-1.1.1-SNAPSHOT-r422266:957329 nonfatal store error> kodo.jdo.DataStoreException: Batch entry 0 INSERT INTO BEAXACMLAP (DOMN, REALMN, TYPEN, CN, XVER, CTS, WCN, WCI, WXF, XD, XS, MTS) VALUES ('lxrccn', 'myrealm', 'Policies', 'urn:bea:xacml:2.0:entitlement:resource:type@E@Fmbean@G', '1.0', NULL, NULL, NULL, NULL, ?, '3', '2014-08-07 17:48:02.600000 +02:00:00') was aborted. Call getNextException to see the cause. {prepstmnt 1242995387 INSERT INTO BEAXACMLAP (DOMN, REALMN, TYPEN, CN, XVER, CTS, WCN, WCI, WXF, XD, XS, MTS) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [params=(String) lxrccn, (String) myrealm, (String) Policies, (String) urn:bea:xacml:2.0:entitlement:resource:type@E@Fadm@G, (String) 1.0, (null) null, (null) null, (null) null, (null) null, (byte[]) [B@4f719938, (String) 3, (Timestamp) 2014-08-07 17:48:02.6] [reused=0]} [code=0, state=42501] FailedObject: [cn=urn:bea:xacml:2.0:entitlement:resource:type@E@Fmbean@G,xacmlVersion=1.0,typeName=Policies,realm=myrealm,domain=lxrccn] [java.util.LinkedList] at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4207) at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4171) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:72) at kodo.jdbc.kernel.BatchingPreparedStatementManager.executeBatch(BatchingPreparedStatementManager.java:304) Truncated. see log file for complete stacktrace Caused By: org.apache.openjpa.lib.jdbc.ReportingSQLException: Batch entry 0 INSERT INTO BEAXACMLAP (DOMN, REALMN, TYPEN, CN, XVER, CTS, WCN, WCI, WXF, XD, XS, MTS) VALUES ('lxrccn', 'myrealm', 'Policies', 'urn:bea:xacml:2.0:entitlement:resource:type@E@Fmbean@G', '1.0', NULL, NULL, NULL, NULL, ?, '3', '2014-08-07 17:48:02.600000 +02:00:00') was aborted. Call getNextException to see the cause. {prepstmnt 1242995387 INSERT INTO BEAXACMLAP (DOMN, REALMN, TYPEN, CN, XVER, CTS, WCN, WCI, WXF, XD, XS, MTS) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [params=(String) lxrccn, (String) myrealm, (String) Policies, (String) urn:bea:xacml:2.0:entitlement:resource:type@E@Fadm@G, (String) 1.0, (null) null, (null) null, (null) null, (null) null, (byte[]) [B@4f719938, (String) 3, (Timestamp) 2014-08-07 17:48:02.6] [reused=0]} [code=0, state=42501] at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:57) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeBatch(LoggingConnectionDecorator.java:912) at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:244) at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:244) Truncated. see log file for complete stacktrace > 

包含几个BYTEA字段的失败的“INSERT INTO BEAXACMLAP”使我相信PostgreSQL的Weblogic的BLOB处理被破坏了。

在所有可能的情况下在PostgreSQL上运行安全存储? 也许有一些创build脚本调整?

不幸的是,exception最有用的部分是隐藏的,因为使用了一个批处理,并且包装的exception没有用getNextException检查。 由于您没有编写代码,因此捕获它可能并不容易。

我build议检查PostgreSQL的服务器错误日志,可能是在设置了log_statement = 'all' ,它会显示更多有用的信息,希望包括问题的真正原因。

(正如在评论中指出的,事实certificate这是一个权限问题)。