05-31-2013 03:23 PM
I'm trying to play back a VuGen 11.5 script I recorded on a Java application using the Java Record Replay. I keep getting errors such as:
Message 7697 package com.timetra.nms.common.generated.generic.ejb does not exist [MsgId: MERR-22986] Actions.java (Path) NewScript80
I've found where these jar files are, and the entire folder is in the Classpath, and I'm still getting these missing files. I even went so far as adding them to the script, and it's still not working. :( The ultimate goal is to be able to take the script I'm working on, and publish it to a Business Process Monitor for monitoring purposes. I'm puzzled as to why it can't find the file, when it's being told where the files are.
05-31-2013 05:19 PM
05-31-2013 05:29 PM
So every JAR file that I identified is located in a local folder, C:\SAM\jars. That folder is in my local DOS CLASSPATH variable, and it's still not working. If I add the JAR file to the script itself, then it seems to get past the one error. The problem is, I have over 4,000 JAR files in play here. I would like to figure out why it's not seeing the JAR files natively.
06-03-2013 05:27 AM - edited 06-03-2013 05:31 AM
You should add every jar’s fullpath to CLASSPATH variable, not the folder (see http://docs.oracle.com/javase/6/docs/technotes/too
Adding 4000 files is a tedious task, of course. If you have Cygwin or MS Services for Unix or something like that installed on your host, I’d suggest to run the following command in jar’s folder:
for j in *.jar; do echo -n "c:\\sam\\jars\\"$j";"; done;
in order to get the string with semicolon-separated list of jar files. Or just copy the output of
dir /b *.jar
into the text editor which allows to replace CRLF characters with “;C:\Sam\jars\” (for example, Notepad++ can do this).
The string which we’ve got on previous step may be copypasted into CLASSPATH environment variable, or into LR script (parameter Java_Env_ClassPath in [JavaVM:Options] section of default.cfg) .
06-03-2013 06:02 AM - edited 06-03-2013 06:03 AM
From LR side we will consider multiple jars adding feature in future releases.
Sergey Kutsos | LoadRunner QA
LoadRunner - Your performance, Our passion!
06-03-2013 06:13 AM
I've been looking at this today, and I'm still a little puzzed.
1) I was able to decode the straight javaw.exe command line to be able to run it from a command line/batch file
2) The command line I put together uses the "-classpath" option in the Java command line - There were only like 8 of them explicitly listed
3) I also added each one of the Jar files to the "Classpath" section under the "Run-Time Settings" in VuGen
4) Question: Do I need to also add them to my Windows CLASSPATH Variable?
Also, I'm able to Record the session just fine. It's only in the replay that I'm getting issues.
06-04-2013 09:34 PM - edited 06-04-2013 09:37 PM
Ok ... that you are only getting the error while playing back, go to the script folder, open up the default.cfg, back it up and edit the java classpath = "" line to include the 4000 Jar files in string format. Save. open the script in Vugen and hit run.
see if it works.
Maybe the application jars are all not used for the particular flow you have recorded. Maybe it only used the 8 jars you had in your classpath.
The total 4000 jars would be used in functions all through the application, but will still be downloaded at first go as the Java application may not be able to download jars on the fly. so if you know that your script requires only these 8, then your classpath needs only those.