Its not always your site says anything to you

But mine did…It said ‘XDB’.

It was my grails application.This is the login window Firefox showed be gleefully with the message

The site says XDB

IE played dumb(er) – It too presented a login screen – but had a simpler message

XDB

I was in the process of trying a few things in Grails – making those cool domain classes and controllers when it happened. It was working a few minutes ago and then boom !!! it stopped.
And since I am so new to Grails- I thought maybe I had messed up something.

Surprisingly google didn’t get many results either.

Anyway it was enough to tell me the problem was with Oracle

And since I was at that time creating a new Oracle Database on my laptop- <snap> that made perfect sense. (Though I was simply creating a new database instance and not fiddling with the one that my app was using)

Once I stopped and restarted all the Oracle listeners -the problem went away.

So moral of the story ? If the site says XDB- restart your Oracle instance.

There may be more elegant solutions out there- but this is what worked for me

 

Today I bid farewell to  Windows Vista. And hello Ubuntu !!!

Well not exactly… I still have Vista as a dual- boot option.But I don’t see myself logging in to Vista any time soon.

For some reason the CD I created after downloading it from Ubuntu downloads site – didn’t work.So crazy as it sounds- I requested a CD to be snail-mailed to me.

It came soon- even though they warned me that it could be ‘months’ before I get it.

I decided not to wipe out Vista and installed Ubuntu on ‘top of’ the Windows.

The installation was quite smooth. I used the instructions posted here

My first reaction after I booted into ubuntu was- Cool !!!  This is fast !!!

My wife was not so impressed though she was relieved that her favourite application i.e. (not Internet Explorer) Firefox works

But when I showed her how to get to Sudoku from Applications>Games – she was actually pleased ;)

I spent rest of the day installing my suite of applications and tools- Apache, Tomcat, Php, MySql , Java, Groovy ,Grails,Spring,Hibernate,Eclipse,ant

Most of the applications – I was able to install from the System>Administration>Synaptic Package manager

(One piece of advice- when in Synaptic package manager- do not use quick search to search for  applications- use the Search button instead.)

All in all – it was a smooth and a very satisfying experience.

Sorry Amit- I know you love windows. But sometimes  you gotta shut the window and open the door to get the fresh air in :)

 

Grails quick-start example is a neat way to start off with Grails.

It will show you how to connect to HSQLDB and gets a quick and elementary web app up and running in no time.

But soon, I wanted to get on with the “real” stuff- Oracle

These are the changes I did to connect with Oracle (and errors I encountered on the way).

But first the Version disclaimer

Groovy:1.6.2

Grails: 1.1

Oracle::9.2.0.6.0
A) Changed the DataSource.groovy as follows

dataSource {
pooled = true
driverClassName = “oracle.jdbc.driver.OracleDriver”
username = “user”
password = “password”
dialect=’org.hibernate.dialect.Oracle9Dialect’

}

environments {
development {
dataSource {
dbCreate = “create-drop” // one of ‘create’, ‘create-drop’,'update’
url = “jdbc:oracle:thin:@myservername:1521:mysid”
}
}
// Left test and Production as they were….

}
B) Dropped the oracle driver jar file in the lib folder under the grails- app folder

Bingo !!! That’s it !!!

I got only one error-  (see at the end of this post) And this maybe specific to Oracle 9i.

The fix was to add this line to the  data source.groovy

dialect=’org.hibernate.dialect.Oracle9Dialect’

(If you are using a higher version of Oracle- you may need to use a different Dialect)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dialectDetector’: Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is java.sql.SQLException: Unsupported feature
at java.security.AccessController.doPrivileged(Native Method)
… 24 more
Caused by: org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is java.sql.SQLException: Unsupported feature
… 25 more
Caused by: java.sql.SQLException: Unsupported feature
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:689)
at oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4442)
… 25 more
2009-04-27 10:57:39,450 [main] ERROR mortbay.log  – Failed startup of context

© 2011 Technology Cafe Suffusion theme by Sayontan Sinha