使用自定义JRE时,JMeter不会开始

时间:2014-08-14 11:53:06

标签: java jmeter

当我尝试运行JMeter Java Request Sampler测试时,我遇到了问题。我们在公司使用经过修改的IBM JRE,我无法使用它来启动JMeter。如果我尝试,我会收到错误:

java.lang.VerifyError: org.apache.http.conn.scheme.PlainSocketFactory
at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:451)
at java.net.URLClassLoader.access$300(URLClassLoader.java:79)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1034)
at java.security.AccessController.doPrivileged(AccessController.java:284)
at java.net.URLClassLoader.findClass(URLClassLoader.java:429)
at java.lang.ClassLoader.loadClass(ClassLoader.java:653)
at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:172)
at org.apache.jorphan.reflect.ClassFinder.isChildOf(ClassFinder.java:465)
at org.apache.jorphan.reflect.ClassFinder.access$000(ClassFinder.java:46)
at org.apache.jorphan.reflect.ClassFinder$FilterTreeSet.add(ClassFinder.java:106)
at org.apache.jorphan.reflect.ClassFinder$FilterTreeSet.add(ClassFinder.java:63)
at org.apache.jorphan.reflect.ClassFinder.findClassesInOnePath(ClassFinder.java:532)
at org.apache.jorphan.reflect.ClassFinder.findClassesInPaths(ClassFinder.java:548)
at org.apache.jorphan.reflect.ClassFinder.findClassesThatExtend(ClassFinder.java:291)
at org.apache.jmeter.gui.action.ActionRouter.populateCommandMap(ActionRouter.java:257)
at org.apache.jmeter.gui.action.ActionRouter.getInstance(ActionRouter.java:300)
at org.apache.jmeter.JMeter.startGui(JMeter.java:231)
at org.apache.jmeter.JMeter.start(JMeter.java:380)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.apache.jmeter.NewDriver.main(NewDriver.java:259)

我尝试了一种解决方法,并使用我们修改过的JRE编译了我的Java测试。然后我将所需的jar放在JMeter的lib \ ext文件夹中,但是当我尝试使用标准IBM JRE在JMeter中运行测试时(JMeter使用此JRE)我收到一个错误:

java.lang.IncompatibleClassChangeError: org.omg.CORBA.Environment
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:306)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:143)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:700)
at java.net.URLClassLoader.access$400(URLClassLoader.java:81)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1148)
at java.security.AccessController.doPrivileged(AccessController.java:366)
at java.net.URLClassLoader.findClass(URLClassLoader.java:583)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:756)
at java.lang.ClassLoader.loadClass(ClassLoader.java:733)
at java.lang.ClassLoader.loadClass(ClassLoader.java:703)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.apache.jorphan.reflect.ClassFinder.isChildOf(ClassFinder.java:465)
at org.apache.jorphan.reflect.ClassFinder.access$000(ClassFinder.java:46)
at org.apache.jorphan.reflect.ClassFinder$FilterTreeSet.add(ClassFinder.java:106)
at org.apache.jorphan.reflect.ClassFinder$FilterTreeSet.add(ClassFinder.java:63)
at org.apache.jorphan.reflect.ClassFinder.findClassesInOnePath(ClassFinder.java:532)
at org.apache.jorphan.reflect.ClassFinder.findClassesInPaths(ClassFinder.java:548)
at org.apache.jorphan.reflect.ClassFinder.findClassesThatExtend(ClassFinder.java:291)
at org.apache.jmeter.gui.action.ActionRouter.populateCommandMap(ActionRouter.java:257)
at org.apache.jmeter.gui.action.ActionRouter.getInstance(ActionRouter.java:300)
at org.apache.jmeter.JMeter.startGui(JMeter.java:231)
at org.apache.jmeter.JMeter.start(JMeter.java:380)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:607)
at org.apache.jmeter.NewDriver.main(NewDriver.java:259)

我有什么想法可以让它发挥作用吗?

1 个答案:

答案 0 :(得分:0)

如果使用最近的jmeter版本,你的ibm jvm需要兼容java6。

如果使用了良好的版本,JMeter即使使用IBM jvms也能正常工作。