[midPoint] MySQL configuration for 3.0

Ivan Noris ivan.noris at evolveum.com
Tue Aug 26 19:25:33 CEST 2014


Hi Deepak,

I'm still trying to replicate your problem (now I've replicated the very
first), but my configuration of Tomcat is slightly different, so it may
take some time. I will reply back anyway.

Regards,
Ivan

On 08/26/2014 05:49 PM, Deepak Natarajan wrote:
> Hi Ivan -
>
> I'm sorry, in my reply I pasted from the wiki, to make my point (i.e I
> am using the configuration as described).
>
> The one in my file is (and which is working correctly now that I added
> in the additional fields of username, password, url and driverclass:
>
>         <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/midpointDS</dataSource>
>             <jdbcUrl>jdbc:mysql://localhost:3306/midpoint</jdbcUrl>
>             <driverClassName>com.mysql.jdbc.Driver</driverClassName>
>             <jdbcUsername>x</jdbcUsername>
>             <jdbcPassword>x</jdbcPassword>
>             <!-- <asServer>true</asServer> -->
>             <!--
>             <baseDir>${midpoint.home}</baseDir>
>             -->
>         </repository>
>
> So yes, it is the same DS as I have configured in my Tomcat instance :
>
>   <GlobalNamingResources>
>     <!-- Editable user database that can also be used by
>          UserDatabaseRealm to authenticate users
>     -->
>     <Resource name="UserDatabase" auth="Container"
>               type="org.apache.catalina.UserDatabase"
>               description="User database that can be updated and saved"
>               factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>               pathname="conf/tomcat-users.xml" />
>
>     <Resource name="jdbc/midpointDS" auth="Container"
> type="javax.sql.DataSource"
>         username="x" password="x"
>         url="jdbc:mysql://localhost:3306/midpoint"
>         driverClassName="com.mysql.jdbc.Driver"
>         accessToUnderlyingConnectionAllowed="true"
>         initialSize="5" maxWait="5000"
>         maxActive="30" maxIdle="5"
>         validationQuery="select 1"
>         poolPreparedStatements="true"/>
>
>   </GlobalNamingResources>
>
> which is the same in the context.xml
>
> -deepak
>
> Ivan Noris wrote:
>> Hi Deepak,
>>
>> it seems you are referencing bad datasource.
>>
>> Shouldn't it be "jdbc/mysql" based on your configuration pasted earlier
>> in this thread?
>> Anyway it must be the same as in the datasource configuration in Tomcat.
>>
>> Regards,
>> Ivan
>>
>> On 08/26/2014 05:07 PM, Deepak Natarajan wrote:
>>> Argh - I should have noticed this, sorry. Didn't spot this change in
>>> Vilo's email. This got rid of that error - however, I subsequently get
>>> these :
>>>
>>> Caused by: com.evolveum.midpoint.util.exception.SystemException: JDBC
>>> driver must be specified (either explicitly or in SQL repository
>>> configuration)
>>>
>>> Caused by: com.evolveum.midpoint.util.exception.SystemException: JDBC
>>> URL must be specified (either explicitly or in SQL repository
>>> configuration).
>>>
>>> Caused by: com.evolveum.midpoint.util.exception.SystemException: JDBC
>>> user name must be specified (either explicitly or in SQL repository
>>> configuration).
>>>
>>> So the configuration prescribed here :
>>>
>>> <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>
>>>
>>> does not work, I had to pretty much add in the rest of it (essentially
>>> what I had before moving to the DS configuration -
>>> https://wiki.evolveum.com/display/midPoint/MySQL). So I'm not sure if
>>> the DS is really being used, if you know what I mean...?
>>>
>>> Thanks
>>> -deepak
>>>
>>>
>>>
>>> _______________________________________________
>>> midPoint mailing list
>>> midPoint at lists.evolveum.com
>>> http://lists.evolveum.com/mailman/listinfo/midpoint

-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer
  evolveum.com
  ___________________________________________
           "Idem per idem - semper idem Vix."




More information about the midPoint mailing list