码迷,mamicode.com
首页 > 编程语言 > 详细

Common Errors with Java Scripts in Controller

时间:2014-11-21 16:49:19      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:style   io   ar   os   sp   java   for   strong   on   

"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.

Common Errors with Java Scripts in Controller

标签:style   io   ar   os   sp   java   for   strong   on   

原文地址:http://my.oschina.net/sunpr/blog/347213

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!