I'm trying to build my own liferay portlet using blade cli but failed. I have 2 failed error
First error is after I init blade to create a workspace then go to the directory then i create new module using command
blade create -t mvc-portlet -p com.liferay.docs.guestbook -c GuestbookPortlet my-guestbook-project
then i build the portlet using command inside workspace directory
blade deploy
then give error "zip END header not found"
Error before change gradle version
after that i do some research and i do upgrade the gradle from
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
to
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
then i redeploy it and give error
Error after change gradle version
Related
I build a little rest service to store data in a mongodb atlas db.
Everything is working and I get no errors when I build with ./gradlew clean build.
The project is written in Java 11 and gradle is set to Java 11 too.
But when I try do deploy the app on heroku I get the following error :
-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> Gradle app detected
-----> Spring Boot detected
-----> Installing **JDK 1.8**... done
-----> Building Gradle app...
-----> executing ./gradlew build -x check
Downloading https://services.gradle.org/distributions/gradle-7.3.2-bin.zip
...........10%...........20%...........30%...........40%...........50%...........60%...........70%...........80%...........90%...........100%
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.3.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> invalid source release: 11
I added a system.properties to my resources with :
java.runtime.version=11
But it still seems to install java 8.
Can anyone help me on this?
Greetings from Berlin
Nino
here are few steps:
pres ctrl+alt+s and verify your project sdk version
goto root of your project where build.gradle and setting.gradle files are present
here create a new file name system.properties(this file is dettected for deploying Heroku apps to override default propeties)
in this newly created file write this piece of line java.runtime.version=17.0.5 or what ever jdk version you want to deploy with..
update the repo with this file using add.' 'commit' and git push heroku master
thats all :)
I have developed a REST API using Java. It works perfectly on local computer and it is compiled with Java 11.0.2. It is also using Hibernate.
When I try to upload this to the AWS Elastic Beanstalk, it always fail with a severe error. I downloaded the log files and the eb-engine.log says the following
2021/08/06 07:36:01.851410 [ERROR] update processes [web healthd cfn-hup nginx] pid symlinks failed with error Read pid source file /var/pids/web.pid failed with error:open /var/pids/web.pid: no such file or directory
2021/08/06 07:36:01.851423 [ERROR] An error occurred during execution of command [app-deploy] - [Track pids in healthd]. Stop running the command. Error: update processes [web healthd cfn-hup nginx] pid symlinks failed with error Read pid source file /var/pids/web.pid failed with error:open /var/pids/web.pid: no such file or directory
I am not using any specific configuration in my Java app. The war file is a clean build directly from netbeans IDE.
How can I fix this issue?
I have a Google Cloud Endpoints Java application that I am developing for App Engine Standard. I am unable to deploy it locally from Eclipse but I can deploy and run it locally like this:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
mvn clean package endpoints-framework:openApiDocs -DskipTests \
&& gcloud endpoints services deploy target/openapi-docs/openapi.json \
&& clear \
&& mvn appengine:run -Dapp.devserver.host=0.0.0.0 | tee appengine.out
Now I want to deploy it to App Engine Standard. If I try to deploy it using the Eclipse plugin I get:
Reading application configuration data...
2021-01-16 11:56:14.946:INFO::main: Logging initialized #370ms to org.eclipse.jetty.util.log.StdErrLog
Bad configuration: Missing required element 'application'.
Please see the logs [/tmp/appcfg1077472932380362760.log] for further information.
The log file says:
com.google.apphosting.utils.config.AppEngineConfigException: Missing required element 'application'.
at com.google.apphosting.utils.config.AppYaml.getApplication(AppYaml.java:804)
at com.google.apphosting.utils.config.AppYaml.generateAppEngineWebXml(AppYaml.java:1296)
at com.google.apphosting.utils.config.AppYamlProcessor.convert(AppYamlProcessor.java:50)
at com.google.appengine.tools.admin.Application.<init>(Application.java:250)
at com.google.appengine.tools.admin.Application.readApplication(Application.java:536)
at com.google.appengine.tools.admin.AppCfg.readWar(AppCfg.java:303)
at com.google.appengine.tools.admin.AppCfg.readApplication(AppCfg.java:281)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:209)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:118)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:114)
If I try to deploy it from the command line I get:
$ gcloud app deploy
ERROR: (gcloud.app.deploy) Maven source deployment is not supported for Java8 GAE project.
When I run:
gcloud config list
I get what looks like the correct value for "project".
Is there a way to deploy this application to App Engine Standard?
Thanks for your help.
-Dan
System : windows 10 and AWS EC2
I have follow below steps:
install jdk
install tomcat8
install maven
PhantomJS
Updated app-convert.properties according to system (windows/linux)
Added new required highchart java-script files in diectory /phantomjs
Updated required java-scripts files names in resources.json
Export war/ install export server from repository
Deploy war in tomcat/ start server using mvn jetty:run
On preview server logs error
[ERROR] [http-nio-8080-exec-25 05:19:49] (ExportController.java:writeFileToStream:356) Tried to read file from filesystem: File '/tmp/tomcat8-tomcat8-tmp/export4935023327417038147/output/UOBhqYub.png' does not exist
So I debug Server.java, server is responding as
"ReferenceError: Can't find variable: highcharts".
(SVGConverter.java:convert:108) responce json: ReferenceError: Can't
find variable: Highcharts
I have added required js files in resource/phontomjs directory and mentioned these files in resources.json.
GitHub issue
Please correct me if I am missing anything.
My bad, my stupid mistake, I was using old version of highchart java-scripts files.
Trying to deploy a Java app to Google Appengine Managed VM. I'm using console gcloud and already prepared WAR file. Plus app.yaml.
Using following command:
gcloud preview app deploy ./build/libs/app.yaml
Right now it fails with:
Building and pushing image for module [default]
-------------------------------------------------------------------------------- DOCKER BUILD OUTPUT --------------------------------------------------------------------------------
Step 0 : FROM gcr.io/google_appengine/jetty9
---> 005014071b64
Step 1 : ADD webapp-webapp.war $JETTY_BASE/webapps/root.war
---> 3e9023930cc8
Removing intermediate container 342e8a2f5750
Successfully built 3e9023930cc8
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Beginning teardown of remote build environment (this may take a few seconds).
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [400] "env" setting is not supported for this deployment.
I see similar error (there) for maven-gcloud-plugin that happens when project is not configured as WAR. But notice that:
i'm using plain command line tool gcloud, a latest version
and my project is packaged into WAR already
Also i'm using following app.yaml (which i've got from maven plugin sources):
runtime: java
env: 2
api_version: 1
handlers:
- url: .*
script: dynamic
So the question, where from this error is coming from (docker image is already prepared at this moment, right?). What it means? And how to fix this?
Update
I noticed that it uses FROM gcr.io/google_appengine/jetty9 for VM. But for Appengine it should be FROM gcr.io/google_appengine/jetty9-compat. I've tried to switch to exploded app instead of WAR, and it started using correct Docker base image. But still fails:
Building and pushing image for module [default]
-------------------------------------------------------------------------------- DOCKER BUILD OUTPUT --------------------------------------------------------------------------------
Step 0 : FROM gcr.io/google_appengine/jetty9-compat
---> 2ad8572ef3d8
Step 1 : ADD . /app/
---> b10f4bc6718e
Removing intermediate container 8b149f4baf9c
Successfully built b10f4bc6718e
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Beginning teardown of remote build environment (this may take a few seconds).
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [400] "env" setting is not supported for this deployment.
The reason was this line in app.yaml:
env: 2
it was too simple and too obvious to try to deploy w/o this option. Also, every doc, official and unofficial, mentions that you need to have env: 2 option set to deploy your app as Appengine app. That's really strange.
Removing this line also changed base Docker image to gcr.io/google_appengine/java-compat. I guess it means that jetty images, including jetty9-compat, aren't compatible with Appengine apps