BEA公司为weblogic server准备了petstore for weblogic供开发者安装, 因为最近测试Hyperic-HQ, 所以进行了petstore for weblogic的安装.
首先, 需要下载Sun的petstore和在bea.com下载petstore for weblogic. 对应weblogic 8.1服务器的petstore版本是1.3.2.
下载后, 按照下载包中的readme.txt文件的提示一步一步安装, 没有什么问题, readme上说得非常清楚. 但是到Step1的第12步和Step2的第7步却无法启动weblogic服务器. 现象为, 启动后抛出如下异常.
<2006/09/06 9時13分08秒 CST> <Critical> <WebLogicServer> <BEA-000364> <Server failed during initialization. Exception:weblogic.security.spi.ProviderInitializationException: [Security:090314]Entitlement Engine unable to connect to the embedded LDAP server
netscape.ldap.LDAPException: error result (50)
weblogic.security.spi.ProviderInitializationException: [Security:090314]Entitlement Engine unable to connect to the embedded LDAP server
netscape.ldap.LDAPException: error result (50)
at weblogic.security.providers.authorization.DefaultAuthorizationUtils.getEngine(DefaultAuthorizationUtils.java:130)
at weblogic.security.providers.authorization.DefaultRoleMapperProviderImpl.initialize(DefaultRoleMapperProviderImpl.java:104)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.createSecurityProvider(SecurityServiceManagerDelegateImpl.java:242)
at weblogic.security.service.SecurityServiceManager.createSecurityProvider(SecurityServiceManager.java:957)
at weblogic.security.service.RoleManager.initialize(RoleManager.java:152)
at weblogic.security.service.RoleManager.<init>(RoleManager.java:98)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.doRole(SecurityServiceManagerDelegateImpl.java:513)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initializeRealm(SecurityServiceManagerDelegateImpl.java:409)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.loadRealm(SecurityServiceManagerDelegateImpl.java:700)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initializeRealms(SecurityServiceManagerDelegateImpl.java:733)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initialize(SecurityServiceManagerDelegateImpl.java:876)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:734)
at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:822)
这个问题的原因是petstore模板中的Critical密钥已经过期.
解决办法是找到weblogic的配置文件config.xml.
修改其中的如下这行
<EmbeddedLDAP Name="petstore" Credential="{3DES}78P9aVGmaIE="/>将其中的Credential属性删除即可. 再启动weblogic的时候, 服务器会重新自动生成一个Credential.
这个问题在petstore for weblogic的readme中并没有提到. 因此不少同志在安装的时候遇到这个问题. 在此进行一下memo, 以飨后来人.