Java rmi protocol

Hi ,
I am recording an java swing application in vugen 9.5. I am using java rmi protocol. As client is communicating to app server by rmi. Application is executed by a batch file by double clicking batch file manually. in recording in vugen i am using type as java Appication and giving main class name and working directory. Now when i start record application get launched with a green box but the problem is events are not recorded. I have given all the jar files needed in classpath in recording option. If anyone knows solution for this please let me know as soon as possible.
One more thing is on server we are using IBM jdk1.4 is this can be a problem? because i heard vugen does not support IBM jdk.

Tags:

  • Hi Anujk,

    1. it is better to use the same version of jdk.

    2. Need to have all the jar files in the build.

    3. Need to have (weblogic.jar)/ necessary,commons-logging.jar and rt.jar should be first. (similar order in the like batch file)

    4.Make sure that you are using proper working directory

    5. Make sure that you are pointing to main class

    6. try JVM SETTINGS -Xms64m -Xmx256m

    7. Application Type: Java Application

  • Thanks for replying...i am giving main class name and working directory but i dont know application parameter. From where i can know the app. parameter i have all the jar files. while recording a green combo box having name "Class Loading progress" is coming but events are not recorded. So is there any problem with vugen,classpath or app parameter.Awaiting reply.
  • Hi Anujk,

    Regarding the parameters refer the batch file your are using.

    if the above is not working. then try "Executable / Batch" in Application type as attached.

    If still it is not working.

    Make sure that your are using the latest version of LR 9.52

    uncomment the "RMI-WL-Proxy" in rmi.hooks file.

    to uncomment you need to remove the semilcolon.

    rmi.hooks will be in â C:\Program Files\HP\LoadRunner\classesâ

    Please let me know whether this helps...

    All the best.
    Christo
  • Thank you once again for replying but still issue is not resolved. I am now downloading LR 9.52 patch. Lets hope it works. One more thing its an java swing application can we record it using RMI protocol in Vugen or not?
    or i need to use java vuser and write the script manually?
  • Hi Anujk

    I have recorded java-rmi (there is no problem in recording in java - if it is getting recorded) :-)

    I have copied the below tips from wilsonmar

    http://www.wilsonmar.com/1lrscript.htm

    Java applets running on JRE (Java Runtime Environment) clients are
    usually invoked from within a predominantly web GUI application
    which also contains HTML.
    Normally, the classes are automatically downloaded within a jar file.
    With applets that are signed, VuGen need them to be
    unjarred into
    their separate class module files.


    VuGen recognizes "RMI-Java" or "CORBA-Java" calls that fit specifications defined in the
    user.hooks filter file in the LoadRunner folder.

    VuGen records those calls as Java code in Java programming code which is modified to add verification, etc.

    During recording, RMI serialization creates .dat files which can be added as actions in the Java VuGen script.


    Since VuGen cannot record multiple protocols along with Java (such as with Web HTML), the web (HTTP) traffic issued around the Java applet must
    first be recorded into a VuGen C language script setup to record web(HTML/HTTP) protocol communications
    into C programming script, then
    using the sed.exe utility
    convert generated C-language code into Java-language code.
    Note that the sed utility is controlled by sed specification files
    edited with a plain text editor program.


    Using VuGen, the Java code created with these two methods are manually merged using VuGen editor and
    compiled from within VuGen
    that the Controller passes
    (along with other script groups) to
    Load Generators (injectors) for playback to
    impose a load on servers under test.


    Java VuGen script compilation is done by VuGen using javac.exe
    from an installtion of the Java SDK.
    Un-jarred CORBA ORB classes are needed to satisfy compiler dependencies, even though they have been replaced by calls to custom classes. Thus, they are not needed
    by classes the VuGen and Controller use for replay.


    If the source code for the application (applet) under test contains security provisions such as protected classes and communications encrypted through Entrust private key files, the source would
    need to be modified (to make classes public and/or bypass the security)
    with a code editor
    and then recompiled
    into modified class files
    used instead of mainstream classes because the folder containing modified classes is listed in the CLASSPATH before (and thus retrieved before) the folder containing mainstream classes.
    So the version of the SDK used to compile the application should be what VuGen uses.


    Data (*.dat) files provide various data values during playback on both VuGen and on Load generators controlled by the LoadRunner Controller.
    java.policy file in C:\jdk1.3.1_15\jre\lib\security (opened with WordPad, not Notepad)
  • Hi, now the thing is it is rmi over iiop. i have added iiop url to jvm and now the application get launched and events are also get recorded when it is not connected to any network but if i connect it to internet or to vpn, events are not recorded. one more thing i have "java.naming.factory.initial",com.sun.xx.xx" some thing is there should i add this also to JVM and if yes then can you give any example.

    Another thing:Is Loadrunner support recording on VPN?
  • Hi,

     

    I am also facing the same situation.I am not able to create a script for a RMI-IIOP protocol based application.Could you please let me know, what all are the settings that you did for recording in VuGen 9.52 using Java Record/Replay protocol.It would be very helpful,if you could respond,becuase am stuck with this for 2 weeks.

    thanks in advance...

  • Hi,
    I am using VuGen 9.52 version, but i dont have Java RMI protocol, when i select Java in the Category combo box,in protocol selection window,i have only 3 protocols listed.They are EJB,Java Record Replay and Java Vuser.Could you please let me know,it is license based or do i need to do anything to get that protocol.
  • Hi,

     

    I am using a sample application Stock Market provided by HP to learn Java RMI. The application is being executed in the form of batch file and i am using Java record and replay protocol of LR 11.00 and application type as Batch/executable .I am able to record the instances of hits made to the server but while replay the script is throwing error that the object factory doesnot exist. I have declared all the necessary classpath and tried implementing above given solutions too but still unable to replay the script. Please suggest as it is highly affecting my work.

     

    Pushpam