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 » mqsideploy error on jenkins from ant script

Post new topic  Reply to topic Goto page 1, 2  Next
 mqsideploy error on jenkins from ant script « View previous topic :: View next topic » 
Author Message
shubham_rajput
PostPosted: Tue Aug 29, 2017 3:07 am    Post subject: mqsideploy error on jenkins from ant script Reply with quote

Novice

Joined: 29 Aug 2017
Posts: 13

I am trying to deploy my bar file using the following "build.xml" code:
Code:

<target name="mqsideploy.deploybar" depends="mqsicreatebar.buildbar">
    <echo message="Deploying Broker Archive file: ${bar.name} " />
    <exec executable="${runtime.dir}\mymqsideployscript.bat" spawn="false" logError="true"
vmlauncher="false" failonerror="true" append="true">
      <arg value="${Brokername}" />
      <arg value="-e" />
      <arg value="${execution.group}" />
      <arg value="-a" />
      <arg value="${workspaces.dir}\${appln.name}\${appln.name}.bar" />
    </exec>
    <echo message="Completed building Broker Archive file - ${bar.name} " />
  </target>


I have also modified mqsideployscript.bat to mymqsideployscript.bat to call mqsiprofile.cmd. The modified mymqsideployscript.bat looks like this:
Code:

@echo off
setlocal
CALL "C:\Program Files (x86)\IBM\MQSI\9.0.0.3\bin\mqsiprofile.cmd"
set PRODUCT_PATH=%~dp0..

if %1""=="" goto noparam

SET parm8=%8
SET parm9=%9
SHIFT /8
SET parm10=%9
SHIFT /8
SET parm11=%9
SHIFT /8
SET parm12=%9
SHIFT /8
SET parm13=%9
SHIFT /8
SET parm14=%9
SHIFT /8
SET parm15=%9
SHIFT /8
SET parm16=%9
SHIFT /8
SET parm17=%9
SHIFT /8
SET parm18=%9
SHIFT /8
SET parm19=%9
SHIFT /8
SET parm20=%9

@echo mqsisetmqenv

"%MQSI_JREPATH%\bin\java" com.ibm.broker.config.util.Deploy %1 %2 %3 %4 %5 %6 %7 %parm8% %parm9% %parm10% %parm11% %parm12% %parm13% %parm14% %parm15% %parm16% %parm17% %parm18% %parm19% %parm20%
goto end

:noparam

"%MQSI_JREPATH%\bin\java" com.ibm.broker.config.util.Deploy -?

:end
endlocal


I am using IIBV9.0.0.3 and Jdk 1.8.
When I run the build on Jenkins the deployment fails with the following error:

Code:

mqsideploy.deploybar:
     [exec]
     [exec] MQSI 9.0.0.3
     [exec] C:\Program Files (x86)\IBM\MQSI\9.0.0.3
     [exec]
     [exec] mqsisetmqenv
     [exec] BIP4516S: Failed to find all the required WebSphere MQ java classes. Class 'com.ibm.mq.MQException' not found in CLASSPATH 'C:\Program Files (x86)\IBM\MQSI\9.0.0.3\messages;C:\Program Files (x86)\IBM\MQSI\9.0.0.3\classes;C:\Program Files (x86)\IBM\MQSI\9.0.0.3\classes\ConfigManagerProxy.jar;C:\Program Files (x86)\IBM\MQSI\9.0.0.3\classes\brokerutil.jar;C:\ProgramData\Application Data\IBM\MQSI\common\wsrr'.
     [exec]
     [exec] Not all the WebSphere MQ jars are installed on this machine. Message Broker requires that WebSphere MQ for Java is installed to work correctly.
     [exec]
     [exec] Make sure that all the correct WebSphere MQ components are installed and that the CLASSPATH correctly contains the WebSphere MQ jar files.

Now I am confuse whether this problemis due to Java version or some other thing. A little help is really appreciated.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 29, 2017 3:55 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Call won't do it, I think.

I believe, without having done any research at all, that Windows CALL runs the command in a separate shell?

Or is that start?

Regardless, you need to make sure that the mqsisetenv is applied to the current shell inside your batch file.

