Search code examples
weblogicjython

Jython script error


I am trying to add the following in the config.xml of weblogic server under <server> node

<ssl>

  <enabled>true</enabled>

</ssl>

I can do this using admin console, but I have to use the jython script so that it can be done while installing the application.

I followed the steps explained in here -

http://blogs.oracle.com/jamesbayer/2010/04/record_and_play_your_weblogic.html

It generates the following script -

cd('/Servers/ocsServer')
cmo.setListenPortEnabled(true)

cmo.setJavaCompiler('javac')

cmo.setClientCertProxyEnabled(false)

cd('/Servers/ocsServer/SSL/ocsServer')

cmo.setEnabled(true)

activate()

startEdit()

But I am getting this exception -

com.bea.plateng.domain.script.
jython.WLSTException: com.bea.plateng.domain.script.jython.WLSTException: com.bea.plateng.domain.script.ScriptException: No nested element SSL is found

Any idea?


Solution

  • It's actually necessary to create a new SSL MBean as a child of the Server MBean, the same way you would with log configuration:

    cd('/Servers/ocsServer')
    ssl = create('ocsServer','SSL')
    ssl.setEnabled(1)