<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Hello Matt,<br></div><div><br></div><div>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?<br></div><div><br></div><div>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.)<br></div><div><br></div><div>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:<br></div><div><br></div><div><div class="container" title="Hint: double-click to select code"><div class="line number1 index0 alt2"><span style="font-size: medium;"><code class="html plain"><</code><code class="html keyword">configuration</code><code class="html plain">></code></span></div><div class="line number2 index1 alt1"><span style="font-size: medium;"><code class="html spaces">  </code><code class="html plain"><</code><code class="html keyword">midpoint</code><code class="html plain">></code></span></div><div class="line number3 index2 alt2"><span style="font-size: medium;"><code class="html spaces">    </code><code class="html plain"><</code><code class="html keyword">repository</code><code class="html plain">></code></span></div><div class="line number4 index3 alt1"><span style="font-size: medium;"><code class="html spaces">      </code><code class="html plain"><</code><code class="html keyword">repositoryServiceFactoryClass</code><code class="html plain">>com.evolveum.midpoint.repo.sql.SqlRepositoryFactory</</code><code class="html keyword">repositoryServiceFactoryClass</code><code class="html plain">></code></span></div><div class="line number5 index4 alt2"><span style="font-size: medium;"><code class="html spaces">      </code><code class="html plain"><</code><code class="html keyword">database</code><code class="html plain">>mysql</</code><code class="html keyword">database</code><code class="html plain">></code></span></div><div class="line number6 index5 alt1"><span style="font-size: medium;"><code class="html spaces">      </code><code class="html plain"><</code><code class="html keyword">jdbcUsername</code><code class="html plain">>midpoint</</code><code class="html keyword">jdbcUsername</code><code class="html plain">></code></span></div><div class="line number7 index6 alt2"><span style="font-size: medium;"><code class="html spaces">      </code><code class="html plain"><</code><code class="html keyword">jdbcPassword</code><code class="html plain">>password</</code><code class="html keyword">jdbcPassword</code><code class="html plain">></code></span></div><div class="line number8 index7 alt1"><span style="font-size: medium;"><code class="html spaces">      </code><code class="html plain"><</code><code class="html keyword">jdbcUrl</code><code class="html plain">>jdbc:mysql://localhost:3306/midpoint?characterEncoding=utf8</</code><code class="html keyword">jdbcUrl</code><code class="html plain">></code></span></div><div class="line number9 index8 alt2"><span style="font-size: medium;"><code class="html spaces">    </code><code class="html plain"></</code><code class="html keyword">repository</code><code class="html plain">></code></span></div><div class="line number10 index9 alt1"><span style="font-size: medium;"><code class="html spaces">  </code><code class="html plain"></</code><code class="html keyword">midpoint</code><code class="html plain">></code></span></div><div class="line number11 index10 alt2"><span style="font-size: medium;"><code class="html plain"></</code><code class="html keyword">configuration</code><code class="html plain">></code></span></div><div class="line number11 index10 alt2"><br></div><div class="line number11 index10 alt2">Here the database name is "midpoint", and is a part of jdbcUrl.<br></div><div class="line number11 index10 alt2"><br></div><div class="line number11 index10 alt2">You could also check <a href="https://wiki.evolveum.com/display/midPoint/MySQL">https://wiki.evolveum.com/display/midPoint/MySQL</a>, but beware; this page is quite old and probably needs a little update.<br></div><div class="line number11 index10 alt2"><br></div></div></div><div>Hope this helps,<br></div><div>Pavol<br></div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Matt Mencel" <mr-mencel@wiu.edu><br><b>To: </b>midpoint@lists.evolveum.com<br><b>Sent: </b>Thursday, August 18, 2016 5:12:11 PM<br><b>Subject: </b>[midPoint] Error creating bean with name 'keyStoreFactory'<br><div><br></div><div dir="ltr">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.<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" data-mce-style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;"><span style="font-family:monospace,monospace" data-mce-style="font-family: monospace,monospace;">2016-08-17 23:41:15,829 [] [localhost-startStop-1] INFO (com.evolveum.midpoint.init.StartupConfiguration): Loading midPoint configuration from<br></span><span style="font-family:monospace,monospace" data-mce-style="font-family: monospace,monospace;"> file /opt/midpoint/config.xml<br></span><span style="font-family:monospace,monospace" data-mce-style="font-family: monospace,monospace;">2016-08-17 23:41:16,165 [] [localhost-startStop-1] WARN (org.springframework.web.context.support.XmlWebApplicationContext): Exception encounte<br></span><span style="font-family:monospace,monospace" data-mce-style="font-family: monospace,monospace;">red during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean w<br></span><span style="font-family:monospace,monospace" data-mce-style="font-family: monospace,monospace;">ith name 'keyStoreFactory' defined in class path resource [ctx-configuration.xml]: Invocation of init method failed; nested exception is java.<br></span><span style="font-family:monospace,monospace" data-mce-style="font-family: monospace,monospace;">lang.NullPointerException<br></span><span style="font-family:monospace,monospace" data-mce-style="font-family: monospace,monospace;">2016-08-17 23:41:16,184 [] [localhost-startStop-1] ERROR (org.springframework.web.context.ContextLoader): Context initialization failed<br></span><span style="font-family:monospace,monospace" data-mce-style="font-family: monospace,monospace;">org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'keyStoreFactory' defined in class path resource [ctx-c<br></span><span style="font-family:monospace,monospace" data-mce-style="font-family: monospace,monospace;">onfiguration.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException<br></span><span style="font-family:monospace,monospace" data-mce-style="font-family: monospace,monospace;">        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java<br></span><span style="font-family: monospace,monospace;" data-mce-style="font-family: monospace,monospace;" face="monospace, monospace">:1578) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]</span></blockquote><div><br></div><div><br></div><div>etc...</div><div><br></div><div>Here is my config.xml</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" data-mce-style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;"><configuration><br>    <midpoint><br>        <repository><br>            <repositoryServiceFactoryClass>com.evolveum.midpoint.repo.sql.SqlRepositoryFactory</repositoryServiceFactoryClass><br>            <embedded>false</embedded><br>            <hibernateDialect>com.evolveum.midpoint.repo.sql.util.MidPointMySQLDialect</hibernateDialect><br>            <hibernateHbm2ddl>validate</hibernateHbm2ddl><br>            <dataSource>java:comp/env/jdbc/mysql</dataSource><br>        </repository><br>    </midpoint><br></configuration></blockquote></div><div><br></div><div>Does the dataSource need to have the database name in it?  In my case I named the DB 'midpoint'.</div><div><br></div><div>Thanks,</div><div>Matt</div></div><br>_______________________________________________<br>midPoint mailing list<br>midPoint@lists.evolveum.com<br>http://lists.evolveum.com/mailman/listinfo/midpoint<br></div><div><br></div></div></body></html>