Since you're having issues wiith MQ jars, you might run the relevant mq profie command as well.

Unless I"m wrong.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
shubham_rajput
PostPosted: Tue Aug 29, 2017 4:43 am    Post subject: Added calling to mqsisetmqenv Reply with quote

Novice

Joined: 29 Aug 2017
Posts: 13

I tried modifying the mymqsideployscript.bat by making a call to mqsisetmqenv too:
Code:

SHIFT /8
SET parm19=%9
SHIFT /8
SET parm20=%9

@call mqsisetmqenv
@call "C:\Program Files (x86)\IBM\MQSI\9.0.0.3\bin\mqsiprofile.cmd"

"%MQSI_JREPATH%\bin\java" com.ibm.broker.config.util.Deploy %1 %2 %3 %4 %5 %6 %7 %parm8% %parm9% %parm10% %parm11% %parm12% %parm13% %parm14% %parm15% %parm16% %parm17% %parm18% %parm19% %parm20%
goto end

:noparam

and now it throws this error in Jenkins
Code:

 [exec] MQSI 9.0.0.3
     [exec] 'mqsisetmqenv' is not recognized as an internal or external command,
     [exec] operable program or batch file.
     [exec] C:\Program Files (x86)\IBM\MQSI\9.0.0.3
     [exec]
     [exec] BIP4516S: Failed to find all the required WebSphere MQ java classes. Class 'com.ibm.mq.MQException' not found in CLASSPATH 'C:\Program Files (x86)\IBM\MQSI\9.0.0.3\messages;C:\Program Files (x86)\IBM\MQSI\9.0.0.3\classes;C:\Program Files (x86)\IBM\MQSI\9.0.0.3\classes\ConfigManagerProxy.jar;C:\Program Files (x86)\IBM\MQSI\9.0.0.3\classes\brokerutil.jar;C:\ProgramData\Application Data\IBM\MQSI\common\wsrr'.
     [exec]
     [exec] Not all the WebSphere MQ jars are installed on this machine. Message Broker requires that WebSphere MQ for Java is installed to work correctly
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 29, 2017 5:04 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Try removing the call entirely. So just

mqsisetmqenv.cmd (.cmd?)
mqsiprofile.cmd

Unless I'm wrong, that should add things to the current shell.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
shubham_rajput
PostPosted: Tue Aug 29, 2017 5:14 am    Post subject: Error coming after removing call Reply with quote

Novice

Joined: 29 Aug 2017
Posts: 13

I tried removing call:
Code:

SET parm19=%9
SHIFT /8
SET parm20=%9

mqsisetmqenv.bat
mqsiprofile.cmd

"%MQSI_JREPATH%\bin\java" com.ibm.broker.config.util.Deploy %1 %2 %3 %4 %5 %6 %7 %parm8% %parm9% %parm10% %parm11% %parm12% %parm13% %parm14% %parm15% %parm16% %parm17% %parm18% %parm19% %parm20%
goto end


It ends in showing error of not an internal or external command
Code:

mqsideploy.deploybar:
     [echo] Deploying Broker Archive file: D:\Ebics-phase1\EBICS_PHASE1\EBICS_PHASE1.bar
     [exec] 'mqsisetmqenv' is not recognized as an internal or external command,
     [exec] operable program or batch file.
     [exec] 'mqsiprofile.cmd' is not recognized as an internal or external command,
     [exec] operable program or batch file.
     [exec] The system cannot find the path specified.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 29, 2017 5:34 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

use the full path.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
shubham_rajput
PostPosted: Tue Aug 29, 2017 9:01 pm    Post subject: Error still coming after specifying the full path Reply with quote

Novice

Joined: 29 Aug 2017
Posts: 13

Tried giving full path
Code:
SET parm19=%9
SHIFT /8
SET parm20=%9

"C:\Program Files (x86)\IBM\MQSI\9.0.0.3\bin\mqsisetmqenv.bat"
"C:\Program Files (x86)\IBM\MQSI\9.0.0.3\bin\mqsiprofile.cmd"

