Я пытаюсь перенести среду Weblogic с Oracle на PostgreSQL. Когда я настраиваю домен с хранилищем безопасности на PostgreSQL, он не запускается.
Weblogic 12c, Java 7, PostgreSQL 9.3.4 здесь, в Mac OS X, но та же проблема в Linux.
Домен был создан с источником данных хранилища безопасности как PostgreSQL (параметр доступен в раскрывающемся списке), правильно настроен.
Схема была создана на основе схемы Derby путем замены BLOB на BYTEA.
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
>
Неудачный запрос INSERT INTO BEAXACMLAP, содержащий несколько полей BYTEA, заставляет меня думать, что обработка больших двоичных объектов в Weblogic для PostgreSQL нарушена.
Возможно ли вообще запустить хранилище безопасности на PostgreSQL? Может быть, с настройкой скрипта создания?
К сожалению, наиболее полезная часть исключения скрыта, потому что использовался пакет, а обернутое исключение не было проверено с помощью getNextException
. Это может быть непросто, поскольку вы не писали код.
Я предлагаю изучить журнал ошибок сервера PostgreSQL, возможно, после установки log_statement = 'all'
, он покажет вам больше полезной информации, включая, надеюсь, настоящую причину проблемы.
(Как отмечалось в комментариях, это оказалось проблемой с разрешениями).