2011-04-05 132 views
1

我想補充下<server>節點在WebLogic Server中的config.xml中的下列Jython腳本錯誤

<ssl> 

    <enabled>true</enabled> 

</ssl> 

我可以做到這一點使用管理控制檯,但我不得不使用Jython腳本,以便它可以在安裝應用程序時完成。

我遵循的步驟在這裏解釋 -

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

生成下面的腳本 -

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

cmo.setJavaCompiler('javac') 

cmo.setClientCertProxyEnabled(false) 

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

cmo.setEnabled(true) 

activate() 

startEdit() 

但我得到這個例外 -

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 

任何想法?

+0

確實小寫'ssl'作任何差異? – JoseK 2011-04-05 11:11:18

+0

當我用小寫的SSL我得到這個 com.bea.plateng.domain.script.j ython.WLSTException:com.bea.plateng.domain.script.jython.WLSTException:java.la NG。 UnsupportedOperationException:無法創建通用操作:ssl – nasaa 2011-04-05 13:20:48

回答

2

它實際上需要創建一個新的SSL的MBean作爲服務器的MBean的孩子,以同樣的方式,你會與日誌配置:

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

感謝Kevin。金星給你。有效。 – nasaa 2011-04-06 10:51:58

+0

太棒了!樂意效勞。 :-) – kevinpowe 2011-04-15 03:05:13

0

您沒有指定您正在使用哪個版本的WebLogic Server,但我正在使用10.x.你可以檢查MBean層次是確定通過在命令提示符下發射了WLST和人工檢查的對象:

connect('weblogic','weblogic-passsword','t3://your-hostname:your-port') 
edit() 
cd('/Servers/ocsServer') 
ls() 

您是否看到了「SSL」 MBean層次的上市節點?