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.

Building Sahi on Linux with Eclipse

globalwormingglobalworming Moderators
edited November 2011 in Sahi - Open Source
Resolved by commenting out every failing test


Hi all

I m using Eclipse Helios with the Javscript plugins on Kubuntu 11.10 and followed the advice here: http://sahi.co.in/forums/viewtopic.php?pid=4093#p4093 When running Ant on the build XML, I got some encoding errors, which got fixed by adding 'encoding="iso-8859-1"' in the <javac>-tags. Now it seems that there is something going wrong with XSLT
Errors while applying transformations: javax.xml.transform.TransformerException: java.lang.RuntimeException: Use of the extension element 'redirect' is not allowed when the secure processing feature is set to true.
i tried to add the line <property name="XMLConstants.FEATURE_SECURE_PROCESSING" value="false" />, but the error persists.
If anyone has an idea how to fix this, please answer me.

The good news is, I m at least able to build from command line
# WARNING! This changes you system settingsa! Use an appropriate language!
 # 'encoding="iso-8859-1"' in the <javac>-tags is needed
 # comment out failing tests

sudo locale-gen de_DE
export LANG=de_DE.ISO-8859-1
ant all build.xml

Regards
Wormi

Comments

  • Hi globalworming,

    Can you try using 'encoding="utf-8"' instead of 'encoding="iso-8859-1"' and check if its working fine.

    If its still not working then we will look at it and let you know.

    Regards
    Sumitra
  • globalwormingglobalworming Moderators
    edited November 2011
    As I already said:
    [javac] Utils.java:234: warning: unmappable character for encoding utf-8
    [javac]     // equivalent. Eg : By passing "?l?phant", the function would return
    
    With iso-8859-1 there are no encoding warnings but
    JUnit tests failed. MAKE SURE THAT junit.jar AND log4j.jar ARE PRESENT IN {sahi}/extlib/ FOLDER
    
    To get past these warnings, I add
    ANT_OPTS=-Dfile.encoding=ISO-8859-1
    
    to the environment.. and now I m stuck with these javax.xml.transform.... error which i tried to fix with
    <property name="XMLConstants.FEATURE_SECURE_PROCESSING" value="false" />
    
    in the build.xml.. which - unfortunatly - isn't working
  • Hi guys

    I still don't get it to build in eclipse... and I'm really hoping you are looking into this. As an partly open source project, you should encourage people to participate. This problems with building Sahi are not very motivating.

    Regards
    Wormi
  • Totally agree.
    Wish I could help..
  • Hi globalworming,

    What version of java are you using to create a build?

    Regards
    Sumitra
  • globalwormingglobalworming Moderators
    edited November 2011
    Hi Sumitra

    i tried building with Suns JDK 6 and openJDK 6
    java version "1.6.0_26"
    Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
    

    Regards
    Wormi
  • Hi globalworming,

    Navigate To base directory of Sahi and run ant all. Check if this solves your issue.

    Regards
    sumitra
  • globalwormingglobalworming Moderators
    edited November 2011
    Hi sumitra

    when using ant all on the clean project i get
    BUILD FAILED
    /home/wormi/workspace/default/Sahi/build.xml:177: The following error occurred while executing this line:
    /home/wormi/workspace/default/Sahi/build.xml:560: JUnit tests failed. MAKE SURE THAT junit.jar AND log4j.jar ARE PRESENT IN {sahi}/extlib/ FOLDER
    
    and these encoding errors.....
    [javac] Utils.java:234: warning: unmappable character for encoding utf-8
    [javac]     // equivalent. Eg : By passing "?l?phant", the function would return
    
  • Hi globalworming,

    Some how in you machine "testConvertStringToASCII" is returing some illegal character thats why
    -assertEqual() is not able to map the character.

    Therefore, can you try commenting "testConvertStringToASCII" and check if it works fine.

    Regards
    Sumitra
  • globalwormingglobalworming Moderators
    edited November 2011
    testUnicode() and testFormatForExpiresHeader() is failing too... commented it...
    ok when skipping all failing tests, I am able to build with ant... (wondering.. I thought I had tried that before.. well nevermind)

    bulding with eclipse is working too

    conclusion:comment out every failing test :)

    thank you sumitra for you help
This discussion has been closed.