CreateJavaVM Failed - java

I have installed one of the old project using Java 11.0.2. When I tried starting tomcat 9 as a service I am getting below errors.
[2019-05-03 05:01:36] [info] [13044] Starting service...
[2019-05-03 05:01:36] [error] [ 9764] CreateJavaVM Failed
[2019-05-03 05:01:36] [error] [ 9764] The system cannot find the file
specified.
[2019-05-03 05:01:36] [error] [13044] Failed to start Java
[2019-05-03 05:01:36] [error] [13044] ServiceStart returned 4
[2019-05-03 05:01:36] [info] [13152] Run service finished.
[2019-05-03 05:01:36] [info] [13152] Commons Daemon procrun finished
I verified jvm.dll path. Its correct. Below are the command used to start tomcat service
C:\Java11\bin\tomcat9.exe //IS//TOMCATSERVER --StartClass
org.apache.catalina.startup.Bootstrap --StopClass
org.apache.catalina.startup.Bootstrap --StartParams start --StopParams
stop
Any help is appreciated.
Thanks in advance,
AKJ.

Related

Unable to run keycloak performance testsuite

I followed the steps provided by this README.md file
Keycloak testsuite readme
I am able to build the project but however when I run
cd testsuite/performance
mvn clean install
I am getting
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (configure-infinispan) on project performance-keycloak-infinispan-server: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /Users/sahilpaudel/Documents/Java/keycloak-testing/keycloak/testsuite/performance/infinispan/infinispan.xml:37: Execute failed: java.io.IOException: Cannot run program "./ispn-cli.sh" (in directory "/Users/sahilpaudel/Documents/Java/keycloak-testing/keycloak/testsuite/performance/infinispan/target/infinispan-server-10.1.8.Final/bin"): error=2, No such file or directory
[ERROR] around Ant part ...<ant antfile="infinispan.xml" target="configure-infinispan"/>... # 4:64 in /Users/sahilpaudel/Documents/Java/keycloak-testing/keycloak/testsuite/performance/infinispan/target/antrun/build-main.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :performance-keycloak-infinispan-server
Has anyone come across this issue and resolved it.
I tried there issue tracker but it hosted separately and not previous such stacktrace is there.
TLDR; If you need to take a performance test on Keycloak try the newer version https://github.com/keycloak/keycloak-benchmark instead.
I met the same issue on Keycloak 12.0.4, below is my research:
I found ispn-cli.sh is the old name of infinispan cli. Now the name is cli.sh
But event if you rename the cli.sh to ispn-cli.sh, it won't work. Because you will meet another issue like below, which means missing ...standalone/configuration/clustered.xml for short.
main:
check-configuration-state:
[echo] configured: ${configured}
[echo] management.configured: ${management.configured}
configure-infinispan:
[copy] Copying 1 file to /home/ubuntu/keycloak12/testsuite/performance/infinispan/target/infinispan-server-11.0.4.Final/bin
[exec] org.aesh.command.parser.CommandLineParserException: batch 'embed-server' is not a batch command. See 'batch --help'.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Keycloak Performance TestSuite 12.0.4:
[INFO]
[INFO] Keycloak Performance TestSuite ..................... SUCCESS [ 1.718 s]
[INFO] Keycloak Performance TestSuite - Keycloak Server ... SUCCESS [ 24.548 s]
[INFO] Keycloak Performance TestSuite - Wildfly ModCluster Load Balancer SUCCESS [ 15.843 s]
[INFO] Keycloak Performance TestSuite - Infinispan Server . FAILURE [ 2.869 s]
[INFO] Keycloak Performance TestSuite - Tests ............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 45.270 s
[INFO] Finished at: 2021-06-19T03:21:30Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (configure-infinispan) on project performance-keycloak-infinispan-server: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /home/ubuntu/keycloak12/testsuite/performance/infinispan/infinispan.xml:43: Warning: Could not find file /home/ubuntu/keycloak12/testsuite/performance/infinispan/target/infinispan-server-11.0.4.Final/standalone/configuration/clustered.xml to copy.
[ERROR] around Ant part ...<ant antfile="infinispan.xml" target="configure-infinispan"/>... # 4:64 in /home/ubuntu/keycloak12/testsuite/performance/infinispan/target/antrun/build-main.xml
[ERROR] -> [Help 1]
So I went through Keycloak git history and found this commit https://github.com/keycloak/keycloak/commit/df68ca8dcfd481ee64801fbc2cecaa0a6359285d
The infinispan version was based on jboss/infinispan-server:8.2.6.Final. Then, I checked the most closest version of infinispan-server(because 8.2.6.Final is not found anymore), it has all the necessary files.
$ unzip -l infinispan-server-8.1.3.Final-bin.zip | grep -E "standalone/configuration/|ispn-cli.sh"
0 2016-04-04 08:51 infinispan-server-8.1.3.Final/standalone/configuration/
2500 2016-04-04 08:51 infinispan-server-8.1.3.Final/bin/ispn-cli.sh
17968 2016-04-04 08:51 infinispan-server-8.1.3.Final/standalone/configuration/clustered.xml
1112 2016-04-04 08:51 infinispan-server-8.1.3.Final/standalone/configuration/mgmt-users.properties
711 2016-04-04 08:51 infinispan-server-8.1.3.Final/standalone/configuration/application-roles.properties
2697 2016-04-04 08:51 infinispan-server-8.1.3.Final/standalone/configuration/logging.properties
669 2016-04-04 08:51 infinispan-server-8.1.3.Final/standalone/configuration/mgmt-groups.properties
12084 2016-04-04 08:51 infinispan-server-8.1.3.Final/standalone/configuration/standalone.xml
935 2016-04-04 08:51 infinispan-server-8.1.3.Final/standalone/configuration/application-users.properties
Besides that, I found this, which is saying infinispan.version is based on root config. That means infinispan has changed a lot, but testsuite/performance/infinispan isn't keep up to date.
// testsuite/performance/infinispan/pom.xml
<infinispan.artifactId>infinispan-server-build</infinispan.artifactId>
<!--infinispan.version is located in the root pom.xml-->
<infinispan.unpacked.folder.name>infinispan-server-${infinispan.version}</infinispan.unpacked.folder.name>
And infinispan module was removed in this commit:
https://github.com/keycloak/keycloak/commit/54c5b1514f0611056f38053081d094cf5e5fd08a#diff-bc3567ad76edc320e3fa85c5e0e5380e09c11f94c8395b80064e195f2ef82793
So, I strongly doubt Keycloak testsuite/performance is stalled.

