Wednesday, December 23, 2009

Database Connection in ADF BC 11g

My colleague was facing ADF BC development question and asked me to help. He sent me whole application, so I was able to open it directly with my local JDeveloper 11g. While investigating actual question, I noticed strange behavior in ADF BC. For example, attribute types were not recognized and I was getting log messages - oracle.jbo.domain.Number not found.

I started to dig more and I saw that Number type is displayed as oracle.jbo.domain.Number, usually it is shown just as Number:

I opened attribute editor, and I saw that type list gives only small set of types, Number type is not available:

Thats was strange and I was a bit frustrated. I realized that database connection is not defined and it might be a reason for this strange problem:

Database connection wasn't present because my colleague was using IDE level connection. I defined HrDS connection locally:

After IDE restart, it started to work properly - Number type was recognized again:

And types list was showing all available types:

This means, missing database connection definition was causing direct impact on ADF BC development.  If you will face same issue, make sure following files are present inside your application - .adf/META-INF/connections.xml, src/META-INF/cwallet.sso and src/META-INF/jps-config.xml.

Download sample application with database connection files in place -

By the way, original question received from my colleague was solved as well ;-)


Steve Muench said...

Are you able to reproduce the problem again by deleting the database connection in an application that was previously working correctly at design time?

Andrej Baranovskij said...

Hi Steve,

Yes, if database connection is deleted, same problem is reproduced.


Maniesh (Sid) said...

I am facing the same problem though i have database connection in place. Infact this problem persists only on my instance of JDeveloper (
When i create a new new Entity Objects the default datatypes are BigDecimal & java.sql.Date. Other people working on the same ADF application doesn't face this issue. I tried deleting system directory but that didn't help either.

Maniesh Sailoz (sid) said...

The issue was solved.

Andrej Baranovskij said...

Thanks for following up, it seems couple of issues are related to this problem.