Deploying Google App Engine and Slim3 code - google-app-engine

I am developing a GAE app and using Slim3 for persistence. I've created the model and the metamodel. When I try to deploy the app to GAE I get the following error when I run the app.
/register
java.lang.IllegalArgumentException: The meta data of the model(com.principalmvl.lojackmykids.meta.ContactMeta) is not found.
at org.slim3.datastore.DatastoreUtil.createModelMeta(DatastoreUtil.java:801)
at org.slim3.datastore.DatastoreUtil.getModelMeta(DatastoreUtil.java:729)
I looked at the lib directory under the WEB-INF directory and I see the generated .CLASS files.
What is the issue? Is there something I need to do on the import or a configuration so that GAE sees this classs?

I believe the issue is in the Eclipse project. I recreated a new project and copied all of my servlets and meta data models and it worked. I killed the other project since it seemed to be corrupt.

Related

IBM Cloud (Bluemix) React deploy routing error

I've managed to deploy a react app (create-react-app) to Bluemix using cloud foundry with a sataticfile, everything is working fine except form one thing: routing.
I'm using BrowserRouter to manage routing so when you write the url's path manually I get a 404 error. I know I have to configure the staticfile to use the index.html as default, the question is how to configure this file on bluemix.
My build configuration looks like this:
And my deploy:
For now I've solved it using HashRoute, but that hash is awful and really bad for SEO as I read somewhere here.
I solved it, just create a file called: Staticfile with pushstate: enabled and save it on the public folder. I was saving it on the src folder so, when the react-app was built the Staticfile wasn't on the root directory.

Can't deploy EAR to Google App Engine 1.9.4

I'm having troubles deploying a Google App Engine EAR application from Cloudbees. The application is built using 1.9.4. The application structure is similar to this project: https://github.com/deege/gae-rest-skeleton The main difference is I have more than just one module.
The problem I'm running into is how to configure the deployment. I have the "Post steps | Deploy Applications | Google App Engine (Java)" set up as the video from their site, but the configuration is expecting a WAR directory structure in the Fixed Directory section.
It's looking for a directory where a WEB-INF/appengine-web.xml file exists. I can point the configuration to the front end's directory where this does exist (and was doing that until I added more modules), but then it only deploys the front end. None of the other WARs are deployed.
I think it should be looking for the META-INF/appengine-application.xml file in the ear directory, since this describes the whole application (front ends and supporting modules).
Is there something I'm missing with the configuration? Do I need to deploy each module (WAR) separately?
Our deployer plugin was written before GAE added support for EARs. If ignoring the form validation and just entering the configuration that you know should work doesn't work then open a ticket.
I will be investigating and adding the extra form validation to the plugin at my next review window for the plugin, but an interim workaround of just ignoring any displayed errors should work
update
I have updated the app engine deployer plugin. Upgrading to version 3.0 or newer will allow you to deploy EAR exploded archives

Can't import library into Google App Engine project

I use the Google App Engine SDK 1.8.5 with Eclipse 3.8 on Ubuntu.
I want to add the Cloud Storage service to my app, so I downloaded guava-gwt-15.0.jar and appengine-gcs-client-0.3.jar, and put them in my apps /war/WEB-INF/lib/ folder. I also added these jars to the build path in Eclipse.
When I fire up my app in dev mode, it runs fine, at least until I try to access a page relevant to the GCS library. When I do that, I get the following error:
java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
at com.google.appengine.tools.cloudstorage.GcsServiceImpl.<init>(GcsServiceImpl.java:35)
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:32)
... etc
I cleaned my project and restarted Eclipse multiple times, and still the problem persists. What to do?
In addition to Guava for GWT, you also need the core Guava library (guava-15.0.jar). Download the .jar to war/WEB-INF/lib and add it to you build path as well.

Google App Engine Eclipse plugin without using GWT

I want to host a Java/AngularJS app on Google App Engine, and leverage the Eclipse plugin. I figure the most straightforward way to do this is:
From within Eclipse, start a new Google Web Project.
Go to project properties and uncheck GWT and DataNucleus.
Delete the generated java classes and GWT related stuff so you have an appengine.web.xml, web.xml, WEB-INF/lib, log4j properties, and a few other files left.
Put index.html under the war folder, sister to favicon.ico.
Change web.xml welcome file to index.html
Deploy and test that index.html is visible.
Deployment via Eclipse works fine, but myapp.appspot.com/ and myapp.appspot.com/index.html both return 404.
Simply put my use case is "how do I deploy an index.html to GAE (using Eclipse plugin) without the 800 pound guerilla that is GWT?"
I was unable to find good documentation on this.
Unchecking 'Use Google Web Toolkit' should be all you need to do to create a basic App Engine application without GWT, however, it will not create a sample index.html file. For that, you need to keep 'Generate project sample code' checked. This will create some extra Java files for you that you'll need to delete, but it's the closest you can get to what you described in your question.

Uploading app on google app engine

I am new to python and google app. I have an already created application in python and
google app engine. I have downloaded source code of the app and customized it. The source
code which i downloaded doesn't have app.yaml and index.yaml in it. Now i want to know that if i upload my app on google app engine without app.yaml and index.yaml then is there any chance that my data on live server get lost. Please show me right path i am doing any
thing wrong. Also i dont know how to upload a single file on google app engine. Should i have to upload whole app ?
i have used following command for downloading source code on localhost:
appcfg.py download_app -A <your_app_id> -V <your_app_version> <output-dir>
You cannot upload an application without an app.yaml. The app.yaml file contains the necessary configurations to run your application like handlers to use, application ID, runtime, and so on.
Also, you cannot upload a single file to App Engine, you always upload the entire app.
I strongly suggest you do the "Getting Started" guide:
https://developers.google.com/appengine/docs/python/gettingstartedpython27/
before you invest more time in trying to figure out why things don't work.

Resources