Running JUnit test cases from Jenkins or Maven for WebSphere MQ causes 2495 error
I was trying to run JUnit test cases using Maven and from jenkins and I was continuously getting the following error -
A WebSphere MQ Error occured : Completion Code 2 Reason Code 2495
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.477 sec
Make sure that the library path has the 32 or 64 bit depending on your configuration in the path i.e. -
export LD_LIBRARY_PATH=/opt/mqm/java/lib/:$LD_LIBRARY_PATH
Creating users for apache-tomcat
conf/tomcat-users.xml contains the users. To create a manager user to manage tomcat add the following details -
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="s3cret" roles="manager-gui,manager-script"/>
This will create the user tomcat with password s3cret.
Running a Maven project in eclipse gives error
If you encounter the following error while trying to run a Maven project in Eclipse -
"-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match."
Here's the solution to that -
Thanks to Stackoverflow for this - http://stackoverflow.com/questions/29330577/maven-3-3-1-eclipse-dmaven-multimoduleprojectdirectory-system-propery-is-not-s
I was trying to run JUnit test cases using Maven and from jenkins and I was continuously getting the following error -
A WebSphere MQ Error occured : Completion Code 2 Reason Code 2495
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.477 sec
Make sure that the library path has the 32 or 64 bit depending on your configuration in the path i.e. -
export LD_LIBRARY_PATH=/opt/mqm/java/lib/:$LD_LIBRARY_PATH
Creating users for apache-tomcat
conf/tomcat-users.xml contains the users. To create a manager user to manage tomcat add the following details -
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="s3cret" roles="manager-gui,manager-script"/>
This will create the user tomcat with password s3cret.
Running a Maven project in eclipse gives error
If you encounter the following error while trying to run a Maven project in Eclipse -
"-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match."
Here's the solution to that -
In
Eclipse
you need to go like this.Window-> Preference -> Java -> Installed JREs -> Edit
In the edit
Default VM arguments
you need to put
If you already set the maven home.
-Dmaven.multiModuleProjectDirectory=$M2_HOMEThanks to Stackoverflow for this - http://stackoverflow.com/questions/29330577/maven-3-3-1-eclipse-dmaven-multimoduleprojectdirectory-system-propery-is-not-s
No comments:
Post a Comment