2006-12-24

FON free router giveaway

FON gives away free social routers for new members invited by existing Foneros. I was happy to invite one of my friends.

FON connectivity solved

I had trouble connection to my Fon social router using my notebook. Since this is my only wifi device and I can connect it to any other APs, I thought there was a problem with the router. In fact, it's the router that does not support the power saving feature of the Intel 3495ABG wifi chipset built into my notebook. Workaround can be found here and the latest Intel drivers here.

2006-12-19

Retroweaver: develop with 1.5, deploy with 1.4

After 2 months of development with Java 5 and targeting Weblogic 9.2, it turned out that the customer wants to run our application on Weblogic 8.1 due to licensing issues.

Before geting too desperate, I've found something really impressive: Retroweawer.

This tool lets you develop with Java 5 and then create Java 1.4 compatible class files. It is an Ant task which translates Java 5 bytecode to 1.4.

Feel free to use the language features of Java 5 (generics, extended for loops, static imports, autoboxing/unboxing, varargs, enumerations, annotations), Retroweaver will support them all.

But pay attention! It's highly reccomended to enable reference verification. Otherwise, you may experience ugly runtime errors like we did: we had to tweak Echo2 to fully support file download with IE and I compiled it using Java 5. Without reference verification I could create a corrupt release for WL8.1. Everything went well until I opened the GUI: Echo2 did reset the session immediately and there was no error message, nowhere! It took me about 1 day to find what went wrong here: class file incompatibility.

As I said this all can be avoid using reference validation. To set up it correctly, you will need the runtime classpath specified in the classpath property in the Retroweaver task. In other words, you will have to list the JVM 1.4 runtime jars plus all of your allplication jars. The 'pathconvert' Ant task will be your best friend here. Seethe relevent parts of our build.xml below:


<taskdef name="retroweaver"
classname="net.sourceforge.retroweaver.ant.RetroWeaverTask">
<classpath>
<fileset dir="util/retroweaver-2.0Beta2"
includes="**/*.jar"/>
</classpath>
</taskdef>

<fileset id="libs_build" dir="libs">
<include name="**/*.jar"/>
</fileset>

<fileset id="java14runtime"
dir="${JDK14_HOME}">
<include name="**/*.jar"/> <!-- This could be
a bit more sophisticated -->
</fileset>

<path id="weave.classpath">
<fileset refid="java14runtime"/>
<pathelement location="build/classes-14"/>
<fileset refid="libs_build"/>
</path>

<target name="weave" depends="build">
<mkdir dir="build/classes-14"/>
<pathconvert pathsep=";"
property="weave.classpath.str"
refid="weave.classpath"/>
<echo message="weave
classpath=${weave.classpath.str}"/>
<retroweaver destdir="build/classes-14"
target="1.4"
classpath="${weave.classpath.str}">
<fileset dir="build/classes">
<include name="**/*.class"/>
</fileset>
</retroweaver>
</target>


Oracle 8 CLOB problem with Thin driver solved

Project: workflow system for major telecom company
Technologies: Java 5, Ajax(Echo2), Weblogic, jBpm, Hibernate
The problem: we have to connect to an Oracle 8.1.7 database and we have been experiencing all kind of weird stuff depending on the driver we were using.

Dispite Oracle states that all current drivers are compatible with (Oracle says: can talk to:) RDBMS 8.1.7, we had to face several incompatibility issues.

First we tried to use the latest 10g thin drivers. Everything went well until we tried to use a CLOB field to store special Hungarian text (árvíztűrőtükörfúrógép). We were unable to retrieve anything better that ?rv?zt?r?t?k?rf?r?g?p using JDBC, although TOAD showed the inserted values perfectly.

Then we switched to version 8 thin driver which proved to be the only Oracle JDBC thin driver capable of retrieving Hungarian chars from CLOB fields of a 8.1.7 database.

Things got worse when the text size increased, suddenly we started to receive this:
java.sql.SQLException: operation not allowed: streams type cannot be used in batching

It seems that the old JDBC driver does not support batch updates of Hibernate, therefore we disabled the batch update feature: hibernate.jdbc.batch_size=0

It didn't help. At the moment of DB connection closing, we got a deadlock... Awesome... What next?

Final attepmt: we switched to the OCI driver and it works well.

Conclusion: if you need to use CLOB fields with Oracle 8, your recommended choice is the OCI driver.

2006-12-18

Fon is spreading in Budapest

Fon, the free Wifi community is spreading in my City. I've attached a map of downtown Budapest. The green spots are the free hotspots currently accessible by the Foneros. I'll update the map regularly so we can see the speed of the growing.

(Too bad that the Hungarian characters are not displayed correctly on the map. For example, in the text box you should see SZÉNA TÉR.)

First post

This is my first post here :)