« Multiple Checkbox Selection in UIX Fails with JavaScript Error in Internet Explorer | Main | Setting the First Day of the Week to Monday in the SelectInputDate component »

Diagnosing Problems with the Visual Editor Not Rendering JSF Pages.


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:
TuhraBlankVisualEditor:

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
java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
    at com.sun.faces.config.ConfigureListener.digester(ConfigureListener.java:964)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:270)
    at oracle.jdevimpl.webapp.design.support.http.DesignTimeServletContainerContext.contextInitialized(DesignTimeServletContainerContext.java:978)
    at oracle.jdevimpl.webapp.design.DesignTimeThread.invokeContextInitialized(DesignTimeThread.java:712)
    at oracle.jdevimpl.webapp.design.DesignTimeThread.synchronousUpdate(DesignTimeThread.java:163)
    at oracle.jdevimpl.webapp.design.DesignTimeDocumentContext._init(DesignTimeDocumentContext.java:1477)
    at oracle.jdevimpl.webapp.design.DesignTimeDocumentContext.<init>(DesignTimeDocumentContext.java:247)
    at oracle.jdevimpl.webapp.design.DesignTimeEngine.start(DesignTimeEngine.java:242)
    at oracle.jdevimpl.webapp.editor.jsp.JspEditor.startupDesignTime(JspEditor.java:307)
    (...)

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:
TuhraMissingLibraries:

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
To fix the issue:
  1. Double-click your Project to access the Project Properties
  2. Select Libraries in the left panel
  3. click button Add Library...
  4. select the 4 missing libraries
    TuhraAddLibraries:
  5. click OK twice to close the 2 dialogs.
After these changes, the libraries showed up as the following:
TuhraExpectedLibraries:

and the page (the Tuhra template in this case) could render correctly in the Visual Editor:
TuhraTempla:

Comments (10)

Ling:

Hi,
I am a new user for JDeveloper. I install the JDeveloper Studio Edition 10.1.3.3.0.4157.
The Visual Editor does not work with JSP. I tried so many time to drag-and-drop different components, the Visual Editor is always blank.
The libraries are not missing. So what's the problem?
Many thanks!
Ling

Hi Ling,

you didn't even mention if you checked the "Show Design Time Messages in Log" to diagnose the issue.
Anyway, I see you created a Service Request in Metalink and we will help you through this channel.

Writing a document about the known issues with the Visual Editor is on my To Do list, but I had no time to do it yet.

Regards,
Didier.

Ling:

Didier,
I turn the logging on. There is no error message when I drag-and-drop ADF faces core component to JSP page.
I also checked the libraries, all the commons.* libraries are already there.
The visual editor is always a blank page. Other than that, everything looks fine. The codes in code window are right; the display in structure window is right; the page displays correctly in web browser. I am following example on book: Oracle JDeveloper 10g for forms & PL/SQL developers.
Thanks!
Ling

Ling:

Didier,
I turn the logging on. There is no error message when I drag-and-drop ADF faces core component to JSP page.
I also checked the libraries, all the commons.* libraries are already there.
The visual editor is always a blank page. Other than that, everything looks fine. The codes in code window are right; the display in structure window is right; the page displays correctly in web browser. I am following example on book: Oracle JDeveloper 10g for forms & PL/SQL developers.
Thanks!
Ling

Chapter 11 ?

Could you check "ADF Faces Pages under WEB-INF Directory Do Not Render Correctly in 10.1.3.1" and see if it applies ?
URL: http://blogs.oracle.com/Didier/2006/11/adf_faces_pages_under_webinf_d.html

Regards,

Didier.

Diego:

Hi Didier

I'm using JDeveloper Studio 11.1.1.0.1 and the message I get in the log when I open a JSP file and open the design view is:

