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 script is failing to create bar

Post new topic  Reply to topic
 Ant script is failing to create bar « View previous topic :: View next topic » 
Author Message
jeevan
PostPosted: Wed Nov 07, 2012 12:59 pm    Post subject: Ant script is failing to create bar Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

I am working on to create a bar file using ant script. When it reaches

exec TAG, it lists commands, parameters correctly then it fails immediately. -debug can produce this but not sure why it failing.

I would apprecaite for any help

This is what the ant errors out in -debug mode


build.xml:63: exec returned: 1
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:636)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:662)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:487)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Back to top
View user's profile Send private message
ganesh
PostPosted: Wed Nov 07, 2012 1:42 pm    Post subject: Reply with quote

Master

Joined: 18 Jul 2010
Posts: 294

Can you post the failing exec tag?
Back to top
View user's profile Send private message
bsiggers
PostPosted: Wed Nov 07, 2012 1:45 pm    Post subject: Reply with quote

Acolyte

Joined: 09 Dec 2010
Posts: 53
Location: Vancouver, BC

It could be a lot of things. Could you put your exec command that is being generated within <echo> tags and see the interpreted result?

Could be that the command you're putting there is failing, not found, your paths not setup correctly for the command, etc.

Best Regards,
Ben Siggers.
Back to top
View user's profile Send private message
jeevan
PostPosted: Wed Nov 07, 2012 1:49 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

bsiggers wrote:
It could be a lot of things. Could you put your exec command that is being generated within <echo> tags and see the interpreted result?

Could be that the command you're putting there is failing, not found, your paths not setup correctly for the command, etc.

Best Regards,
Ben Siggers.



<!-- The default target to build the Broker Archive file. The required projects have been exported to ${workspace.home}. CHANGE VALUES FOR -p AND -o SWITCHES BELOW AS REQUIRED. -->
<target name="buildBAR" description="Build BAR file" depends="init">
<echo message="Building Broker Archive file : ${bar.file.path}"/>
<exec failonerror="true" executable="${ createbar.cmd }">
<arg value="-data"/>
<arg value="${workspace.home}"/>
<arg value="-b"/>
<arg path="${bar.file.path}"/>
<arg value="-cleanBuild"/>
<arg value="-p"/>
<arg value="${P1}"/>
<arg value="${P2}"/>
<arg value="${P3}"/>
<arg value="${P4}"/>
<arg value="${P5}"/>
<arg value="${P6}"/>
<arg value="${P7}"/>
<arg value="${P8}"/>
<arg value="${P9}"/>
<arg value="${P10}"/>
<arg value="${P11}"/>
<arg value="${P12}"/>
<arg value="-o" />
<arg value="${F1}"/>
<arg value="${F2}"/>
<arg value="${MS1}"/>
<arg value="${MS2}"/>
<arg value="${MS3}"/>
</exec>
Back to top
View user's profile Send private message
jeevan
PostPosted: Wed Nov 07, 2012 1:53 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

jeevan wrote:
bsiggers wrote:
It could be a lot of things. Could you put your exec command that is being generated within <echo> tags and see the interpreted result?

Could be that the command you're putting there is failing, not found, your paths not setup correctly for the command, etc.

Best Regards,
Ben Siggers.



<!-- The default target to build the Broker Archive file. The required projects have been exported to ${workspace.home}. CHANGE VALUES FOR -p AND -o SWITCHES BELOW AS REQUIRED. -->
<target name="buildBAR" description="Build BAR file" depends="init">
<echo message="Building Broker Archive file : ${bar.file.path}"/>
<exec failonerror="true" executable="${ createbar.cmd }">
<arg value="-data"/>
<arg value="${workspace.home}"/>
<arg value="-b"/>
<arg path="${bar.file.path}"/>
<arg value="-cleanBuild"/>
<arg value="-p"/>
<arg value="${P1}"/>
<arg value="${P2}"/>
<arg value="${P3}"/>
<arg value="${P4}"/>
<arg value="${P5}"/>
<arg value="${P6}"/>
<arg value="${P7}"/>
<arg value="${P8}"/>
<arg value="${P9}"/>
<arg value="${P10}"/>
<arg value="${P11}"/>
<arg value="${P12}"/>
<arg value="-o" />
<arg value="${F1}"/>
<arg value="${F2}"/>
<arg value="${MS1}"/>
<arg value="${MS2}"/>
<arg value="${MS3}"/>
</exec>


