3 Replies Latest reply on May 16, 2019 11:07 AM by sgd

    WLST JMSServers are empty

    sgd

      Hi everyone

       

      I use Weblogic 12c in docker container and want to delete JMS message. But i can't connect to JMSServers and queues by WLST. In GUI mode I see these JMSServers.

       

      Steps:

      sh-4.2$ /u01/oracle/oracle_common/common/bin/setWlstEnv.sh

      sh-4.2$ /u01/oracle/oracle_common/common/bin/wlst.sh'

       

      wls:/offline> connect('weblogic','Welcome01','t3://localhost:7001')

       

      wls:/InfraDomain/serverConfig/> serverRuntime()

      wls:/InfraDomain/serverRuntime/> cd('JMSRuntime/AdminServer.jms/JMSServers')

      wls:/InfraDomain/serverRuntime/JMSRuntime/AdminServer.jms/JMSServers> ls()

       

      wls:/InfraDomain/serverRuntime/JMSRuntime/AdminServer.jms/JMSServers>

       

      So, what is the problem?

       

      Thanks

        • 1. Re: WLST JMSServers are empty
          r0unak

          Hi User ,

           

          You can give cmo.getJMSServers() instead of JMSServers--> this command will give u an array object containing the names of the servers .

           

          Note : you wont be able to see the Server names with the above command .

           

          To get the list of servers write a wlst script and traverse the array object . Below is a small snippet :

           

          i=1

          serverRuntime()

          cd('/')

          cd('/JMSRuntime/'+cmo.getName()+'.jms')

          JMSServers=cmo.getJMSServers()

          if(len(JMSServers)>0):

          for jmssource in JMSServers:

          jms_name=jmssource.getName()

          jms_Server=cmo.getName()

          jms_type=jmssource.getType()

          jms_state=jmssource.getHealthState()

          i=i+1

           

           

          Regards

          r0unak

          • 2. Re: WLST JMSServers are empty
            sgd

            Hi r0unak, thank you for answer.

             

            Unfortunately in my case len(JMSServers)=0

             

            wls:/InfraDomain/serverRuntime/JMSRuntime/AdminServer.jms> JMSServers

            array(weblogic.management.runtime.JMSServerRuntimeMBean,[])

            wls:/InfraDomain/serverRuntime/JMSRuntime/AdminServer.jms> cmo.getJMSServers()

            array(weblogic.management.runtime.JMSServerRuntimeMBean,[])

            wls:/InfraDomain/serverRuntime/JMSRuntime/AdminServer.jms> len(JMSServers)

            0

            wls:/InfraDomain/serverRuntime/JMSRuntime/AdminServer.jms>

            • 3. Re: WLST JMSServers are empty
              sgd

              For history

              Solution

               

              You have to connect to managed servers (Not only Admin Server) so list of jmsservers will be valid. And you will able to delete messages in queue