facebook

error message in adf-faces-config.xml file in myEclipse

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #258130 Reply

    lagonze
    Member

    hello,
    i’m trying to customize appearance of my JSF/ADF Faces app (which worked fine until now), and tried to insert a adf-faces-config.xml file in my WEB-INF directory, this is it (copied from a tutorial) :

    <?xml version=”1.0″?>

    <adf-faces-config xmlns=”http://xmlns.oracle.com/adf/view/faces/config”&gt;
    <!– Enable debug output –>
    <debug-output>true</debug-output>

    <!– Pick accessibility options based on a per-user managed bean –>
    <accessibility-mode>#{user.accessibilityMode}</accessibility-mode>

    <!– A silly use of EL: English users get one appearance, –>
    <!– others get another –>
    <skin-family>
    #{view.locale.language==’en’ ? ‘minimal’ : ‘oracle’}
    </skin-family>
    </adf-faces-config>

    after saving the file (in myEclipse) i get the following error message on the second line :

    cvc-elt.1 : Cannot find the declaration of element ‘adf-faces-config’
    what does that mean and what should i do ?
    thx…

    #258310 Reply

    Riyad Kalla
    Member

    You need a full root or doctype declaration that specifies the schema or DTD to validate this XML file against. They have a certain format to them that looks sort of weird, to get an example open your web.xml file. You will need to find the adf-faces schema (or DTD) then likely add a schemaLocaiton line that will normally look something like:
    schemaLocation=”<ROOT URL TO SCHEMA> <FULL URL TO SCHEMA>”

    so assuming the namespace you gave above is actually it, it may look something *like* this:
    <adf-faces-config xmlns=”http://xmlns.oracle.com/adf/view/faces/config&#8221; schemaLocation=”http://xmlns.oracle.com/adf/view/faces/config http://xmlns.oracle.com/adf/view/faces/config/adf-faces-1_0.xsd&#8221;
    >

    #263659 Reply

    lagonze
    Member

    thx for your explanation.
    i have tried to do what you said and this is what i have now :

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE adf-faces-config PUBLIC “-//Sun Microsystems, Inc.//DTD Web
    Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”&gt;

    <adf-faces-config xmlns=”http://xmlns.oracle.com/adf/view/faces/config&#8221;
    schemaLocation=”http://xmlns.oracle.com/adf/view/faces/config
    http://xmlns.oracle.com/adf/view/faces/config/adf-faces-1_0.xsd”&gt;

    <debug-output>true</debug-output>
    <!–client-validation-disabled>true</client-validation-disabled–>

    <accessibility-mode>#{prefs.proxy.accessibilityMode}</accessibility-mode>

    <!– you can use EL to get the skin. This allows the skin to change
    between
    requests. –>
    <skin-family>#{prefs.proxy.skinFamily}</skin-family>
    <!–skin-family>oracle</skin-family–>

    <!– Uncomment any of these to enable them –>
    <!– accessibility-mode>inaccessible</accessibility-mode –>

    <!– A silly use of EL: English users get Simple Skin, others get
    Oracle Skin –>
    <!– skin-family>#{facesContext.viewRoot.locale.language==’en’ ?
    ‘simple’ : ‘oracle’}</skin-family –>

    <!–
    oracle-help-servlet-url>http://helponline.oracle.com/jdeveloper/help/</oracle-help-servlet-url
    –>

    </adf-faces-config>

    the error message has changed, now i have the same error for every element : “element ‘adf-faces-config’ must be declared”, same for ‘debug-output’, ‘accessibility-mode’ and ‘skin-family’….?????

    for your info in my web-xml i have :
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!– <!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web
    Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”&gt; –>

    <web-app xmlns=”http://java.sun.com/xml/ns/j2ee&#8221;
    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
    version=”2.4″
    xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”&gt;

    but if i uncomment the “doctype” line, the workspace can’t be built and i get the error message :
    “attribute ‘xsi:schemaLocation’ must be declared for element type ‘web-app’ ” ???!!!!

    what did i do wrong ???????? – please help i’m really stuck !!!!!
    thx again,
    dom.

    #263879 Reply

    lagonze
    Member

    @lagonze wrote:

    thx for your explanation.
    i have tried to do what you said and this is what i have now :

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE adf-faces-config PUBLIC “-//Sun Microsystems, Inc.//DTD Web
    Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”&gt;

    <adf-faces-config xmlns=”http://xmlns.oracle.com/adf/view/faces/config&#8221;
    schemaLocation=”http://xmlns.oracle.com/adf/view/faces/config
    http://xmlns.oracle.com/adf/view/faces/config/adf-faces-1_0.xsd”&gt;

    <debug-output>true</debug-output>
    <!–client-validation-disabled>true</client-validation-disabled–>

    <accessibility-mode>#{prefs.proxy.accessibilityMode}</accessibility-mode>

    <!– you can use EL to get the skin. This allows the skin to change
    between
    requests. –>
    <skin-family>#{prefs.proxy.skinFamily}</skin-family>
    <!–skin-family>oracle</skin-family–>

    <!– Uncomment any of these to enable them –>
    <!– accessibility-mode>inaccessible</accessibility-mode –>

    <!– A silly use of EL: English users get Simple Skin, others get
    Oracle Skin –>
    <!– skin-family>#{facesContext.viewRoot.locale.language==’en’ ?
    ‘simple’ : ‘oracle’}</skin-family –>

    <!–
    oracle-help-servlet-url>http://helponline.oracle.com/jdeveloper/help/</oracle-help-servlet-url
    –>

    </adf-faces-config>

    the error message has changed, now i have the same error for every element : “element ‘adf-faces-config’ must be declared”, same for ‘debug-output’, ‘accessibility-mode’ and ‘skin-family’….?????

    for your info in my web-xml i have :
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!– <!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web
    Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”&gt; –>

    <web-app xmlns=”http://java.sun.com/xml/ns/j2ee&#8221;
    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
    version=”2.4″
    xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”&gt;

    but if i uncomment the “doctype” line, the workspace can’t be built and i get the error message :
    “attribute ‘xsi:schemaLocation’ must be declared for element type ‘web-app’ ” ???!!!!

    what did i do wrong ???????? – please help i’m really stuck !!!!!
    thx again,
    dom.

    could anybody please answer this ?
    thx !

    #263881 Reply

    Riyad Kalla
    Member

    dom,
    Sorry I didn’t follow up, I think I see the error, I just don’t know what the answer is. You are combining two web-app specifications in this file and that won’t work… I think you just need one, either in the root of the file or at the top of the file.

    Please trying asking on the adf-faces mailing list for a empty correct config file with full schema specified from the folks and see if they can give you one.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: error message in adf-faces-config.xml file in myEclipse

You must be logged in to post in the forum log in