Jhipster Webpack failure for Jhipster Maven Microservice Gateway application in Dev environment - maven

I have generated a Sample Microservice application and a Microservice gateway application using Jhipster. Both applications are built using maven and are using Jhipster registry for identification and routing. I am successfully able to build the Micro service application and able to reach it in the assigned localhost port.
I have build issues while building ./mvnw for gateway application. But it builds properly for gradle application and the API's are up. I have issues only for maven in org.springframework.boot:spring-boot-maven-plugin:2.0.5.
Its running on Windows 10 machine, latest version of Jhipster.
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.5.RELEASE:run (default-cli) on project api-contact-gateway: Could not exec java: Cannot run program "C:\Program Files\Java\jdk1.8.0_181\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long
I have debugged further and could see that the Classpath passed as a part of JVM arguments is too long. But my system variables are properly set.

I coudn't find any specific solution. I just lowered my Jhipster version to 4.14

Related

How to specify JDBC URL in spring boot application in case of the MySQL running as a Kubernetes Service?

I have a java application with maven build. I have provided the k8 service name of the mysql in the application properties of the spring boot application. However, I get error as unknown host and the maven build fails. How do I overcome this?
Application properties:
spring.datasource.url=jdbc:mysql://mymysqlk8servicename/testdb
When I build the application using mvn clean install, the build fails with error as java.net.UnknownHostException.
For the record, I am running the maven build in the master machine of the Kubernetes cluster. Should I run the java application only as a Kubernetes service? Is it possible to just run the java application without deploying in the Kubernetes cluster?
If you do
kubectl get service
You should be able to see the servicename. Pay attention to the port too.

How can I run a Spring REST service in the IntelliJ debugger (built via maven)

I am able to build the Sprint RESTful server and then run the server from the command line using:
java -jar rest-service-0.0.1-SNAPSHOT.jar
But how can I run it under the IntelliJ debugger? In IntelliJ in the Maven Projects window it includes Lifecycle choices of: package, site, & deploy but none of these if run under the debugger actually start the server.

In the Quarkus Amazon Lambda HTTP guide the Lambda runtime cannot find QuarkusStreamHandler on the classpath

As this issue hasn't been raised already I'm obviously missing something simple. I am following the Quarkus - Amazon Lambda with Resteasy, Undertow, or Vert.x Web guide using the 1.0.0.Final release (I've also tried the CR and 0.28.1 releases).
I have this packaged as an Uber jar.
I have run the mvn quarkus-bootstrap:build-tree and this shows the io.quarkus:quarkus-amazon-lambda-http-deployment:jar:1.0.0.Final with it's dependant jars and checking the generated runner jar shows that the io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler.class file is present.
However, whenever I run this either in the AWS SAM environment or in AWS proper I get the dreaded java.lang.ClassNotFoundException: io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler
I'm at a loss where to turn. I'm compiling using Maven 3.6.2 and Graal 19.2.1 (though not the native compilation).
If anyone stumbles across this, I found that adding "quarkus.package.uber-jar=true" to application.properties folder is required when working with maven.
https://quarkus.io/guides/maven-tooling

Spring Maven rest web service - What is the URL when deploying on real web server?

I followed this tutorial https://spring.io/guides/gs/rest-service/ by creating maven project in intellij, addind pom.xml etc. Then I run on localhost exactly as written in the tutorial and all works:
http://localhost:8080/greeting
When greeting came from the annotation of method in the controller #RequestMapping("/greeting").
Then I made JAR artifact & deployed it to Tomact on 'real server' (Elastic beanstalk environment running EC2 instance on AWS).
I got from AWS the base URL of my webserver running Tomact. What is now the suffix to my service? This is NOT working:
http://someEnvironmentName.elasticbeanstalk.com/greeting
EDIT: How I made the artifact JAR
In intellij I can compile & run maven project and then test it in localhost. So what I did:
Right click on the project name->Open Module Settings->Artifacts->Add->Jar
Build->Build Artifacts->Selecting the Jar from above
Maybe I need to build WAR? And how to deal with the POM.xml? Now my pom is exactly as in the linked tutorial.
Thanks,
If you use spring-boot, you donĀ“t need a tomcat because spring include an embedded tomcat. Only you run the application with Maven. So, the advantage of spring-boot is not dependent on an application server and using other containers such as Docker.
Do you put the port in the call to your webserver?
On the other hand, check your server logs to see if there are any problem.
Solution (Thanks to #JBNizet suggestion):
Follow this link http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-create-a-deployable-war-file
Modify the Application.java file
Modify the pom.xml (By adding one more dependency)
Then if you are using Intellij IDE under Build->Build Artifacts will be automatically option for WAR file.
Just deploy to AWS elasticbeanstalk instance running EC2 in the usual way. The URL is:
http://someEnvironmentName.elasticbeanstalk.com/greeting

Weblogic Maven Plugin Deployment Issue

I'm using eclipse Kepler, Weblogic 10.3.5 and Maven 3.0.5 with the Weblogic-Maven-Plugin. When I deploy my application using eclipse Run As...Run On Server, this is what I get:
When I deploy this way, you see the application on the Weblogic Server and I'm able to reach my application through my localhost link.
When I use the Weblogic-Maven-Plugin, this is what I get:
You see the application has been placed under the adminServer and I get an error when I try to reach the application through my localhost link (Yes, I even ran the start-app command).
I have few questions:
Why is it that when I use the weblogic-maven-plugin, it deploys under the adminServer?
Is there a way to have the weblogic-maven-plugin deploy in a similar fashion as the Run As option in eclipse?
Why can I not reach the application with my localhost link after deploying with the plugin?
Any help is greatly appreciated.
I face this problem some weeks ago but in another environment Jdeveloper 12c with Maven and OJMake and OJDeploy.
The deployment is the last step on your way to run our application on WLS(WebLogic Server)
How do i solve the issue?
I create an Maven Ear projet
I create also Maven War project
I add the war project in the ear project also dependency and later also web_module
My deploy(to WLS) Configuration is in the pom from Ear project.
I you use run as from Eclipse or Jdeveloper there is a complex mechanism which do the work for us. If we want maven to do the job for us, then we must tell him what to do. We must also know what type of archive file we suppose to send/deploy to WLS

Resources