Tuesday, November 27, 2007

ArrayIndexOutOfBoundsException with CFMX and oracle thin jdbc

I hit the error below in my ongoing saga with switching over to use the Oracle Thin driver with CF8.

There are a few references to this error around the web, with some notes on metalink about websphere and the IBM JDK. Oracle calls this a vendor issue.

The statement is an insert with 19 parameters, including a spatial sdo_geometry column via CFQUERY. I am using oracle (+ October patch) and ojdbc6.jar.

Removing some extraneous new lines from the query resolved the issue.

java.lang.ArrayIndexOutOfBoundsException: 19
at oracle.jdbc.driver.OracleSql.computeBasicInfo(OracleSql.java:950)
at oracle.jdbc.driver.OracleSql.getSqlKind(OracleSql.java:623)
at oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.java:1212)
at oracle.jdbc.driver.T4CPreparedStatement.(T4CPreparedStatement.java:28)
at oracle.jdbc.driver.T4CDriverExtension.allocatePreparedStatement(T4CDriverExtension.java:68)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3059)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:2961)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:5808)
at coldfusion.server.j2ee.sql.JRunConnection.prepareStatement(JRunConnection.java:786)

Friday, November 23, 2007

Looking forward to the next CFCAMP

I went along to CFCAMP Melbourne today, it was a really good event, very relevant and interesting stuff. Peter Bell's talk on code generation was my highlight, I enjoyed chatting about it with him over lunch... then to have the nice suprise of finding three of my dad's work mates were sitting at the same table...

I raised the idea of having an open CF Bug Tracker (Jira being my preferred option as always) and the Adobe team were quite open to the idea. Even having an (semi) open bug tracker can reduce your support calls. Livedocs comments are the closest thing at the moment.

CF8's new Flex support showed strongly, as did the PDF forms, CFInterface, Ajax support (lets hope updater 1 updates the various js libraries)

The whole CF8 package is pretty incredible when you delve inside what you can do with it, as Jason explained on CFInsider recently, it's a lot cheaper than the sum of it's parts

I sat down with some of the Adobe team and discussed my issue with my Oracle JDBC problem and after showing them my test cases they forwarded it on to the CF team. Really nice group of people the CF crowd :) I might of been a bit harsh in my initial blog entry ... sorry guys

As a guide for anyone wanting to submit a CF Bug Report, it's a bit hidden under the Feature Request link from the Coldfusion Support homepage. Tho you can't attach files which kinda sucks.

Just remember, when you reduce your test case (bug example) down to very simple code (or steps to reproduce) that clearly demonstrates the problem, it's more likely to get attention.

That's good advice for everyone, developers and users !! hehe

Star Wars - The Election Edition

Now this is perhaps the best election youtube entry i have seen yet.

---snip spoiler deleted! --- i don't want to spoil your fun

Wednesday, November 21, 2007

ABC Election News mobile application

The ABC has an election app for your mobile phone, i just downloaded it and it looks snappy.

I blog later after playing round with it, will be good for someone out in the bush

Why does my N95 always report installation size as being double the real size?

Tuesday, November 20, 2007

Optus Network Status - more info

So today a lot of my net connections didn't work.

So I checked whirlpool yep there are problems, then I looked at the optus network status page.. no problems

So I spend 20 mins on the phone to optus and get told it's an upstream problem, nothing to do with optus.....

But because it's upstream they don't put anything on their network status page...

DUMB OPTUS DUMB!!!!!!!!!!!!!!

Save your helpdesk queues and staff being overloaded and your customers time.....

Just Post a bloody note to the Network Status Page


Monday, November 19, 2007

Aboriginal choreography of Zorba The Greek

I first saw this on the ABC..... it's a wonderful interpretation of the contemporary greek classic

Kyoto News Flash - It's time, Australia will Ratify

