Diagnosing Problems with the Visual Editor Not Rendering JSF Pages.
By Didier Laurent on Feb 26, 2007
In a previous post, I blogged about some ADF Faces Pages that didn't render correctly - see "ADF Faces Pages under WEB-INF Directory Do Not Render Correctly in 10.1.3.1".
I also had another customer reporting the problem, though the pages were created outside the WEB-INF directory.
In his case, the Visual Editor was showing a blank page as the following:
To diagnose such issues, you can first launch JDeveloper with the Console window opened, by executing <JDEV_HOME>\jdev\bin\jdev.exe (not jdevW.exe).
Repeat the operation and check if the Console displays a Stack Trace.
Unfortunately, it didn't help in this case.
The next step is to change a preference in JDeveloper:
Select menu Tools -> Preferences...
In the left pane, select JSP and HTML Visual Editor
There select the check box Show Design Time Messages in Log.
This preference controls whether design time errors display in the Log window.
Restart JDeveloper and open the page again.
In this case, we got errors in the Log window:
Failed in contextInitialization : class com.sun.faces.config.ConfigureListener
With this information, the cause of the problem is more obvious.
While trying to render the JSF page in the Visual Editor, JDeveloper doesn't find the class Digester in the libraries of the project and a NoClassDefFoundError is raised.
This class is included in the library Commons Digester 1.5 (<JDev_Home>\jakarta-taglibs\commons-digester-1.5\commons-digester.jar)
A quick look at the libraries of the project showed us that this library was missing:
By comparing another ADF Faces project, we could see the following libraries were missing
- Common Beanutils 1.6.1
- Common Digester 1.5
- Common Logging 1.0.3
- Common Collections 2.1
- Double-click your Project to access the Project Properties
- Select Libraries in the left panel
- click button Add Library...
- select the 4 missing libraries
- click OK twice to close the 2 dialogs.
and the page (the Tuhra template in this case) could render correctly in the Visual Editor: