gwt application not deployed to google app engine with appcfg - java

I have gwt 2.7 project that i develop with eclipse.
from 1.9.20 I not success to deploy project to google app engine
I deploy the project with old gwt plugin in eclipse
when the deploy finished I get error
Unable to update:
java.lang.RuntimeException: Fatal problem encountered during deployment. Please refer to the
logs for more information.
at com.google.appengine.tools.admin.AppVersionUpload.isServing(AppVersionUpload.java:1051)
at com.google.appengine.tools.admin.AppVersionUpload.access$200(AppVersionUpload.java:43)
at com.google.appengine.tools.admin.AppVersionUpload$2.call(AppVersionUpload.java:884)
at com.google.appengine.tools.admin.AppVersionUpload$2.call(AppVersionUpload.java:881)
at com.google.appengine.tools.admin.AppVersionUpload$3.call(AppVersionUpload.java:1188)
at com.google.appengine.tools.admin.AppVersionUpload$3.call(AppVersionUpload.java:1185)
at com.google.appengine.tools.admin.AppVersionUpload.retryWithBackoffOptional(AppVersionUpload.java:1213)
at com.google.appengine.tools.admin.AppVersionUpload.retryWithBackoff(AppVersionUpload.java:1183)
at com.google.appengine.tools.admin.AppVersionUpload.commit(AppVersionUpload.java:881)
at com.google.appengine.tools.admin.AppVersionUpload.uploadFilesTransaction(AppVersionUpload.java:223)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:197)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:580)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:65)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:438)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:158)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
I think is related the google app engine not supported to deploy project with appcfg.
they support only deploy with gcloud but my project is not maven and i do not know how to deploy project with gcloud.
I try to convert to maven project and deploy with gcloud but when I run
mvn package appengine:deploy -Dapp.deploy.projectId=myProjectId
from commandline
I get error
path to file /BaseResourceCss.java:[3,39] package com.google.gwt.resources.client does not exist
and I get like this for all files in project
thank you everyone

Since the last August 30th the appcfg is deprecated. As you can see in the shared link, it is recommended to use the gcloud commands.
Depends on the language you are using, is the command you need to execute. Below are the examples:
For Java 8 apps, build the app first. Then deploy with:
gcloud app deploy WEB-INF/appengine.xml
For Java 11 apps, you can deploy the source code to the Java 11 runtime without building locally:
gcloud app deploy pom.xml
To deploy a Java fatjar to the Java 11 runtime:
gcloud app deploy myapp.jar
You can also use the Cloud SDK-based Maven or Gradle plugins to build and deploy Java 8 and Java 11 apps.

Related

Upgrading to Mobile First 6.3 Server shows No runtime

The client has upgraded the worklight server 6.2 to Mobile First 6.3, and deployed the updated war file. Now when we open the console to deploy the adapter, "It shows no runtime can be found"
But the same project works fine in the local development environment, where we installed the mobilefirst studio plugin in eclipse. We are able to build the project and run the app.
Java - 1.7
Eclipse - Juno SR2
MobileFirst studio 6.3
Cannot access the remote server for now, will attach the logs shortly.
Kindly let us know if there are any known issues on upgrading to 6.3(mobile first) from 6.2(worklight)
Thanks
Hi we are able to fix it. The reason is the client has not built the war file in 6.3, they have updated the old war, when we tried building the war file from the 6.3 and deployed. it worked.

Deploy Scala PlayFramework Project to IBM Bluemix

