cancel
Showing results for 
Search instead for 
Did you mean: 

ProcessEngineConfiguration gtSessionFactories retun null

harishashim
Champ in-the-making
Champ in-the-making
From this thread https://forums.activiti.org/content/use-own-usergroup-tables

Second post by falko.menge


ProcessEngineConfiguration processEngineConfiguration = new ProcessEngineConfiguration();
Map<Class< ? >, SessionFactory> sessionFactories = processEngineConfiguration.getSessionFactories();
sessionFactories.put(IdentitySession.class, new MyIdentitySessionFactory());
ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();


I am getting null for sessionFactories.

In that case can I just create a new sessionFactories and put my custom user and group in that new sessionFactories?

Asking this because I did just that and get error saying

"No session factory configured for org.activiti.engine.imp.db.DbSqlSession"

Sounds like since I am creating a new sessionFactories I need to put DbSqlSession inside it too. But all the code I see did not show how to do this.

So can be that there is no need to put DbSqlSession but I am doing something wrong. For instance all the example I see in this forums show that getSessionFactories does not return null.

Any suggestion is appreciated!
1 REPLY 1

harishashim
Champ in-the-making
Champ in-the-making
Solve getting null for sessionFactories.

I am following code as in this post https://forums.activiti.org/comment/1246#comment-1246

What I did that cause me to get null sesstionFactories is this

<java>
@Override
public ProcessEngine getObject() throws Exception {
  //code that getSessionFactories which return null sessionFactories
  return Objecsuper.getObject();
}
</java>

And what fix it is this


<java>
@Override
public ProcessEngine getObject() throws Exception { 
  ProcessEngine processEngineObject = super.getObject();
  //codes that getSessionFactories that is not null from processEngineObject
  return processEngineObject;
}
</java>

Ha! should have think of this earlier Smiley Very Happy.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.