JMeter throws java.lang.NoSuchMethodError: org.apache.jmeter.samplers.SampleSaveConfiguration.setFormatter(Ljava/text/DateFormat;) - jmeter

2017-09-29 12:39:56,306 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2017-09-29 12:39:56,307 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2017-09-29 12:39:56,312 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.NoSuchMethodError:
org.apache.jmeter.samplers.SampleSaveConfiguration.setFormatter(Ljava/text/DateFormat;)
at kg.apc.jmeter.JMeterPluginsUtils.doBestCSVSetup(JMeterPluginsUtils.java:256) ~[jmeter-plugins-cmn-jmeter-0.3.jar:?]
at kg.apc.jmeter.perfmon.PerfMonCollector.setupSaving(PerfMonCollector.java:136) ~[jmeter-plugins-perfmon-2.1.jar:?]
at kg.apc.jmeter.perfmon.PerfMonCollector.testStarted(PerfMonCollector.java:113) ~[jmeter-plugins-perfmon-2.1.jar:?]
at org.apache.jmeter.reporters.ResultCollector.testStarted(ResultCollector.java:355) ~[ApacheJMeter_core.jar:3.2 r1790748]
at kg.apc.jmeter.vizualizers.CorrectedResultCollector.testStarted(CorrectedResultCollector.java:28) ~[jmeter-plugins-cmn-jmeter-0.3.jar:?]
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:218) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:388) ~[ApacheJMeter_core.jar:3.2 r1790748]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_65]

As per UBIK LOAD PACK 's answer and Subho comment above:
For Jmeter 3.3 and jpgc-perfmon-2.1 (latest versions as I write), after the install of the perfmon zip file into Jmeter, you need to:
- remove the jmeter-plugins-cmn-jmeter-0.3.jar from the /lib directory
- and replace it with jmeter-plugins-cmn-jmeter-0.4.jar (available from Maven Central).
Thanks so much guys! Spent hours on this (I dont have enough reputation to just add a comment to UBIKs answer)

You are using a version of Perfmon plugin which is incompatible with Apache JMeter version as per this message:
java.lang.NoSuchMethodError:
org.apache.jmeter.samplers.SampleSaveConfiguration.setFormatter(Ljava/text/DateFormat;)
So either update jmeter-plugins perfmon plugin or downgrade your jmeter.

Related

How do I fix JMeterPluginsCMD "Missing plugin type specification" error

I'm trying to use the JMeterPluginsCMD on Windows to generate load test result graphs after a JMeter run. I installed the plugin manually because I can't use the JMeter Plugins Manager. (I don't have the network information I need to configure it). When I run a simple command .\JMeterPluginsCMD.bat, I get an error message. What can I do about this error message?
Here's the error message ERROR: java.lang.IllegalArgumentException: Missing plugin type specification
Here's the full error output:
~\Desktop\apache-jmeter-5.1.1\bin> .\JMeterPluginsCMD.bat
2019-08-12 12:10:29,564 WARN o.a.j.u.JMeterUtils: Exception 'null' occurred when fetching String property:'sampleresult.default.encoding', defaulting to: ISO-8859-1
2019-08-12 12:10:29,571 WARN o.a.j.u.JMeterUtils: Exception 'null' occurred when fetching String property:'jmeterPlugin.prefixPlugins'
2019-08-12 12:10:29,572 INFO k.a.j.PluginsCMDWorker: Using JMeterPluginsCMD v. N/A
2019-08-12 12:10:29,574 INFO o.a.j.u.JMeterUtils: Setting Locale to en_US
2019-08-12 12:10:29,578 INFO k.a.j.JMeterPluginsUtils: Loading user properties from: C:\Path\apache-jmeter-5.1.1\bin\user.properties
2019-08-12 12:10:29,582 INFO k.a.j.JMeterPluginsUtils: Loading system properties from: C:\Path\apache-jmeter-5.1.1\bin\system.properties
ERROR: java.lang.IllegalArgumentException: Missing plugin type specification
*** Problem's technical details go below ***
Home directory was detected as: C:\Path\apache-jmeter-5.1.1\lib
Exception in thread "main" java.lang.IllegalArgumentException: Missing plugin type specification
at kg.apc.jmeter.PluginsCMDWorker.checkParams(PluginsCMDWorker.java:78)
at kg.apc.jmeter.PluginsCMDWorker.doJob(PluginsCMDWorker.java:104)
at kg.apc.cmdtools.ReporterTool.processParams(ReporterTool.java:255)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:62)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:115)
~\Desktop\apache-jmeter-5.1.1\bin>
You are missing plugin-type parameter, example:
JMeterPluginsCMD.bat --generate-png test.png --input-jtl results.jtl --plugin-type ResponseTimesOverTime --width 800 --height 600
Your plugin jar should be available in lib/ext folder
Make note that you need to install corresponding plugins set to have Extras plugins available in CMD.

