Tuesday 15 November 2011

Null LOVs Throwing invalid number error

This is a problem I came across while working with oracle apex. It took me a while to find the solution so I thought I would just do a quick blog for anyone who was having the same problem.

The problem occurs when using a select list in Oracle Apex that displays nulls. These select lists actually have a value of  '%null%' which if you try to insert into a database gets compared to a number and produces an invalid number error.

I solved this problem by simply checking my the values of my select list for the string '%null%' and then using a null variable to do the insert instead if I found this string.

A better solution (if you have lots of select lists) is provided by Patrick Wolf here .

Hope this helps

Mayo

Friday 9 September 2011

Quartz Scheduler - Cannot instantiate type SimpleTrigger (JobDetail)

One of the projects that I will soon be working on will use the Quartz scheduler. This is a Java framework for scheduling tasks (or jobs). One of the problems I came across when trying write code using Quartz based on books and internet tutorials was that I came across two errors.


  1. Cannot instantiate type SimpleTrigger
  2. Cannot instantiate type JobDetail
After searching for a solution I found many forum posts describing the same problem. The only responses given were to ensure all the appropriate JAR files were added to the project build path/class path. For me though this didn't solve the problem.

After some probing I realised the problem I was having which basically made the majority of the tutorials and examples on the internet correct in theory but syntactically wrong and the code they contained useless to me. The problem is that I was using the latest version of Quartz 2.0 and this updates has significantly changed the API from all quartz 1.x versions (e.g. quartz 1.8).

So if you are using (or updating to) Quartz 2.0 and you find you have these problems I have three tips for you

  1. Familiarise yourself with all of the changes and new features of Quartz (click here)   
  2. Read and understand the source code available in the examples folder that comes with your quartz download
  3. Follow the official Quartz tutorial (click here) To learn how to use the new API
Hope this helps

Mayo

Because I asked the Internet and no one answered



This is just a quick intro to my blog. Here I'm going to post quick answers to technical questions that I have searched for personally and not been able to find suitable answers, the answers have taken a very long time to find or I have only reached the solution by experimentation.

I hope someone out there finds this useful.