Wednesday 23 December 2009

Why can't icefaces give proper error messages? II

After days of searching and experimentation it seems that its not possible to dynamically import
a .jspx file into another (one which is loaded from a jar, and the src location is supplied by the backing bean).

I'm trying to embed iframes now, but as soon as the iframes render, icefaces freezes up and does not send any events again. The only clue was this javascript error:
Error: no element found
Source File: http://localhost:17080/EbrWeb/block/receive-updated-views
Line: 1


After searching and a hunch that concurrently loading jspx pages breaks icefaces, I looked at the portlet sample
(ICEfaces-1.8.2-src/icefaces/samples/portlet/location/web/WEB-INF/web.xml).

I found that if I include the following in my web.xml, it works! Hurray!
<context-param>
<param-name>com.icesoft.faces.concurrentDOMViews</param-name>
<param-value>true</param-value>
</context-param>

This makes sense because I want to load several iceface pages in iframes in my main page.

Thursday 10 December 2009

Why can't icefaces give proper error messages?

SEVERE: StandardWrapperValve[Persistent Faces Servlet]: PWC1406: Servlet.service() for servlet Persistent Faces Servlet threw exception
java.lang.Exception: javax.faces.FacesException: Problem in renderResponse: null

was trying to tell me:

<ice:tree> needed to be encapsulated inside an <ice:form>.

http://seamframework.org/Community/ProblemWithIceTree#comment101040

Tuesday 01 December 2009

A+

"a plus", short for "a plus tard" (French, pronounced ah-plu-tar), that is "see you later".
Used to end an informal email, or a chat. Equivalent to "C U"
http://www.urbandictionary.com/zazzle.products.php?defid=1461004

You can listen to the pronunciation here: http://www.forvo.com/word/a_plus_tard/

Monday 30 November 2009

pycurl does not like bad certificates

I keep on hitting this once in a blue moon (maybe after dist-upgrading), pushing to a smart server over https I get the following:

bzr: ERROR: Connection error: curl connection error (server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none)        
on https://mycompany/bzr/aprojectrepo/mybranch/.bzr/smart


And every time it takes me some time to figure out how to fix it, so I'm noting it here for future reference:
* remove python-pycurl
* or use "http+urllib://"

https://bugs.launchpad.net/bzr/+bug/365874

I suppose I should help fix this, but I don't see myself getting round to that any time soon.

Tuesday 24 November 2009

happy karmic day

My upgrade from jaunty to karmic was not quite rosy.
My man two problems were that my sound and touchpad stopped working.
Thankfully its all sorted out now (I hope).

My touchpad wasn't working because of using the wrong kernel - after upgrading to karmic, it didn't boot using the karmic kernel by default, I had to use grub editor to change that.
But then I could not boot. I had to go fix up my grub menu:
sudo vim /boot/grub/menu.lst
I had

title Ubuntu 9.10, kernel 2.6.31-14-generic (recovery mode)
root
in stead of

title Ubuntu 9.10, kernel 2.6.31-14-generic (recovery mode)
root (hd0,0)

(it was complaining that it could not find a kernel image at the specified location or something)

the sound was also related to using the wrong kernel, but also due to some pulsaudio issues see HOWTO: PulseAudio Fixes & System-Wide Equalizer Support - Ubuntu Forums


[update]
mmm... the first kernel update broke it again :(
I finally heeded Robert's advice to do:
sudo update-grub

https://bugs.launchpad.net/ubuntu/+source/grub/+bug/470265
My menu.lst looks fine now, but still need to reboot and test it.

Saturday 21 November 2009

Kalternatives

I found this cool package today:
sudo apt-get install kalternatives


From the package info:

Kalternatives offers a GUI to configure the alternative systems (a
system that allows you to select one alternative file for many in the
filesystem).
Kalternatives is available as KDE configuration module, integrated by default
into KDE's System Settings.

This is an advanced GUI of the update-alternatives program shipped with dpkg.


Some of the options I wanted to customise:

desktop-splash
usplash-artwork (usplash-theme)
x-terminal-emulator
x-window-manager
x-www-browser

Saturday 31 October 2009

Project Lombok: Put an End to Java Verbosity

If you're interested in java programming involving lots of beans, this is a crazy cool tool.

Its a combination of a compile-time and a development-time code generator, which has made Java POJO verbosity history.
It uses annotation magic to implement all the repetitive boring bean methods (getters, setters, equals, hashCode, toString)
without them actually cluttering your classes. Thats right it generates invisible code!

Now you have to watch the video at:
http://projectlombok.org/

You can reed this introductory article:
http://www.devx.com/Java/Article/42946/1954

See some other cool examples to look at:
http://projectlombok.org/features/Data.html
http://projectlombok.org/features/Cleanup.html (I was trying to implement this one just a couple of weeks ago)
http://projectlombok.org/features/EqualsAndHashCode.html

I came across lombok while trying to figure out if I can get eclipse to also generate the .equals and .hashCode methods
on new JPA entities like netbeans does. turns out it I don't really need that any more.