ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Ant Cannot Find mqsicreatebar.exe

Post new topic  Reply to topic Goto page 1, 2  Next
 Ant Cannot Find mqsicreatebar.exe « View previous topic :: View next topic » 
Author Message
EricCox
PostPosted: Wed Apr 27, 2016 4:45 am    Post subject: Ant Cannot Find mqsicreatebar.exe Reply with quote

Master

Joined: 08 Apr 2011
Posts: 292

To all,

How do I properly account for the white space in the path to mqsicreatebar.exe?

I'm getting this error running the Ant build.xml:
BUILD FAILED
C:\Documents and Settings\N016438\.jenkins\jobs\POC_Ant\workspace\build.xml:12: Execute failed: java.io.IOException: Cannot run program "${toolkit.home}\mqsicreatebar.exe": CreateProcess error=2, The system cannot find the file specified

Here is the Ant build.xml:
<?xml version="1.0"?>
<project name="project" default="run">
<target name="run" description="">
<property name="toolkit.home" value="D:\Program Files\IBM\WMBT800" />
<property name="ant.bars.basedir" value="D:\OutputDIR" />
<property name="bar.name" value="${ant.bars.basedir}\log.bar" />
<property name="workspace.dir" value="D:\workspaces\wmb" />
<antcall target="build" />
</target>
<target name="build">
<echo message="Building the Message Broker Project @ ${workspace.dir}" />
<exec executable="${toolkit.home}\mqsicreatebar.exe" spawn="false">
<arg value="-data" />
<arg value="${workspace.dir}" />
<arg value="-b" />
<arg value="${bar.name}" />
<!-- List all the message flow projects -->
<arg value="-p" />
<arg value="log" />

<!-- List all the files to be included in the archive -->
<arg value="-o" />
<arg value="log\logging\logging_XML.esql" />
<arg value="log\logging\logging_XML.msgflow" />
</exec>
</target>
</project>

I tried all sorts of things to escape use \\, / etc but could not figure out what I'm doing wrong with the path.

Has anyone solved this?

I'm on Windows 2003 server, using Jenkins to kick off the Ant build.

Thanks,
EMC
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Apr 27, 2016 4:53 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

My memory is poor, but I think you either need to use \\\ or \\\\.

But the issue appears to be that ant is not resolving ${toolkit.home}.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
EricCox
PostPosted: Wed Apr 27, 2016 4:58 am    Post subject: Like this? Reply with quote

Master

Joined: 08 Apr 2011
Posts: 292

I tried this with three and four slashes, which did not work:
<property name="toolkit.home" value="D:\\\\Program Files\\\\IBM\\\\WMBT800" />
<property name="ant.bars.basedir" value="D:\OutputDIR" />
<property name="bar.name" value="${ant.bars.basedir}\logTeller.bar" />
<property name="workspace.dir" value="D:\workspaces\wmb" />
<antcall target="build" />
</target>
<target name="build">
<echo message="Building the Message Broker Project @ ${workspace.dir}" />
<exec executable="${toolkit.home}\\\\mqsicreatebar.exe" spawn="false">

Should they all be four slashes?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Apr 27, 2016 5:05 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You might also try / instead.

But again, the error you showed said that it couldn't find "${toolkit.home}/mqsicreatebar.exe". Which to me means that it's not replacing ${toolkit.home} with the right value.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
EricCox
PostPosted: Wed Apr 27, 2016 5:14 am    Post subject: Focus Reply with quote

Master

Joined: 08 Apr 2011
Posts: 292

Right,

That is why I was focusing on the line:
<property name="toolkit.home" value="D:\\\\Program Files\\\\IBM\\\\WMBT800" />

My guess is that since it is having a problem reading the path it is not filling in the property value and thus can't find the mqsicreatebar.exe.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Apr 27, 2016 5:17 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Ok. Well, try / instead.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 27, 2016 5:22 am    Post subject: Re: Ant Cannot Find mqsicreatebar.exe Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

EricCox wrote:
Has anyone solved this?


Use the other form of the directory name; Progra~1 or whatever it is that doesn't have whitespace.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
EricCox
PostPosted: Wed Apr 27, 2016 5:25 am    Post subject: Other form Reply with quote

Master

Joined: 08 Apr 2011
Posts: 292

How do I find the other form of the directory name?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Apr 27, 2016 5:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

dir /x
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
EricCox
PostPosted: Wed Apr 27, 2016 5:39 am    Post subject: Try Reply with quote

Master

Joined: 08 Apr 2011
Posts: 292

I tried this:
<target name="run" description="">
<property name="toolkit.home" value="D:/PROGRA~1/IBM/WMBT800" />
<property name="ant.bars.basedir" value="D:\OutputDIR" />
<property name="bar.name" value="${ant.bars.basedir}\logTeller.bar" />
<property name="workspace.dir" value="D:\workspaces\wmb" />
<antcall target="build" />
</target>
<target name="build">
<echo message="Building the Message Broker Project @ ${workspace.dir}" />
<exec executable="${toolkit.home}/MQSICR~2.EXE" spawn="false">

And this:
<target name="run" description="">
<property name="toolkit.home" value="D:\PROGRA~1\IBM\WMBT800" />
<property name="ant.bars.basedir" value="D:\OutputDIR" />
<property name="bar.name" value="${ant.bars.basedir}\logTeller.bar" />
<property name="workspace.dir" value="D:\workspaces\wmb" />
<antcall target="build" />
</target>
<target name="build">
<echo message="Building the Message Broker Project @ ${workspace.dir}" />
<exec executable="${toolkit.home}\MQSICR~2.EXE" spawn="false">