"%MQSI_JREPATH%\bin\java" com.ibm.broker.config.util.Deploy %1 %2 %3 %4 %5 %6 %7 %parm8% %parm9% %parm10% %parm11% %parm12% %parm13% %parm14% %parm15% %parm16% %parm17% %parm18% %parm19% %parm20%
goto end


And again error comes
Code:
mqsideploy.deploybar:
     [exec] 'mqsifindmqpath' is not recognized as an internal or external command,
     [exec] operable program or batch file.
     [exec] set was unexpected at this time.


I tried opening the mqsisetmqenv.bat and there is a line of code in there and because of that mqsifindmqpath is not recognosed error is coming. The code of mqsisetmqenv is:
Code:
@echo off
SHIFT /0
FOR /f "tokens=*" %%i in ('mqsifindmqpath %* ') do SET MQSI_MQ_DIRECTORY=%%i
set MQSI_MQ_DIRECTORY=%MQSI_MQ_DIRECTORY%##
set MQSI_MQ_DIRECTORY=%MQSI_MQ_DIRECTORY: ##=%
set "MQSI_MQ_SETMQENV_CMD=%MQSI_MQ_DIRECTORY%\bin\setmqenv.cmd"

IF EXIST "%MQSI_MQ_SETMQENV_CMD%" @call "%MQSI_MQ_SETMQENV_CMD%" -s -x %MQSI_PROCESSOR_ARCHITECTURE%

IF %MQSI_PROCESSOR_ARCHITECTURE%==64 set "PATH=%MQ_JAVA_INSTALL_PATH%\lib64;%PATH%"
IF %MQSI_PROCESSOR_ARCHITECTURE%==32 set "PATH=%MQ_JAVA_INSTALL_PATH%\lib;%PATH%"
set CLASSPATH=%MQ_JAVA_INSTALL_PATH%\lib\com.ibm.mq.jar;%MQ_JAVA_INSTALL_PATH%\lib\com.ibm.mqjms.jar;%MQ_JAVA_INSTALL_PATH%\lib\connector.jar;%MQ_JAVA_INSTALL_PATH%\lib\com.ibm.mq.pcf.jar;%MQ_JAVA_INSTALL_PATH%\lib\com.ibm.mq.jmqi.jar;%MQ_JAVA_INSTALL_PATH%\lib\com.ibm.mq.headers.jar;%MQ_JAVA_INSTALL_PATH%\lib\com.ibm.mq.commonservices.jar;%CLASSPATH%


I also tried giving the path of mqsisetmqenv.bat and mqsiprofile.cmd without quotes it results in the error of unrecognised internal or external command

After some time I tried with modified code as
Code:
SHIFT /8
SET parm20=%9

@echo mqsisetmqenv
"C:\Program Files (x86)\IBM\MQSI\9.0.0.3\bin\mqsiprofile.cmd"

"%MQSI_JREPATH%\bin\java" com.ibm.broker.config.util.Deploy %1 %2 %3 %4 %5 %6 %7 %parm8% %parm9% %parm10% %parm11% %parm12% %parm13% %parm14% %parm15% %parm16% %parm17% %parm18% %parm19% %parm20%
goto end


It does not result in any error but still the bar file does not get deployed
Code:

mqsideploy.deploybar:
     [exec] mqsisetmqenv
     [exec]
     [exec] MQSI 9.0.0.3
     [exec] C:\Program Files (x86)\IBM\MQSI\9.0.0.3
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Aug 30, 2017 3:57 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Try running the setmqenv before the mqsiprofile...
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 30, 2017 4:22 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
Try running the setmqenv before the mqsiprofile...

Shouldn't the setmqenv be run as part of the mqsiprofile?
See the part in setting up a command line environment
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Aug 30, 2017 4:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

fjb_saper wrote:
mqjeff wrote:
Try running the setmqenv before the mqsiprofile...

Shouldn't the setmqenv be run as part of the mqsiprofile?


mqjeff wrote:
Unless I"m wrong.

_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 30, 2017 4:44 am    Post subject: Reply with quote

Grand High Poobah

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

AFAIK there is not much sense in running setmqenv with V9 (at least early versions)
What you really have to do is cater for what is being called in the mqsisetmqenv.cmd.
If an environment variable is being used there you better cater for setting it beforehand... That might happen in a batch file called by mqsiprofile...

