Database user permissions required for configuring BRMS 5.3.x with DB2

Solution Unverified - Updated -

Issue

  • Configuring BRMS 5.x with DB2 database works fine while using schema credentials (i.e. the database user would have the schema level permissions in the database). Is there a way to use a database user for the same BRMS configuration who does not have schema credentials? Many times it is required that the database user's credentials used for configuring BRMS should not have all the privileges as the schema user, e.g. the database user can perform the DML operations but can't execute the DDLs.
  • Is there any specific user permissions required for configuring BRMS 5 with DB2 ?
  • Is it really required for the BRMS user in the database to always retain DBA or resource privileges all the time?
  • While trying out with a database schema user the BRMS 5 server starts fine and during operations like jBPM5 process instance state persistence it works fine. However, the exceptions like SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=SCHEMATWO.SESSIONINFO, DRIVER=3.67.26 and the following exception is thrown when the database configuration is attempted with a user who does not have a schema permission but instead the user has rights to write/query to/from the database tables.
...
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not insert: [org.drools.persistence.info.SessionInfo]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1235)
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1168)
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1174)
    at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:674)
    at org.drools.persistence.jpa.JpaPersistenceContext.persist(JpaPersistenceContext.java:24)
    at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:153)
    ... 8 more
Caused by: org.hibernate.exception.SQLGrammarException: could not insert: [org.drools.persistence.info.SessionInfo]
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:64)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2329)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2836)
    at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:268)
    at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:321)
    at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
    at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
    at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:69)
    at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:179)
    at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:135)
    at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:61)
    at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:800)
    at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:774)
    at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:778)
    at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:668)
    ... 10 more

Environment

  • Red Hat JBoss BRMS (BRMS)
    • 5.3.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content