JBPM – setRollbackOnly was invoked while configuration specifies user managed transactions.

The problem

you get the exception ‘setRollbackOnly was invoked while configuration specifies user managed transactions.’ When trying to close the JbpmContext because you called jbpmContext.setRollbackOnly()


As the error message says, this error comes up when you have configured user managed transactions but you invoke setRollbackOnly.

User managed transaction configuration –

<service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory"/>

As per the JBPM documentation here

Grails, Hibernate Event Listeners and ArrayStoreException

The Problem

Trying to register few Hibernate event listeners from plugin, But some how, registering the custom event listeners causes ArrayStoreException at runtime.

In plugin class

 def doWithSpring = {
	hibernateEventListeners(HibernateEventListeners) {
		listenerMap = ['save':sanitizeHtmlListner]

Listener class

class SanitizeHtmlListner implements SaveOrUpdateEventListener {


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization o
f bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with nam
e 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto
ry': Invocation of init method failed; nested exception is java.lang.ArrayStoreException
        at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:391)
        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
        at gant.Gant.withBuildListeners(Gant.groovy:427)
        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
        at gant.Gant.dispatch(Gant.groovy:415)
        at gant.Gant.this$2$dispatch(Gant.groovy)
        at gant.Gant.invokeMethod(Gant.groovy)
        at gant.Gant.executeTargets(Gant.groovy:590)
        at gant.Gant.executeTargets(Gant.groovy:589)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initi
alization of bean failed; nested exception is


No solution is known,

This is a bug in Grails, which will not let you register SaveAndUpdateListener,  and if you do, you get this error. if you try with pre-insert, pre-update listeners it should work. I don’t know what other listeners are affected.

Reported http://jira.grails.org/browse/GRAILS-7576



Vote for google app engine Maven plugin

Yes, Just like you, I am also looking for maven support in GAE.

There is an unofficial GAE maven plugin here. But  It would be great if google release an official maven plugin and publish artifacts to central maven repository.

Vote here if you are looking for maven support in GAE


Update: Finally My trick did the work. I posted link to this issue on mailing lists and blogs related to Java/app engine on January 7.  Since then more than 100 people have voted for the issue.  And the issue is now accepted by google.

Now we can hope for a official appengine maven plugin in near future.

Update 27-DEC-2010

Congratulations !
I just noticed that the issue has been fixed. App Engine 1.3.7 is now in Maven central and future versions will be pushed to central after each release.

See the link for How to use Maven with google plugin for eclipse.

Javascript CSV parser

var expr = /,(?=(?:[^\"]*\”[^\"]*\”)*(?![^\"]*\”))/g;
var array = str.split(expr);

it works for me

function parseLineCSV(lineCSV) {
// parse csv line by line into array
var CSV = new Array();

// Insert space before character ",". This is to anticipate 'split' in IE
// try this:
// var a=",,,a,,b,,c,,,,d";
// a=a.split(/\,/g);
// document.write(a.length);
// You will see unexpected result!
lineCSV = lineCSV.replace(/,/g," ,");

lineCSV = lineCSV.split(/,/g);

// This is continuing of 'split' issue in IE
// remove all trailing space in each field
for (var i=0;i
<lineCSV.length;i++) {
lineCSV[i] = lineCSV[i].replace(/\s*$/g,"");

var fstart = -1;

for (var i=0;i=0) {
for (var j=fstart+1;j<=i;j++) {
fstart = (lineCSV[i].match(/^"/)) ? i : fstart;

var j=0;

for (var i=0;i
<lineCSV.length;i++) {
if (lineCSV[i]!="-DELETED-") {
CSV[j] = lineCSV[i];
CSV[j] = CSV[j].replace(/^\s*|\s*$/g,""); // remove leading & trailing space
CSV[j] = CSV[j].replace(/^"|"$/g,""); // remove " on the beginning and end
CSV[j] = CSV[j].replace(/""/g,'"'); // replace "" with "

return CSV;

It works for me, I got it from here http://purbayubudi.wordpress.com/2008/11/09/csv-parser-using-javascript/

Could not perform XSLT transformation. Make sure PHP has been compiled/configured to support XSLT.

Error when running symfony on wamp server.

Description:   I was trying to run the symfony PHP framework. I tried to build the model using command
php symfony propel:build-model.

And it gave error Could not perform XSLT transformation. Make sure PHP has been compiled/configured to support XSLT.

Environment: Wamp server 2.0, PHP 5.2.5, Apache 2.2.6.

Reason: PHP-XSL extension is not enabled. By default, Wamp server doesnt enable php-xsl php extension. and php-xsl is required.

Solution: Enable php-xsl extension.

left click on WAMP’s tray icon and than in PHP>PHP extensions select php-xsl and enable it.But there is one more php.ini file, which WAMP won’t change, we need to do it by hand, open: C:\wamp\bin\php\php5.2.5\php.ini and remove “;” from the line


And then restart the server. Try to run the build command again.

Some useful links to get symfony running properly on wamp.



What this blog is about?

You may be wondering what this blog is about !!.

This blog is about the errors, problems, configuration issues that I faced when doing my job of a Java programmer.

Here I write about the problems which casued me to open the google and seach atleast for an hour, ask questions on forums, post questions in mailing lists, or take whatever the alternatives are to solve the problem. When the problem is solved finally, I write the solution here so that it can save the time of others.