Getting Error 500 in SMTP sampler in JMeter

I am getting this error while running the SMTP Sampler in JMeter:
Response code: 500
Response message: IOException while sending message
And I got the following in the logs:
javax.mail.MessagingException: IOException while sending message at
com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1167)
~[mail-1.5.0-b01.jar:1.5.0-b01] at
org.apache.jmeter.protocol.smtp.sampler.protocol.SendMailCommand.execute(SendMailCommand.java:303)
~[ApacheJMeter_mail.jar:3.2 r1790748] at
org.apache.jmeter.protocol.smtp.sampler.SmtpSampler.executeMessage(SmtpSampler.java:169)
[ApacheJMeter_mail.jar:3.2 r1790748] at
org.apache.jmeter.protocol.smtp.sampler.SmtpSampler.sample(SmtpSampler.java:146)
[ApacheJMeter_mail.jar:3.2 r1790748] at
org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:491)
[ApacheJMeter_core.jar:3.2 r1790748] at
org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:425)
[ApacheJMeter_core.jar:3.2 r1790748] at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:254)
[ApacheJMeter_core.jar:3.2 r1790748] at java.lang.Thread.run(Unknown
Source) [?:1.8.0_201] Caused by: java.io.FileNotFoundException: V:\001
Automation\Automation Scripts\Test Plan\Cloud\Final\Priority 6 -
Process (Access is denied) at java.io.FileInputStream.open0(Native
Method) ~[?:1.8.0_201]
What would probably the cause of the issue and how it will be resolved?
According to the error message JMeter cannot access the following file:
V:\001 Automation\Automation Scripts\Test Plan\Cloud\Final\Priority 6 - Process
make sure to amend the permissions to the file and make sure the user account under which you're running JMeter has access to the given file.
Also be aware that according to JMeter Best Practices you should always be using the latest version of JMeter so consider upgrading to JMeter 5.1 (or whatever is the latest stable version which is available at JMeter Downloads page) as soon as possible.

JMeter: No Class Def Found Error: kg/apc/jmeter/JMeterPluginsUtils

I'm trying to run a JMeter test and I keep getting the error listed below. I'm running in non-gui mode on an EC2 instance. I know I'm missing a .jar file and that's what is causing the error. But when I head over to Apache to look through their JMeter plugins, I can't find one that resolves this error.
2017-09-06 21:18:12,954 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.NoClassDefFoundError: kg/apc/jmeter/JMeterPluginsUtils
at kg.apc.jmeter.PluginsCMDWorker.<init>(PluginsCMDWorker.java:51) ~[jmeter-plugins-cmd-2.1.jar:?]
at kg.apc.jmeter.listener.GraphsGeneratorListener.testEnded(GraphsGeneratorListener.java:146) ~[jmeter-plugins-graphs-ggl-2.0.jar:?]
at kg.apc.jmeter.listener.GraphsGeneratorListener.testEnded(GraphsGeneratorListener.java:137) ~[jmeter-plugins-graphs-ggl-2.0.jar:?]
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfEnd(StandardJMeterEngine.java:230) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:498) ~[ApacheJMeter_core.jar:3.2 r1790748]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141]
Caused by: java.lang.ClassNotFoundException: kg.apc.jmeter.JMeterPluginsUtils
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_141]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_141]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_141]
Your JMeter Plugins installation is corrupt, double check you have jmeter-plugins-cmn-jmeter-0.3.jar file in the "lib" folder of your JMeter installation. If not - you will have to re-install JMeterPluginsCMD Command Line Tool
Be aware that recommended way of installing JMeter Plugins and keeping them up-to-date is using JMeter Plugins Manager
If you are running in Non-UI mode just remove the plugin element from your jmx file.

Jmeter include controller relative path

