I am running jmeter 4.0 on my centos 7 system from command line but getting below error, please help.
JMeter command:-
./jmeter -n -t file_load.jmx -l loadResult.csv
Error:
Unrecognized VM option 'MaxMetaspaceSize=256m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
java -version
Picked up _JAVA_OPTIONS: -Xmx512M
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
Make sure you really run JMeter with Java 8, double-check which Java you're using via alternatives --config java command
For instance I cannot reproduce your issue with Java 8 but with Java 7 it fails:
As per What’s New in JMeter 4.0? article you need to use at least Java 8 to run JMeter 4.0
Related
I have the following problem: I would like to have a .sh file that starts a jar file so I have created one with nano and added the following:
java -jar myjarfile.jar
But Java gives me the following error "Error: Unable to access jarfile myjarfile.jar" so I tried to start it directly from the console with the same command. This works without problems so I checked the rights:
chmod 775 myjarfile.jar
chmod 775 start.sh
But I have exactly the same result. So I tried it with the root account but that did not help either. So slowly I'm a little bit desperate because I can not think of it anymore...
System information:
Linux version 4.9.0-8-amd64 (debian-kernel#lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08)
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
Thanks for any answer :)
I am currently using java 1.8 on my Mac Sierra.
java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
Now I want to run "jshell" for executing simple java commands right from the terminal. But I ended up with the following error message -
Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/jshell" (-1)
What is the workaround do I need to do for avoiding this error message ?
As pointed out by #Elliott, you need to download and install Java-9 for working with jshell.
Once you have set the environment variable to make use of the /jdk../.../bin directory. You can execute the command jshell on your command line to get going.
I ran the command /iReport-5.5.0/bin$ ./ireport.sh to run iReport designer but the terminal showed me some errors as following
Unrecognized VM option 'MaxPermSize=512m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit..
Here is the result of my java -version:
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
How do I fix it?
The problem is that you are using java 8 and IReport is not compatable with that version ... however if you have also old version of java installed (say 1.6.0_26) than you can still run Ireport.
You can edit ireport.conf file (e.g. iReport-5.5.0\etc\ireport.conf)
and add
jdkhome="C:\Program Files\Java\jdk1.6.0_26"
Note that you should have java6 jdk also installed on your system for the above to work.
I'm using Talend 5.4.1 (from the VM).
I'm getting the following error when trying to run talend job (from each of the projects):
Error:
Could not find or load main class expenses_2.etladtech_0_1.ETLADTECH.
for more help i added the java version i'm using. (after observing the issue in other posts i saw that it's recommended to add it)
so I ran the command from the cmd of the VM:
[root#dev-talend1 ~]# java -version
Response:
classpath=.;%JAVA_HOME%\jre\lib\rt.jar;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\too ls.jar;
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing)
bash: fg: %JAVA_HOME%jrelibrt.jar: no such job
bash: fg: %JAVA_HOME%libdt.jar: no such job
bash: fg: %JAVA_HOME%libtools.jar: no such job
You have new mail in /var/spool/mail/root
[root#dev-talend1 ~]#
what can i do to solve it?
You're using Windows environment variables (%JAVA_HOME%) on a Unix machine. Use $JAVA_HOME instead. And don't run services as root.
Thanks for the quick responses.
In the end i didn't find the cause for the error but after upgrading to a newer version of Talend 5.6.0 it was fixed.
I restarted my Rails 4 VPS and Solr was obviously also shutdown. I am now trying to startup Solr but when I run the following RAILS_ENV=production bundle exec rake sunspot:solr:start I get the following error message:
rake aborted!
Sunspot::Solr::Server::JavaMissing: You need a Java Runtime Environment to run the Solr server
/home/dani/.rvm/gems/ruby-2.1.2/gems/sunspot_solr-2.1.1/lib/sunspot/solr/server.rb:203:in `ensure_java_installed'
/home/dani/.rvm/gems/ruby-2.1.2/gems/sunspot_solr-2.1.1/lib/sunspot/solr/server.rb:27:in `initialize'
/home/dani/.rvm/gems/ruby-2.1.2/gems/sunspot_solr-2.1.1/lib/sunspot/solr/tasks.rb:37:in `new'
/home/dani/.rvm/gems/ruby-2.1.2/gems/sunspot_solr-2.1.1/lib/sunspot/solr/tasks.rb:37:in `server'
/home/dani/.rvm/gems/ruby-2.1.2/gems/sunspot_solr-2.1.1/lib/sunspot/solr/tasks.rb:5:in `block (3 levels) in <top (required)>'
/home/dani/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/home/dani/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => sunspot:solr:start
(See full trace by running task with --trace)
The weird thing is that Java is installed:
$ echo $JAVA_HOME
/usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java
$ java -version
java version "1.6.0_31"
OpenJDK Runtime Environment (IcedTea6 1.13.3) (6b31-1.13.3-1ubuntu1~0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
I'm not sure what might be causing this behavior. Any suggestions?
Try adding to PATH the folder where java is, like this:
export PATH=$PATH:/path/to/java/bin
so that java could be callable from everywhere without specifying the folder.
Launching this before calling rake solved the problem for me.