title: Primefaces and Omnifaces ClassNotFound warning from GlassFish, just warning, the application works correctly
body: <p>We have a Java EE application where we use JSF with Omnifaces (v 2.6.3) and Primefaces (v 6.1), deployed on GlassFish v 4.1.2.</p>
  
  <p>Although the application runs correctly (I can navigate the pages and use them) we have some warnings in the logs regarding some classes that cannot be found in both of omnifaces and primefaces. Yes, warnings about a "ClassNotFound exception", so it's not the exception in and of itself, just warning about it, after the warnings, the server continues to run normally and deploys my application successfully.
  This happens both with Eclipse and with <code>asadmin</code>, manually.</p>
  
  <p>The structure of the application is like this (I have one EJB app, one web service app and the JSF one that triggers the warnings):</p>
  
  <pre><code>EAR
  ├───WebService_war
  │   ├───META-INF
  │   │       MANIFEST.MF
  │   │       
  │   └───WEB-INF
  │       │   web.xml
  │       │   
  │       ├───classes
  │       │       ...
  │       └───config
  │               ...
  │               
  ├───lib
  │   │   common.jar
  │   │   ...
  │   
  ├───META-INF
  │       application.xml
  │       glassfish-resources.xml
  │       
  ├───EJBapp_jar               
  │   └───META-INF
  │       │   glassfish-ejb-jar.xml
  │       │   MANIFEST.MF
  │       │   
  │       └───config
  │               ...
  │               
  └───JSFapp_war
      │   index.xhtml
      │   ...
      │   
      ├───META-INF
      │       MANIFEST.MF
      │       
      ├───resources
      │   ├───css
      │   │       custom.css
      │   │               
      │   ├───imgs
      │   │       logo.png
      │   │       
      │   └───js
      │           foo.js
      │           
      └───WEB-INF
          │   beans.xml
          │   faces-config.xml
          │   hestaglib.xml
          │   shiro.ini
          │   web.xml
          │   
          ├───classes
          │       ...
          ├───common
          │       footer.xhtml
          │       header.xhtml
          │       template.xhtml
          │       
          ├───config
          │       ...
          │       
          └───lib
                  omnifaces-2.6.3-javadoc.jar
                  omnifaces-2.6.3.jar
                  primefaces-6.1-sources.jar
                  primefaces-6.1.jar
  </code></pre>
  
  <p>If I move the primefaces library in the EAR's <code>lib</code> directory then the warnings related to primefaces are gone.
  Altough this is not a proper solution, primefaces is "local" to the JSF app, and omnifaces as well (if I try to move the omnifaces library I get some initializatoin errors, the application breaks).</p>
  
  <p>What is the cause of this behaviour? How can I get rid of the warnings?
  Could there be latent bugs?</p>
  
  <p>The warnings (there are more, this is only a small part of them): </p>
  
  <pre><code>2017-11-24T08:18:22.264+0200|Warning: Unable to load class org.primefaces.component.tieredmenu.TieredMenuRenderer, reason: java.lang.ClassNotFoundException: org.primefaces.component.tieredmenu.TieredMenuRenderer
  2017-11-24T08:18:22.270+0200|Warning: Unable to load class org.primefaces.mobile.renderkit.BaseMenuRenderer, reason: java.lang.ClassNotFoundException: org.primefaces.mobile.renderkit.BaseMenuRenderer
  2017-11-24T08:18:22.280+0200|Warning: Unable to load class org.primefaces.component.contextmenu.ContextMenuRenderer, reason: java.lang.ClassNotFoundException: org.primefaces.component.contextmenu.ContextMenuRenderer
  2017-11-24T08:18:22.284+0200|Warning: Unable to load class org.primefaces.component.menubar.MenubarRenderer, reason: java.lang.ClassNotFoundException: org.primefaces.component.menubar.MenubarRenderer
  2017-11-24T08:18:22.287+0200|Warning: Unable to load class org.primefaces.component.slidemenu.SlideMenuRenderer, reason: java.lang.ClassNotFoundException: org.primefaces.component.slidemenu.SlideMenuRenderer
  2017-11-24T08:18:22.293+0200|Warning: Unable to load class org.primefaces.mobile.renderkit.MenuRenderer, reason: java.lang.ClassNotFoundException: org.primefaces.mobile.renderkit.MenuRenderer
  2017-11-24T08:18:22.297+0200|Warning: Unable to load class org.primefaces.mobile.renderkit.TabMenuRenderer, reason: java.lang.ClassNotFoundException: org.primefaces.mobile.renderkit.TabMenuRenderer
  2017-11-24T08:18:22.301+0200|Warning: Unable to load class org.primefaces.component.growl.GrowlRenderer, reason: java.lang.ClassNotFoundException: org.primefaces.component.growl.GrowlRenderer
  2017-11-24T08:18:22.304+0200|Warning: Unable to load class org.primefaces.component.message.MessageRenderer, reason: java.lang.ClassNotFoundException: org.primefaces.component.message.MessageRenderer
  2017-11-24T08:18:22.306+0200|Warning: Unable to load class org.primefaces.component.messages.MessagesRenderer, reason: java.lang.ClassNotFoundException: org.primefaces.component.messages.MessagesRenderer
  2017-11-24T08:18:22.313+0200|Warning: Unable to load class org.primefaces.mobile.renderkit.GrowlRenderer, reason: java.lang.ClassNotFoundException: org.primefaces.mobile.renderkit.GrowlRenderer
  2017-11-24T08:18:22.315+0200|Warning: Unable to load class org.omnifaces.component.tree.TreeInsertChildren, reason: java.lang.ClassNotFoundException: org.omnifaces.component.tree.TreeInsertChildren
  2017-11-24T08:18:22.318+0200|Warning: Unable to load class org.omnifaces.component.validator.ValidateEqual, reason: java.lang.ClassNotFoundException: org.omnifaces.component.validator.ValidateEqual
  2017-11-24T08:18:22.320+0200|Warning: Unable to load class org.omnifaces.component.validator.ValidateAll, reason: java.lang.ClassNotFoundException: org.omnifaces.component.validator.ValidateAll
  2017-11-24T08:18:22.322+0200|Warning: Unable to load class org.omnifaces.component.output.ResourceInclude, reason: java.lang.ClassNotFoundException: org.omnifaces.component.output.ResourceInclude
  2017-11-24T08:18:22.335+0200|Warning: Unable to load class org.omnifaces.component.validator.ValidateOne, reason: java.lang.ClassNotFoundException: org.omnifaces.component.validator.ValidateOne
  2017-11-24T08:18:22.338+0200|Warning: Unable to load class org.omnifaces.component.validator.ValidateMultiple, reason: java.lang.ClassNotFoundException: org.omnifaces.component.validator.ValidateMultiple
  2017-11-24T08:18:22.368+0200|Warning: Unable to load class org.omnifaces.component.validator.ValidateAllOrNone, reason: java.lang.ClassNotFoundException: org.omnifaces.component.validator.ValidateAllOrNone
  2017-11-24T08:18:22.370+0200|Warning: Unable to load class org.omnifaces.component.messages.OmniMessages, reason: java.lang.ClassNotFoundException: org.omnifaces.component.messages.OmniMessages
  2017-11-24T08:18:22.372+0200|Warning: Unable to load class org.omnifaces.component.output.GraphicImage, reason: java.lang.ClassNotFoundException: org.omnifaces.component.output.GraphicImage
  2017-11-24T08:18:22.377+0200|Warning: Unable to load class org.omnifaces.component.output.ConditionalComment, reason: java.lang.ClassNotFoundException: org.omnifaces.component.output.ConditionalComment
  </code></pre>
  
  <p>LE:
  I forgot to mention that the above setup also triggers this on a re-deploy with <code>asadmin</code>:</p>
  
  <pre><code>[glassfish 4.1] [WARNING] [NCLS-DEPLOYMENT-00023] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=47 _ThreadName=admin-listener(2)] [timeMillis: 1511441893194] [levelValue: 900] [[
    Ignoring JSFapp_war/ because the containing archive C:\glassfish4\glassfish\domains\domain1\applications\EAR recorded it as a pre-existing stale file]]
  </code></pre>
  
  <p>The stale files are exactly the libs in the JSF's WAR.
  If I move primefaces in the EAR, then only omnifaces remains stale upon re-deploy.
  What's up with this?</p>