Jan 22, 2009 2:44:38 PM oracle.bali.xml.dom.buffer.AbstractBufferDomParser doParse
SEVERE: Unexpected error in document scanner
java.lang.NullPointerException
at oracle.jdevimpl.webapp.jsp.JspDocumentScanner.parseDirective(JspDocumentScanner.java:657)
at oracle.jdevimpl.webapp.jsp.JspDocumentScanner.parseDocumentToken(JspDocumentScanner.java:124)
at oracle.bali.xml.dom.buffer.parser.DocumentScanner.scanDocument(DocumentScanner.java:179)
at oracle.bali.xml.dom.buffer.parser.DocumentScanner.scanDocument(DocumentScanner.java:90)
at oracle.bali.xml.dom.buffer.AbstractBufferDomParser.doParse(AbstractBufferDomParser.java:402)
at oracle.bali.xml.dom.buffer.BufferDomDocumentParser._parse(BufferDomDocumentParser.java:461)
at oracle.bali.xml.dom.buffer.BufferDomDocumentParser.parse(BufferDomDocumentParser.java:88)
at oracle.bali.xml.dom.buffer.BufferDomModel._parseCurrentTextBuffer(BufferDomModel.java:1843)
at oracle.bali.xml.dom.buffer.BufferDomModel._realEnsureSynchronizedImmediate(BufferDomModel.java:1665)
at oracle.bali.xml.dom.buffer.BufferDomModel._ensureSynchronizedImmediate(BufferDomModel.java:1623)
at oracle.bali.xml.dom.buffer.BufferDomModel.refreshModel(BufferDomModel.java:560)
at oracle.bali.xml.dom.impl.DomModelImpl.refreshModel(DomModelImpl.java:1096)
at oracle.bali.xml.dom.impl.DomModelImpl.acquireReadLock(DomModelImpl.java:433)
at oracle.bali.xml.model.XmlModel.acquireReadLock(XmlModel.java:2067)
at oracle.bali.xml.model.XmlModel.__attachContext(XmlModel.java:2505)
at oracle.bali.xml.model.XmlContext._initializeModel(XmlContext.java:264)
at oracle.bali.xml.model.XmlContext._setSourceModel(XmlContext.java:2115)
at oracle.bali.xml.model.XmlContext.setModel(XmlContext.java:324)
at oracle.bali.xml.addin.XMLSourceNode._createAndInitXmlContext(XMLSourceNode.java:1422)
at oracle.bali.xml.addin.XMLSourceNode._getXmlContext(XMLSourceNode.java:1372)
at oracle.bali.xml.addin.XMLSourceNode.getXmlContext(XMLSourceNode.java:182)
at oracle.bali.xml.gui.jdev.JDevXmlContext.getXmlContext(JDevXmlContext.java:227)
at oracle.bali.xml.gui.jdev.AbstractXmlVisualEditor.setContext(AbstractXmlVisualEditor.java:244)
at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.setContext(AbstractWebAppEditor.java:240)
at oracle.jdevimpl.webapp.editor.jsp.JspEditor.setContext(JspEditor.java:161)
at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:158)
at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:94)
at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:231)
at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:194)
at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:103)
at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:379)
at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1400)
at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1334)
at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1260)
at oracle.ide.editor.EditorUtil.openDefaultEditorInFrame(EditorUtil.java:164)
at oracle.ide.cmd.FileOpenHistory$2.run(FileOpenHistory.java:590)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Jan 22, 2009 2:44:38 PM oracle.bali.xml.dom.buffer.BufferDomModel _doWfCheck
WARNING: Exception in well-formedness check!
java.lang.NullPointerException
at oracle.jdevimpl.webapp.jsp.JspDocumentScanner.parseDirective(JspDocumentScanner.java:657)
at oracle.jdevimpl.webapp.jsp.JspDocumentScanner.parseDocumentToken(JspDocumentScanner.java:124)
at oracle.bali.xml.dom.buffer.parser.DocumentScanner.scanDocument(DocumentScanner.java:179)
at oracle.bali.xml.dom.buffer.parser.DocumentScanner.scanDocument(DocumentScanner.java:90)
at oracle.jdevimpl.webapp.html.WellFormednessChecker._check(WellFormednessChecker.java:105)
at oracle.jdevimpl.webapp.html.WellFormednessChecker.check(WellFormednessChecker.java:88)
at oracle.jdevimpl.webapp.html.HtmlParserConfiguration.doWellFormednessCheck(HtmlParserConfiguration.java:62)
at oracle.jdevimpl.webapp.jsp.JspParserConfiguration.doWellFormednessCheck(JspParserConfiguration.java:79)
at oracle.bali.xml.dom.buffer.BufferDomModel._doWfCheck(BufferDomModel.java:2159)
at oracle.bali.xml.dom.buffer.BufferDomModel.getCurrentDomParseProblems(BufferDomModel.java:303)
at oracle.bali.xml.dom.impl.DomModelImpl.getCurrentDomParseProblems(DomModelImpl.java:796)
at oracle.bali.xml.model.XmlModel.__attachContext(XmlModel.java:2514)
at oracle.bali.xml.model.XmlContext._initializeModel(XmlContext.java:264)
at oracle.bali.xml.model.XmlContext._setSourceModel(XmlContext.java:2115)
at oracle.bali.xml.model.XmlContext.setModel(XmlContext.java:324)
at oracle.bali.xml.addin.XMLSourceNode._createAndInitXmlContext(XMLSourceNode.java:1422)
at oracle.bali.xml.addin.XMLSourceNode._getXmlContext(XMLSourceNode.java:1372)
at oracle.bali.xml.addin.XMLSourceNode.getXmlContext(XMLSourceNode.java:182)
at oracle.bali.xml.gui.jdev.JDevXmlContext.getXmlContext(JDevXmlContext.java:227)
at oracle.bali.xml.gui.jdev.AbstractXmlVisualEditor.setContext(AbstractXmlVisualEditor.java:244)
at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.setContext(AbstractWebAppEditor.java:240)
at oracle.jdevimpl.webapp.editor.jsp.JspEditor.setContext(JspEditor.java:161)
at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:158)
at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:94)
at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:231)
at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:194)
at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:103)
at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:379)
at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1400)
at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1334)
at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1260)
at oracle.ide.editor.EditorUtil.openDefaultEditorInFrame(EditorUtil.java:164)
at oracle.ide.cmd.FileOpenHistory$2.run(FileOpenHistory.java:590)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)