Neither the short form nor the / are working. I'm stumped and I started doing this stuff too long ago.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Apr 27, 2016 5:58 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I have some old ant build.xml. It looks like this
Code:
   <property file="d:\build\MB\DailyBuild\abc.properties" />
   <property file="build.properties" />
   <target name="mqsicreatebar.buildbar">
      <echo message="Building Broker Archive file: ${bar.name} " />
      <echo message="${toolkit.home}\mqsicreatebar.exe
           -data ${workspaces.dir} -b ${bar.name} -cleanBuild -p ${broker.projectlist} -o ${broker.objectlist}" />
      <exec executable="${toolkit.home}\mqsicreatebar.exe" failonerror="false" spawn="false" error="ERRREC.txt" output="REC.txt">
         <arg value="-data" />
         <arg value="${workspaces.dir}" />
         <arg value="-b" />
         <arg value="${bar.name}" />
         <arg value="-cleanBuild" />
         <arg value="-p" />
         <arg value="${broker.projectlist}" />
         <arg value="-o" />
         <arg value="${broker.objectlist}"/>
      </exec>
      <echo message="Completed building Broker Archive file - ${bar.name} " />
   </target>


The value of "${toolkit.home}" is in the abc.properties file, and looks like "toolkit.home=C:\\Progra~1\\IBM\\WMBT700"
(like I said... old...)
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 27, 2016 5:59 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

FWIW this is my local prototype xml (our "real" environment is Linux so the whitespace problem doesn't come up):

Code:

<?xml version="1.0" encoding="UTF-8"?>
<project name="buildabar" default="run" xmlns:if="ant:if" xmlns:unless="ant:unless" >
   <property name="toolkit.home" value="C:\Program Files (x86)\IBM\IntegrationToolkit90"/>
   <property name="runtime.home" value="C:\Program Files\IBM\MQSI\9.0.0.2\bin"/>
   <property name="ant.bars.basedir" value="C:\Users\{user.name}\Documents\Ant\"/>
   <property file="${ant.bars.basedir}\local.properties"/>
   <property name="workspace.dir" value="c:\users\${user.name}\IBM\IntegrationToolkit90\${workspace.name}"/>
   <property name="bar.name" value="${target.name}.bar"/>
   <property name="deploy.bar.name" value="${target.name}.patched.bar"/>
   <property name="properties.name" value="${target.name}.properties"/>
   <target name="clean" description="remove old bar file">
      <echo message="Cleaning old file"/>
      <delete file="${bar.name}"/>
      <delete file="${deploy.bar.name}"/>
   </target>
   <target name="build" depends="clean">
      <echo message="Building ${workspace.dir}"/>
      <exec executable="${toolkit.home}\mqsicreatebar.exe" spawn="false" failonerror="true">
         <arg value="-data"/>
         <arg value="${workspace.dir}"/>
         <arg value="-b"/>
         <arg value="${bar.name}"/>
         <arg value="-version"/>
         <arg value="${version.label}"/>         
         <arg value="-p"/>
         <arg value="${target.name}"/>
         <arg value="-a"/>
         <arg value="${target.name}"/>
      </exec>
   </target>
   <target name="edit" depends="build">
   <echo message="Editing ${bar.name}"/>
      <exec executable="${toolkit.home}\mqsiapplybaroverride.exe" spawn="false" failonerror="true">
      <arg value="-b"/>
      <arg value="${bar.name}"/>
      <arg value="-k"/>
         <arg value="${target.name}"/>
      <arg value="-p"/>
      <arg value="${properties.name}"/>
      <arg value="-o"/>
            <arg value="${deploy.bar.name}"/>
      <arg value="-r"/>
      </exec>
   </target>
   <target name="run" depends="clean,build,edit,deploy">
      <echo message="Build Complete"/>
   </target>
   <target name="deploy" depends="build">
      <echo message="Deploying ${bar.name}"/>
      <exec executable="${runtime.home}\mqsideploy.exe" spawn="false" failonerror="true">
         <arg value="${broker.name}"/>
         <arg value="-e"/>
         <arg value="${eg.name}"/>
         <arg value="-a"/>
         <arg value="${deploy.bar.name}"/>
      </exec>
      <echo message="Deployment Complete"/>
   </target>
</project>

_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Armageddon123
PostPosted: Wed Apr 27, 2016 10:54 am    Post subject: Reply with quote

Acolyte

Joined: 11 Feb 2014
Posts: 61

just thinking , this might not be an issue with space

you may try with a value for {toolkit.home} without space and see if it resolves fully..

If it was space issue, mostly the error should have been
"D:\Program\mqsicreatebar" not found ,,
But i dont know for sure.
Back to top
View user's profile Send private message
EricCox
PostPosted: Wed Apr 27, 2016 10:58 am    Post subject: Odd Stuff Reply with quote

Master

Joined: 08 Apr 2011
Posts: 292

It is really odd. If I move mqsicreatebar.exe to C:\apps just to see if it hits it I get no indication it can find it.

I'm invoking this from a command prompt directly using Ant and from inside Jenkins. I can't get either to work.

Ant says it builds succesfully but does not output the bar file. So it clearly is not succesful.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Apr 27, 2016 11:15 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Try adding the echo to show toolkit.home

Also, I forget if ant has some kind of debug/trace option.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Ant Cannot Find mqsicreatebar.exe
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.