Thursday, June 28, 2012

Visual Design Editor Fails To Render Page In JDeveloper 11g

Oracle JDeveloper 11.1.1.3
ADF-BC, ADF RC


While doing some test work, suddenly an error dialog pops-up classnotfound in IDE.
Intially the error was claiming NoClassFound AdfcConfigNode in below screenshot.



And my page look like below -












& Fusion Application Template was missing in New Application dialog.



The first thing to check 'JSP Tag Libraries' in ViewController properties.
Make sure the 'Execute Tags in JSP Visual Editor' is checked for adf components, in 'JSP Tag Libraries'
section. This did not help in restoring the visual design, I deleted IntegratedWLS Installation folder.

Unfortunately, in my case it did not work.

After deleting the IntgratedWLS folder, the error dialog pops-up again like below -



















I started comparing the exact duplicate project in other Project Source.
I compared each tab in 'Technology Scope', that was ok.
Then I checked in 'Libraries & Classpath' section. 4 entries were referencing to
missing libraries-
  1. ADF Page Flow Runtime
  2. ADF Controller Schema
  3. ADF Faces Runtime 11
  4. ADF Controlller Runtime
Removing the entries & again adding from 'Add Library' button finally restored the page in design
visual editor.




-The other way is to check broken design time references in LOG Window.
From Tool > Preferences select "JSP and HTML Visual Editor".
Tick the checkbox "Show Design Time Messages In Log". Press OK to close Preferences Dialog.






Now, when accessing the particular page, Log Window shows, what causing the page to render improperly in design mode. Based on that, further action can be taken.

-Best way is to re-initialize Java Server Faces Servlet by registering below listener in web.xml file in ViewController Project. Issue is resolved instantly in majority cases.
 <listener>  
     <listener-class>com.sun.faces.config.ConfigureListener</listener-class>  
 </listener>  

Save web.xml after modification and shuttle the listener to Selected Listeners list in Project Properties like below. Press OK to close dialog & Save All. Re-open broken page or simply click on page. Editor should try to render the page in original format.

















-Also refer to ADF Code Corner Blog - https://blogs.oracle.com/jdevotnharvest/entry/when_jdeveloper_ide_doesn_t