Friday, October 26, 2007

Oracle DB User and Password with Turkish Characters

If you have ever put turkish characters in your username and/or password for your DB and tried to use it thru an application, you might have gotten:

java.sql.SQLException: ORA-01017: invalid username/password; logon denied

This is due to the fact that oracle JDBC driver does a local insensetive upper case and therefore the turkish characters gets converted incorrectly.

For example, if your username had 'kaşmir' this should be converted to 'KASMIR' but gets converted to 'KAŞMİR' and therefore not supported.

Thursday, October 25, 2007

Increasing Progress SonicMQ Client Performance

Progress SonicMQ is a Java Message Service (JMS) implementation. The client performance can be improved by using prefetch and prefetch_threshold parameters. The default values for the parameters are 3 and 1 respectively.

What these parameters are used for is to reduce the network traffic by grapping 3 messages (if available) from the queue with one network request instead of 1 message per request. The threshold is used for filling the local client buffer before the next message processing requests a message.

One misconception with this is that, if there are two receivers for one destination, and lets say 6 messages in it, the first receiver will get the first 3 messages and the second one will get the next 3 messages from the queue. This does not mean the message is processed, but just retreived from the queue. If the client does not acknowledge these message, they are returned back to the queue.

Wednesday, October 24, 2007

BEA Weblogic 8.1 and Hibernate 3.x new SQL Parser

Hibernate 3.x uses new sql parser for HQL by default that requires antlr.jar. BEA also uses the same parser for EJB-QL. The problem is that because WL loads the its own version of the jar file before your application, and therefore a different and older version of jar is loaded.

Your application encounters "org.hibernate.QueryException: ClassNotFoundException" for “org.hibernate.hql.ast.HqlToken” even though you include the antlr.jar file from hibernate distribution.

This issue is addressed in the hibernate document site at:
http://www.hibernate.org/250.html

The easy way this can be resolved is by modifying the startWeblogic script and include your own jar file in the beginning of the classpath so yours gets loaded before the BEA’s jar file.

Friday, March 9, 2007

Test Issue

Hello World...standard, what you expect!