尝试保存测试计划文件时出现JMeter错误

lawou6xi  于 2023-02-04  发布在  其他
关注(0)|答案(4)|浏览(553)

当我尝试在JMeter中保存我的测试计划时,出现了以下错误:无法保存到文件(访问被拒绝)有人能帮助我吗?
日志跟踪如下所示:

ERROR o.a.j.g.a.Save: Failed to backup file : C:\Program Files 
(x86)\Sisteplant\LoadTests\TestDefinitions\HandlingUnitStateChangeSimulation.jmx
java.io.FileNotFoundException: C:\Program Files 
(x86)\Sisteplant\LoadTests\JMeter\backups\HandlingUnitStateChangeSimulation-000001.jmx (Acceso 
denegado)
at java.io.FileOutputStream.open0(Native Method) ~[?:1.8.0_191]
at java.io.FileOutputStream.open(Unknown Source) ~[?:1.8.0_191]
at java.io.FileOutputStream.<init>(Unknown Source) ~[?:1.8.0_191]
at java.io.FileOutputStream.<init>(Unknown Source) ~[?:1.8.0_191]
at org.apache.commons.io.FileUtils.doCopyFile(FileUtils.java:1142) ~[commons-io-2.5.jar:2.5]
at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1088) ~[commons-io-2.5.jar:2.5]
at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1040) ~[commons-io-2.5.jar:2.5]
at org.apache.jmeter.gui.action.Save.createBackupFile(Save.java:378) ~[ApacheJMeter_core.jar:3.2 
r1790748]
at org.apache.jmeter.gui.action.Save.doAction(Save.java:209) ~[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_191]
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_191]
at java.awt.EventQueue.access$500(Unknown Source) [?:1.8.0_191]
at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_191]
at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_191]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_191]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) 
[?:1.8.0_191]
at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_191]
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_191]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_191]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_191]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_191]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_191]
at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_191]

多谢了

pbossiut

pbossiut1#

很可能您的用户没有C:\Program Files (x86)文件夹的写入权限,因此您会收到此错误。
选择其他位置(您肯定对您的个人文件夹具有写入权限)
另一个选择是run JMeter as administrator,这样你就可以摆脱WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0错误,也可以解锁一些定制的持久性。
另请注意,根据9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure文章,您应始终使用最新版本的JMeter,因此请考虑在下一个可用的机会升级到JMeter 5.3(或JMeter Downloads页面上提供的最新稳定JMeter版本)。

s5a0g9ez

s5a0g9ez2#

不在Java8上对我来说是个问题。安装Java8,它会运行得很好。

eaf3rand

eaf3rand3#

请尝试以下方法:
1.将文件保存到其他

jtw3ybtb

jtw3ybtb4#

尝试 * 以下 *:

  • 打开JMeter-〉Options-〉Look and Feel-〉选择除Darcula以外的任何其他主题。
  • 重新启动JMeter
  • 创建测试计划并
  • 尝试保存。

保存应该可以。

相关问题