做个记录。
问题记录:
jmeter版本:5.4.1
本地Java版本:1.8.0_151
执行jmeter,报错:
2022-10-14 12:06:27,372 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[填报角色分配 1-1,6,main] java.lang.UnsupportedClassVersionError: oracle/jdbc/OracleDriver has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_151] at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_151] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_151] at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[?:1.8.0_151] at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[?:1.8.0_151] at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[?:1.8.0_151] at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[?:1.8.0_151] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_151] at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[?:1.8.0_151] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_151] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_151] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_151] at java.lang.Class.forName(Class.java:264) ~[?:1.8.0_151] at org.apache.commons.dbcp2.DriverFactory.createDriver(DriverFactory.java:44) ~[commons-dbcp2-2.8.0.jar:2.8.0] at org.apache.commons.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:462) ~[commons-dbcp2-2.8.0.jar:2.8.0] at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:528) ~[commons-dbcp2-2.8.0.jar:2.8.0] at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:734) ~[commons-dbcp2-2.8.0.jar:2.8.0] at org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSourceComponentImpl.getConnection(DataSourceElement.java:362) ~[ApacheJMeter_jdbc.jar:5.4.1] at org.apache.jmeter.protocol.jdbc.config.DataSourceElement.getConnection(DataSourceElement.jav
解决办法:
将java版本更新为:18.0.1.1,重启jmeter,问题解决。
标签:lang,151,java,URLClassLoader,1.8,commons,报错,jmeter From: https://www.cnblogs.com/silgen/p/16793052.html