Jmeter error occurred when running jmeter.bat - jmeter

just download and extracted jmeter on my pc.
when i double click jmeter.bat, this error occurred
An error occurred: class com.google.common.collect.AbstractMapBasedMultimap over
rides final method setMap.(Ljava/util/Map;)V
errorlevel=1
Press any key to continue . . .
why is jmeter have to do with com.google.common.collect.AbstractMapBasedMultimap.
any idea what is wrong with my environment?
im using
apache-jmeter-2.11 and java version "1.7.0_51"
i have also extracted 5 plugins: standard set, extras with lib set, extras set, WebDriver set and Hadoop set.
updated:
i sort of found out the problem. It is because i din't extract the plugins in correct order.
it must follow this order: Extras > ExtrasLib > Hadoop > Standard > WebDriver when extracting the plugins into jmeter directory. Then the jmeter can be started without error.

You error may be related to the presence of 2 different versions of GUAVA library.
I suppose you are using some third party JMeter plugin (possibly JMeter-Plugins + Selenium Driver).
You may find this interesting:
http://www.simplehooman.co.uk/2013/03/jmeter-could-not-initialize-class-org-apache-jmeter-gui-util-menufactory/

Related

HL7 FHIR IG Publisher returns java NullPointerException

I'm trying to generate documentation of my HL7 FHIR profiles using IG Publisher (publisher.jar). I'm running it on command line on macOS. I've uploaded the IG resource on Simplifier and it validates with no errors.
The problem is that i'm getting java.lang.NullPointerException. Full output below:
java -jar publisher.jar -ig fsh-generated/resources/ImplementationGuide-nfz.pozplus.json -tx n/a
FHIR IG Publisher Version 1.1.120 (Git# 210e48f945ad). Built 2022-05-13T15:20:39.709Z (8 days old)
Detected Java version: 11.0.10 from /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home on Mac OS X/x86_64 (64bit). 2048MB available
dir = /Users/marcingrudzien/Library/CloudStorage/OneDrive-Osobisty/Praca/iEHReu/NFZ/POZ-Plus/FHIR/sushi-test/NfzTest, path = /Users/marcingrudzien/.gem/ruby/3.1.2/bin:/Users/marcingrudzien/.rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/bin:/Users/marcingrudzien/.rubies/ruby-3.1.2/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Postgres.app/Contents/Versions/latest/bin
Parameters: -ig fsh-generated/resources/ImplementationGuide-nfz.pozplus.json -tx n/a
Start Clock # sobota, 21 maja 2022 20:56:04 czas środkowoeuropejski letni (2022-05-21T20:56:04+02:00)
API keys loaded from /Users/marcingrudzien/fhir-api-keys.ini (00:00.0027)
Package Cache: /Users/marcingrudzien/.fhir/packages (00:00.0030)
Load Configuration from /Users/marcingrudzien/Library/CloudStorage/OneDrive-Osobisty/Praca/iEHReu/NFZ/POZ-Plus/FHIR/sushi-test/NfzTest/fsh-generated/resources/ImplementationGuide-nfz.pozplus.json (00:00.0053)
Root directory: /Users/marcingrudzien/Library/CloudStorage/OneDrive-Osobisty/Praca/iEHReu/NFZ/POZ-Plus/FHIR/sushi-test/NfzTest/fsh-generated/resources (00:00.0084)
Publishing Content Failed: null (00:00.0086)
(00:00.0087)
Use -? to get command line help (00:00.0087)
(00:00.0087)
Stack Dump (for debugging): (00:00.0088)
java.lang.NullPointerException
at org.hl7.fhir.igtools.publisher.Publisher.initializeFromJson(Publisher.java:2947)
at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:2168)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:854)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:10144)
I hope someone here could help me. I could provide any additional information, if needed.
From the stack dump, you are missing a "path" property in your json config file, but I highly recommend that you switch to using the new set up, a ini file that points to a template and a IG resource. Use something like the sample-ig as a starter (https://github.com/FHIR/sample-ig) or see the how-to (https://build.fhir.org/ig/FHIR/ig-guidance/index.html)

Jmeter - How to set Jmeter to pick up specific Java version (windows)

My windows system has two Java versions: 15 & 17
I want to make Jmeter pick up version 15.
I set path as: C:\Program Files\Java\jdk-15.0.2\bin
And JAVA_HOME as C:\Program Files\Java\jdk-15.0.2
When I do: java -version I have:
But still seems like Jmeter is picking up Java 17 due to an exception when I run code that contains JSR223 Assertion
2022-05-12 13:40:51,300 ERROR o.a.j.a.JSR223Assertion: Problem in JSR223 script: JSR223 Assertion
javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Unsupported class file major version 61
How to 'force' Jmeter to pick up java 15?
It's sufficient to set the Java version you want to use to be ahead of other Javas in PATH environment variable and JMeter will pick it up.
set PATH="C:\Program Files\Java\jdk-15.0.2\bin";%PATH%
In order to check what Java version JMeter is using you can add a Debug Sampler configured like:
and look for java.version property in the View Results Tree listener
or just look for java.version line in the JMeter.log file
Milk and honey for me here were:
1 set path as: set PATH="C:\Program Files\Java\jdk-15.0.2\bin";%PATH%
2 lunch Jmeter from cmd as: java -jar ApacheJMeter.jar
coz launching from 'ApacheJMeter.jar' probably initiated hardcode java version
the alternative is the creation of .bat launcher as:
a) create startJmeter.bat
b) put inside
c:
cd C:\apache-jmeter-5.4.3\bin
java -jar ApacheJMeter.jar