We are using Jmeter-maven-plugin and created a maven project in eclipse. My test file (MainTest.jmx) is in src/test/jmeter folder, in this test we used "include controller" to reuse test fragments. These fragments are stored in src/test/jmeter/fragments. We tried following relative path in include controller
../fragments/FragmentA.jmx
src/test/jmeter/fragments/FragmentA.jmx
Tried propertiesUser option in pom.xml
<propertiesUser>
<fragments.directory>src/test/jmeter/fragments</fragments.directory>
</propertiesUser>
Include controller failing to load .jmx file. Getting following
ERROR
o.a.j.c.IncludeController: Include Controller 'Include Controller'
can't load '${__P(fragments.directory)}/fragmentA.jmx' - see log for
details.
java.io.IOException: loadIncludedElements -failed for:
E:\Luna\ADXJmeter\target\jmeter\bin\${__P(fragments.directory)}\FragmentA.jmx and E:\Luna\ADXJmeter\target\jmeter\testFiles\${__P(fragments.directory)}\FragmentA.jmx
Complete Log
> 2017-05-24 12:14:39,442 INFO o.a.j.c.IncludeController: loadIncludedElements -- try to load included module: E:\Luna\ADXJmeter\target\jmeter\bin\FragmentA.jmx
> 2017-05-24 12:14:39,442 INFO o.a.j.c.IncludeController: loadIncludedElements -failed for: E:\Luna\ADXJmeter\target\jmeter\bin\FragmentA.jmx
> 2017-05-24 12:14:39,442 INFO o.a.j.c.IncludeController: loadIncludedElements -Attempting to read it from: E:\Luna\ADXJmeter\target\jmeter\testFiles\FragmentA.jmx
> 2017-05-24 12:14:39,442 ERROR o.a.j.c.IncludeController: Include Controller 'Include Controller' can't load 'FragmentA.jmx' - see log for details
> 2017-05-24 12:14:39,443 ERROR o.a.j.u.JMeterUtils: Including file "FragmentA.jmx" failed for Include Controller "Include Controller", unexpected error - see log for details
> 2017-05-24 12:14:39,443 WARN o.a.j.c.IncludeController: Including file "FragmentA.jmx" failed for Include Controller "Include Controller", unexpected error
> java.io.IOException: loadIncludedElements -failed for: E:\Luna\ADXJmeter\target\jmeter\bin\FragmentA.jmx and E:\Luna\ADXJmeter\target\jmeter\testFiles\FragmentA.jmx
> at org.apache.jmeter.control.IncludeController.loadIncludedElements(IncludeController.java:139) [ApacheJMeter_components-3.2.jar:3.2 r1790748]
> at org.apache.jmeter.control.IncludeController.resolveReplacementSubTree(IncludeController.java:111) [ApacheJMeter_components-3.2.jar:3.2 r1790748]
> at org.apache.jmeter.JMeter.runNonGui(JMeter.java:936) [ApacheJMeter_core-3.2.jar:3.2 r1790748]
> at org.apache.jmeter.JMeter.startNonGui(JMeter.java:910) [ApacheJMeter_core-3.2.jar:3.2 r1790748]
> at org.apache.jmeter.JMeter.start(JMeter.java:538) [ApacheJMeter_core-3.2.jar:3.2 r1790748]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
Have you read the documentation prior to attempting to use Include Controller this way?
This element does not support variables/functions in the filename field.
However, if the property includecontroller.prefix is defined, the contents are used to prefix the pathname.
The same chapter provides the clue: you have includecontroller.prefix property and JMeter will attempt to find the file under the path of includecontroller.prefix + Filename
So you should amend your configuration as follows:
<propertiesUser>
<includecontroller.prefix>src/test/jmeter/fragments</includecontroller.prefix>
</propertiesUser>
And use just FragmentA.jmx in the Include Controller.
Check out How to Manage Large JMeter Scripts With JMeter Test Fragments for more information on working with modular JMeter tests.

Jmeter Warning Showing up each time on opening

