Common Errors with Java Scripts in Controller
Common Errors with Java Scripts in Controller
perfectspr 发表于3年前
Common Errors with Java Scripts in Controller
  • 发表于 3年前
  • 阅读 77
  • 收藏 1
  • 点赞 0
  • 评论 0

腾讯云 十分钟定制你的第一个小程序>>>   

摘要: Below are some common issues / errors that are faced while replaying / running java vuser scripts in loadrunner.

"22994 : Error:Unable to create Java VM"

This error usually means that the PATH and the CLASSPATH environment  variables are not set properly.
Delete ini file for Vugen:
a. Shutdown  Vugen.
b. Go to "Window install directory" and look for vugen.ini.  Delete the file. LoadRunner will recreate new configuration file when VuGen is   launched.
c. Launch VuGen and run the script again. 

"22997 Java Vuser Compilation failed"

Make sure that LoadRunner and the Java environment are set up  properly.
1. Ensure the "jdk install dir"\bin and "LoadRunner Install dir"\bin  directories are in the PATH environment variable.
2. Ensure "LoadRunner Install dir"\classes, "LoadRunner Install dir"\classes\srv, and "JDK install dir"\jre\lib\rt.jar are in the   CLASSPATH environment variable (preferably at the beginning of the   entry).
3. Add any necessary application CLASSPATHs to the environment  variable.
4. Remove potentially conflicting entries in both the PATH and  CLASSPATH entries (sometimes having the Java environment set up for QTP  will conflict with the LoadRunner compilation process).
5. If you are running the script on a remote load generator,  make sure that you apply the same update (1-4 ) there, and then, restart the  LoadRunner agent.
6. Make sure that any classpaths specified in the Run-Time  settings of the script are valid on the load generator machine as  well.


"22992 Can't find Actions.class"

Make sure that there is a file named "Actions.class" within the  script directory. This is the Java bytecode file generated from compiling  Actions.java. If this file does not exits, there could be a compilation problem. 
If the file exits, verify the folllowing:
1. Ensure the  "JDK Install dir"\bin and "LoadRunner Install dir"\bin directories are in the PATH  environment variable.
2. Ensure "LoadRunner Install dir"\classes, "LoadRunner Install dir"\classes\srv, and "JDK Install dir"\jre\lib\rt.jar are in the   CLASSPATH environment variable (preferably at the beginning of the   entry).
3. Add any necessary application CLASSPATHs to environment  variable.
4. Remove potentially conflicting entries in both the PATH and  CLASSPATH entries (sometimes having the Java environment set up for QTP will conflict with the LoadRunner compilation process).
5. Make sure to restart the Controller or VuGen in order to have  changes in steps 1-4 registered.
6. If the script was working and started to throw the above  error for no obvious reasons, try to clean up the initilization files and  reregister LoadRunner's DLL. To reregister the DLLs and recreate the   configuration files:

a. Make sure all the LoadRunner applications are  closed.
b. Go to "LoadRunner Install dir"\bin directory and execute  register_vugen.bat.
c. Go to C:\Winnt, back up vugen.ini, then delete the  file. LoadRunner will recreate new configuration files when VuGen is launched.  
7. The JVM is limited to 56 KB per function. If one or more of  the functions within the Actions class is too big, you will get the above error.  To resolve this, break the function up into multiple functions.

共有 人打赏支持
粉丝 3
博文 42
码字总数 1198
×
perfectspr
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: