Thursday 14 August 2014

IBM BPM 8.5.0.1 - Booting the Bootstrap

I've seen similar problems before, but wasn't sure whether I'd fully documented one particular issue, related to DB permissions.

So I'm boot-strapping my BPM database, post installation: -

/opt/ibm/WebSphereProfiles/Dmgr01/bin/bootstrapProcessServerData.sh -clusterName AppCluster

which returns: - 

Bootstraping data into cluster AppCluster

WASX7357I: By request, this scripting client is not connected to any server process. Certain configuration and application operations will be available in local mode.

java.lang.Exception: java.lang.reflect.InvocationTargetException

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'handlersMap': Cannot create inner bean 'com.lombardisoftware.server.ejb.persistence.PSDefaultHandler#35a5e1c7' of type [com.lombardisoftware.server.ejb.persistence.PSDefaultHandler] while setting bean property 'sourceMap' with key [TypedStringValue: value [Task], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.lombardisoftware.server.ejb.persistence.PSDefaultHandler#35a5e1c7' defined in class path resource [registry.persistence.xml]: Cannot resolve reference to bean 'dao.task' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dao.task' defined in class path resource [registry.persistence.xml]: Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'message.routingCache' defined in class path resource [registry.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.lombardisoftware.bpd.runtime.engine.message.DefaultMessageRoutingCache]: Constructor threw exception; nested exception is org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select propvalue from lsw_system where propkey=?]; nested exception is com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=DB2USER1;SELECT;DB2USER1.LSW_SYSTEM, DRIVER=4.11.69


 The DB messages lead one straight to root cause.

I'm using a different user - DB2USER1 - to connect from WAS to DB2, rather than the DB2 instance - DB2INST1 - which I'd normally use in lazybones fashion.

Whilst the DB2 instance has ALL rights to the database, this user does NOT.

Solution, give DB2USER1 the appropriate permissions - I chose DBADM - to the BPMDB database: -

db2 connect to BPMDB
db2 grant dbadm on database to user db2user1
db2 terminate


Sorted :-)

Now my bootstrapping works as one would hope .... 

2 comments:

Sam said...

http://www-01.ibm.com/support/docview.wss?uid=swg1JR54970

My migration from BPM 7.5 to 8.5 failed with similar error when a custom jar (BPMInternalProvider.jar) was placed in lib/ext.

[1/19/16 15:45:30:271 CST] 00000001 BootstrapProc I Started bootstrapping of data...
[1/19/16 15:45:36:830 CST] 00000001 Registry E CWLLG2035E: The registry was not initialized. Error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'handlersMap': Cannot create inner bean 'com.lombardisoftware.server.ejb.persistence.PSDefaultHandler#5e0c9964' of type [com.lombardisoftware.server.ejb.persistence.PSDefaultHandler] while setting bean property 'sourceMap' with key [TypedStringValue: value [BpdEvent], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.lombardisoftware.server.ejb.persistence.PSDefaultHandler#5e0c9964' defined in class path resource [registry.persistence.xml]: Cannot resolve reference to bean 'dao.bpdEvent' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dao.bpdEvent' defined in class path resource [registry.persistence.xml]: Instantiation of bean failed; nested exception is java.lang.VerifyError: JVMVRFY012 stack shape inconsistent; class=com/lombardisoftware/client/persistence/common/AbstractPO, method=toXML(Lorg/jdom/Element;)V, pc=11
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'handlersMap': Cannot create inner bean 'com.lombardisoftware.server.ejb.persistence.PSDefaultHandler#5e0c9964' of type [com.lombardisoftware.server.ejb.persistence.PSDefaultHandler] while setting bean property 'sourceMap' with key [TypedStringValue: value [BpdEvent], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.lombardisoftware.server.ejb.persistence.PSDefaultHandler#5e0c9964' defined in class path resource [registry.persistence.xml]: Cannot resolve reference to bean 'dao.bpdEvent' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dao.bpdEvent' defined in class path resource [registry.persistence.xml]: Instantiation of bean failed; nested exception is java.lang.VerifyError: JVMVRFY012 stack shape inconsistent; class=com/lombardisoftware/client/persistence/common/AbstractPO, method=toXML(Lorg/jdom/Element;)V, pc=11
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)

Dave Hay said...

Hi Sam

Useful feedback, thanks for letting us know.

Cheers, Dave

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...