I am using Jmeter GUI and upon opening it is showing warning this is what error log shows:2
017-04-28 03:44:07,288 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.assertions.BSFAssertion
2017-04-28 03:44:10,020 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.extractor.BSFPostProcessor
2017-04-28 03:44:10,123 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.modifiers.BSFPreProcessor
2017-04-28 03:44:10,221 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2017-04-28 03:44:10,221 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2017-04-28 03:44:10,221 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2017-04-28 03:44:10,221 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2017-04-28 03:44:10,222 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2017-04-28 03:44:10,222 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser
2017-04-28 03:44:11,571 ERROR o.a.j.e.KeyToolUtils: Exception checking for keytool existence, will return false
java.io.IOException: Cannot run program "keytool": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source) ~[?:1.8.0_73]
at org.apache.jorphan.exec.SystemCommand.run(SystemCommand.java:142) ~[jorphan.jar:3.2 r1790748]
at org.apache.jorphan.exec.SystemCommand.run(SystemCommand.java:125) ~[jorphan.jar:3.2 r1790748]
at org.apache.jorphan.exec.KeyToolUtils.checkKeytool(KeyToolUtils.java:436) ~[jorphan.jar:3.2 r1790748]
at org.apache.jorphan.exec.KeyToolUtils.<clinit>(KeyToolUtils.java:94) ~[jorphan.jar:3.2 r1790748]
at org.apache.jmeter.protocol.http.proxy.ProxyControl.<clinit>(ProxyControl.java:248) ~[ApacheJMeter_http.jar:3.2 r1790748]
at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.createPortPanel(ProxyControlGui.java:708) ~[ApacheJMeter_http.jar:3.2 r1790748]
at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.init(ProxyControlGui.java:664) ~[ApacheJMeter_http.jar:3.2 r1790748]
at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.<init>(ProxyControlGui.java:239) ~[ApacheJMeter_http.jar:3.2 r1790748]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_73]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_73]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_73]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_73]
at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_73]
at org.apache.jmeter.gui.util.MenuFactory.initializeMenus(MenuFactory.java:505) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.gui.util.MenuFactory.<clinit>(MenuFactory.java:169) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.control.gui.TestPlanGui.createPopupMenu(TestPlanGui.java:93) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.gui.tree.JMeterTreeNode.createPopupMenu(JMeterTreeNode.java:156) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.gui.action.EditCommand.doAction(EditCommand.java:46) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:74) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:59) ~[ApacheJMeter_core.jar:3.2 r1790748]
at java.awt.event.InvocationEvent.dispatch(Unknown Source) [?:1.8.0_73]
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_73]
at java.awt.EventQueue.access$500(Unknown Source) [?:1.8.0_73]
at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_73]
at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_73]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_73]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_73]
at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_73]
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_73]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_73]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_73]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_73]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_73]
at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_73]
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method) ~[?:1.8.0_73]
at java.lang.ProcessImpl.<init>(Unknown Source) ~[?:1.8.0_73]
at java.lang.ProcessImpl.start(Unknown Source) ~[?:1.8.0_73]
... 35 more
2017-04-28 03:44:14,937 INFO o.a.j.e.KeyToolUtils: keytool found at 'C:\Program Files\Java\jre1.8.0_73\bin\keytool'
2017-04-28 03:44:14,938 INFO o.a.j.p.h.p.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file D:\Jmeter\apache-jmeter-3.2\bin\proxyserver.jks
2017-04-28 03:44:15,997 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.protocol.java.sampler.BSFSampler
2017-04-28 03:44:16,117 INFO o.a.j.s.FileServer: Default base='D:\Jmeter\apache-jmeter-3.2\bin'
2017-04-28 03:44:16,852 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.protocol.mongodb.config.MongoSourceElement
2017-04-28 03:44:16,854 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.protocol.mongodb.sampler.MongoScriptSampler
2017-04-28 03:44:20,136 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.timers.BSFTimer
2017-04-28 03:44:20,265 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.visualizers.BSFListener
2017-04-28 03:44:20,922 INFO o.a.j.s.SampleResult: Note: Sample TimeStamps are START times
2017-04-28 03:44:20,923 INFO o.a.j.s.SampleResult: sampleresult.default.encoding is set to ISO-8859-1
2017-04-28 03:44:20,923 INFO o.a.j.s.SampleResult: sampleresult.useNanoTime=true
2017-04-28 03:44:20,924 INFO o.a.j.s.SampleResult: sampleresult.nanoThreadSleep=5000
Note:I tried running it with administrator but it was of no use.Also on using constant timer status is always shows warning signs for each sample.Much thanks in advance for guidance.
The error you are getting indicates that JMeter cannot find keytool utility which is a part of Java Runtime Environment or Development Kit.
However if you look into the next line after the error:
2017-04-28 03:44:14,937 INFO o.a.j.e.KeyToolUtils: keytool found at 'C:\Program Files\Java\jre1.8.0_73\bin\keytool'
so you can ignore this warning (or report it via JMeter bugzilla) so developers could take a look into it.
In the meantime I would recommend the following workaround:
Uninstall your jre1.8.0_73 (it is old in any case)
Download latest version of 64-bit Server JRE or JDK from Oracle website
Install it to the folder which doesn't contain spaces or non-ASCII characters, i.e. to C:\java
Add the next 2 lines to beginning of jmeter.bat startup script:
set JAVA_HOME=c:\java
set PATH=%JAVA_HOME%\bin;%PATH%
It should give JMeter a "good" Java configuration and the issue should go away.
See How to Get Started With JMeter: Part 1 - Installation & Test Plans article for proper steps on installing and starting using JMeter
On Windows, you may experience the failure of expanding the environment variable PATH, like:
C:\>echo %PATH%
C:\ProgramData\Oracle\Java\javapath;%JAVA_HOME%\bin;C:\Windows\System32;
Notice the literal value %JAVA_HOME%\bin. This is caused by:
'PATH' contains reference of other variable
'PATH' is modified without evaluation (e.g. by program)
Solution
Open the environment setting box
Do some modification of the value of PATH (trigger the expansion of variables)
This should fix the problem. We can now open a new cmd window and check the value of PATH.
C:\>echo %PATH%
C:\ProgramData\Oracle\Java\javapath;C:\java\jdk1.8.0_121\bin;C:\Windows\System32;
Note that the value %JAVA_HOME%\bin has been expanded to C:\java\jdk1.8.0_121\bin.

Resources