Tuesday, 27 August 2013

Exception initializing Security Realms in Weblogic

Problem description: Error initializing securty realms.

Logs:
 <Error> <Security> <BEA-090870> <The realm "myrealm" failed to be loaded: weblogic.security.service.SecurityServiceException: java.lang.ExceptionInInitializerError.
weblogic.security.service.SecurityServiceException: java.lang.ExceptionInInitializerError
        at weblogic.security.service.CSSWLSDelegateImpl.initializeServiceEngine(CSSWLSDelegateImpl.java:341)
        at weblogic.security.service.CSSWLSDelegateImpl.initialize(CSSWLSDelegateImpl.java:220)
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.InitializeServiceEngine(CommonSecurityServiceManagerDelegateImpl.java:1785)
  
Cause in this case: weblogic couldn't find the hostname as it was the fresh installation of VM, and localhost will not work untill you have a hostname in Linux.

Resolution:
1)  Browse to the following directory like
      cd /etc/sysconfig
2) open "network" in vi mode.
3)Add the hostname as below:

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=myvmware

4) run the command "service network restart"
5) verify the hostname with the command "hostname"
6)Restart weblogic, Admin server will start as expected.

2 comments:

  1. hi we need to change in

    cd /etc/hosts
    file

    ReplyDelete
  2. Hi Honey,

    Thanks for taking time to read this blog.

    Actually adding to the "host" file will not assign the hostname to the server/VM, as this is in one of the case.

    try to run the command "hostname" to verify server has hostname, if hostname is "localhost" security realms will not initialize and server will go to "Not restartable Mode".

    Hoping this helps.

    Regards
    Anshul Tiwari

    ReplyDelete