18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

I am getting this error...please help

kuldeepbhkuldeepbh Members
edited May 2009 in Sahi - Open Source
I have installed Sahi V2 Release 2009-05-21

java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)



As said in the tutorial, i am facing this error:


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\zoh>cd c:\sahi\bin

C:\SAHI\bin>sahi

C:\SAHI\bin>SET EXT_CLASS_PATH=;

C:\SAHI\bin>REM eg. SET EXT_CLASS_PATH=;;..\extlib\db\mysql-connector-java-5.0.4-bin.jar

C:\SAHI\bin>SET SAHI_CLASS_PATH=..\lib\sahi.jar;..\extlib\rhino\js.jar;..\extlib\apc\commons-codec-1
.3.jar

C:\SAHI\bin>REM SET MOZ_NO_REMOTE=1

C:\SAHI\bin>java -classpath ;;..\lib\sahi.jar;..\extlib\rhino\js.jar;..\extlib\apc\commons-codec-1.3
.jar net.sf.sahi.Proxy
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/sf/sahi/Proxy (Unsupported ma
jor.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

Please help me regarding this.
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Comments

  • narayannarayan Administrators
    You are using java 1.3, but you need java 1.5 (same as java 5) or above for Sahi.
    If you have already installed java 1.5 or above, most probably that is not in your path.

    To add java1.5 to your path,
    1) Do a right click on icon "My Computer" and select "Properties"
    2) On tab "Advanced", click on "Environment Variables" button
    3) On "System Variables", select "Path" and edit
    4) On "Variable value" add in the end of that line (separated with ; ) the path to the bin folder inside java1.5 (eg. "C:\Java5\bin" ).
    5) Click on "OK" of all opened windows.

    Open a new command prompt and run sahi.bat and it should start properly.
  • I've added Java dir location to the path variable. Following are its values:

    c:\Orant920\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\MKSNT\bin;C:\MKSNT\bin\X11;C:\MKSNT\mksnt;C:\Program Files\DevStudio\SharedIDE\BIN;C:\Program Files\DevStudio\DF\BIN;C:\Program Files\DevStudio\VC\BIN;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%IFORT_COMPILER91%\IA32\Bin;%IFORT_COMPILER91%\EM64T\Bin;%IDB_PATH%IDB\9.1\IA32\Script;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\IFOR\WIN\BIN;C:\IFOR\WIN\BIN\EN_US;C:\Program Files\IBM\License Use Management\BIN;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Java\jre1.5.0_07\bin

    Even this hasn't solved the error.
  • narayannarayan Administrators
    C:\Program Files\Oracle\jre\1.3.1\bin; comes before C:\Program Files\Java\jre1.5.0_07\bin, which causes 1.3 to be picked first. If you need 1.3 for oracle, I would suggest you modify the path in sahi.bat.
    Open sahi/bin/sahi.bat, add this line at the top

    SET PATH="C:\Program Files\Java\jre1.5.0_07\bin";%PATH%

    and rerun sahi.bat
  • thanks a lot...

    working fine now....
This discussion has been closed.