当前位置: 首页 > 知识库问答 >
问题:

jmeter中的堆大小错误

丌官炎彬
2023-03-14

当我在jenkins中触发一个具有3000个用户计数的jmeter测试的作业时,我在jmeter-server中得到以下异常.log文件

2018-05-16 15:26:45,696 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.testbeans.gui.GenericTestBeanCustomizer

at org.apache.jmeter.testbeans.BeanInfoSupport.createPropertyGroup(BeanInfoSupport.java:255) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jmeter.config.CSVDataSetBeanInfo.<init>(CSVDataSetBeanInfo.java:58) ~[ApacheJMeter_components.jar:4.0 r1823414]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_25]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_25]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_25]

at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_25]

at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_25]
    at com.sun.beans.finder.InstanceFinder.instantiate(Unknown Source) ~[?:1.8.0_25]

    at com.sun.beans.finder.InstanceFinder.find(Unknown Source) ~[?:1.8.0_25]

at java.beans.Introspector.findExplicitBeanInfo(Unknown Source) ~[?:1.8.0_25]

at java.beans.Introspector.<init>(Unknown Source) ~[?:1.8.0_25]

at java.beans.Introspector.getBeanInfo(Unknown Source) ~[?:1.8.0_25]

at org.apache.jmeter.testbeans.TestBeanHelper.prepare(TestBeanHelper.java:66) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jmeter.threads.TestCompiler.trackIterationListeners(TestCompiler.java:183) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jmeter.threads.TestCompiler.subtractNode(TestCompiler.java:137) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:998) ~[jorphan.jar:4.0 r1823414]

at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:995) ~[jorphan.jar:4.0 r1823414]

at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:977) ~[jorphan.jar:4.0 r1823414]

at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:611) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:246) ~[ApacheJMeter_core.jar:4.0 r1823414]

at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]
2018-05-16 15:26:45,712 INFO o.a.j.t.JMeterThread: Thread finished: Users 1-1157
2018-05-16 15:26:45,712 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.testbeans.gui.GenericTestBeanCustomizer

at org.apache.jmeter.testbeans.BeanInfoSupport.createPropertyGroup(BeanInfoSupport.java:255) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jmeter.config.CSVDataSetBeanInfo.<init>(CSVDataSetBeanInfo.java:58) ~[ApacheJMeter_components.jar:4.0 r1823414]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_25]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_25]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_25]

at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_25]

at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_25]
    at com.sun.beans.finder.InstanceFinder.instantiate(Unknown Source) ~[?:1.8.0_25]

    at com.sun.beans.finder.InstanceFinder.find(Unknown Source) ~[?:1.8.0_25]

at java.beans.Introspector.findExplicitBeanInfo(Unknown Source) ~[?:1.8.0_25]

at java.beans.Introspector.<init>(Unknown Source) ~[?:1.8.0_25]

at java.beans.Introspector.getBeanInfo(Unknown Source) ~[?:1.8.0_25]

at org.apache.jmeter.testbeans.TestBeanHelper.prepare(TestBeanHelper.java:66) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jmeter.threads.TestCompiler.trackIterationListeners(TestCompiler.java:183) ~[ApacheJMeter_core.jar:4.0 r1823414]

    at org.apache.jmeter.threads.TestCompiler.subtractNode(TestCompiler.java:137) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:998) ~[jorphan.jar:4.0 r1823414]

at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:995) ~[jorphan.jar:4.0 r1823414]

    at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:977) ~[jorphan.jar:4.0 r1823414]

at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:611) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:246) ~[ApacheJMeter_core.jar:4.0 r1823414]

