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
Related
The IDE complains about no Deployment selected, but from the picture I can't pick one.
I have upgraded IntelliJ to the latest. I am planning to reinstall everything.
Suggestions?
There should be an artifact displayed:
Make sure you have a war artifact defined in the Project Structure | Artifacts.
If the issue persists, please report a bug and attach a sample project to reproduce.
Artifact options available out of the box in IntelliJ IDEA Ultimate:
If you don't see the Web Application options, you need to make sure that all the plug-ins are enabled. You can also just delete disabled_plugins.txt file from the IDE CONFIG directory and restart the IDE.
In case you are still running into issues:
It actually looks like you are using the Cloud Tools for IntelliJ plugin (https://github.com/GoogleCloudPlatform/google-cloud-intellij) and not the App Engine plugin bundled in IDEA Ultimate as in the accepted answer.
You can refer to the following documentation for deployment to the App Engine standard environment:
https://cloud.google.com/tools/intellij/docs/deploy-std
Also a couple things to check:
You should have an app engine standard facet
You should have an exploded-war artifact:
Try the following action:
Tools > Google Cloud Tools > Add App Engine support > Google App Engine Standard and see if this resolves the problem.
If none of this helps, perhaps you can post some screenshots of your artifact / module structure under project settings.
So OK, at the end I was using IntelliJ Community which doesn't support deploying to Google App Engine anymore (although it's bizarre the plugin is available). Apparently one of the latest updates disable whatever minimal support was there, as I was able to deploy to GAE just a few weeks ago.
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..!!
Question about getting the Java starter project booted up on Google App Engine
https://developers.google.com/glass/quickstart/java
In that quickstart when configuring Eclipse it says
Uncheck the Use Google App Engine checkbox and save.
However if I follow the instructions on the above page - including Eclipse with the Google plugin - I get a project which can be run on localhost. If I try to upload the App Engine it says this is not a App Engine project and won't upload.
So then if I make it one (go under the Google->App Engine settings) the Eclipse project complains about the jars under
web/WEB-INF/lib
and still won't upload. If I delete them then I get a project that doesn't compile either. So what do I need to do specifically to get this to load to the cloud?
Related to this is that I'm confused about the relationship between Maven and Eclipse - the two seem to be a cross purposes as Maven populates the lib directory but I keep wrangling with Eclipse over it too. The App Engine plugin seems to want to use it's jars, while the app-engine code I downloaded per the instructions (to get the bin utils app-cfg) want to be used too by Maven AFAIK.
Deploy to App Engine from the command line using appcfg.sh.
Getting many IDEs and App Engine to all work in the same project has led to some compromises due to differing assumptions made by each of the tools involved. For example, the Eclipse App Engine plugin makes different assumptions about the structure of projects than other IDEs. The compromise was to fall back to the official command line tools since they seem the most tolerant of variation and are always available.
Maven is part of the project to handle dependency management.
If you'd like to use Eclipse for your deployment too, you'll probably want to create a new Eclipse App Engine project and copy the libraries and code into that project.
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.
I want to export the datastore that I have running in App Engine into my local "standalone" version of the application. Anyone know how I can do that?
I've been looking around in the App Engine dashboard but can't find it.
Check out the docs on uploading and downloading data.
Gobo-Tools is designed for such tasks
It seems that there is no separate doc for java version of this except that it is said to do with com.google.apphosting.utils.remoteapi.RemoteApiServlet in the doc Nick provided.
Tip: If you have a Java app, you can use the Python appcfg.py tool by installing the Java
version of the remote_api handler, which is included with the Java runtime environment.
The handler servlet class is com.google.apphosting.utils.remoteapi.RemoteApiServlet.
Here is some relevant code example for java version of this API usage GAE/J datastore backup