![](/img/trans.png)
[英]Could not initialize class org.apache.jmeter.protocol.http.parser.CssParser - JMeter
[英]Could not initialize class org.apache.jmeter.protocol.http.proxy.ProxyControl
嗨,我正在嘗試在 IntelliJ 中運行我的 java 代碼,並且還嘗試初始化 apache JMeter,但有人可以解釋一下可能是錯的嗎?
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.protocol.http.proxy.ProxyControl
at jdk.internal.reflect.GeneratedConstructorAccessor8.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.lang.Class.newInstance(Class.java:584)
at org.apache.jmeter.save.converters.TestElementConverter.unmarshal(TestElementConverter.java:100)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readBareItem(AbstractCollectionConverter.java:132)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:117)
at org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readBareItem(AbstractCollectionConverter.java:132)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:117)
at org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at org.apache.jmeter.save.ScriptWrapperConverter.unmarshal(ScriptWrapperConverter.java:95)
... 22 more
java.lang.IllegalArgumentException: Problem loading XML from:'C:\Users\IEUser\Desktop\apache-jmeter-3.1\bin\transactions\PetStore\all_transactions_local_server.jmx', missing class com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception : java.lang.NoClassDefFoundError
cause-message : Could not initialize class org.apache.jmeter.protocol.http.proxy.ProxyControl
first-jmeter-class : org.apache.jmeter.save.converters.TestElementConverter.unmarshal(TestElementConverter.java:100)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jmeter.save.ScriptWrapper
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan/hashTree/hashTree/ProxyControl
line number : 15
version : 3.1 r1770033
根據NoClassDefFoundError描述:
如果 Java 虛擬機或 ClassLoader 實例嘗試加載 class 的定義(作為正常方法調用的一部分或作為使用新表達式創建新實例的一部分)並且找不到 ZA2F2ED2AA2A4F8EBC2CBB4C21 的定義。
搜索到的 class 定義在編譯當前正在執行的 class 時存在,但無法再找到該定義。
你至少需要:
在您的項目類路徑中,一旦完成,您將能夠運行您的代碼。
您可能還會發現在不使用 JMeter GUI 和jmeter-from-code示例項目的情況下啟動 JMeter 測試的五種方法有用/有趣
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.