Error while generating report in apache-jmeter-5.4.1.tgz

sh jmeter.sh -n -t filePath.jmx -l outFilePath.jtl -e -o folderPath
Error generating the report: org.apache.jmeter.report.dashboard.GenerationException: Error while processing samples: Consumer failed with message :Consumer failed with message :Consumer failed with message :Consumer failed with message :Begin size 0 is not equal to fixed size 5
In resume
Consumer failed with message :Begin size 0 is not equal to fixed size 5
currently using Java version "17" 2021-09-14 LTS
MacOS big SUR version 11.4
the properties files are fresh and values are equal to the default ones
Jmeter 5.4.1
outFile.jtl
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect
1632430450882,1117,HTTP Request,200,OK,FIRST_Jmeter_Test 1-3,text,true,,3824,557,3,3,Url_hidden,1111,0,256
1632430450448,1755,HTTP Request,200,OK,FIRST_Jmeter_Test 1-2,text,true,,3836,557,3,3,Url_hidden,1755,0,690
1632430450448,1755,HTTP Request,200,OK,FIRST_Jmeter_Test 1-1,text,true,,3828,557,3,3,Url_hidden,1755,0,690
1632430452312,585,HTTP Request,200,OK,FIRST_Jmeter_Test 1-2,text,true,,3836,557,3,3,Url_hidden,585,0,144
1632430452238,758,HTTP Request,200,OK,FIRST_Jmeter_Test 1-3,text,true,,3832,557,3,3,Url_hidden,757,0,137
1632430452301,806,HTTP Request,200,OK,FIRST_Jmeter_Test 1-1,text,true,,3828,557,3,3,Url_hidden,805,0,136
1632430452962,550,HTTP Request,200,OK,FIRST_Jmeter_Test 1-2,text,true,,3824,557,3,3,Url_hidden,550,0,152
1632430453328,593,HTTP Request,200,OK,FIRST_Jmeter_Test 1-1,text,true,,3828,557,2,2,Url_hidden,592,0,135
1632430453276,815,HTTP Request,200,OK,FIRST_Jmeter_Test 1-3,text,true,,3840,557,1,1,Url_hidden,814,0,142
The thread run successfully and the jtl file is created as well.
I quite new on Jmeter and tried to see where that "size" attribute is currently locate to see how change it, but could not find it on any *.properties file
any though how can be this fixed, what the message is referring to?
thanks
This error is likely due to an incompatibility of JMeter with Java 17 (as mentioned by Dmitri T).
Whilst we wait for a fix, a workaround would be downgrading to Java 16. I can confirm this solved the issue for me.
I had the same issue with:
MacOS big SUR version 11.6
Jmeter 5.4.1 (installed via brew)
Temurin 11 (LTS) OpenJDK & Temurin 8 (LTS) OpenJDK
Running Jmeter with Java 8 solved my issue. The problem was, that Jmeter always used Java 11. I struggled some days to find out, how to set the Jmeter Java version:
set the correct Java 8 Home in: /usr/local/Cellar/jmeter/5.4.1/bin/jmeter:
JAVA_HOME=$JAVA_8_HOME exec "/usr/local/Cellar/jmeter/5.4.1/libexec/bin/jmeter" "$#"
Maybe there are easier ways to set Java 8 for Jmeter - but this was the only solution which worked for me.
I had Java 8 installed however, the JMeter was picking up Java 1.17 which was nowhere in my system. So uninstalling and reinstalling jmeter, worked like a charm for me.
I cannot reproduce your issue using:
openjdk:8-jre-alpine docker image
JMeter 5.4.1
Test plan Test.jmx from extras folder of JMeter
Demo:
If you cannot reproduce the above behaviour I think you made some changes either to Results File Configuration or to Reporting Configuration or both so you need to inspect all the JMeter Properties which differ from the defaults and restore their values to the original ones.
If you need further support you need to share at least first 2 lines of your outFilePath.jtl results file. Better if possible the full file and all the .properties files from JMeter's "bin" folder.
exec commandline /usr/libexec/java_home -V
enter image description here
replace bin of jmeter JAVA_HOME
enter image description here
and then ,it is success.

