Spring Roo with GAE error on most basic tests - google-app-engine

I have been playing around with spring roo for some time now, read most of the documentation, tried most of the tutorials I could find (pizze, wedding...) - all worked well. My next step was to create a basic application, that can be deployed on Google App Engine. I just can't get it to work.
I found a simple tutorial that consists of 2 Entities and seems to run fine on GAE. It has been created using Roo-1.1.0.M2. I did the exact same steps but could not get it to run. I tried Roo-1.1.0.RELEASE as well as the current Roo-1.1.1 development branch. I always ran into the same problem as Ron.
I was able to strip down the test.roo file to
project --topLevelPackage com.springsource.failureexample
persistence setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE --applicationId failureexample
entity --class ~.domain.Person --testAutomatically
perform tests
Using this example, I get something like ERROR DataNucleus.Transaction - Operation rollback failed on resource: org.datanucleus.store.appengine.DatastoreXAResource and the build fails with a test in testCountPeople(com.springsource.failureexample.domain.PersonIntegrationTest).
The problem is also described at Roo's issue tracker (where I provided my minimal test script), but since it obviously worked at other setup, I might have misunderstood or overlooked something important in the setup process.
Could you provide some ideas of what my error might be?

How about creating at least one field in your entity ?

Related

Updating AppEngine deployed version on GitHub push

Is it possible to auto-deploy to AppEngine when Github receives a new commit? I found a bunch of dead documentation links that suggest it is, however I still have no idea how to set it up. There are some mentions for creating a release pipeline, but I don't see any way to do that in the cloud console anymore.
I've got my code mirroring the GitHub repository already, however I can't figure out how to link this to the deployment pipeline or even how to create a new version. Am I missing something obvious? This seems like it should be incredibly straightforward to do...
The entry on the Google Cloud Platform blog that's supposed to explain how to achieve this is blank. It seems Google quietly killed this feature. Some people have complained that it suddenly stopped working. The only way to do this now is to use Continous Delivery/Integration tools such as Travis CI.

Bluemix Monitoring and Analytics: Resource Monitoring - JsonSender request error

