webspehere 6.1.0.25 基础与 RAD 7.0.0.9 wsInstallApp 任务问题

发布于 2024-08-03 04:46:05 字数 2441 浏览 8 评论 0原文

大家好,

我正在尝试运行 wsInstallApp 任务将我的 war 文件部署到 网络圈。 我收到错误“无法解析 setupCmdLine: null\bin\setupCmdLine.bat(系统找不到指定的路径。)”

<property name="ear.file" value="../archive/DocProcessing.war" />
There is no attribute for war

Here is the code SNIPPET:
<target name="init">
<path id="lib.ref">
<fileset dir="${env.classpath.WAS_HOME}\lib">
            <include name="*.*jar" />
</fileset>
<fileset dir="${env.classpath.WAS_HOME}\bin">
            <include name="*.*bat" />
        </fileset>
        <fileset dir="${env.classpath.WAS_HOME}\plugins">
            <include name="*.*jar" />
        </fileset>
        <fileset dir="${env.classpath.WAS_HOME}\java\lib">
            <include name="*.*jar" />
        </fileset>
        <fileset dir="${env.classpath.WAS_HOME}\deploytool\itp\plugins">
            <include name="*.*jar" />
        </fileset>
        <fileset dir="${env.classpath.WAS_HOME}">
            <include name="*.*jar" />
        </fileset>
      </path>
    <taskdef name="wsStartServer" classpathref="lib.ref"
        classname="com.ibm.websphere.ant.tasks.StartServer" />
    <taskdef name="wsInstallApp" classpathref="lib.ref"
        classname="com.ibm.websphere.ant.tasks.InstallApplication" />

</target>

<target name="StartServer" depends="init">
    <exec dir="${env.classpath.WAS_HOME}\bin" executable="cmd">
        <arg line="/c startServer.bat server1 -profileName AppSrv01" />
    </exec>
</target>
<target name="installEar" depends="StartServer">
    <echo message="EAR File located: ${ear.file}" />
    <wsInstallApp ear="${ear.file}" wasHome="${env.classpath.WAS_HOME}"
        conntype="${remoteConnType}" host="${remoteHostName}" user="${remoteUserId}"
        password="${remotePassword}" />
</target>


properties set are:

<property name="remoteHostName" value="localhost" />
<property name="remoteConnType" value="SOAP" />
<property name="remotePort" value="8880" />
<property name="remoteUserId" value="wasadmin" />
<property name="remotePassword" value="wasadmin" />

path set for wasHome ="C:\Program Files\IBM\WebSphere\AppServer"

我可以 不知道这有什么问题。虽然我是 websphere 的新手,但我是 试图找出安装应用程序并启动的解决方案 使用ant脚本的应用程序。请向我提供解决方案 把它设置好。

提前感谢

Hi All,

I am trying to run wsInstallApp task to deploy my war file into
websphere.
I am getting the error "Unable to parse setupCmdLine:
null\bin\setupCmdLine.bat (The system cannot find the path specified.)"

<property name="ear.file" value="../archive/DocProcessing.war" />
There is no attribute for war

Here is the code SNIPPET:
<target name="init">
<path id="lib.ref">
<fileset dir="${env.classpath.WAS_HOME}\lib">
            <include name="*.*jar" />
</fileset>
<fileset dir="${env.classpath.WAS_HOME}\bin">
            <include name="*.*bat" />
        </fileset>
        <fileset dir="${env.classpath.WAS_HOME}\plugins">
            <include name="*.*jar" />
        </fileset>
        <fileset dir="${env.classpath.WAS_HOME}\java\lib">
            <include name="*.*jar" />
        </fileset>
        <fileset dir="${env.classpath.WAS_HOME}\deploytool\itp\plugins">
            <include name="*.*jar" />
        </fileset>
        <fileset dir="${env.classpath.WAS_HOME}">
            <include name="*.*jar" />
        </fileset>
      </path>
    <taskdef name="wsStartServer" classpathref="lib.ref"
        classname="com.ibm.websphere.ant.tasks.StartServer" />
    <taskdef name="wsInstallApp" classpathref="lib.ref"
        classname="com.ibm.websphere.ant.tasks.InstallApplication" />

</target>

<target name="StartServer" depends="init">
    <exec dir="${env.classpath.WAS_HOME}\bin" executable="cmd">
        <arg line="/c startServer.bat server1 -profileName AppSrv01" />
    </exec>
</target>
<target name="installEar" depends="StartServer">
    <echo message="EAR File located: ${ear.file}" />
    <wsInstallApp ear="${ear.file}" wasHome="${env.classpath.WAS_HOME}"
        conntype="${remoteConnType}" host="${remoteHostName}" user="${remoteUserId}"
        password="${remotePassword}" />
</target>


properties set are:

<property name="remoteHostName" value="localhost" />
<property name="remoteConnType" value="SOAP" />
<property name="remotePort" value="8880" />
<property name="remoteUserId" value="wasadmin" />
<property name="remotePassword" value="wasadmin" />

path set for wasHome ="C:\Program Files\IBM\WebSphere\AppServer"

I could
not findout what is wrong in this .Though i am new to websphere i am
trying to find out the solution to install application and start
application using ant script .Please kindly provide me the solution to
get it set right .

Thanx in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

夜空下最亮的亮点 2024-08-10 04:46:05

您必须设置“user.install.root”属性,这里是一个示例:

<property name="user.install.root" value="${env.classpath.WAS_HOME}/profiles/was60profile1" />

You have to set 'user.install.root' property, here is an example:

<property name="user.install.root" value="${env.classpath.WAS_HOME}/profiles/was60profile1" />
梦里泪两行 2024-08-10 04:46:05

是的,我们需要添加以下内容:

<property name="user.install.root" value="${was.path}/profiles/AppSrv01" />

其中 was.path 是 was 应用程序的安装位置。

Yes, we needed to add the following:

<property name="user.install.root" value="${was.path}/profiles/AppSrv01" />

where was.path would be the location where your was application is installed.

何止钟意 2024-08-10 04:46:05

我今天遇到了这个错误。并且找到了答案!!!
添加 profileName="[配置文件名称]",在我的例子中 profileName="wp_profile",并且它有效!

I had this error today. And found the answer!!!
Add profileName="[name of the profile]", in my case profileName="wp_profile", And it works!

请止步禁区 2024-08-10 04:46:05

此过程很可能运行 ws_ant.bat,后者又调用 setupcmdline 来初始化所有变量。在我的安装中,该行是这样的:

@echo off
@setlocal
call "%~dp0setupCmdLine.bat" %*

这可能与您的服务器/RAD 配置无效有关,或者该项目没有为其分配默认服务器?

当您通过命令行在 RAD 之外运行它时会发生什么,它是否仍然以同样的方式失败?

This process most probably runs ws_ant.bat which in turn calls setupcmdline to initialise all the variables. In my installation the line is like this:

@echo off
@setlocal
call "%~dp0setupCmdLine.bat" %*

Could it be something to do with your server/RAD configuration being invalid, or the project not having a default server assigned to it?

What happens when you run it outside of RAD through the command line, does it still fail in the same way?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文