Sunday, August 24, 2008

JBO-25058 and JBO-26001 exceptions

In a case if you will get JBO-25058 and JBO-26001 exceptions after running application developed with Oracle ADF in JDeveloper 11g, most probably my post will help you.

Those exceptions can be thrown, after refactoring Model part implemented with ADF BC. If Business Components Project file with extension *.jpx is moved to different package, jbo.project property available in bc4j.xcfg file must be changed accordingly. However, it is not changed always automatically. If its not changed, two exceptions will appear at runtime:

1) oracle.security.jazn.JAZNRuntimeException: JBO-25058: Definition JobTitle of type Attribute not found in JobTitle

2) oracle.jbo.NoXMLFileException: JBO-26001: XML File not found for the Container /Model.jpx

In order to solve this issue, double check bc4j.xcfg, ADF BC configuration file. For example, if Model.jpx file (this file can have different name in your project) is in lt.andrejusb.model package, jbo.project property in bc4j.xcfg file must be equal to jbo.project="lt.andrejusb.model.Model".

8 comments:

Nosayba said...

Hello Andrejus,

I am getting the "JBO-25058" Exception in my ADF Application but without having refactored or moved any parts of the project earlier. I've also double checked the bc4j.xcfg file and the properties seem to be quite correct.

I'm working on a single .JSP page currently, which is based on 3 View Objects. The strange part is that the page would run perfectly couple of times before suddenly -without changing anything in the project- the Exception pops, and after that neither this page would run nor any other pages I create in the application. I googled around and read that this error could occur "..if there is a case conflict, as when the database expects "DEPTNO" and receives "Deptno" instead." But to be honest, I have no clue how to work around that. I would appreciate any tips from your side. Thank you in advance. And btw, great blog!.

Nosayba said...

I forgot to subscribe for following-up comments in this post. This comment is just for this purpose. Sorry :-)

Andrejus Baranovskis said...

Hi,

This exception also can happen when database is down. Your database is running?

What if to run ADF BC Tester?

Regards,
Andrej

Nosayba said...

The database is running. The ADF Tester however doesn't -and never did- work with me. I get the following error when attempting to run it:

(oracle.jbo.ConfigException) JBO-33003: Connection name ORAA not defined

Andrejus Baranovskis said...

Hi,

Most probably its a reason for your problem, tester should work well. Looks like your database connection is defined wrong.

You can check 2 things:

1) Right click on Model project and choose Project Properties. Make sure in Business Components section, Connection is defined correctly.

2) Right click on Application Module and choose Configurations, make sure Connection is defined correctly.

Regards,
Andrejus

Nosayba said...

Hi,
Thanks for replying back. I hadn't the chance to test your recommendation because I was in a holiday. Now that I have, the connections are correctly defined in both locations. I'm starting to think it's a Bug in JDev11g, since I've read about similar bugs in metalink. It seems that I might be going back to a more stable release in 10g!.. :(

Nosayba.

Nosayba said...

A quick follow-up: I've downloaded Jdeveloper 11g Production Release that was released last week. I re-built the application and have been working on it for a while. No strange exceptions have occurred till now. I think it might have been an issue with the technology preview. Anyways, thank you for your replies :-)

Nosayba.

yaji said...

Dear Andrejus,
I am using ADFBC of Jdev 10.1.3. By placing the create form in the create.jspx page I create a new record in a table using the backing bean. I am doing it because I want to capture the primary key (DBSequence) value in to the session scope. The creation process is fine but the problem is reporting the unique key constraint exception handling as I have a passport_no field which is unique constrained. I want to display a simple message like “The passport number already exists”.
For further curiosity, If I use the create form execute action it displays a whole lot of message displaying the SQL query statement (I am using the SRdemo application as template)  how to customize this message.
I had gone through the ADFPhaseListner related code stuff but it may take some time for me to understand this. Your genius is good for new ADFBC coders like me.
Regards
Yaji