15 May 2012, 12:08pm
uncategorized

leave a comment




  • JUnit-Testing and GAE APIs

    Some issues I encoun­tered when test­ing a new Java library for load­ing mul­ti­ple URLs in par­al­lel on the Google Apps Engine (GAE) (more about that library in another post).

    Here are some of the typ­i­cal errors you might encounter:

    Miss­ing time­out class

    java.lang.NoSuchMethodError: org.mortbay.thread.Timeout

    Con­text menu on project: Prop­er­ties -> Build Path -> Order and Export: move GWT SDK *above* App Engine SDK (cf. here)

    Com­pi­la­tion unit was not seen

    com.google.gwt.junit.JUnitFatalLaunchException: The test class 'com.test.client.MyTest' was not found in module 'com.text.Module'; no compilation unit for that type was seen

    • The test class needs to be within a pack­age that is con­fig­ured in the mod­ule file (*.gwt.xml). You should cre­ate a new source folder (Con­text menu on project -> New -> Source Folder) and cre­ate the whole pack­age struc­ture you use within your project up to “client”, e.g. “com.company.client”, and put your GWT tests in it. This way you make sure that the tests are not going to be deployed to GAE later on.

    • If you are test­ing client-side code, your test class needs imple­ment GWTU­nit *and* be run as GWTU­nitTest *not* as JUnitTest ;)

    API pack­age not found

    java.util.concurrent.ExecutionException: com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'urlfetch' or call 'Fetch()' was not found.

    The GAE envi­ron­ment has not been initialized.

    • Set up the required libraries for testing:
      • Con­text menu on project -> Prop­er­ties -> Build Path -> Libraries -> Add Vari­able -> Con­fig­ure Vari­ables -> New…: Set “SDK_ROOT” as name and search you disk for “appengine-api-stubs.jar” and copy the part before “/lib/impl” into the text box named “Path”
      • Select “SDK_ROOT” from the pre­vi­ous dia­log, click “Extend…”, unfold lib and impl and select …labs.jar, …stubs.jar, and …api.jar; unfold lib/testing and select …testing.jar — done, whew.
    • Add fol­low­ing lines to your test class:
      private final LocalServiceTestHelper helper = new LocalServiceTestHelper(new LocalURLFetchServiceTestConfig());
      @Before public void setUp() { helper.setUp(); }
      @After public void tearDown() { helper.tearDown(); }

    • Have a look in com.google.appengine.tools.development.testing to see all the services/APIs avail­able for test­ing and replace LocalURLFetchServiceTestConfig with the one you need.

    I tried to keep it as brief as pos­si­ble, for more details have a look at this page.

    14 May 2012, 8:27pm
    uncategorized

    leave a comment




  • Missing Digikam Themes w/t KDE

    Digikam is a great tool to man­age and work on pho­tos — my per­sonal favorite for some years already. But it’s made for KDE and uses a lot of KDE-related libs and stuff, there­fore, installing it in Gnome, Xfce, Lxde and the like will cost about 1gb because of the depene­den­cies.
    Nev­er­the­less, worth it. But it comes with a bright default skin ren­der­ing it com­pletely unus­able for work­ing seri­ously on light and color set­tings of photos.

    To add themes, you will have to install an extra pack­age (as decribed here) like this:
    sudo apt-get install kde-workspace-data
    Yes, this will add more data to your disk, but only 10mb this time. ;)

    Happy photo-tweaking!