Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8263037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:57:43+00:00 2026-06-08T03:57:43+00:00

All, I’m trying to configure Google App Engine to work with my local MySQL

  • 0

All,
I’m trying to configure Google App Engine to work with my local MySQL database instance and JPA using Hibernate.
After setup I had a socket issue that I realized is discussed before (http://stackoverflow.com/questions/10585140/gae-cloudsql-with-mysql-access-denied) so I followed the instructions and tried to resolve my issue. however for some reason eclipse is doing something annoying and wipes out my changes made to persistence.xml file as it’s instructed in the mentioned post.

To test this I installed a fresh Eclipse (Juno) and loaded the google plugin.
I create a test application
I add JPA to is and set it up to use hibernate.
I google app property I make sure it’s using local mysql

So far so good. When I look at the generated persistence.xml I see this:

<?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="transactions-optional" transaction-type="RESOURCE_LOCAL">
    <provider></provider>
        <properties>
            <property name="datanucleus.NontransactionalRead" value="true"/>
            <property name="datanucleus.NontransactionalWrite" value="true"/>
            <property name="datanucleus.ConnectionURL" value="appengine"/>
            <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
            <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/shelem?user=root&amp;password=gandom"/>
            <property name="javax.persistence.jdbc.user" value="root"/>
            <property name="javax.persistence.jdbc.password" value="gandom"/>
        </properties>
    </persistence-unit>
</persistence>

As you can see the provider is set to nothing (wrong) and URL and Driver attributes are also wrong (as per mentioned post).
If I run the application as is I’ll get the socket error exception mentioned in the above post so I manually change the persistence.xml file to look like this (as per above post):

<?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="transactions-optional" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <properties>
            <property name="datanucleus.NontransactionalRead" value="true"/>
            <property name="datanucleus.NontransactionalWrite" value="true"/>
            <property name="datanucleus.ConnectionURL" value="appengine"/>
            <property name="javax.persistence.jdbc.driver" value="com.google.appengine.api.rdbms.AppEngineDriver"/>
            <property name="javax.persistence.jdbc.url" value="jdbc:google:rdbms://localhost/Guardian"/>
            <property name="javax.persistence.jdbc.user" value="root"/>
            <property name="javax.persistence.jdbc.password" value="gandom"/>
        </properties>
    </persistence-unit>
</persistence>

Then the crazy thing happens! As soon as I do this and I clean/build the application so I can start it Eclipse wipes out my changes and turn the persistence.xml file to look like what it was before my manually made changes and …..
Interestingly if I add comments or change anything else those changes are kept and are not lost so it seems for some reason eclipse only replaces the code that was suggested to fix my issues!!!

It’s been driving me crazy, anyone has seen this? Any suggestions?

Thanks for your comments.

Amir

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:57:45+00:00Added an answer on June 8, 2026 at 3:57 am

    It seems at least with version 1.7 of the app engine you can not use anything but EclipseLink as the persistence provider. Using EL is not a major concern as regardless of what is used to access your local database Google uses its own provider on the app engine server farms.

    That said it’s maybe even for the best to use EclipseLink for local development as well since any persistence provider specific logic you may embed in your code that is not compatible with google’s provider would eventually come back and break your code after deployment so safer approach is to use EclipesLink on local.

    Hope this helps others so they don’t waste time as I did.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I'm inserting some text from a textarea in a mySQL database. I'm using
All, If I've go the following database fields/values: user_id field_name field_value 1 EventHour1 1
all. We're trying to get some intersect collisions working, but the problem experience is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
All, I am building a small site using PHP. In the site, I receive
All, I am trying to create a table to receive user inputs (UGC). This
All, I'm using wordpress with this and for some reason the eventDrop stopped working.
All, I'm using Facebook Connect (JS SDK) to authenticate a user to my site.
We're building an app, our first using Rails 3, and we're having to build
all, I am trying to multiply a matrix to a vector in OpenGL, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.