How to Use JDO with Google App Engine Modules Java - google-app-engine

I'm trying to use JDO for datastore, in GAE Java modules app.
I have created two dynamic web projects with GAE runtime. Created an EAR project, add the two dynamic web projects to EAR.
Then tried "run on server".
I got the following error.
org.datanucleus.exceptions.ClassNotPersistableException: The class "MyBeanClass" is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data/annotations for the class are not found.
I tried enabling the JPA facet also.
please help.
Thanks.

I solved the problem after lot of trail and errors.
I just wanted to post the solution so that it might help others.
Creating a Dynamic Web Project and enabling JPA didn't work for me.
I created a Dynamic web project, while creating selected, Google App engine with JPA. It solved the problem.
Thanks..!!

Related

Deploying a polymer project to app engine/java standard of flex environments

I'm looking for instructions similar to these (python) on how to deploy a polymer project to app engine that uses java standard or, preferably, flexible environment. I don't fully understand how a polymer project can be integrated with Jetty. Any help would be greatly appreciated.
It seems that the key here is to integrate static content into my application. There is even no need to add web.xml:
If you do not specify a web.xml, a default is used that maps
everything to the default servlet.
The article even talks about alternatives to serving directly from the application to reduce the costs.

How can i manage environment specific properties with google cloud appEngine springboot project?

Documentation says that Google RuntimeConfig Service is one way to do so but I couldn't find any sample around it. Has anybody ever tried that? Any pointer would be of great help.
I setup another service using 'spring-cloud-config-server' dependency and then using 'spring-cloud-starter-config' in this gcp appengine project to manage configurations for different environment.

DataNucleus JDO with Google Cloud Tools for Eclipse

I am using the relatively new Google Cloud Tools Plugin for Eclipse, replacing the Google Plugin for Eclipse. I have converted my App Engine project to the environment of the new plugin, but now the app stopped working.
I get the following error when requesting a servlet that uses a Google DataStore entry:
javax.jdo.JDOUserException: Persistent class \"Class
CLASSNAME does not seem to have been enhanced. You may want to rerun
the enhancer and check for errors in the output.\" has no table in the
database, but the operation requires it. Please check the specification
of the MetaData for this class.
The GPE (Google Plugin Eclipse) had some options for this: https://developers.google.com/eclipse/docs/appengine_orm and https://developers.google.com/eclipse/docs/appengine_datanucleus.
Unfortunately there are no settings for this in the new plugin. I tried to add the DataNucleus Plugin for Eclipse, but then I get the error: Error: Could not find or load main class org.datanucleus.enhancer.DataNucleusEnhancer, when it tries to enhance the classes.
I already tried this too: https://cloud.google.com/appengine/docs/standard/java/datastore/jdo/overview-dn2#Enhancing_Data_Classes, but I don't get how to use this with the new plugin.
I use all the latest versions of Google Cloud (App Engine SDK 1.9.50).
Any help is greatly appreciated!
The new Cloud Tools for Eclipse plugin does not support Datanucleus, the recommended way is to use the Datanucleus Maven plugin to do enhancing: http://www.datanucleus.org/products/datanucleus/jdo/enhancer.html#maven

I have installed the grails appengine plugin, I use intellij, how can I get intellj to quit yelling at me for jdo errors?

So,
I am trying to integrate a grails app, with google app engine, all using intellij. I successfully built the grails app, and I installed the app engine plugin successfully. But, now all my domain classes have JDO errors.
Intellij has built in support for app engine, but I couldn't quickly figure out a way to integrate it with my grails app. So I just used the grails command line.
Ideally I would like to use the intellij plugin, but at this point I just want the errors to disappear.
How do I get my jdo errors to go away in my intellij grails app?
And if your feeling really helpful:
How do I use the intellij app engine module to integrate with my grails app?
Thanks
Can you give an example of the error or a screenshot? If it's an inspection you can disable it via an intention action shortcut (Alt+Enter) while standing on the code with an error/warning. When menu opens, press the right arrow for the sub-menu where you can disable it. If it's a result of language injection feature, you can try to un-inject the language using the same intention action.
Feel free to vote for the built-in Grails App Engine support in IntelliJ IDEA.

Salesforce's Database.com and Google App Engine via JPA

Currently i try to connect (via JPA/Datanucleus) with an application, hosted by Google App Engine, to the database service of database.com (Salesforce)
After many hours of reading and trying, i could not find any solution.
So, is it even possible??
Some Information....
Database.com provides JPA: http://forcedotcom.github.com/java-sdk/jpa-provider, but i could not found any sdk on this side, but i found a jar-file hosted by grepcode http://grepcode.com/snapshot/repo1.maven.org/maven2/com.force.sdk/force-jpa/22.0.7-BETA/ - Possibly there is currently no official release ...
The problem is that this SDK from Salesforce needs datanucleus 2.0, but Google App Engine includes only datanucleus 1.1.5. So i try to update theses libaries and found this.... code.google.com/p/datanucleus-appengine/ . I tried a few hours to replace the old libaries and to use the newer, but unsuccessfully. The error was that eclipse could not find some libaries, because the newer libaries, provided by the side above, have different package structure -
I am thankful for any help...
Kotake
The official release of the JPA provider is available on Maven Central:
http://search.maven.org/remotecontent?filepath=com/force/sdk/force-jpa/22.0.7-BETA/force-jpa-22.0.7-BETA.jar
The external connection restriction won't be a limiting factor because the JPA adapter connects to Database.com over https using a SOAP API.
I can't speak to the challenges around getting DN 2.0 running on GAE. Perhaps GAE support can help with that?
As stated here in the App Engine docs, you cannot make direct connections to external servers from GAE (except over http or https using the app engine specific url APIs). You will need to find some other way to get data out of your remote database.
This link describes how to solve your problem:
How to use Force.com Database SDK on Google APP Engine
(He has updated the Saleforce SDK source code to allow it to work without problem on GAE.)

Resources