昨天启动Weblogic adminServer失败,报错信息如下:
<Feb 18, 2013 9:51:05 AM CST> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: java.lang.AssertionError: java.lang.reflect.InvocationTargetException
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
at weblogic.descriptor.DescriptorManager$SecurityServiceImpl$SecurityProxy._invokeServiceMethod(DescriptorManager.java:175)
at weblogic.descriptor.DescriptorManager$SecurityServiceImpl$SecurityProxy.decrypt(DescriptorManager.java:192)
at weblogic.descriptor.DescriptorManager$SecurityServiceImpl.decrypt(DescriptorManager.java:114)
at weblogic.descriptor.internal.AbstractDescriptorBean._decrypt(AbstractDescriptorBean.java:991)
at weblogic.management.configuration.SecurityConfigurationMBeanImpl.getCredential(SecurityConfigurationMBeanImpl.java:736)
Truncated. see log file for complete stacktrace
Caused By: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:600)
at weblogic.descriptor.DescriptorManager$SecurityServiceImpl$SecurityProxy._invokeServiceMethod(DescriptorManager.java:173)
Truncated. see log file for complete stacktrace
Caused By: weblogic.security.internal.encryption.EncryptionServiceException: com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte.
at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptBytes(JSafeEncryptionServiceImpl.java:125)
at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptString(JSafeEncryptionServiceImpl.java:173)
at weblogic.security.internal.encryption.ClearOrEncryptedService.decrypt(ClearOrEncryptedService.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
Truncated. see log file for complete stacktrace
Caused By: com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte.
at com.rsa.jsafe.JA_PKCS5Padding.a(Unknown Source)
at com.rsa.jsafe.JG_BlockCipher.decryptFinal(Unknown Source)
at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptBytes(JSafeEncryptionServiceImpl.java:113)
at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptString(JSafeEncryptionServiceImpl.java:173)
at weblogic.security.internal.encryption.ClearOrEncryptedService.decrypt(ClearOrEncryptedService.java:96)
Truncated. see log file for complete stacktrace
>
<Feb 18, 2013 9:51:05 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
<Feb 18, 2013 9:51:05 AM CST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
<Feb 18, 2013 9:51:05 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
这应该是密码解析问题,在%DOMAIN_HOME%/servers/AdminServer/security/boot.properties中看到用户名和密码是明文,记得前段将用户名和密码从startWebLogic.sh放到了boot.properties,应该是这个问题造成的。在网上搜索解决方法,有一篇https://forums.oracle.com/forums/thread.jspa?threadID=1022442
步骤一:如果你的Weblogic是生产模式请将其改成开发模式(可参看http://blog.csdn.net/cuihaiyang/article/details/8289148),否则weblogic不支持在config.xml中使用明文密码而启动失败。
将domain路径下%DOMAIN_HOME%\bin\setDomainEnv.cmd文件set PRODUCTION_MODE=true 更改为 set PRODUCTION_MODE=false 或set PRODUCTION_MODE=
将%DOMAIN_HOME%\config\config.xml文件中<production-mode-enabled>true</production-mode-enabled>更改为<production-mode-enabled>false</production-mode-enabled>或者直接删掉。
步骤二:修改%DOMAIN_HOME%/config/config.xml文件,将
[html] view plaincopy
<default-realm>myrealm</default-realm>
<credential-encrypted>weblogic123</credential-encrypted>
<node-manager-username>weblogic</node-manager-username>
<node-manager-password-encrypted>weblogic123</node-manager-password-encrypted>
<embedded-ldap>
<name>base_domain</name>
<credential-encrypted>weblogic123</credential-encrypted>
</embedded-ldap>
中加密的用户名和密码替换成自己的用户名和密码(我的用户名weblogic,密码weblogic123),再次启动Weblogic成功。weblogic会自动将%DOMAIN_HOME%/servers/AdminServer/security/boot.properties中的用户名和密码加密。
[plain] view plaincopy
#Mon Feb 18 09:54:46 CST 2013
password={AES}9ymlSJ82yzBzGH0sLgATptcNvdJ1tn6Wdbt248iMRnY\=
username={AES}RnjKpCymMz0aVpuFc5V0ok8A8xJV5od21aWerppJ9V4\=
步骤三:在控制台(base_domain-》安全)修改realm、nodemananger和ldap的密码
保存后weblogic会自动加密密码并更新到config.xml中
[html] view plaincopy
<credential-encrypted>{AES}wv4rulmnNCdQZhope1ehp6TGnE9YOzqhOwCTSL3xOBw=</credential-encrypted>
<node-manager-username>weblogic</node-manager-username>
<node-manager-password-encrypted>{AES}XhbgIeSqoN2SCg7hxhfeo7hAfgvLrEX3dgEyRMtTdNI=</node-manager-password-encrypted>
<embedded-ldap>
<name>base_domain</name>
<credential-encrypted>{AES}wSZq29RMDZWOQGXjD2l45VEdEfua3n3G1bNAabWfFQk=</credential-encrypted>
<backup-hour>23</backup-hour>
<backup-minute>5</backup-minute>
<backup-copies>7</backup-copies>
<cache-enabled>true</cache-enabled>
<cache-size>32</cache-size>
<cache-ttl>60</cache-ttl>
<refresh-replica-at-startup>false</refresh-replica-at-startup>
<master-first>false</master-first>
<timeout>0</timeout>
<anonymous-bind-allowed>false</anonymous-bind-allowed>
</embedded-ldap>
步骤四:与步骤一相反,关闭Weblogic,将Weblogic从开发模式改成生产模式,重新启动。
--转自