How to set JMSXUserID in Websphere MQ using Spring JMS

Every time I work with MQ and Spring JMS I want to poke my eyes out with a dull instrument. It’s always a pain in the neck. My most recent challenge was trying to get the JMSXUserID field to flow through to the application on the other side of MQ. First, I created a MessagePostProcessor to add the JMS header public class MyMessagePostProcessor implements MessagePostProcessor { private String userId; @Override public Message postProcessMessage(Message msg) throws JMSException { msg. [Read More]

Can not execute Sonar: Missing column: period in ALERTS

I recently encountered the following error in Sonar 3.5 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project smartfx: Can not execute Sonar: Missing column:period in DB.ALERTS -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project myproject: Can not execute Sonar at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java: 203) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java: 148) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java: 140) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) A quick check of the database revealed that the ALERTS table does indeed contain a column named ‘period’. [Read More]
Sonar 

SonarException: The project is already been analysing.

I was getting this error when running a Sonar analysis recently.

This was caused by the Jenkins/Sonar process getting killed while the project analysis is underway. Sonar now uses a database semaphore to prevent multiple builds running at the same time, but if the job gets terminated then the semaphores don’t get cleaned up.

To fix the problem: Log into the database and delete any rows in the ‘semaphores’ table.

Sonar 

Maven Release from Jenkins

I encountered this error while setting up a Jenkins job to automate our Maven release process. [INFO] EXECUTING: cmd.exe /X /C "hg commit --message "[maven-release-plugin] prepare for next development iteration" c:\jenkins\jobs\Release\workspace\pom.xml" [DEBUG] abort: C:\Jenkins\jobs\Release\workspace\pom.xml not under root [ERROR] EXECUTION FAILED Execution of cmd : commit failed with exit code: -1. Working directory was: c:\jenkins\jobs\Release\workspace Your Hg installation seems to be valid and complete. Hg version: 2.0 (OK) Our Jenkins box runs on Windows. [Read More]