Thursday, 20 February 2014

Getting NoclassDefFound Error in command window while invoking the Murex JavaApp

Problem Details:- I am trying to capture Java application(Murex) using Java Record Replay

protocol. The nature of the application is like this:
The mechanism currently used to invoke the Murex appln first involves a

launcher mechanism(Batch file) that includes an initial download of jar

files to the client (Windows) platform followed by the invocation of

the Murex Java client.

This we need to capture through LoadRunner and hence in this process we

installed JDK 1.6 in our system and set the path n classpath variables

in the Environment Variables section of MyComputer->system properties.

Later we took the Java Record Replay protocol and gave the Executable

path of the Batch file and tried to record. It opens a command window

giving the following error:

Loading properties file. [c:\\program

files\\hp\\loadrunner\\\dat\jprops.ini]
Exception in thread "main" java.lang.NoClassDefFoundError:

murex.Rmi.Loader.RmiLoader

Please suggest us what went wrong what all we need to do for recording

such kind of applications.


Problem Solution:-  I did a quick check on all case in Murex and here are my response based on the case logged previously, feel free to comment :

a) The Murex application is built from an application framework that is customised by a 3rd party (in this case Accenture) to deliver the required functionality for a client organisation (ABN-AMRO). It consists of client and server components.

b) This Murex client application is based on Java and appears to use RMI to interact with the server side.

Action 1: Verify the details of the communication mechanism in the Murex client server architecture. LoadRunner supports RMI/CORBA/JMS.

c) The mechanism currently used to invoke the Murex first involves a launcher mechanism that includes an initial download of jar files to the client (Windows) platform followed by the invocation of the Murex Java client. The initial download step needs to be separated from the actual Murex Java client application invocation. Furthermore the jar files that implement this client application need to be located on the client (Windows) platform.

Action 2: To be able to record this application using LoadRunner, the mechanism used to invoke the Murex Java client application should be modified so that it is invoked directly on the client platform (as a local Java application), that is, without the jar file download mechanism. This will allow the jar files that implement the client to be controlled. The jar files that are required for the application should be located in a directory on the client platform (under local control) and the classpath and path environment variables configured to include this location. The "java" command line, used to invoke the Murex Java client, should be appropriately modified to use the local jar files.

Action 3: LoadRunner requires that the Java JDK is used and not the JRE. Modify the Java implementation on the client platform to ensure that the Java JDK is being used.

Action 4: Verify that the Murex Java client application can be invoked locally and functions correctly.

d) Once the Murex Java client can be invoked locally, then LoadRunner can be used to record and replay this application.

Action 5: Review and follow the HP VuGen User's Guide documentation detailing how to record a Java application. In particular ensure that classpath and path environment variables are correctly specified.

Regarding the severity of this case I believe that it is set too high. Severity 1 is intended to be used when a production system is down. Severity 2 is applicable to a major feature/function failure. Given the description provided I am changing the severity of this case to severity 3 (minor feature/function failure). Please note that while the case severity is lower HP will make best efforts to resolve the case promptly! I will lower down the severity to High. Hope thats OK with you.

More Information:-

 

Do you mean to say that we need to modify the batch script file that is establishing the connection with the murex server and downloading all the necessary jar files with bin folder and launching the appln.
From my understanding we need to download and put all the files in our client m/c and try a work around to launch the appln from the existing jar files and bin folder by modifying the contents in the batch file. Am I right? Arman.

FYI...Please see the batch file contents below that is invoking the app:

@ECHO OFF

REM Mx G2000 Client Launcher
REM Mofify this script to match your java and server environnement
REM For 2.2.8 and 2.2.9
REM V2.3

setlocal

SET JAVAHOME=d:\j2re1.4.2_13
SET MXJ_FILESERVER_HOST=xx.xx.xx.xxx
SET MXJ_FILESERVER_PORT=xxxxx

SET MXJ_SITE_NAME=<SiteName>

SET MXJ_PLATFORM_NAME=MX
SET MXJ_PROCESS_NICK_NAME=MX


SET PATH=%JAVAHOME%\jre\bin;%JAVAHOME%\jre\bin\classic;%JAVAHOME%\bin;%JAVAHOME%\bin\classic;%PATH%
SET PATH=%PATH%;bin\
SET MXJ_JAR_FILELIST=murex.download.guiclient.download
SET MXJ_POLICY=java.policy
SET MXJ_BOOT=mxjboot.jar
SET MXJ_CONFIG_FILE=<Config_file>.xml

IF EXIST jar\%MXJ_BOOT% copy jar\%MXJ_BOOT% . >NUL

title %~n0 FS:%MXJ_FILESERVER_HOST%:%MXJ_FILESERVER_PORT%/%MXJ_JAR_FILELIST% Xml:%SET MXJ_SITE_NAME=site1SITMX% /PLATF:%MXJ_PLATFORM_NAME% /NNAME:%MXJ_PROCESS_NICK_NAME%

java -DJINTEGRA_NATIVE_MODE -cp %MXJ_BOOT% -Xmx1024M -Djava.security.policy=%MXJ_POLICY% -Djava.rmi.server.codebase=http://%MXJ_FILESERVER_HOST%:%MXJ_FILESERVER_PORT%/%MXJ_JAR_FILELIST% murex.rmi.loader.RmiLoader /MXJ_SITE_NAME:%MXJ_SITE_NAME% /MXJ_CLASS_NAME:murex.gui.xml.XmlGuiClientBoot /MXJ_PLATFORM_NAME:%MXJ_PLATFORM_NAME% /MXJ_PROCESS_NICK_NAME:%MXJ_PROCESS_NICK_NAME% /MXJ_CONFIG_FILE:%MXJ_CONFIG_FILE% %1 %2 %3 %4 %5 %6

Soon after clicking the above batch file two folders bin and jar files will get downloaded on to our machines with details showing in the command window as copying ....jar file and so and app gets launched.

The below error comes in command window when tried recording the same app thru vuGen:

Attached cjhook_rec.
Loading properties file.[c:\\program files\\hp\\loadrunner\\\dat\jprops.ini]
Exeption in thread "main" java.lang.NoClassDefFoundError: murex/rmi/loader/RmiLoader

Kindly do the needful aeap and let me know if you still require any fiurther informantion.


4 comments: