Friday, July 17, 2009

Oracle ADF BC Deployment and Imported Libraries

Last year July, I was writing about ADF BC sharing through JAR libraries across entire application. It works the same in current JDeveloper 11g release, however during deployment on standalone WebLogic server I have noticed some problems. When application with imported ADF BC libraries was deployed, shared ADF BC components were not found on the classpath and page wasn't loaded. For more info about importing shared ADF BC libraries you can find in my previous post - Import Functionality in Oracle ADF BC.

I have tried to deploy my previously developed application directly from JDeveloper 11g to standalone WebLogic server:


However, after application was successfully deployed and when I have tried to access it, I got oracle.jbo.NoDefException for lt.andrejusb.model.shared.entities.Countries entity:


This Entity Object should come from imported ADF BC library:


But for some reason shared package wasn't included into EAR. When I have extracted EAR package, I didn't found it there:


But as usual, solution is easy. If you have application with shared and imported ADF BC libraries, make sure you didn't forgot to set dependencies properly. In order shared package to be included into deployment WAR and then EAR archives, make sure you have set dependencies in ViewController:


In my case, ModelShared wasn't set with dependency, it's why this package wasn't included. I have set dependency and redeployed - got shared package included now:


Now application with shared and imported ADF BC components works just fine as well when it is deployed on standalone WebLogic:


Download sample application prepared for deployment - ADFBC_Import_Deploy.zip.

Spanish Summary:

En anteriores post, se mostró como hacer uso de una libreria ADF BC en otros proyectos usando Jdeveloper 10g. Sin embargo, en la actual versión de la herramienta 11g existen algunos inconvenientes que son resueltos en el siguiente post.

1 comment:

Milkbird said...

Solutions are easy only after you find them