This time, I am getting different error

BUILD FAILED
C:\ant\bin\build.xml:63: exec returned: 1
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:636)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:662)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:487)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Nov 07, 2012 2:02 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

jeevan wrote:

<arg value="-p"/>
<arg value="${P1}"/>
<arg value="${P2}"/>
<arg value="${P3}"/>
<arg value="${P4}"/>
<arg value="${P5}"/>
<arg value="${P6}"/>
<arg value="${P7}"/>
<arg value="${P8}"/>
<arg value="${P9}"/>
<arg value="${P10}"/>
<arg value="${P11}"/>
<arg value="${P12}"/>

This is not right.
Code:
<arg value="-p"/>
<arg line="${P1} ${P2} ${P3} ${P4} ${P5} ${P6}"/>
Back to top
View user's profile Send private message
bsiggers
PostPosted: Wed Nov 07, 2012 2:04 pm    Post subject: Reply with quote

Acolyte

Joined: 09 Dec 2010
Posts: 53
Location: Vancouver, BC

Hi jeevan,

You aren't going to be able to figure out what's going wrong without knowing what command you are passing to the exec statement. Like I mentioned before, it would be helpful to you to be able to see what is actually being run (including parameters that you're actually passing in) to the mqsicreatebar command.

Hope this helps, Best Regards,
Ben Siggers.
Back to top
View user's profile Send private message
jeevan
PostPosted: Wed Nov 07, 2012 2:10 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

mqjeff wrote:
jeevan wrote:

<arg value="-p"/>
<arg value="${P1}"/>
<arg value="${P2}"/>
<arg value="${P3}"/>
<arg value="${P4}"/>
<arg value="${P5}"/>
<arg value="${P6}"/>
<arg value="${P7}"/>
<arg value="${P8}"/>
<arg value="${P9}"/>
<arg value="${P10}"/>
<arg value="${P11}"/>
<arg value="${P12}"/>

This is not right.
Code:
<arg value="-p"/>
<arg line="${P1} ${P2} ${P3} ${P4} ${P5} ${P6}"/>


thanks mqjeff. I was wondering whether there is an alternative way to express these parameters.
Back to top
View user's profile Send private message
jeevan
PostPosted: Wed Nov 07, 2012 2:12 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

bsiggers wrote:
Hi jeevan,

You aren't going to be able to figure out what's going wrong without knowing what command you are passing to the exec statement. Like I mentioned before, it would be helpful to you to be able to see what is actually being run (including parameters that you're actually passing in) to the mqsicreatebar command.

Hope this helps, Best Regards,
Ben Siggers.


I know what command I am passing and what parameters I am passing. In fact, before ant, I have tested the syntax of the command in bath file. I know the command along with the parameters work perfectly. Although there are a few other issue in compiling in headless environment but that is not ant issue or command issue.


Here is the previous discussions
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Nov 07, 2012 6:45 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

you might also want to add -trace.

Lot of interesting things printed that way...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jeevan
PostPosted: Thu Nov 08, 2012 6:16 am    Post subject: Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

fjb_saper wrote:
you might also want to add -trace.

Lot of interesting things printed that way...


My biggest issue for me is not the an ant script to get working, but find out why the headless compilation (creation of bar file - using compilation and create bar interchangeably).

As I mentioned in my previous post, when I took delete the .metadata dir from the workspace or create a new workspace and copy only prpject, it only compiles, one main flow, and 3 message setup. none of subflows, java and one main flow are not getting added to the bar file. Same code works in Tooklit and with compilation with .metadata dir in workspace or in eclipse workspace.


Last edited by jeevan on Thu Nov 08, 2012 7:02 am; edited 1 time in total
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Nov 08, 2012 6:53 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

There are a few tricks.
If you defined any path variables (java project), you need to also define them in ANT, and will have to use
ant -Dtoolkit.home=<tkinstall> buildAll

Seek guidance through a PMR...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Ant script is failing to create bar
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.