at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]
2018-05-16 15:26:45,790 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\Java\jre1.8.0_25\bin\awt.dll: ”ÛH`ÚH¼ÖH—‹„G¶

at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[?:1.8.0_25]

at java.lang.ClassLoader.loadLibrary0(Unknown Source) ~[?:1.8.0_25]

at java.lang.ClassLoader.loadLibrary(Unknown Source) ~[?:1.8.0_25]

at java.lang.Runtime.loadLibrary0(Unknown Source) ~[?:1.8.0_25]
    at java.lang.System.loadLibrary(Unknown Source) ~[?:1.8.0_25]

at java.awt.Toolkit$3.run(Unknown Source) ~[?:1.8.0_25]
    at java.awt.Toolkit$3.run(Unknown Source) ~[?:1.8.0_25]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_25]

at java.awt.Toolkit.loadLibraries(Unknown Source) ~[?:1.8.0_25]
    at java.awt.Toolkit.<clinit>(Unknown Source) ~[?:1.8.0_25]

at java.awt.Component.<clinit>(Unknown Source) ~[?:1.8.0_25]

at org.apache.jmeter.testbeans.BeanInfoSupport.createPropertyGroup(BeanInfoSupport.java:255) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jmeter.config.CSVDataSetBeanInfo.<init>(CSVDataSetBeanInfo.java:58) ~[ApacheJMeter_components.jar:4.0 r1823414]

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_25]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_25]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_25]

at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_25]

at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_25]

at com.sun.beans.finder.InstanceFinder.instantiate(Unknown Source) ~[?:1.8.0_25]

at com.sun.beans.finder.InstanceFinder.find(Unknown Source) ~[?:1.8.0_25]

at java.beans.Introspector.findExplicitBeanInfo(Unknown Source) ~[?:1.8.0_25]

at java.beans.Introspector.<init>(Unknown Source) ~[?:1.8.0_25]
    at java.beans.Introspector.getBeanInfo(Unknown Source) ~[?:1.8.0_25]

at org.apache.jmeter.testbeans.TestBeanHelper.prepare(TestBeanHelper.java:66) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jmeter.threads.TestCompiler.trackIterationListeners(TestCompiler.java:183) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jmeter.threads.TestCompiler.subtractNode(TestCompiler.java:137) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:998) ~[jorphan.jar:4.0 r1823414]

at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:995) ~[jorphan.jar:4.0 r1823414]

at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:977) ~[jorphan.jar:4.0 r1823414]

at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:611) ~[ApacheJMeter_core.jar:4.0 r1823414]

at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:246) ~[ApacheJMeter_core.jar:4.0 r1823414]

at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]
2018-05-16 15:26:45,805 INFO o.a.j.t.JMeterThread: Thread finished: Users 1-990
2018-05-16 15:26:45,805 ERROR o.a.j.JMeter: Uncaught exception: 

我在一台远程机器上运行测试。我还想运行50000用户计数的测试。我该如何通过jenkins设置堆大小呢

我还得到Java . lang . unsatisfiedlinkerror:C:\ Program Files(x86)\ Java \ JRE 1 . 8 . 0 _ 25 \ bin \ awt . dll异常

共有2个答案

姜鸿畴
2023-03-14
C:\Program Files (x86)\Java\jre1.8.0_25\
                 ^^^^ 

我强烈怀疑你能否用32位JRE接触到50,000(甚至3000)个虚拟用户。根据甲骨文留档

在大多数现代32位Windows系统上,最大堆大小将在1.4G到1.6G之间。

因此,请考虑尽快迁移到64位Server JRE,并将HEAP大小调整为总可用物理RAM的80%左右。另外,请确保您遵循了《JMeter负载测试“内存不足”故障指南的9个简单解决方案》中的其他建议。

此外,50 000个虚拟用户似乎无法在一台机器上启动,很可能您将不得不进行分布式测试。

万高洁
2023-03-14

您的 Java 安装似乎已损坏。

重新安装它(jdk会更好),然后重试。

 类似资料:
  • 在JMeter分布式测试中使用非GUI模式时,如何更改所有从机的堆大小? 我想从主机器触发这个。C:\jeter\bin\jmeter.bat-n-t C:\test.jmx-Juser=10000-R192.168.0.19,192.168.0.29…… 我可以在这里传递一些参数,以便从主机器更改所有从机器的堆大小吗?

  • 我遇到了我最近升级到的Intellij 2019.2.1版本的问题。我已经在智能帮助中设置了Xms和Xmx - 现在,当我启动应用程序时,在应用程序的VM参数中,我传递-Xmx800m,然后在运行应用程序时,它抛出一个错误,指出“初始堆大小设置为大于最大堆大小的值”。 有人能告诉我我在这里放了什么错误的配置吗?还是我漏掉了什么?

  • 我是Java的初学者,刚开始使用Intellij作为我的IDE。 当我使用它时,有时会延迟。 我更改了我的 xms 和 xmx 以获得更大的堆大小(xms = 1024,xmx = 2048),但它抛出了一个错误。 所以,我把它回滚了。 错误消息是这样的:“初始堆大小设置为大于最大堆大小的值”。 有什么问题? 如果可能,如何增加最大堆大小? 我用的是笔记本电脑,它有8GB内存。x64Intelli

  • 在stanford core nlp我已安装java运行时环境的文件夹中运行命令java-MX4G-CP“*”edu.stanford.nlp.pipeline.StanfordCorenlpServer-port 9000-timeout 15000时,出现以下错误: 无效的最大堆大小:-XMX4G指定的大小超过了可表示的最大大小。错误:无法创建Java虚拟机。错误:发生致命异常。程序将退出。

  • 我得到了这个StackOverFlow错误,我完全理解,但问题是我不是在处理大数据,那么这个错误是怎么产生的呢? 我有一个活动,框架布局,一个片段,3个选项。 在片段中,当你点击其中一个选项时,它会重新创建片段并放入随机数,最大值是,所以它没那么大,当用户快速点击导致溢出的选项时会发生此错误。 这是生成代码,关于“增强”它有什么想法吗?我不知道这段代码是否是一种不好的记忆使用方法。

  • 问题内容: 我正在使用具有8 GB RAM的Windows 2003服务器(64位)。如何增加堆内存的最大值?我正在使用该标志将堆大小增加到1500 Mb。是否可以将堆内存增加到物理内存(6 GB堆)的75%? 问题答案: 你可以在32位系统上增加到4GB。如果你使用的是64位系统,则可以更高。如果你选择的错误,不用担心,如果你在32位系统上要求5g,则Java会抱怨一个无效的值并退出。 正如其他