IBM Bluemix Cloud Foundry SpringBoot kotlin app error - java

I have deploy on IBM Bluemix a spring boot application written in kotlin. I have use liberty for java.
But I cant able to run correctly my app, but on my machine in local it work very well.
When I call my REST API it return me an error or not work.
This is the error:
There was an unexpected error (type=Internal Server Error,
status=500). java.lang.NoClassDefFoundError:
it.gate42.skip.DeviceInfo.DeviceInfo_Accessor_ewee6w (initialization
failure)
I have already tried to change the Java version but the error is the same.
(I have set OPEN_JDK and version 1.8.+)
This is the log of call that return me the cloud foundry app: https://gist.github.com/paranoiasystem/a28a2587c231f2b398c4650ba1c7016c
I have post it on gist because is so long and it is impossible to post all log here.

I have resolved this issue, I have rewrite my manifest.yml like this:
---
applications:
- name: testskipapi
memory: 1G
instances: 1
path: build/libs/skipcode-0.0.1-SNAPSHOT.jar
buildpack: https://github.com/cloudfoundry/java-buildpack.git
env:
JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 1.8.0_+ } }'

Related

Application error and logs not loading, what steps to take?

I've been getting the following error page, when visiting my app:
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs --tail
However, heroku logs --tail does not return anything. If I go to the dashboard through web (https://dashboard.heroku.com/apps/app-name/logs), the logs window keeps loading but nothing is shown.
I have nothing to go on, and Heroku won't accept a ticket of a free app. Does anyone know any more steps I can take to trace the error?
Additional info:
The build logs all look fine:
BUILD SUCCESSFUL in 49s
5 actionable tasks: 5 executed
Discovering process types
Procfile declares types -> (none)
Default types for buildpack -> web
Compressing...
Done: 85.2M
Launching...
Released v3
https://app-name.herokuapp.com/ deployed to Heroku
I am creating a spring Java API, it works fine when I try to run it locally. If I try to run it through $heroku local I do get an error:
[FAIL] No Procfile and no package.json file found in Current Directory - See run --help
I had same issue. I just added system.properties to root folder of spring app and this file contained 1 line:
java.runtime.version=11
Heroku procfile documentation.
Spring documentation for Heroku deployment

failed to test azure purview SDK for Java due to "IntelliJ Authentication not available

I'm following this sample to test purview SDK for java, it could be built successful, but when I run this java file ,it's failed due to "IntelliJ Authentication". BTW, I just edit one java file and run it in cmd windows, also I logon the IntelliJ with azure account. any suggestions appreciated
error messages:
10:30:44.138 [main] ERROR com.azure.identity.implementation.IntelliJCacheAccessor - IntelliJ Authentication not available. Please log in with Azure Tools for IntelliJ plugin in the IDE.

Managed VM deploy failed because "env" setting is not supported

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

AWS - Unable to deploy java project to aws beanstalk from eclipse

I am trying to deploy amazon java web app to beanstalk(AWS Elastic Beanstalk for Tomcat 7) from eclipse using aws toolkit.
But i am facing following error,
Unable to update environment with new application version:
Environment named awseclipse is in an invalid state for this operation. Must be Ready.
(Service: AWSElasticBeanstalk; Status Code: 400; Error Code: InvalidParameterValue; Request ID: da4518bf-13e4-11e4-9c13-97be58285d3c)
You probably have another deployment or change pending. As the error message mentions, you need to wait until your environment is ready to deploy a new version.

AWS Elasticbeanstalk deployment error

We are seeing the following errors being thrown while deploying a new application version on to our elasticbeanstalk environment(Tomcat 7 , Java 6).
The eb-version-deployment.log on a running backend EC2 instance shows this:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>ExpiredToken</Code><Message>The provided token has expired.</Message>
Exception in downloading source bundle. Exception message: S3ResponseError: 400 Bad Request
The elasticbeanstalk event log on the console shows this:
[Instance: Module: AWSEBAutoScalingGroup ConfigSet: Infra-WriteApplication2] Command failed on instance. Return code: 1 Output: Error occurred during build: Command 01downloadVersion failed .
This error started appearing all of a sudden and without any changes being done to any of our underlying infrastructure components (S3,etc).
Any ideas to resolve this ?
Thanks in advance.
Make sure that you have defined AWS Credentials file and it contains valid tokens.
export AWS_CREDENTIAL_FILE=~/.aws/aws.cred

Categories

Resources