Attention the rest of the world: There is an exciting development in Climate Change politics (it's such a wrong term, a bushism from memory.)

John Howard is most likely going to lose the Australian Federal Election next week. His opponent Kevin Rudd has declared his first task as a new Prime Minister will be to ratify the Kyoto protocol. This is the team with Peter Garrett (of Midnight Oil fame) as (shadow) Environment Minister.

The added bonus is that it looks quite certain that the Australian Greens will hold the balance of power in the Senate. Kevin Rudd or Kevin as he's known these days has led the polls for 10 months since he got the leadership.

Garrett and The Greens are good news for the world, as is Kevin Rudd. If the Greens get the balance, they can negotiate an even better outcome for Environment Policy.

The Liberals (Howard's party) have been attacking Kevin's lack of experience for a long time. I woke up yesterday to hear Julia Guillard (Deputy Labour Leader) on the radio, sounding relaxed, comfortable and like a Leader. The Age wrote yesterday about what a shocking campaign the Liberals have run this time round.

Experience when your on the nose doesn't really help.

Next Saturday, if all goes well, (everyone here is cautious despite the consistent opinion polls favoring Labour with a 10 point lead) Australian's will once again start to have something to be proud about. Add to the list pulling out of Iraq, the end of Workchoices ( the IR policy they dare not mention any more by name ) and the return to decency when it comes to Immigration and Refugees...


Sunday, November 18, 2007

My little Gmail 2 Wish list for Contacts

I just read about "5 little-known Gmail features you may not yet know about".

I like having you mail history working with the browser forward and back buttons. The keyboard history in your browser is usually Alt-left and Alt-right, great for flying thru you history. Control-tab flicks between tabs... the mouse is slowwww... anyway...

So here's my Number 6 little known hopefully awaited new feature.

What i am still extremely frustrated with is the new contacts. It's a bit better than the old one, but there are some simple things to make it a whole lot better.

My mate John just sent out an email saying his old age email address doesn't work anymore as he's now freelance, so i thought ok, lets clean up my contacts... eeeyyuuu......my response

Zac's Improved Gmail Contact Management Hitlist

  1. Show both the contact's name and email address in the second column, like composing.. otherwise it's becomes very confusing
  2. Get rid of the edit button! if i click on a contact in contacts, i am most likely going to want to see more detail.
  3. Drag and drop contact merge, Auto Merge ?? "Are these the same person?"
  4. Email Domain auto generated Filters like groups
  5. There are two icons for adding users and groups. I didn't naturally get that one the first time i used it. Gmail has a text based ui. Every other button has a text annotation... come on.. there's enuff space
  6. The group button, when no contact is selected, should still allow adding a new group

Thursday, November 15, 2007

The Ministry of rich old white guys

This satire of the Liberal 70% unions add campaign ( circa $8 Million spent so far, why? ) is so on the mark it's brilliant!

Wednesday, November 14, 2007

On a lighter note

It's summer in Melbourne, it was nice to hit the beach down at Half Moon Bay, Black Rock last weekend

WMI Performance Adapter Event Log Spam

If your running oracle on Windows, you may find the the System Event log being filled with Start Stop messages for the WMI Performance Adapter ... every few minutes or even more often...

Event ID:7036 The WMI Performance Adapter service entered the running state.
Event ID:7035 The WMI Performance Adapter service was successfully sent a start control.
Event ID:7036 The WMI Performance Adapter service entered the stopped state.

I hate Event Log Spam, then again, I find the event log very 1990's :)

Turns out it's due to an old NT4 dll, pdh.dll in the %ORACLE_HOME%\bin directory.

The fix is easy, stop your dbconsole service(s), rename the file and restart the dbconsole service(s).

The metalink docid is 454987.1

This feels like a much better solution than the autostart option for the service which has been mentioned around the web.

Why didn't the latest critical update for oracle (oct 07) include this, I consider this to be very critical as it obscures important the event log entries...hmmm

Side Note: The McAfee McShield service entered the running state is a bug in the version 8.50i of viruscan :(

Thursday, November 08, 2007

Picasa Backup to disk is nifty(tm)

Ever used Picasa's built in backup feature under Tools -> backup?

There is a disk to disk backup option so you can use your external hard disk for backups. Burning to DVD is not environmentally friendly.

You should ideally have three copies of everything. IE your laptop/desktop, your regular external hard disk and a backup which is kept separate and not always on and hidden. That way if you get burgled you still have your data. Online backups are also pretty good.

These newer larger 100Gb laptop hard disks are not that reliable, be prepared for them to die, trust me, mine did, a mate's did.

I read about this on the picasa help site. The disk to disk was disabled when i first opened the backup tool, so you need to create a new backup set and then you can select a (pre-existing) folder.

Did Adobe cripple the Oracle Thin Driver in Cold Fusion

Adobe bundles the Data Direct drivers with the developer and enterprise versions of Cold Fusion. The oracle version works really well, but somehow it doesn't justify paying $10k just to have working oracle support.

Now this has been this way for a long time historically speaking, but it does support JDBC. Sooooooo you can use the oracle thin drivers (ojdbc4.jar, ojdbc5.jar and ojdbc6.jar the last two being the 11g versions for java 1.5 and 1.6).

But some basic things it just don't work.

for example
"INSERT INTO zac.test (REGIONS_R_id)
select REGIONS_R_id FROM zac.test"

works in sqlplus, via plain old java, via the data direct drivers but don't via JDBC thru Cold fusion 8.

This is a simple un-bound query, but it fails with

java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended

oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java :91)
at oracle.jdbc.driver.T4CTTIoer.processError (T4CTTIoer.java:455)
oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java :183)
oracle.jdbc.driver.OracleStatement.executeInternal (OracleStatement.java:1770)
coldfusion.server.j2ee.sql.JRunStatement.execute (JRunStatement.java:348)

No I know that there are some subtle differences in the way Oracle's JDBC works, but this is a plain old query.

Pass SQL to the driver, prepare the statement and execute. Of course the sheer beauty of CF is that this is all handled beneath the covers. It should just work :(

UPDATE: I have passed on basic jdbc and cf test cases to Adam from Adobe at CFCAMP Melbourne and they are going to have a look. The Coldfsion Wishlist apparently is a channel to send cf bug reports