Encountered Error "Compilation process failed" (702 Views)
Reply
Highlighted
Occasional Visitor
Posts: 2
Registered: ‎09-19-2013
Message 1 of 7 (702 Views)

Encountered Error "Compilation process failed"

Hi All,

 

I have done my scripting (Java) in my local PC which is running on Windows7 platform and the script is working fine. However, when I tried to run it in controller (Load Generator assigned back to my local PC) and encountered the following error:

 

Message Code : -22997

Text : Error: Compilation process failed.

 

Any idea how I can resolve this? As running in local is fine but when I used controller its failing. Thanks a lot

HP Expert
Posts: 102
Registered: ‎03-28-2011
Message 2 of 7 (680 Views)

Re: Encountered Error "Compilation process failed"

Hi,

 

In your case VuGen and LG are installed on the same machine, right?

Can you please share the script?

 

Thanks,

Sergey

-----
Sergey Kutsos | LoadRunner QA
LoadRunner - Your performance, Our passion!
Occasional Visitor
Posts: 2
Registered: ‎09-19-2013
Message 3 of 7 (662 Views)

Re: Encountered Error "Compilation process failed"

Hi,

 

Ya Vugen and LG is in the same machine. Just the controller is in the different machine.

 

What the script is trying to do is FTP some files from my local to the FTP server. My script looks something like this

 

/*
 * LoadRunner Java script. (Build: 3020)
 *
 * Script Description:
 *                     
 */

import java.io.File;
import java.io.IOException;
import java.util.Properties;

import org.apache.commons.io.*;

import com.jcraft.jsch.*;

import lrapi.lr;

public class Actions
{
    int j=0;
    public int init() throws Throwable {

        return 0;
    }//end of init


    public int action() throws Throwable {
        JSch jsch=new JSch();

        String host="<hostName>";
        String user= "<userName>";
        String pwd= "<password>";


        int port=22;


        try {

        Session session=jsch.getSession(user, host, port);

        java.util.Properties config = new java.util.Properties();
        config.put("StrictHostKeyChecking", "no");
        session.setConfig(config);
        session.setPassword(pwd);
        session.connect();

        //SFTP get
        Channel channel = session.openChannel("sftp");
        channel.setXForwarding(true);
        channel.connect();
        
        ChannelSftp sftp = (ChannelSftp) channel;

        //get all files under one directory.
        File srcfile=new File ("<sourceFolder>");

        if (srcfile.isDirectory())
        {
            File []srcfilelist=srcfile.listFiles();
            j=0;
            for( ;j < srcfilelist.length;j++){
            if (srcfilelist[j].isFile()) {
                lr.log_message(srcfilelist[j].toString()+srcfilelist[j].getName());
                sftp.cd("<Destination>");
                sftp.put(srcfilelist[j].toString(), srcfilelist[j].getName());
            }
            }
        }
    
        sftp.quit();
        session.disconnect();
        }
     catch (Exception e){
        System.out.println(e);
     }

    //LCstart
     //System.exit(0);
     //LCend
   
        return 0;
    }//end of action


    public int end() throws Throwable {
        return 0;
    }//end of end
}

 

Frequent Advisor
Posts: 62
Registered: ‎05-09-2013
Message 4 of 7 (639 Views)

Re: Encountered Error "Compilation process failed"

Validate that the JDK (I think JRE too could work) is installed and paths are properly configured on the loadgenerator.

 

Regards,

AJ

Valued Contributor
Posts: 117
Registered: ‎04-30-2012
Message 5 of 7 (635 Views)

Re: Encountered Error "Compilation process failed"

if you have Vugen on controller machine, just do a compilation from VUgen and see how it's behaving. If you get any error from VUgen also then few files might be missed while moving the script to the controller.

 

Thanks,Ajay

Occasional Visitor
Posts: 1
Registered: ‎11-05-2013
Message 6 of 7 (601 Views)

Re: Encountered Error "Compilation process failed"

Hi All,

 

I have installed load runner 11.52 on my work station on Windows 8 64 bit 

Initially there was no jre, for which i was unable to record then script

 

After I have installed jdk 1.7/jre, i was successfully able to record the script but unable to replay/play

 

I was getting Compilation Process failed pop up with 0 errors

 

Can't able to figure out whatz the issue!!!

 

Can anyone help me out???

HP Expert
Posts: 102
Registered: ‎03-28-2011
Message 7 of 7 (591 Views)

Re: Encountered Error "Compilation process failed"

Hi,

 

Please try to install JDK instead of JRE and reproduce the issue.

Can you please send me the script?

 

Thanks,

Sergey

-----
Sergey Kutsos | LoadRunner QA
LoadRunner - Your performance, Our passion!
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.