Is it possible to use azure Application Insights SDK with quarkus web application that runs as jar?
I have tried using it as described here
https://learn.microsoft.com/en-us/azure/azure-monitor/app/java-get-started?tabs=maven
but it just doesn't work.
It loads the ApplicationInsights.xml file when I start the app with following command:
mvnw quarkus:dev -Dapplicationinsights.configurationDirectory=../src/main/resources -f pom.xml
but it does not send any data automatically to the azure app insights. I only see data being sent to the azure when I do it manually via code.
Related
I am trying to implement newrelic in my spring boot JPA project.
I am using this link to implement this. new relic guid for spring boot
Now I have installed newrelic-java-7.9.0.zip (new relic zip)from this link and changed the yml as per my requirment.
I am not able to understand what to do next as per the link. also how can run this in production environment.
AFter researching on internet I got this command to execute :
java -javagent:<path to your new relic jar>\newrelic.jar -jar <path to your application jar>\<you rapplication jar name>.jar
Now I have new relic jar but i don't have jar of my application in target folder. i am ruuning an application by clicking on play window. (Can not see any jar though target folder is getting created.)
How to run this in local
How to run this in production (How to make this command production ready)
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.
I have my front-end in Angular and back-end REST services written in java using maven plugin. I want to containerise the web service using docker but I am stuck on how to connect my front-end and back-end(which contains the webapp(WAR) of my RESTAPIs) in Dockerfile.
Should I use nginx as a mediator between the two?
Any suggestions. Thanks in advance.
I have written my Dockerfile below !
FROM node:alpine AS builder
WORKDIR /app
COPY . .
RUN npm install && \
npm build
FROM tomcat
COPY --from=builder Example.war /usr/local/tomcat/webapps/Example.war
Wars are web-archives that can be deployed on dedicated application server like tomcat, weblogic or many others. Application can't be run as standalone from var. If you want to run it from docker container - most widely used option is spring boot Has a nice docker tutorial as well. Then you can connect your web app by directly exposing app port on the back-end (suggest this approach for a play around at the beginning).
I am trying to use jhipster, so far Ive seen how it works on java8, I even found an example repo with java7 that is certainly java 8 (https://github.com/jhipster/jhipster-sample-app-java7).
I was wondering if there is any way I can generate an app to run with java7? I know is deprecated from jhipster but seems like if I can run jhipster v 1.7.0 I could do it, any idea how?
So far this is what jhipster -help shows
C:\Users\user>jhipster -help
Usage: jhipster [command] [options]
Commands:
app Create a new JHipster application based on the selected options
aws Deploy the current application to Amazon Web Services
ci-cd Create pipeline scripts for popular Continuous Integration/Continuous Deployment tools
client Create a new JHipster client-side application based on the selected options
cloudfoundry Generate a `deploy/cloudfoundry` folder with a specific manifest.yml to deploy to Cloud Foundry
docker-compose Create all required Docker deployment configuration for the selected applications
entity [name] Create a new JHipster entity: JPA entity, Spring server-side components and Angular client-side components
export-jdl [jdlFile] Create a JDL file from the existing entities
heroku Deploy the current application to Heroku
import-jdl [jdlFiles...] Create entities from the JDL file passed in argument
info Display information about your current project and system
kubernetes Deploy the current application to Kubernetes
languages [languages...] Select languages from a list of available languages. The i18n files will be copied to the /webapp/i18n folder
openshift Deploy the current application to OpenShift
rancher-compose Deploy the current application to Rancher
server Create a new JHipster server-side application
service [name] Create a new Spring service bean
upgrade Upgrade the JHipster version, and upgrade the generated application
completion Print command completion script
Options:
-h, --help output usage information
-d, --debug enable debugger
-V, --version output the version number
You're referring to a 2 years old project sample. Current version of JHipster 4.x requires JDK 8, there's no way to generate a project compatible with JDK 7 with it.
The only solution would be to install an obsolete version of JHipster like 2.22.0 which is the one used to generate this JDK 7 sample project:
npm install -g generator-jhipster#2.22.0
then follow instructions of this version's documentation: http://www.jhipster.tech/documentation-archive/v2.22.0/
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