jsf-2faceletsxml-namespacesicefaces-3

Warning: This page calls for XML namespace declared with prefix style but no taglibrary exists for that namespace


I'm upgrading a web application from icefaces 1.8 to Icefaces 3.x and from jsf 1.2 to jsf 2. Whenever I open existing popups, I receive:

"Warning: This page calls for XML namespace declared with prefix style but no taglibrary exists for that namespace."

of course, this is shown trough:

<ice:messages
    globalOnly="true"
    styleClass="graRequired" />

These are the namespaces I use:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:gra="http://www.gravitant.com/components">

I spent a few hours on this and I wasn't able to find out what can cause this issue.

Is there anybody who met something similar?


Solution

  • Warning: This page calls for XML namespace declared with prefix style but no taglibrary exists for that namespace.

    This may happen when you're using plain HTML <style> element while not having the default XML namespace declared as xmlns="http://www.w3.org/1999/xhtml". But this is unlikely as you already have declared it in the <ui:composition> snippet in your question.

    Another probable cause is you're using the literal string style: in a XML element or attribute, which indicates a XML namespace prefix (like as h: is the XML namespace prefix of standard JSF component set and ice: is that for ICEfaces component set).

    Given that you didn't awarely declare such a XML namespace, and the "style" being recognizable as a standard HTML element attribute, this in turn strongly suggests that you accidently used the following somewhere in the XHTML file:

    <someElement style:"bar">
    

    instead of

    <someElement style="bar">
    

    Just do a Ctrl+F on style: and fix accordingly.