What I remember is mqsiprofile setting my environment to the version of MQ set in the file called by mqsiprofile depending on the value of the broker release... (because I set up my batchfile to do so)...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Aug 30, 2017 5:24 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Also what I recall using ant was that it was easier to run ant inside a shell that already had the mq env/mqsi env defined in it, rather than trying to do it within the ant file.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
schodipalli1
PostPosted: Tue May 22, 2018 5:36 am    Post subject: mqsideploy error on jenkins from ant script Reply with quote

Newbie

Joined: 22 May 2018
Posts: 3

I am facing the below error while i was deploying using jenkins.

I modified the file mqsideployscript.bat by adding the below commands to the file

@echo mqsisetmqenv.bat
@call "C:\Program Files\IBM\MQSI\9.0.0.1\bin\mqsiprofile.cmd"


mqsideploybar:
[echo] Deploying Broker Archive file: C:\Users\Satish.Chodipalli\IBM\IntegrationToolkit90\workspace\I1357_APP_PAR_CLEARPLAN\I1357_APP_PAR_CLEARPLAN.bar
[exec] Current OS is Windows 7
[exec] Executing 'C:\Program Files\IBM\MQSI\9.0.0.1\bin\mqsideployscript.bat' with arguments:
[exec] 'IB9NODE'
[exec] '-e'
[exec] 'default'
[exec] '-a'
[exec] 'C:\Users\Satish.Chodipalli\IBM\IntegrationToolkit90\workspace\I1357_APP_PAR_CLEARPLAN\I1357_APP_PAR_CLEARPLAN.bar'
[exec]
[exec] The ' characters around the executable and arguments are
[exec] not part of the command.
[exec] mqsisetmqenv.bat
[exec]
[exec] MQSI 9.0.0.1
[exec] C:\Program Files\IBM\MQSI\9.0.0.1
[exec]
[exec] BIP4516S: Failed to find all the required WebSphere MQ java classes. Class 'com.ibm.mq.MQException' not found in CLASSPATH 'C:\Program Files\IBM\MQSI\9.0.0.1\messages;C:\Program Files\IBM\MQSI\9.0.0.1\classes;C:\Program Files\IBM\MQSI\9.0.0.1\classes\ConfigManagerProxy.jar;C:\Program Files\IBM\MQSI\9.0.0.1\classes\brokerutil.jar;C:\ProgramData\Application Data\IBM\MQSI\common\wsrr'.
[exec]
[exec] Not all the WebSphere MQ jars are installed on this machine. Message Broker requires that WebSphere MQ for Java is installed to work correctly.
[exec]
[exec] Make sure that all the correct WebSphere MQ components are installed and that the CLASSPATH correctly contains the WebSphere MQ jar files.
[echo] Completed building Broker Archive file - C:\Users\Satish.Chodipalli\IBM\IntegrationToolkit90\workspace\I1357_APP_PAR_CLEARPLAN\I1357_APP_PAR_CLEARPLAN.bar
[antcall] Exiting E:\I1357_APP_PAR_CLEARPLAN\IIB_build.xml.
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Tue May 22, 2018 6:31 am    Post subject: Re: mqsideploy error on jenkins from ant script Reply with quote

Knight

Joined: 17 Jul 2017
Posts: 516
Location: UK

schodipalli1 wrote:

[exec] Not all the WebSphere MQ jars are installed on this machine. Message Broker requires that WebSphere MQ for Java is installed to work correctly.
[exec]
[exec] Make sure that all the correct WebSphere MQ components are installed and that the CLASSPATH correctly contains the WebSphere MQ jar files.


Isn't it clear from the error that the MQ jars are missing from the classpath? I think the class it is complaining about can be found at <MQ installation path>/java/lib/com.ibm.mq.allclient.jar
Back to top
View user's profile Send private message
schodipalli1
PostPosted: Tue May 22, 2018 7:35 am    Post subject: Reply with quote

Newbie

Joined: 22 May 2018
Posts: 3

Thanks for replying abhi_thri,

But my classpath has that jar file, Still its Throwing same error
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 » mqsideploy error on jenkins from ant script
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.