[midPoint] MySQL configuration for 3.0
Deepak Natarajan
dnataraj at trilobytesystems.com
Tue Aug 26 13:37:56 CEST 2014
Hi Vilo,
Thanks for the reply. I have reverted back to my earlier pre-datasource
configuration to get things running.
I cannot find a sample <context> for Midpoint on the wiki for my Tomcat
configuration. I'm assuming I would add my resource in there?
On the wiki right now, the Resource definition is added as a global
(hence, I assumed, there is no need for a particular application
context), but, as you pointed out if a resource link is needed to this
Global resource definition, then I will need to create a context for
Midpoint in my Tomcat server.xml.
Thanks
BR/Deepak
> Viliam Repan <mailto:vilo.repan at evolveum.com>
> August 26, 2014 at 12:41 PM
> Hi Deepak,
>
> datasource should work, I currently don't have time to test it on my
> computer against MySQL, but configuration looks fine to me.
> From what I can see there is a configuration problem in your
> application server.
>
> Invocation of init method failed; nested exception is
> javax.naming.NameNotFoundException: Name [jdbc/mysql] is not bound in
> this Context. Unable to find [jdbc].
>
> If it is tomcat maybe resource link to this datasource is missing in
> context.xml or something like that...
>
> Best regards,
>
> Vilo
>
>
>
>
> Deepak Natarajan <mailto:dnataraj at trilobytesystems.com>
> August 26, 2014 at 10:39 AM
> Hi -
>
> I have been trying to update my MySQL configuration from 2.3 to fit with
> 3.0 since I noticed that the relevant documentation has changed as well.
>
> Question : Is the MySQL configuration not relying on the new data source
> defined in Tomcat?
>
> https://wiki.evolveum.com/display/midPoint/Repository+Configuration
>
> I have the Resource defined as shown :
>
> <Resource name="jdbc/mysql" 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 id from m_system_configuration"
> poolPreparedStatements="true"/>
>
> And the corresponding configuration in config.xml :
>
> <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>
>
> But this is failing.
>
>
> 014-08-26 08:27:43,408 [RMI TCP Connection(2)-127.0.0.1] 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 bean with name 'sessionFactory' defined in URL
> [jar:file:/Users/dnataraj/dev/midpoint/gui/admin-gui/target/midpoint/WEB-INF/lib/repo-sql-impl-3.0.jar!/ctx-repository-session.xml]:
> Initialization of bean failed; nested exception is
> org.springframework.beans.factory.BeanExpressionException: Expression
> parsing failed; nested exception is
> org.springframework.expression.spel.SpelEvaluationException:
> EL1021E:(pos 14): A problem occurred whilst attempting to access the
> property 'dataSource': 'Unable to access property 'dataSource' through
> getter'
> ... 73 common frames omitted
> Caused by: java.lang.reflect.InvocationTargetException: null
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[na:1.7.0_45]
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> ~[na:1.7.0_45]
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ~[na:1.7.0_45]
> at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_45]
> at
> org.springframework.expression.spel.support.ReflectivePropertyAccessor$OptimalPropertyAccessor.read(ReflectivePropertyAccessor.java:495)
> ~[spring-expression-3.1.0.RELEASE.jar:3.1.0.RELEASE]
> ... 74 common frames omitted
> Caused by: org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'jndiDataSource' defined in URL
> [jar:file:/Users/dnataraj/dev/midpoint/gui/admin-gui/target/midpoint/WEB-INF/lib/repo-sql-impl-3.0.jar!/ctx-repository-session.xml]:
> Invocation of init method failed; nested exception is
> javax.naming.NameNotFoundException: Name [jdbc/mysql] is not bound in
> this Context. Unable to find [jdbc].
>
> However, I see that the MySQL configuration looks different here :
>
> https://wiki.evolveum.com/display/midPoint/MySQL
>
> Which does not use the new DS - and this is what I had earlier and it
> works.
>
--
Deepak Natarajan
Director
Trilobyte Systems ApS
Falkoner Alle 1, 3 Fredrikinkatu 61A, 6th Floor
2000 Frederiksberg Business Center Papula
Denmark 00100 Helsinki
Finland
Tel : +45 29375068
http://www.trilobytesystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20140826/eb6732e4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compose-unknown-contact.jpg
Type: image/jpeg
Size: 770 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20140826/eb6732e4/attachment.jpg>
More information about the midPoint
mailing list