zondag 13 december 2015

Getting my first ADF app to work

Since I'm a traditional eBS and forms developer, moving towards ADF was quite a step. The tutorials seemed easy enough, but getting your first actual application to work is always much more difficult since you always run into those errors that you don't encounter in your tutorials and training sessions and they are so good in explaining what the errors are and what you should  do to fix it right?
So after quite some google-hours I decided to blog here all the issues I've encountered so far in the hope to help someone else a lot quicker to fix things!

Unable to reserve the .lok file for Integrated Weblogic Server (IntegratedWeblogicServer)


When JDeveloper closes unexpected without shutting down IntegratedWebLogicServer, trying to start IntegratedWLS next time, gives "Unable to reserve the .lok file for Integrated WebLogic Server (IntegratedWebLogicServer)."

First Solution is to kill the process in Task Manager. Open Task Manager & check for java.exe process for higher memory consumption. End the process.

IF above does not help then go to C:\Users\RRA\AppData\Roaming\JDeveloper\system11.1.2.1.38.60.81\DefaultDomain . Delete the edit.lok file.


The task cannot be processed further until the current edit session is activated

 Actually, that is not an error. Login to the weblogic console and activate the changes.




Check your preferences to make sure you switch this off so you don't have to activate the changes every time you deploy.


Package weblogic security does not exist


Using Weblogic 10.3, I found that in order to follow the documented steps for creating an ADF Faces login page, I also needed to create a new JDeveloper library containing the following classpath entries and add this new library to my ViewController project. 

modules/com.bea.core.weblogic.security.auth_1.1.0.0.jar
oracle.wlserver_10.3/server/lib/wls-api.jar

This allowed my project to compile since it resolved the following imports from the code sample

 import weblogic.security.SimpleCallbackHandler; 
import weblogic.security.services.Authentication;
import weblogic.servlet.security.ServletAuthentication; 


Navigate to Project Properties, Libraries, Classpaths. I picked the libraries from weblogic.jar in the /server directory.




weblogic.application.ModuleException: Context path '/xxx' is already in use by the module: xxx application

In this case I choose the incorrect deployment profile. I created too many deployment profiles that looked too much the same with the same applications. You should not do that.

No META-INF/application.xml and no modules could be found in it


  • Make sure you have war file created for the UI project 
  • Check the Deployment Profile of the ADF application to see if the UI project is selected (application properties -> application assembly->select UIProject->check the assembly)



this project has no default run target jdeveloper



Well, actually my problem was simply I wasn't starting the run from the main page :-).


In JDeveloper, an application can be deployed to the internal weblogic server by selecting an entry in the project navigator and choosing "Run" from the context menu. JDeveloper then also prints the target URL through which the application can be accessed to its console.

Which file is actually used as the application's starting point and how the target URL is constructed can be defined in the "Run configuration" of the project (usually the ViewController project). Select the ViewController project, and then from the context menu choose "Project Properties". In the "Project Properties" dialog, select the "Run/Debug/Profile" section from the tree on the left, and then edit the run configuration. The "Edit Run Configuration" dialog is shown (click to enlarge):
 


In the "Edit Run Configuration" dialog, there are two sections which define the default run target:

  • "Launch Settings" defines the file to use as the run target. This can for example be an ADF task flow file such as adfc-config.xml for the unbounded task flow or a particular .jspx file. Below is the option "Attempt to Run Active File before Default": this influences whether JDeveloper shall always use the file provided above, or, when a particular file is currently selected in the project navigator, JDeveloper shall first try to use that file as the run target.

  • In case the default run target is an ADF task flow, there is a second section in the "Edit Run Configurations" dialog which needs to be considered: "Launch Settings => ADF Task flow". There, the actual task flow to execute by default is defined.
 

Geen opmerkingen:

Een reactie posten

Opmerking: Alleen leden van deze blog kunnen een reactie posten.