Starting a payara 5 has encountered

I have build a very simple project of hello world in
Payara 5 (5.181)
JSF 2.3
JDK 1.8
CDI 2.0
Maven
and encountered a problem
Unable to start server due following issues: Launch process failed with exit code 1
in console it throws an error of :
Error: Could not find or load main class server\payara5\glassfish.lib.grizzly-npn-bootstrap.jar
[PIC] Payara 5 Error
It seems that the Payara Tools for Eclipse suffer by several bugs that may cause this. In my case, the following workarounds helped:
The Payara installation path should not contain spaces (e.g. Program Files\Payara)
It seems that only Java 8 is supported at the time
Open the domain.xml configuration file for the domain you are trying to start (typically payara_install_path/glassfish/domains/domain1/config/domain1.xml) and search for "Xbootclasspath". You should find a couple of lines like
<jvm-options>[1.8.0|1.8.0u120]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar</jvm-options>
<jvm-options>[1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar</jvm-options>
<jvm-options>[1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar</jvm-options>
<jvm-options>[1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
Depending of your installed Java version (try running java --version) and choose the appropriate line (most likely the last one). Remove the remaining lines and remove the [...] part at the beginning of the chosen line so you will get something like
<jvm-options>-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
After this, the tools seem to start normally.
The Problem is with Java version. The grizzly-npn-bootstrap-1.8.1.jar Jar is placed in bootclasspath, thats why it requires proper java version to start payara server. So remove unnecessary bootstrap jar from domain.xml.
In Windows:
1) Go To ---C:\Users\xxxx\payara5\glassfish\domains\domain1\config\domain.xml
2) According to my java verson(java version "1.8.0_191") I deleted the following lines from domain.xml. So delete according to your java version.
<jvm-options>[1.8.0|1.8.0u120]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar</jvm-options>
<jvm-options>[1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar</jvm-options>
<jvm-options>[1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar</jvm-options>
3) Remove this [1.8.0u191|1.8.0u500] part from jvm-options & Edit the line in your domain.xml(w.r.t java -version) as shown below
<jvm-options>-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
4) restart your server.
As Radkovo said, "The Payara installation path should not contain spaces (e.g. Program Files\Payara)", so I moved the Payara to the Documents folder.
Problem solved!

Too small initial heap error - stanford parser

I am trying my hands on the Stanford dependency parser. I tried running the parser from command line on windows to extract the dependencies using this command:
java -mx100m -cp "stanford-parser.jar" edu.stanford.nlp.trees.EnglishGrammaticalStructure -sentFile english-onesent.txt -collapsedTree -CCprocessed -parserFile englishPCFG.ser.gz
I am getting the following error:
Error occurred during initialization of VM
Too small initial heap
I changed the memory size to -mx1024, -mx2048 as well as -mx4096. It didn't change anything and the error persists.
What am I missing?
Type -Xmx1024m instead of -mx1024.
See https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html
It should be -mx1024m. I skipped m.
One more thing: in the -cp, the model jar should also be included.
... -cp "stanford-parser.jar;stanford-parser-3.5.2-models.jar"...
(assuming you are using the latest version).
Otherwise an IO Exception will be thrown.
There may be some arguments that are preexisting in the IDE.
In eclipse:
Go to-> Run as-> run configuration-> Arguments
then Delete the arguments that are used previously.
Restart your eclipse.
Worked for me!

Resources