Archiv der Kategorie: Java

Vaadin 6.6.0 is here (there)

… Based on this, we have mobile device support with native look-and-feel coming up a little later. The TouchKit Add-on v2 is on its way and will follow Vaadin 6.6 next month. This release will bring you widgets that fit seamlessly first to IPhone and later releases will then support iPad and Android devices….

URL’s for Vaadin 6.6.0 aka „San Francisco“:


java.sql.SQLException: ORA-01843: not a valid month

You think it is easy to insert a date into a database? Then you never tried it on an Oracle database! Today I spent some time on the „java.sql.SQLException: ORA-01843: not a valid month“ – exception. It was caused by the query

Query: UPDATE myTable SET dataSent=?, dataSentDate=? WHERE email=? Parameters: [Y, 2010-05-17 11:49:50,]>

… but the date looks good, or? Some documentation showing this notation. But Oracle (and the web) says it was caused by a date specified an invalid month. Valid months are: January-December, for format code MONTH, and Jan-Dec, for format code MON. Action: Enter a valid month value in the correct format. I tried to change my SimpleDateFormatter…

new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date());
new SimpleDateFormat("yyyy-MMMMM-dd hh:mm:ss").format(new Date());
new SimpleDateFormat("yyyy/MM/dd hh:mm:ss").format(new Date());

.. but nothing woked. Finally I found the solution: you have to tell Oracle the formatting of the date! So changing the insert statement like this…

update("UPDATE member SET dataSent=?, dataSentDate=to_date(?,'DD/MM/YYYY HH24:MI:SS') WHERE email=?", updateParams);

.. and of course change the SimpleDateFormatter to the same brings me to the solution!

Weblogic, sql-taglib and JNDI: DataSource invalid: No suitable driver found

On a Weblogic 10 environment, you may get an error like
javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: „java.sql.SQLException: No suitable driver found for jndi_ds
if you are using the sql-taglib to access your JNDI name from the Weblogic application server, configured via the Weblogic console.

The solution is quiet simple, but not that good documented. It is not possible to use the paramter „driver“ inside the sql:setDataSource – tag. You rather have to promote the JNDI name in your web.xml like this:


Than you can set the dataSource with the sql:setDataSource – tag like this:

<sql:setDataSource dataSource="jndi_ds" />

and finally use the sql-taglib as you did in any other environment like Tomcat server and so on.

How to remove jsessionid from url / Weblogic server

On a Weblogic server, you don’t need a rewite rule or filter to get rid of this …;jsessionid… stuff on any URL build using the „c:url“ tag. You simply need to put one more line to your weblogic.xml:


Apache Lucene 2.9 ist da!

Das beliebte Java-Sucheframework Apache Lucene ist in der Version 2.9 erschienen. Neben einem überarbeiteten Unicode-Support gibt es ein neues Query-Parser-Framework. Umsteiger von Version 2.8 sollten jedoch aufpassen, da sich die API zum Teil geändert hat. Auf JAXEnter wurde übrigens eine Artikelserie zum Thema Lucene eingerichtet.

Magnolia 4.1 veröffentlicht

Magnolia hat das unter der GPL stehende CMS in der Version 4.1 veröffentlicht.

Identity Management: OpenID mit openid4java

Heise Online hat aktuell 2 Artikel um Thema Single-Sign-on (SSO) via OpenID im Newsticker publiziert. Dabei wird auch auf das Projekt OpenID4Java eingegangen.