I am having problems with the Bluemix Monitoring and Analytics service.
I have 2 applications with bindings to a single Monitoring and Analytics service. Every ~1 minute I get the following log line in both apps:
ERR [Resource Monitoring][ERROR]: JsonSender request error: Error: unsupported certificate purpose
When I remove the bindings, the log message does not appear. I also greped my code for anything related to "JsonSender" or "Resource Monitoring" and did not find anything.
I am doing some major refactoring work on our server, which might have broken things. However, our code does not use the Monitoring service directly (we don't have a package that connects to the monitoring server or something like that) - so I will be very surprised if the problem is due to the refactoring changes. I did not check the logs before doing the changes.
Any ideas will help.
Bluemix have 3 production environments: ng, eu-gb, au-syd, and I tested with ng, and eu-gb, both using 2 applications with same M&A service, and tested with multiple instances. They are all work fine.
Meanwhile, I received a similar problem that claim they are using Node.js 4.2.6.
So there are some more information we need to know to identify the problem:
1. Which version of Node.js are you using (Bluemix Default or any other one)
2. Which production environment are you using? (ng, eu-gb, au-syd)
3. Is there any environment variables are you using in your application?
(either the creating in code one, or the one using USER-DEFINED Variables)
4. One more thing, could you please try to delete the M&A service, and create it again, in case we are trapped in a previous fault of M&A.
cf ds <your M&A service name>
cf cs MonitoringAndAnalytics <plan> <your M&A service name>
NodeJS versions 4.4.* all appear to work
NodeJS uses openssl and apparently did/does not like how one of the M&A server certificates were constructed.
Unfortunately NodeJS does not expose the openssl verify purpose API.
Please consider upgrading to 4.4 while we consider how to change the server's certificates in the least disruptive manner as there are other application types that do not have an issue with them (e.g. Liberty and Ruby)
setting node js version 4.2.4 in package.json worked for me, however this is an alternative by-passing solution. Actual fix is being handled by core team. Thanks.

How do I save a screenshot when an MSpec/Selenium test fails?

I'm using MSpec to drive some automated UI tests using Selenium WebDriver. Much like the examples I found online. I'm having problems getting it to take screenshot when the test fails.
I saw a comment on another issue where it works because they have a ResultSupplementer in the sample web specs. However, ResultSupplementer does not seem to exist in the latest version of Mspec (0.9.1).
Is there a different way to do this in the latest version of mspec? Ultimately, I'm going to generate HTML reports as TeamCity artifacts and include the screenshot on any failing specs.
I've updated the samples for the latest version of MSpec (in short, you need to implement ISupplementSpecificationResults yourself).
I've also merged the solutions and converted the MVC project to Nancy. You'll find that there's a bit more infrastructure-related code that grew over the last couple of years and works around various things, like
status codes 4xx and 5xx logged by IIS Express
IIS and Chrome Driver ports bound by other processes
page objects access the web driver with a high-level API
I use Paket for dependency management because it's far more powerful than plain NuGet
All that said, you need to run msbuild.exe mspec-samples.sln and then All-Specs.cmd. I've also checked that a TeamCity build creates screenshots.

gwt sample project rpc call failure

When i try to run gwt sample project it gives "RPC call failure.An error occurred while attempting to contact the server. Please check your network connection and try again". It was running good before but after i update programs and libraries it gives that error. Which update causes this error or there is other things?
Appengine version:1.7.0
GWT version:2.4.0
Eclipse version:4.2(juno)
JDK version:1.7.0_05
This may not be the problem you are facing but it seems to be the most frequent problem.
Let me predict - you last tried GWT four years ago and you hoarded the sample project hoping to pull it out one day.
And yesterday, you did pull it out. It kinda worked and then you decided to upgrade to the latest 2.4.0. (Actually the latest is 2.5.0-rc1).
Ooops. The web-inf/lib of your project is still faithfully using pre-version 2.2 gwt-servlet jar.
Nope, you can't do that. GWT-RPC data transfer format is version-unstable. Not guaranteed to be compatible from one version to the next.
Simple solution - recreate a new GWT project using the new Google plugin.
Then copy the src and web.xml of your project into the new project.
Or replace the gwt-servlet.jar with the latest. And if you usegwt-servlet-deps.jar, you would need to upgrade that too (but I doubt so, because if you did use gwt-servlet.deps.jar you wouldn't be asking this question).
But why would you keep the gwt sample from an old project?
The samples have remained quite the same over the years. Why not use the samples from the new GWT 2.4.0 download. You don't have to keep the samples. You should try to construct the projects for the samples afresh.
The GWT directory is found under Eclipse's plugins directory, under a long name. Like
plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201205091048-rel-r37/gwt-2.4.0.
In which you will find the samples directory.

GAE SDK 1.6.4 on Mac with django-nonrel: syncdb won't create the datastore file

first question from newbie. Haven't needed to post a question for months now -- so many great answers already posted. I am stuck on this one, though.
Developing on a Mac, Python 2.7, Django with the django-nonrel project, GAE datastore. Up to and including GAE SDK 1.6.3, all goodness. After upgrading to GAE SDK 1.6.4, noticed 3 strange things:
Dev server (python manage.py runserver) fails immediately with "Error: No module named webob." No other errors or output. I rooted around under /usr/local/google_appengine/lib/... and, indeed, no module named webob. There are two close matches -- webob_0_9 and webob_1_1_1. I made a symlink webob -> webob_1_1_1 to get past the error.
Startup messages from the dev server include an INFO: message that the SDK version is later than the advertised version. Google has 1.6.4 on their download site, so not seeing how my 1.6.4 is later than the latest.
Django's syncdb command (python manage.py syncdb) will no longer create the .gaedata/datastore file. It says it's creating tables, it prompts me for the superuser creds, it even says it installed a bunch of objects from my fixture file. It gives no errors, but when it completes, it has done none of these things -- the .gaedata/datastore file doesn't even exist.
Prior to 1.6.4, syncdb worked great, including loading fixture data. I tried starting a fresh project with only bare bones files in it and a simple model (one class having one field) to see if some complexity I had introduced might be the cause of the problem. Even in simple-land, syncdb wouldn't create the datastore.
My only solution was to fall back to GAE SDK 1.6.3 -- everything works once again. Anyone else seeing similar symptoms with SDK 1.6.4? Are there obvious diagnostic steps I should be taking?
Fixed in latest django-nonrel. Either sync to latest code, or manually integrate this pull request:
https://github.com/django-nonrel/djangoappengine/pull/24
Haven't seen this problem, don't know.
There's a workaround, but it's not merged into the master branch yet, you'll have to manually integrate the changes.
https://github.com/django-nonrel/djangoappengine/pull/25

Resources