Maven deployment for GCP App Engine on Gitlab

I am using Maven to deploy a Java application on GitLab. I receive the following error. From what I understand it is using the the incorrect project and I don't understand which environment variable if they are using one or where they are getting that variable from. Every time I try to debug deploying with Maven on Gitlab I run into a new error is there a proper way to deploy on Gitlab?
This is my yml file
before_script:
- echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
- apt-get update && apt-get install -y google-cloud-sdk google-cloud-sdk-app-engine-java
- wget https://www-us.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz
- tar xzvf apache-maven-3.6.0-bin.tar.gz
test:1.1:
image: python:2.7
stage: deploy
environment: Production
only:
- master
script:
- echo $DEPLOY_KEY_FILE_PRODUCTION > $CI_PIPELINE_ID.json
- gcloud auth activate-service-account --key-file $CI_PIPELINE_ID.json
- ./apache-maven-3.6.0/bin/mvn clean appengine:deploy
This is the error
Dec 17, 2018 8:08:54 PM com.google.cloud.tools.appengine.cloudsdk.CloudSdk logCommand
INFO: submitting command: /usr/lib/google-cloud-sdk/bin/gcloud app deploy
[INFO] GCLOUD: ERROR: (gcloud.app.deploy) Permissions error fetching application [apps/gitlab-ci-155816]. Please make sure you are using the correct project ID and that you have permission to view applications on the project.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 45.781 s
[INFO] Finished at: 2018-12-17T20:08:55Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.2:deploy (default-cli) on project appengine-try-java: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.2:deploy failed: Non zero exit: 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Xampp Tomcat service (is not a valid win32)

I've read many topics such as Tomcat server is not starting as service: %1 is not a valid Win32 application or Tomcat 7 won't start
But it did not worked for me.
First of all I'm running Windows Server 64bits. I performed the following steps:
Downloaded Xampp (I believe it's 64bits..because I couldn't find a
64 bits in their website)
Download JDK 8.20 x64 bits
Since I was in doubt about the Tomcat in Xampp, I've download the Tomcat x64 and replace the whole content in the c:\xampp\tomcat\
After everything is installed I needed to update the Environment Variables, and so I did.
After completed this steps I installed successfully the Tomcat Service, although it gives error when starting. I found the logs of the errors I and get the following:
[info] [ 5096] Commons Daemon procrun (1.0.15.0 32-bit) started
[info] [ 5096] Running 'Tomcat7' Service...
[info] [ 4876] Starting service...
[error] [ 4876] %1 is not a valid Win32 application.
[error] [ 4876] Failed creating java C:\Program Files\Java\jdk1.8.0_20\bin\server\jvm.dll
[error] [ 4876] %1 is not a valid Win32 application.
[error] [ 4876] ServiceStart returned 1
[error] [ 4876] %1 is not a valid Win32 application.
[info] [ 5096] Run service finished.
[info] [ 5096] Commons Daemon procrun finished
So I check if the file jvm.dll existed in that folder (C:\Program Files\Java\jdk1.8.0_20\bin\server\jvm.dll), but I found that it does not. I searched a little more and I found that file is actually in the folder C:\Program Files\Java\jre1.8.0_20\bin\server\jvm.dll!
I then open Tomcat7 at C:\xampp\tomcat\bin and changed the path to the correct one.
But still, I keep getting the same error. What am I doing wrong?
Solved.
So, I had to do two steps.
Download jre-7u67-windows-x64.exe
Select, in the Tomcat7, in the tab "Java", the option "Use Default".
After that I was able to start the service properly. Plus, I've changed the port of tomcat in xampp, since by default is 8080, I changed to 9000 and I can now enter the project by localhost:9000/myproject

Error while building Hadoop src using maven

I want to install hadoop single node setup on windows7 64 bit. I have installed cygwin, windows SDK 7.1, maven 3.1.1 and jdk 1.6.33.
Running Hadoop single node setup on windows 7 is very trooublesome.
While buiding the "mvn package -Pdist,native-win -DskipTests -Dtar" i am getting below error.
Can someone help how to fix this error or any other way to build hadoop on windows 7 64 bit?
portion of the Error log is as follows:
[INFO] Apache Hadoop Main ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 41.461s
[INFO] Finished at: Wed Jun 11 19:42:25 IST 2014
[INFO] Final Memory: 53M/339M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
5.1:compile (default-compile) on project hadoop-common: Compilation failure: Com
pilation failure:
[ERROR] D:\hdfs\hadoop-common-project\hadoop-common\src\main\java\org\apache\had
oop\ipc\protocolPB\RefreshCallQueueProtocolPB.java:[26,65] package org.apache.ha
doop.ipc.proto.RefreshCallQueueProtocolProtos does not exist
[ERROR] D:\hdfs\hadoop-common-project\hadoop-common\src\main\java\org\apache\had
oop\ipc\protocolPB\RefreshCallQueueProtocolPB.java:[36,33] package RefreshCallQu
eueProtocolService does not exist
[ERROR] D:\hdfs\hadoop-common-project\hadoop-common\src\main\java\org\apache\had
oop\ipc\protocolPB\RefreshCallQueueProtocolServerSideTranslatorPB.java:[24,65] p
ackage org.apache.hadoop.ipc.proto.RefreshCallQueueProtocolProtos does not exist
You can download the latest hadoop release from this url:
http://apache.mirrors.tds.net/hadoop/common/stable/hadoop-2.2.0.tar.gz
You are complicating yourself for no reason: you only need to build hadoop in windows if your system is 32 bits (and good luck on that: I've been trying it for 3 weeks!). Since your system is 64 all you need to do is download a precompiled package

Pushing my repository (JAVA app) to heroku fails

Im building an app in playframework 2.2., and when I run the app locally with play run it runs fine but when I try to upload to heroku with git push heroku master it starts uploading fine but after a while it always ends with these errors:
[info] downloading http://s3pository.heroku.com/maven-central/org/par
ed/parboiled-core/1.1.5/parboiled-core-1.1.5.jar ...
[info] [SUCCESSFUL ] org.parboiled#parboiled-core;1.1.5!parboiled-c
jar(bundle) (245ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/ow2
/asm/4.1/asm-4.1.jar ...
[info] [SUCCESSFUL ] org.ow2.asm#asm;4.1!asm.jar (198ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/ow2
/asm-tree/4.1/asm-tree-4.1.jar ...
[info] [SUCCESSFUL ] org.ow2.asm#asm-tree;4.1!asm-tree.jar (109ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/ow2
/asm-analysis/4.1/asm-analysis-4.1.jar ...
[info] [SUCCESSFUL ] org.ow2.asm#asm-analysis;4.1!asm-analysis.jar
ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/ow2
/asm-util/4.1/asm-util-4.1.jar ...
[info] [SUCCESSFUL ] org.ow2.asm#asm-util;4.1!asm-util.jar (354ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/sca
ang/scala-compiler/2.10.3/scala-compiler-2.10.3.jar ...
[info] [SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.3!scala-com
r.jar (8070ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/sca
ang/jline/2.10.3/jline-2.10.3.jar ...
[info] [SUCCESSFUL ] org.scala-lang#jline;2.10.3!jline.jar (307ms)
[info] Done updating.
[info] Compiling 5 Scala sources and 11 Java sources to /tmp/scala_bu
ack_build_dir/target/scala-2.10/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.10.3. Compil
..
[info] Compilation completed in 23.023 s
[error] /tmp/scala_buildpack_build_dir/app/utils/DatabaseConnection.j
45: illegal start of type
[error] List<String> results = new ArrayList<>();
[error] ^
[error] 1 error
[error] (compile:compile) javac returned nonzero exit code
[error] Total time: 387 s, completed Mar 25, 2014 4:20:51 PM
! Failed to build app with sbt
! Push rejected, failed to compile Play 2.x - Java app
To git#heroku.com:glacial-plateau-2895.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:glacial-plateau-2895.git'
Can someone help me?
I've searched but i didn't find similar problems that could help me.
Thanks in advance.
[error] /tmp/scala_buildpack_build_dir/app/utils/DatabaseConnection.java:45:
illegal start of type
[error] List<String> results = new ArrayList<>();
[error] ^
Means that the JDK on your Heroku environment is Java 6 whereas your code is Java 7. Upgrade ;)
Here's info how to...
If you want to use java 7 on Heroku, you'll need to add a file with a directive in the root folder of your project. Details here - https://devcenter.heroku.com/articles/add-java-version-to-an-existing-maven-app

Categories