JNLP XX:-UseSplitVerifier in 1.7 - java-7

Is there a way how to set -XX:-UseSplitVerifier jvm arg in JNLP file in 1.7? In doc I did not find it is supported and when I tried it is ignored.

Related

maven cargo plugin : how to customize logging.properties?

I use a cargo plugin with tomcat8x as container-id on linux.
The maven command cargo:run make jvm using a default logging.properties, which seems to be built by the plugin, and I can see the -Djava.util.logging.config.file=/thePath/conf/logging.properties at the end of the process command (thePath is catalina.base)
This file is a very simple default logging.properties (I can see the comment # Codehaus CARGO, copyright 2004- etc... inside).
I'm trying to use an other -D .... logging.properties via the property <cargo.start.jvmargs> in my pom.xml but it comes at the first position in the process, so the default one is still used.
So how could I do ? Thank you.

How to fix problem 'Unsupported major.minor version 52.0' when trying to start Logstash

I want to start service Logstash in my server, but when I trying to start, I got warning info log. Is it any problem solved for this issue?
All of my setting was same with information as on web, start from configuration on startup.option, jvm.option, logstash.yml and logstash-sample.conf but when I try to start, it thorws below error :
[root#CDS01~/logstash]$./bin/logstash -e warning: ignoring
JAVA_OPTS=-Dsysid=CTAG_WEB_SERVER -DCTAG_CONFIG=/app1/am/cds -server
-Xms2048m -Xmx2048m -XX:MaxPermSize=128m -XX:+UseParNewGC -XX:ParallelGCThreads=2 -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=50; pass JVM parameters via LS_JAVA_OPTS
This issue happens when some of your libraries are compiled using different JRE version, then your running JRE version.
You must be using some incompatible versions of JAR in your application. let me know which version of Logstash and which JDK you are using and any site which you are following to install and run your application?
Please refer this Unsupported major.minor version 52.0 SO question on detailed explanation about it.
Please check the Logstash site for the compatible JDK version based on your version.
Looks like you are using some of the jars which are compiled using JRE 8, while you are using the JRE 7 or lower which are causing the issue, Please refer How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version of more information on different class versions of JRE and how to fix this exception.

No main manifest attribute found in Corda Standalone Shell jar of Corda Enterprise v4.0

I want to evaluate Corda Standalone Shell of Corda Enterprise v4.0.
I have downloaded corda-shell-4.0.jar from below URL
https://www.r3.com/corda-enterprise-download/
And refering to below document
https://docs.corda.r3.com/releases/4.0/shell.html?highlight=standalone%20shell#the-standalone-shell I am analysing the Standalone Shell and when I run java -jar corda-shell-4.0.jar command then I get the following error:
no main manifest attribute, in corda-shell/corda-shell-4.0.jar
When I checked the MANIFEST.MF file then there is no Main-Class specified in the Manifest file.
Can anyone please guide me how to use the standalone shell?
Have a read of this - https://docs.corda.r3.com/releases/4.0/cli-application-shell-extensions.html .
It the jar is not meant to be run via java -jar. Instead, you install the CLI commands and need to set up some config to get it all to work.

SonarQube startup Error: log4j2 could not find a logging implementation. Please add log4j2 to the filepath

I resolved this issue, I did it by following the instructions found here:
Elasticsearch installation : Error missing 'server' JVM at ...jvm.dll
I was using SonarQube fine the day before, but today when I tried to start the program I'm getting a error.
I have not changed anything on SonarQube as far as I know, I did made a successful connection with SonarQube to Jenkins. But if I remember correctly, I didn't had to install/change files for SonarQube for this(I just made a project, and generated a user login token for Jenkins). Also, I'm sure I'm using the "vanilla" version of SonarQube.
Download and install Java
Go to
c:/program files/java/jre/bin
and create a folder called "server"
Now go into the
c:/program files/java/jre/bin/client
and copy all data of this folder to
c:/program files/java/jre/bin/Server
updating/reinstalling the target jre (jre-8u181-windows-x64 for sonarqube 6.7.x) resolved this for me
I copied these jar in this route and it worked:
path: sonarqube-6.7/lib
log4j-api
log4j-core
This is a side effect; your have a JRE in your Windows PATH.
You need a JDK in your %PATH% // see previous error log
jvm 1 | Error: missing `server' JVM at `C:\Program Files (x86)\Java\jre1.8.0_191\bin\server\jvm.dll'.
jvm 1 | Please install or use the JRE or JDK that contains these missing components.
Used JDK 15, had same issue
Installed OpenJDK 11 instead (https://jdk.java.net/java-se-ri/11)
opened "[path to sonarqube folder]\conf\wrapper.conf"
replaced "wrapper.java.command=java"
with "wrapper.java.command=C:\Program Files\Java\jdk-11\bin\java.exe"
worked for me.

How to add enable flag for Flight Recorder in Maven project?

I'm just about start using Java Mission Control 5.3.0.
I have added -XX:+UnlockCommercialFeatures -XX:+FlightRecorder into my web-app's jetty.template.
Then I start the web-app with mvn jetty:run.
But while I was starting Flight Recorder I got the problem occurred pop-up as below.
'Start Flight Recording.. (Last attempt failed)' have encountered a problem.Commercial features are not enabled. In JDK7u4 and above,the JVM must be started with -XX:+UnlockCommercialFeatures -XX:+FlightRecorder .
And I also try adding the flags as below into pom.xml but it doesn't work.
<jvmArgs>
<jvmArg>-Xmx128m</jvmArg>
<jvmArg>-Xms128m</jvmArg>
<jvmArg>-XX:MaxPermSize=512m</jvmArg>
<jvmArg>-XX:+UnlockCommercialFeatures</jvmArg>
<jvmArg>-XX:+FlightRecorder</jvmArg>
<jvmArg>-XX:StartFlightRecording=duration=160s,delay=20s,settings=profile,filename=target/recording.jfr</jvmArg>
</jvmArgs>
What should I do for enable Flight Recorder on my web-app?
That configuration should be added to the running VM of Jetty so I'd try this:
mvn jetty:run -XX:+UnlockCommercialFeatures -XX:+FlightRecorder
I could not test this, and I work most on Tomcat, but I think this could help you
I got the answer by using below.
export MAVEN_OPTS="$MAVEN_OPTS -XX:+UnlockCommercialFeatures -XX:+FlightRecorder"
If you are using jcmd command from jdk, then could enable JFR via:
jcmd 31118 VM.unlock_commercial_features
Then use JFR.
e.g
jcmd 31118 JFR.start name=a
After some tests, I'll add something that could help someone else :
This is the JVM (Azul Zulu) I am using for my tests :
openjdk version "1.8.0_272"
OpenJDK Runtime Environment (Zulu 8.50.0.21-CA-linux64) (build 1.8.0_272-b17)
OpenJDK 64-Bit Server VM (Zulu 8.50.0.21-CA-linux64) (build 25.272-b17, mixed mode)
I created in the top of the project a file :
.mvn/jvm.config
That contains only one instruction :
-XX:StartFlightRecording=filename=build.jfr
Then, do whatever mvn goal you want to do and look for the build.jfr command you want.
Zulu's JVM has flight record enabled by default, so you this is one step less to worry.
It is important to mention that, in my case I had several JVM's installed in my machine and the mvn command uses JAVA_HOME variable, so make sure it is pointing to the right jvm.

Resources