大多数状况下,咱们会对weblogic的domain新创建一个用户,从而用该用户来管理domain,避免多个domain之间出现加载jvm,加载jar包,加载war,加载so文件等死锁或者重复加载异常。
咱们如今weblogic922上就创建了两个domain,用weblogic922_1,weblogic922_2去管理,并将
/usr/local/bea2/user_projects/domains/base_domain1
/usr/local/bea2/user_projects/domains/base_domain2
的权限分别设置为weblogic922_1与weblogic922_2所属,该命令以下:
chown -R weblogic922_1:root ./base_domain1
chown -R weblogic922_2:root ./base_domain2
若是在启动weblogic的时候忘记切换用户用root启动一次后,再次用weblogic922_x启动,就会出现以下错误:
<Aug 7, 2008 3:19:24 PM CST> <Critical> <EmbeddedLDAP> <BEA-171522> <An error occurred while initializing the Embedded LDAP Server. The exception thown is java.lang.ClassCastException: com.octetstring.vde.backend.BackendRoot. This may indicate a problem with the data files for the Embedded LDAP Server. If the problem is with the data files and it can not be corrected, backups of previous versions of the data files exist in ./servers/AdminServer/data/ldap/backup.>
<Aug 7, 2008 3:19:24 PM CST> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason:
There are 1 nested errors:
java.lang.ClassCastException: com.octetstring.vde.backend.BackendRoot
at weblogic.ldap.EmbeddedLDAP.start(EmbeddedLDAP.java:273)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
上面的错误缘由主要是在用root用户启动weblogic的时候会在base_domain里产生root权限的文件,或者用root权限的文件覆盖了原来存在的weblogic922_x所属文件,当再次切换到weblogic922_x用户后,启动的时候就会出现权限问题,因此报告上面的错误。
解决办法:
在root用户下,执行:
chown -R weblogic922_1:root ./base_domain
再次切换到weblogic_922下启动就没有问题了。 java