I don't think adding this libraries will make design view work. Should I add other libraries or something?

Thanks!
Regards,

Diego

pedro:

Hi Didier,
Im using JDeveloper 10.3.4.0.4270. I turned the logging on and got a different error, so could you help me, please?

Thanks,

Pedro
--------------------------------------------------------------------------

Error exercising tag : afh:head
java.lang.NullPointerException
at oracle.adfinternal.view.faces.renderkit.AdfRenderingContext.getTranslatedString(AdfRenderingContext.java:70)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.GlobalVariablesScriptlet.outputScriptletContent(GlobalVariablesScriptlet.java:49)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.Scriptlet.outputScriptletImpl(Scriptlet.java:111)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.Scriptlet.outputScriptlet(Scriptlet.java:52)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.XhtmlUtils.addLib(XhtmlUtils.java:166)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.Scriptlet.outputDependency(Scriptlet.java:144)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.AliasedScriptlet.outputScriptletImpl(AliasedScriptlet.java:112)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.Scriptlet.outputScriptlet(Scriptlet.java:52)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.XhtmlUtils.addLib(XhtmlUtils.java:166)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.Scriptlet.outputDependency(Scriptlet.java:144)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.DefaultTimeZoneScriptlet.outputScriptletImpl(DefaultTimeZoneScriptlet.java:41)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.Scriptlet.outputScriptlet(Scriptlet.java:52)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.XhtmlUtils.addLib(XhtmlUtils.java:166)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.HeadRenderer._writeCookieScript(HeadRenderer.java:124)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.HeadRenderer.encodeBegin(HeadRenderer.java:72)
at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeBegin(CoreRenderer.java:149)
at oracle.adf.view.faces.component.UIXComponentBase.encodeBegin(UIXComponentBase.java:593)
...

Anonymous:

I'm getting severe errors like Element End name:html does not match start name:div.

What does that mean? It was working before so I did something to lose my html tags or some

jt:

I am getting these errrors when running jdev the way you descript. Not sure what changed to where i would lose my objects in .jspx files. Everythings seems to run ok. These are the error messages...

WARNING: The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
WARNING: There is no SkinFactory
SEVERE: Could not get stylesheet cache
SEVERE: Element End name :head does not match start name:script
SEVERE: Element End name:html does not match start name:div

Any help is appreciated! Thanks!

I suspect you are using a custom Filter or PhaseListener.
If that's the case, you should ensure:
. that your custom class compiles
. that your code can be evaluated at Design Time

For more information, see my Note 382812.1 in Metalink, where I documented various causes and their solutions.

You can also open a Service Request at Oracle Support.
With the usage of OWC (Oracle Web Conference), the support engineer will be able to diagnose the issue online.

Regards,

Didier.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on February 26, 2007 8:43 AM.

The previous post in this blog was Multiple Checkbox Selection in UIX Fails with JavaScript Error in Internet Explorer.

The next post in this blog is Setting the First Day of the Week to Monday in the SelectInputDate component.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle