[midPoint] Error creating bean with name 'keyStoreFactory'

Pavol Mederly pavol.mederly at evolveum.com
Thu Aug 18 17:39:08 CEST 2016


Hello Matt, 

it seems to me that the real reason of the problem is written in the log just a few lines under the text you've posted. Please, could you send here the whole exception stack trace? 

As for your question: No, it is generally not needed to put the database name into data source name: the data source name can be anything that you consider descriptive enough. What is needed, though, is that the data source should be correctly defined in your application server configuration. (Of course, also with the database name.) 

But using data source is something I would call "advanced use". If you're not familiar with Tomcat data source configuration, I would suggest more straightforward way: configure DB connection directly in midPoint config.xml, like this: 

< configuration > 
< midpoint > 
< repository > 
< repositoryServiceFactoryClass >com.evolveum.midpoint.repo.sql.SqlRepositoryFactory</ repositoryServiceFactoryClass > 
< database >mysql</ database > 
< jdbcUsername >midpoint</ jdbcUsername > 
< jdbcPassword >password</ jdbcPassword > 
< jdbcUrl >jdbc:mysql://localhost:3306/midpoint?characterEncoding=utf8</ jdbcUrl > 
</ repository > 
</ midpoint > 
</ configuration > 

Here the database name is "midpoint", and is a part of jdbcUrl. 

You could also check https://wiki.evolveum.com/display/midPoint/MySQL , but beware; this page is quite old and probably needs a little update. 

Hope this helps, 
Pavol 

----- Original Message -----

From: "Matt Mencel" <mr-mencel at wiu.edu> 
To: midpoint at lists.evolveum.com 
Sent: Thursday, August 18, 2016 5:12:11 PM 
Subject: [midPoint] Error creating bean with name 'keyStoreFactory' 

I'm trying to setup Midpoint with a MySQL db. I think I have all the configs right, but I'm getting this error when Tomcat starts. 



2016-08-17 23:41:15,829 [] [localhost-startStop-1] INFO (com.evolveum.midpoint.init.StartupConfiguration): Loading midPoint configuration from 
file /opt/midpoint/config.xml 
2016-08-17 23:41:16,165 [] [localhost-startStop-1] WARN (org.springframework.web.context.support.XmlWebApplicationContext): Exception encounte 
red during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean w 
ith name 'keyStoreFactory' defined in class path resource [ctx-configuration.xml]: Invocation of init method failed; nested exception is java. 
lang.NullPointerException 
2016-08-17 23:41:16,184 [] [localhost-startStop-1] ERROR (org.springframework.web.context.ContextLoader): Context initialization failed 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'keyStoreFactory' defined in class path resource [ctx-c 
onfiguration.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java 
:1578) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 




etc... 

Here is my config.xml 


<blockquote>
<configuration> 
<midpoint> 
<repository> 
<repositoryServiceFactoryClass>com.evolveum.midpoint.repo.sql.SqlRepositoryFactory</repositoryServiceFactoryClass> 
<embedded>false</embedded> 
<hibernateDialect>com.evolveum.midpoint.repo.sql.util.MidPointMySQLDialect</hibernateDialect> 
<hibernateHbm2ddl>validate</hibernateHbm2ddl> 
<dataSource>java:comp/env/jdbc/mysql</dataSource> 
</repository> 
</midpoint> 
</configuration> 
</blockquote>


Does the dataSource need to have the database name in it? In my case I named the DB 'midpoint'. 

Thanks, 
Matt 

_______________________________________________ 
midPoint mailing list 
midPoint at lists.evolveum.com 
http://lists.evolveum.com/mailman/listinfo/midpoint 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20160818/c9f17990/attachment.htm>


More information about the midPoint mailing list