↓ Skip to main content

Posts

2008

The meaning of ORA-29907 error and the fix

·189 words·1 min
I have first time encountered the error: ORA-29907: found duplicate labels in primary invocations after testing the change request we have implemented recently. The error message was not very helpful - I was not exactly sure which labels and which invocations ;-) - and as Oracle guru who actually does understand fine details of Oracle Text was visiting sunny India, I was on my own. The change addressed an issue in repository search: users were asking for more flexible processing of full text search phrases: instead of e.g. searching for "unit test" search for document that contains both unit AND test. The text was parsed in Java and the SQL generator produced instead of something like

Starting Ruby on Rails 2 with Netbeans and AWDWR book

·701 words·4 mins
After some break, I got back to Rails land. The return is not as smooth as I hoped: since Rails 2.0, many things work differently and quite a few steps learned from "The Book" do not work any more. The issues are more often than not quite easy to fix, but there is quite a few of them. All the following is related to NetbeansRuby build 6327 from Jan 26th with JRuby 1.1RC1

Showstopper issue with JRuby ?

·606 words·3 mins
After some break, I dusted off the Ruby to try out one interesting idea Peter presented yesterday that literally ASKS for Rails. So I grabbed the latest and greatest RubyNetBeans from Ruby Hudson. For some reason it stopped updates on January 26th so the latest version I have got was build 6327. It is bundled with JRuby 1.1RC1 and the Rails version that comes preinstalled is 1.2.6. Using the menu Tools -> Ruby Gems, they can be easily upgraded to latest and greatest 2.0.2.

On White Stuff and Other Disasters

·370 words·2 mins
Guess what are three most useful tools without which no proper Ottawa household can exist ? Snow shovel, snow pusher and car window ice scratcher. If the number was 4, the next would be snowblower. Up to yesterday, our family was in safe position being equipped with several shovels, four or five scratchers and one pusher. Then disaster stroke: my son broke the pusher while moving away few cube meters of snow we removed from the roof. In case you do not understand - removing snow from roof is another favorite winter leisure time activity in Ottawa: almost everybody is doing it. Not that it would be so much fun, but because of the dreadful consequences - avoid it and you may end up like this guy.

Couple of Objective-C and Cocoa links

·151 words·1 min
Lured by the iPhone platform, this is what I read in the evenings. Feels kind of funny: after 10+ years of Java/C# and almost as many years of C++ beforehand, I mostly lost my C instincts and C habits. Fortunately, I have also mostly lost my C++ bad habits as well. The Apple site is definitive starting point - put the http://developer.apple.com/referencelibrary/index.html into your bookmarks. From non-Apple sources, very bookmarking-worthy is the Cocoa Literature and Cocoa Devcentral.

Versioning with Spring and Ant

·439 words·3 mins
This is post is NOT about version control in the sense of source code control. It addresses the issue how to easily tell which version of the Web application is running as well make sure that the same version is reflected in the snapshots performed by Ant. We have used this approach on several applications and found it quite useful. The version I talk about is not the automatically generated version from VCS system (such as SVN revision). The version number is set manually.

iBatis, Date null values and Oracle

·360 words·2 mins
I better blog this before I forget what was the issue :-). During daily run of unit tests, I started to receive this (very well explained) exception: [sourcecode language='xml'] org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [17004]; --- The error occurred while applying a parameter map. --- Check the APPROVAL_TASK.insert-InlineParameterMap. --- Check the parameter mapping for the 'scheduledDate' property. --- Cause: java.sql.SQLException: Invalid column type; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred while applying a parameter map. --- Check the APPROVAL_TASK.insert-InlineParameterMap. --- Check the parameter mapping for the 'scheduledDate' property. --- Cause: java.sql.SQLException: Invalid column type at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:121) at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322) at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:212) at org.springframework.orm.ibatis.SqlMapClientTemplate.insert(SqlMapClientTemplate.java:397) ... [/sourcecode] Now the problem was that scheduledDate was null. Here is partial SQL map used: [sourcecode language='xml']

How to generate and send emails using Spring and Velocity

·1049 words·5 mins
Testing applications that communicate using email is more challenging than e.g. testing database access. Thanks to GMail and Spring, it can be done pretty easily. Here is the scoop: I need to generate email notifying users about business events and after sending the email, store the content in the database. In real environment you will use corporate SMTP server and real email addresses of real people. For development we can avoid bothering and spamming our customers by few simple tricks.

Spring PropertyPlaceholderConfigurer with Velocity

·171 words·1 min
Part of the configuration magic is (one of several) Spring post-processors, that allows load the property file or files and refer to the values in these files inside XML configuration files. The rationale behind these is that property files are much easier to edit that possibly huge XML config file and using property values prevents repeating same value over and over again. With this approach, the following configuration: [sourcecode language='xml']

Oracle SQLDeveloper and mystery of the missing host

·193 words·1 min
If you work with Oracle database, a very good tool you should not ignore is the Oracle SQL Developer. It gives you much more power when it comes to manipulating data or managing database. I use most of the time MyEclipseIDE plugins, but when I need e.g. export data, the SQLDeveloper is way to go. Today I tried it for first time on the Mac. I started to configure and database connection and was completely confused by the error message "Port must contain numerical value". Here was the dialog box: