2013-07-02 47 views
1

我在使用以下命令(請參見下文)從wsadmin命令行安裝應用程序的.ear文件時面臨一個問題 - 我從Websphere的「查看最後一個操作的管理腳本命令」後,我試圖從控制檯手動執行此操作。問題是部署完成後,我去應用程序,我沒有看到詳細屬性下的「用戶/組映射的安全角色」鏈接,但我確實看到這一點,當我從控制檯安裝應用程序,而我接受所有使用快速路徑方法的默認值。 PS:我在Windows 2008 R2 64位機器上使用Websphere 7.0.0.23。另外,如果我忽略了AdminApp.install()命令中的所有選項,並且只使用AdminApp.install('C:\pathToMyEar'),我會看到安全性映射鏈接,但是我至少需要傳遞應用程序的名稱,否則名稱最終會變成隨機字符串。wsadmin應用程序安裝脫離用戶/組映射的安全角色

AdminApp.install( 'C:/fakepath/myApplication.ear',「[-nopreCompileJSPs -distributeApp -nouseMetaDataFromBinary -nodeployejb -appname myApplicationRestEAR -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall警告-noprocessEmbeddedConfig -filepermission。 的.dll = 755#。。所以= 755#。.A = 755#。 .sl = 755 -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -asyncRequestDispatchType DISABLED -nouseAutoLink -MapModulesToServers [[myApplicationRest myApplicationRest.war,WEB-INF /網。 xml WebSphere:cell = TestNode01Cell,node = TestNode01,server = server1]] -MapRolesT oUsers [安全AppDeploymentOption.No AppDeploymentOption.Yes 「」 「」 AppDeploymentOption.No 「」 「」]]]」)

非常感謝, Chethan

+0

有MapRolesToUsers'的'只有5個參數的文件,並在armstrhb答案(見下文)。爲什麼你有8個參數的MapRolesToUsers?這些參數做什麼? –

回答

2

它看起來像有一些額外的參數-MapRolesToUsers塊的結尾。我不確定那些是否會拋棄wsadmin。下面是關於MapRolesToUsers IBM文檔(source):

AdminApp.install('myapp.ear', '[-MapRolesToUsers [["All Role" No Yes "" ""]["Every Role" Yes No "" ""] [DenyAllRole No No user1 group1]]]') 

where {{"All Role" No Yes "" ""} corresponds to the following: 

"All Role" Represents the role name 
No   Indicates to allow access to everyone (yes/no) 
Yes   Indicates to allow access to all authenticated users (yes/no) 
""   Indicates the mapped users 
""   Indicates the mapped groups 

嘗試改變MapRolesToUsers塊這樣的:

-MapRolesToUsers [[ security AppDeploymentOption.No AppDeploymentOption.Yes "" "" ]] 
+0

謝謝,我也試過,結果也一樣,但是,有一個問題:重啓WAS糾正了這個問題,我可以在重新啓動後馬上看到「安全角色用戶/組映射」,無論我是否用我的方式或你的語法。 –

+1

確保你不要忘了 '$的AdminConfig save' 也可能會超時如果這樣檢查:'C:\ IBM \的WebSphere \ AppServer的\型材\ MyAppSrv123 \屬性\ soap.client.props' 我在這裏示例組 '$ AdminApp查看myAPP123 {-MapRolesToUsers}' '$ AdminApp編輯myAPP123 {-MapRolesToUsers {{「MyAdmins」否否「」「AdminG | WAS AdminG」}}}' – Tilo

相關問題