使用 Google Cloud SQL 的 Maven GAE 插件
早上好,
我正在尝试本地测试我的网络应用程序,该应用程序使用:
- Spring(核心+ MVC)
- Google AppEngine
- Google Cloud SQL
- Hibernate
在此页面 https://developers.google.com/cloud-sql/docs/developers_guide_java Google 解释了如何让 hello world 运行,没错。 我部署到 AppEngine 没有任何问题。
下一个需要是使用本地标准 mysql 实例在本地系统上进行测试,该文档将在解释中继续。您可以通过命令行或 Google Eclipse 插件提供本地访问凭据。
但我使用 Maven GAE 插件 http://www.kindleit.net/maven_gae_plugin/ 并且简单mvn gae:run
最终出现以下错误:
Cannot resolve reference to bean 'mySessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: System property rdbms.driver must be set.:
java.lang.IllegalStateException: System property rdbms.driver must be set.
at com.google.appengine.api.rdbms.dev.LocalRdbmsServiceLocalDriver.registerDriver(LocalRdbmsServiceLocalDriver.java:80)
这是一个非常具有描述性的错误,所以我拼命尝试:
mvn gae:run -Drdbms.server=local -Drdbms.driver=com.mysql.jdbc.Driver -Drdbms.url=jdbc:mysql://localhost:3306/prova?user=root&password=pass
...没有结果! :-(
救命!哦
Good morning,
I am trying to local test my web application, which makes use of:
- Spring (core + MVC)
- Google AppEngine
- Google Cloud SQL
- Hibernate
In this page https://developers.google.com/cloud-sql/docs/developers_guide_java Google explains how to make the hello world run, and that's right.
I deploy to AppEngine with no problems.
The next need is testing on the local system, with a local standard mysql instance and that document goes ahead in the explanation. You can give your local access credentials by command-line or by Google Eclipse Plugin.
But I am using the Maven GAE Plugin http://www.kindleit.net/maven_gae_plugin/ and simple mvn gae:run
ends up with this error:
Cannot resolve reference to bean 'mySessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: System property rdbms.driver must be set.:
java.lang.IllegalStateException: System property rdbms.driver must be set.
at com.google.appengine.api.rdbms.dev.LocalRdbmsServiceLocalDriver.registerDriver(LocalRdbmsServiceLocalDriver.java:80)
That's a pretty descriptive error, so I desperately tried:
mvn gae:run -Drdbms.server=local -Drdbms.driver=com.mysql.jdbc.Driver -Drdbms.url=jdbc:mysql://localhost:3306/prova?user=root&password=pass
... with no result! :-(
Help! O.O
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用插件的jvmFlags解决
Solved using plugin's jvmFlags