[midPoint] jdbcUrl not being read from config.xml

Florin. Stingaciu fstingaciu at mirantis.com
Tue Apr 19 23:32:37 CEST 2016


This problem was solved. There was a problem with how mySQL was set up.
Feel free to discard this from the mailing list.

Thanks,
-F

On Tue, Apr 19, 2016 at 1:45 PM, Florin. Stingaciu <fstingaciu at mirantis.com>
wrote:

> Alternatively, I also tired using the guide here
> <https://wiki.evolveum.com/display/midPoint/Repository+Configuration#RepositoryConfiguration-SQLschemascripts>,
> to configure it using datasources. The error with this method is very
> similar:
>
> ERROR (org.springframework.web.context.ContextLoader): Context
>>> initialization failed
>>
>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean with name 'repositoryService' defined in class path resource
>>> [ctx-configuration.xml]: Initialization of bean failed; nested exception is
>>> org.springframework.beans.factory.BeanCreationException: Error creating be
>>
>> an with name 'dataSource' defined in URL
>>> [jar:file:/var/lib/tomcat7/webapps/midpoint/WEB-INF/lib/repo-sql-impl-3.3.1.jar!/ctx-repository-session.xml]:
>>> Instantiation of bean failed; nested exception is
>>> org.springframework.beans.factory.BeanDefinitionStoreException: Factory
>>> method [public
>>
>> javax.sql.DataSource
>>> com.evolveum.midpoint.repo.sql.DataSourceFactory.createDataSource() throws
>>> com.evolveum.midpoint.repo.api.RepositoryServiceFactoryException] threw
>>> exception; nested exception is
>>> com.evolveum.midpoint.repo.api.RepositoryServiceFactoryException: Couldn't
>>> initialize dat
>>
>> asource, reason: Access denied for user 'midpoint'@'100.80.134.132'
>>> (using password: YES)
>>
>>
>
>
> On Tue, Apr 19, 2016 at 12:58 PM, Florin. Stingaciu <
> fstingaciu at mirantis.com> wrote:
>
>> Upon turning on debuging using logback.xml, I find that the jdbcUrl is
>> actually set properly:
>>
>> 2016-04-19 19:54:12,855 [] [localhost-startStop-1] DEBUG
>>> (com.evolveum.midpoint.init.StartupConfiguration):     jdbcUrl =
>>> jdbc:mysql://v-midpdb-001-example.net:3306/midpoint
>>
>> However for some reason, it seems to trying to connect to the localhost
>> (100.80.134.132) instead of jdbcUrl.
>>
>> On Tue, Apr 19, 2016 at 12:27 PM, Florin. Stingaciu <
>> fstingaciu at mirantis.com> wrote:
>>
>>> Hello,
>>>
>>> I'm trying to switch to a mysql DB instead of h2. Here's how my
>>> repository section looks like in config.xml:
>>>
>>>         <repository>
>>>>
>>>>                 <embedded>false</embedded>
>>>>
>>>>
>>>>> <repositoryServiceFactoryClass>com.evolveum.midpoint.repo.sql.SqlRepositoryFactory</repositoryServiceFactoryClass>
>>>>
>>>>                 <driverClassName>com.mysql.jdbc.Driver</driverClassName>
>>>>
>>>>                 <hibernateHbm2ddl>update</hibernateHbm2ddl>-->
>>>>
>>>>
>>>>> <hibernateDialect>org.hibernate.dialect.MySQLDialect</hibernateDialect>
>>>>
>>>>                 <jdbcUsername>midpoint</jdbcUsername>
>>>>
>>>>                 <jdbcPassword>password</jdbcPassword>
>>>>
>>>>                 <jdbcUrl>jdbc:mysql://
>>>>> v-midpdb-001-exmaple.net:3306/midpoint</jdbcUrl>
>>>>
>>>>         </repository>
>>>>
>>>>
>>>  Upon starting tomcat7, I find the following error under idm.log:
>>>
>>> acquisition Attempt Failed!!! Clearing pending acquires. While trying to
>>>> acquire a needed new resource, we failed to succeed more than the maximum
>>>> number of allowed acquisition attempts (30). Last acquisition attempt
>>>> exception:
>>>>
>>>> java.sql.SQLException: Access denied for user 'midpoint'@'100.80.134.132'
>>>> (using password: YES)
>>>>
>>>
>>> The IP address 100.80.134.132 actually maps to the localhost, not
>>> v-midpdb-001-exmaple.net. It seems that jdbcUrl reverts to the default
>>> from the SQL class: jdbc:mysql://localhost/midpoint. Any help would be
>>> greatly appreciated.
>>>
>>> Thanks,
>>> -F
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20160419/3d30ebfc/attachment.htm>


More information about the midPoint mailing list