Oracle Weblogic Server (MOSC)

MOSC Banner

Python script error

edited Feb 28, 2014 12:00PM in Oracle Weblogic Server (MOSC) 1 commentAnswered

Hi,

I am using below script. I am getting error any one check on it.

#!/usr/bin/python

def serverStatus(server):

    serverBean = cmo.lookupServerLifeCycleRuntime(server)

    serverState = serverBean.getState();

    print ""

    print "Instance: ", server," is in state: ", serverState

    #If it's shutdown  start.

       if serverState in ('SHUTDOWN', 'UNKNOWN'):

                start(instanceName, block='true')

connect('user','password','t3://localhost:7001')

domainRuntime()

cd('ServerRuntimes')

servers=domainRuntimeService.getServerRuntimes()

serverStatus(servers)

Error:TypeError: lookupServerLifeCycleRuntime(): 1st arg can't be coerced to String

//Thanks,

Grandhi.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center