I've build a RESTFul Service with Play 2.4 Scala2.11, now I want to deploy this to IBM Bluemix.
play2-war-plugin was used to package the project to a war package since Bluemix use Liberty as container.
But when I push the war package to Bluemix, I got error logs:
[ERROR ] SRVE0918E: The attempted blocking write is not allowed because the non-blocking I/O has already been started by the application registering the WriteListener [play.core.server.servlet31.Play2Servlet31RequestHandler$ResultWriteListener#d2487ee8].
I want to knwo:
Can Scala based PlayFramework project be deployed to IBM Bluemix?
Are there some better ways to package Play project to a war package?
In my circumstances, what can I do to confirm whether this ERROR caused by my codes or caused by the play2-war-plugin.
You don't need to package your Play Framework application in a war file in order to deploy it to Bluemix.
Simply build your application using play dist or activator dist and then use the java_buildpack to deploy it. For example:
$ cf push play-application -p target/universal/play-application-1.0-SNAPSHOT.zip -b java_buildpack
You can see Java buildpack documentation for Play Framework here:
https://github.com/cloudfoundry/java-buildpack/blob/master/docs/example-play_framework.md
Just for people (like me) coming to this page now. Alex de Silva's answer works great but needs some update:
Instead of the command play or activator use sbt The sbt dist or sbt stage command are described here. If you use play it won't work at all & in the case of activator--which is outdated--it will fail with some "can't find dependency" errors. Make sure you have latest version of sbt installed.
The same instructions apply in any sbt-based Scala application, not just Play Framework. You just have to be sure you have the sbt-native-packager plugin set up properly in your sbt build.

Java dynamic web project is not building

I have modified the Web content folder & then did the Clean project followed by build project. But still there is no change in project.
I am using tomcat server 7 & JRE1.7.
What is the best way to build a java dynamic web project? How to ensure each & every file of the project gets re-build?
I cannot create a comment on this question so have to put it up as an answer..
Java dynamic web project is not building
What kind of build tool are you using? i.e Maven, Gradle, Ant
I have modified the Web content folder & then did the Clean project
followed by build project. But still there is no change in project. I
am using tomcat server 7 & JRE1.7.
Tomcat is there to deploy your web project, so if your build is failing you will not be able to deploy it successfully to your tomcat server. Maybe you could provide us with some sort of error message?
What is the best way to build a java dynamic web project? How to
ensure each & every file of the project gets re-build?
Don't think you will find any "best way", but there's several options out there you can use. Fast google search for build tool
Maven
Gradle
Ant
This is just a few.

How to run AngularJS in eclipse kepler?

I'm new to Angularjs and i'm trying to run first angular program with Spring. I downloaded the code from here: http://javahonk.com/spring-mvc-angularjs-integration/. Imported it as a maven project. Downloaded JSDT and AngualrJs plugin from eclipse marketplace but it's still not running. There is no error message. I'm running this on tomcat 7. What am I missing?
Any help would be appreciated?
I'm not a Eclipse user. so I have no idea for that. But you can use nodejs as a static server. it is explained here
1) Install nodejs for your OS
2) Run this command in a terminal (console)
> npm install http-server -g
3) Start server
> cd /path/to/your/project
> http-server -o --cors
Now you can access your project from browser http://localhost:8080/yourfile.html
Work in Eclipse and just refresh page on browser to see changes.
If you are working on a Spring Application within Eclipse IDE, your best alternative would be to start you appliction using an embedded Application Server (Best I would recommand are Jetty or Tomcat if you ain't need EE level components).
You can follow this link, which holds basic steps for adding a new Application Server within Eclipse IDE.
Once you have added a new application server, you can deploy your application in it then launch it and you should have your applcation reachable at http://localhost:8080/SpringMVCAngularJS.
A good alternative when using Maven as a build tool, is using an embedded AS plugin such as Tomcat7 Plugin or Jetty Plugin. This plugin will provide the ability to start your applcation using the Maven different goals (which does not require adding a new AS into Eclipse IDE).
I've pushed a sample module based on the tutorial you mentioned. YOu can test the above described plugin as follows in a *nix shell (You may need to setup git if not already done):
git clone https://github.com/tmarwen/stackoverflow-showcase.git
cd stackoverflow-showcase/springmvc-angularjs
mvn tomcat7:run

Heroku: Java/Maven build requires NodeJS

I've got a Java web application that builds with Maven. My project uses RequireJS. I use a maven plugin at build time to compress the JS artifacts (https://github.com/bringking/requirejs-maven-plugin). The plugin calls out to NodeJS (with the r.js compressor) to do the actual work.
Local builds work wonderfully.
On Heroku, however, NodeJS is not available using the Heroku Java buildpack (the default for Java/Maven applications).
For now, I run the requireJS maven plugin locally using an active Maven profile that isn't present on the Heroku server. This prevents the RequireJS plugin from running on the Heroku server. This is less than ideal because it requires me to run the plugin locally, then check in the resulting build artifact. It's far better to generate the compressed JS file at build time in the Heroku system.
I'm looking for a good solution. Thanks in advance.
The best solution is to use Heroku Multi Buildpack with the Node.js and Java buildpacks. This is described in an article using Grunt with Java and Maven but the same principles apply for Require.js.

Categories

Resources