Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIComponent cannot be found #951

Closed
dguna opened this issue Jun 1, 2018 · 2 comments
Closed

UIComponent cannot be found #951

dguna opened this issue Jun 1, 2018 · 2 comments

Comments

@dguna
Copy link

dguna commented Jun 1, 2018

Hello,

Every page change, I keep getting the following warning. I am sure this is related to CSS loading.

Avertissement:   Unable to save dynamic action with clientId 'j_id345' because the UIComponent cannot be found
Avertissement:   Unable to save dynamic action with clientId 'j_id346' because the UIComponent cannot be found
Avertissement:   Unable to save dynamic action with clientId 'j_id347' because the UIComponent cannot be found
Avertissement:   Unable to save dynamic action with clientId 'j_id348' because the UIComponent cannot be found
Avertissement:   Unable to save dynamic action with clientId 'j_id349' because the UIComponent cannot be found
Avertissement:   Unable to save dynamic action with clientId 'j_id351' because the UIComponent cannot be found
Avertissement:   Unable to save dynamic action with clientId 'j_id352' because the UIComponent cannot be found
Avertissement:   Unable to save dynamic action with clientId 'j_id353' because the UIComponent cannot be found
Avertissement:   Unable to save dynamic action with clientId 'j_id350' because the UIComponent cannot be found

My faces-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<faces-config
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
    version="2.2">
    <application>
        <resource-handler>org.omnifaces.resourcehandler.CombinedResourceHandler</resource-handler>
</application>

It is not a blocking issue but very annoying. Please somebody shed some light on it.
Thanks in advance.

@stephanrauh
Copy link
Collaborator

stephanrauh commented Jun 1, 2018

That's a weird bug already haunting us for a long time. For instance, have a look at #365 (and several other tickets).

It only happens if you're using the CombinedResourceHandler. This removes the CSS files from the JSF tree and replaces them with a new, combined CSS file. For some reason, the JSF engine sometimes recognizes that it has lost one or more file and start complaining.

Most of the time, you can safely ignore the bug. The number of warning increases on each AJAX request, so it's a potential memory and time leak. If you working on a SPA, that might be a problem. Otherwise, it hardly ever gets worse enough to be noticed.

The message only shows in developer mode. Setting the project stage to "production" silences it:

<context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <!--param-value>Production</param-value -->
        <param-value>Production</param-value>
</context-param>

@stephanrauh
Copy link
Collaborator

Also see #325 and #365.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants