Saturday, September 14, 2013

Clous sql error "System property rdbms.driver must be set"


Hi, every one.

i have problem with cloud sql , i use spring mvc with google app engine 1.8.3 and maven 3.
I want connect to my sql cloud via hibernate / jpa, so I declared a persistent file that contains the cloud sql  connection parameters  :



<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
    <persistence-unit name="test" transaction-type="RESOURCE_LOCAL">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <class>com.demo.test/model</class>
        <properties>        
            <property name="hibernate.connection.driver_class" value="com.google.appengine.api.rdbms.AppEngineDriver"/>
             <property name="hibernate.connection.url" value="jdbc:google:rdbms://myinstan/mydb?zeroDateTimeBehavior=convertToNull"/>
            <property name="hibernate.connection.username" value="root"/>
             <property name="hibernate.connection.password" value=""/>
            <property name="hibernate.connection.pool_size" value="0" />
            <property name="hibernate.hbm2ddl.auto" value="update" />
            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
        </properties>
    </persistence-unit>
</persistence>


for running application i use maven command " appengine-devserver " ,and i have this error " System property rdbms.driver must be set " :

[INFO] ERROR: org.springframework.web.servlet.DispatcherServlet - Context initialization failed
[INFO] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: System property rdbms.driver must be set.
.....................

[INFO] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: System property rdbms.driver must be set.
[INFO]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
..........................
[INFO] Caused by: java.lang.IllegalStateException: System property rdbms.driver must be set.
[INFO]     at com.google.appengine.api.rdbms.dev.LocalRdbmsServiceLocalDriver.registerDriver(LocalRdbmsServiceLocalDriver.java:80)

..............................

INFO] sept. 14, 2013 2:59:13 PM com.google.appengine.tools.development.ApiProxyLocalImpl log
[INFO] SEVERE: javax.servlet.ServletContext log: unavailable
[INFO] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: System property rdbms.driver must be set.



my question is,  I need to configure the cloud sql in the pom.xml ??? or is another thing I do not???


thanks

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/7c0eea35-6954-40c3-b1ca-b80e477cffac%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment