gpt4 book ai didi

java - 从命令行更新 websphere 中的 war

转载 作者:塔克拉玛干 更新时间:2023-11-01 22:46:16 29 4
gpt4 key购买 nike

我开发了一个 java ear,我通过使用 eclipse 中的发布按钮从我的本地 eclipse 部署到我的本地 websphere 8.5。当我尝试从命令行部署我的耳朵时,我在尝试访问网页后收到错误消息。

我从这样的公共(public)线路更新我的耳朵:${was.dir}/profiles/${was.profile}/bin/wsadmin.sh -lang jython -username ${was.username} -password ${was.password} -c AdminApplication.updateApplicationUsingDefaultMerge('${was .app.name}', '${build.dir}/${ear.name}')

部署成功,但当我通过网络浏览器访问我的应用程序时,我收到以下消息,而不是看到我的应用程序:

错误 404:com.ibm.ws.webcontainer.servlet.exception.NoTargetForURIException:没有为 uri 配置目标 servlet:/wwww/index.html

我已经通过 websphere 的 web 管理界面更新它来验证耳朵是好的,没有任何配置。

我做错了什么或者我需要执行哪些额外步骤才能成功更新我的耳朵?

最佳答案

您使用了错误的命令。你应该使用这样的东西:

AdminApp.update('MyAppEAR', 'app', '[ -operation update -contents MyApp.ear -nopreCompileJSPs -installed.ear.destination C:\WAS\MyAppEAR -nodistributeApp -useMetaDataFromBinary -nodeployejb -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall warn -noprocessEmbeddedConfig -filepermission ..dll=755#..so=755#..a=755#..sl=755 -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -asyncRequestDispatchType DISABLED -nouseAutoLink -noenableClientModule -clientMode isolated -novalidateSchema -MapModulesToServers [[ MyApp MyApp.war,WEB-INF/web.xml WebSphere:cell=Node02Cell,node=Node02,server=server1 ]]]' )

此外,在 WebSphere Application Server 中,您可以记录通过管理控制台发出的每个命令。

步骤

  1. 使用管理用户(例如 wasadmin)登录管理控制台
  2. 点击“系统管理”->“控制台首选项”
  3. 选中“启用命令帮助通知”和“记录命令帮助命令”
  4. 点击应用按钮保存更改

enter image description here

您可以在管理控制台右上角的帮助组件中看到命令: help portlet

如果勾选“记录命令辅助命令”,还可以在日志文件“<WAS_HOME>\profiles\<PROFILE_NAME>\logs\server1\commandAssistanceJythonCommands.log”中看到jython命令

关于java - 从命令行更新 websphere 中的 war ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23882128/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com