RE: JSF/Primefaces logs on JBoss EAP 7

thumbnail
Aliasgar Pratapgarhwala, modified 6 Years ago. New Member Posts: 16 Join Date: 10/31/16 Recent Posts

Greetings,

 

We are using Liferay Faces and Primefaces 5.2 Portlets in Liferay DXP 7.0. The server we are using is JBoss EAP 7.1.0.

 

Now, what we notice is that the INFO or ERROR messages related to internal JSF or Primefaces classes are not shown in JBoss or Liferay Logs.

 

As per our analysis, these JARs (JSF & Primefaces) use "java.util.logging.Logger". We tried adding the logger category in JBoss EAP but still the logs are not appearing.

 

Can you please advice for the same?

 

P.S. The logs used to appear properly in Liferay 6.2 with JBoss EAP 6.4. Is it due to OSGi approach?

 

Thanks and Regards,

Aliasgar

thumbnail
Kyle Joseph Stiemann, modified 6 Years ago. Liferay Master Posts: 760 Join Date: 1/14/13 Recent Posts
Hi Aliasgar,
Could you provide the following:
 
  • An SSCCE that shows how we can reproduce the issue.
  • Logs from Liferay 6.2 and from Liferay 7.0 so we can see which classes/logs are missing.
  • All your dependencies from your pom.xml or build.gradle file.
Finally, please be aware that PrimeFaces 5.2 has a serious remote code execution vulnerability , so you need to upgrade to a patched version of PrimeFaces as soon as possible.

- Kyle
thumbnail
Aliasgar Pratapgarhwala, modified 6 Years ago. New Member Posts: 16 Join Date: 10/31/16 Recent Posts

Dear Kyle,

 

Thank you for your kind response.

 

- I will attach a sample error found in server logs of JBoss EAP 6.4 (Liferay 6.2) in case of any JSF exceptions.

- These similar exceptions can no longer be found in JBoss EAP 7.1.0 (Liferay DXP 7.0) server logs in case we miss a tag in JSF/Primefaces or some xhtml component ID error or some other JSF related errrors.

It then becomes difficult to debug the exact issue.

- Also, I am attaching the build.gradle we are using in case of JSF projects.

thumbnail
Kyle Joseph Stiemann, modified 6 Years ago. Liferay Master Posts: 760 Join Date: 1/14/13 Recent Posts

Hi Aliasgar,
I tried to reproduce the missing log messages using Liferay DXP 7.0.10 SP 9 on JBoss EAP 7.1, but I could not. When I deployed the attached portlet, added it to a page, and refreshed the page, I could see the following error in $LIFERAY_HOME/logs/liferay.2019-01-24.log:

2019-01-24 21:19:43.458 ERROR [default task-84][render_portlet_jsp:131] null
javax.faces.view.facelets.FaceletException: Error Parsing /WEB-INF/views/view.xhtml: Error Traced[line: 21] The element type "h:head" must be terminated by the matching end-tag "</h:head>".
        at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:466)
        at com.sun.faces.facelets.compiler.SAXCompiler.doMetadataCompile(SAXCompiler.java:449)
        at com.sun.faces.facelets.compiler.Compiler.metadataCompile(Compiler.java:130)
        at com.sun.faces.facelets.impl.DefaultFaceletFactory.createMetadataFacelet(DefaultFaceletFactory.java:503)
        at com.sun.faces.facelets.impl.DefaultFaceletFactory.access$200(DefaultFaceletFactory.java:106)
        at com.sun.faces.facelets.impl.DefaultFaceletFactory$2.newInstance(DefaultFaceletFactory.java:205)
        at com.sun.faces.facelets.impl.DefaultFaceletFactory$2.newInstance(DefaultFaceletFactory.java:203)
        at com.sun.faces.facelets.impl.DefaultFaceletCache$2.newInstance(DefaultFaceletCache.java:97)
        at com.sun.faces.facelets.impl.DefaultFaceletCache$2.newInstance(DefaultFaceletCache.java:92)
        at com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:99)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:114)
        at com.sun.faces.facelets.impl.DefaultFaceletCache.getViewMetadataFacelet(DefaultFaceletCache.java:146)
        at com.sun.faces.facelets.impl.DefaultFaceletCache.getViewMetadataFacelet(DefaultFaceletCache.java:63)
        at com.sun.faces.facelets.impl.DefaultFaceletFactory.getMetadataFacelet(DefaultFaceletFactory.java:316)
        at com.sun.faces.facelets.impl.DefaultFaceletFactory.getMetadataFacelet(DefaultFaceletFactory.java:246)
        at com.sun.faces.application.view.ViewMetadataImpl.createMetadataView(ViewMetadataImpl.java:138)
        at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:243)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
        at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123)
2019-01-24 21:19:45.988 ERROR [default task-85][render_portlet_jsp:131] null
javax.faces.view.facelets.FaceletException: Error Parsing /WEB-INF/views/view.xhtml: Error Traced[line: 21] The element type "h:head" must be terminated by the matching end-tag "</h:head>".
        at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:466)
        at com.sun.faces.facelets.compiler.SAXCompiler.doMetadataCompile(SAXCompiler.java:449)
        at com.sun.faces.facelets.compiler.Compiler.metadataCompile(Compiler.java:130)
        at com.sun.faces.facelets.impl.DefaultFaceletFactory.createMetadataFacelet(DefaultFaceletFactory.java:503)
        at com.sun.faces.facelets.impl.DefaultFaceletFactory.access$200(DefaultFaceletFactory.java:106)
        at com.sun.faces.facelets.impl.DefaultFaceletFactory$2.newInstance(DefaultFaceletFactory.java:205)
        at com.sun.faces.facelets.impl.DefaultFaceletFactory$2.newInstance(DefaultFaceletFactory.java:203)
        at com.sun.faces.facelets.impl.DefaultFaceletCache$2.newInstance(DefaultFaceletCache.java:97)
        at com.sun.faces.facelets.impl.DefaultFaceletCache$2.newInstance(DefaultFaceletCache.java:92)
        at com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:99)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:114)
        at com.sun.faces.facelets.impl.DefaultFaceletCache.getViewMetadataFacelet(DefaultFaceletCache.java:146)
        at com.sun.faces.facelets.impl.DefaultFaceletCache.getViewMetadataFacelet(DefaultFaceletCache.java:63)
        at com.sun.faces.facelets.impl.DefaultFaceletFactory.getMetadataFacelet(DefaultFaceletFactory.java:316)
        at com.sun.faces.facelets.impl.DefaultFaceletFactory.getMetadataFacelet(DefaultFaceletFactory.java:246)
        at com.sun.faces.application.view.ViewMetadataImpl.createMetadataView(ViewMetadataImpl.java:138)
        at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:243)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
        at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123)

Perhaps you are viewing the JBoss logs (under $LIFERAY_HOME/jboss-eap-7.1/standalone/log/server.log) rather than the Liferay logs (under $LIFERAY_HOME/logs/liferay.$DATE.log)? Could you try unzipping, building, deploying, and visiting the attached portlet in your local Liferay instance and seeing if the above error message appears in the Liferay logs?

thumbnail
Aliasgar Pratapgarhwala, modified 6 Years ago. New Member Posts: 16 Join Date: 10/31/16 Recent Posts

Dear Kyle,

 

Thank you for your kind feedback.

 

The exception related to closing tag appears, we actually faced some other issue due to which logs were not appearing and it's not related to JSF projects.

 

Thank you so much for your support for the same.

thumbnail
Kyle Joseph Stiemann, modified 6 Years ago. Liferay Master Posts: 760 Join Date: 1/14/13 Recent Posts
Great! Seems like you solved your logging issue. Thanks for using Liferay Faces!
thumbnail
Aliasgar Pratapgarhwala, modified 6 Years ago. New Member Posts: 16 Join Date: 10/31/16 Recent Posts

Many thanks to Liferay Faces Team. We are using Liferay Faces for Enterprise level portlets and it helped us a lot in cleaner development with easier maintenance.

 

Also, as per your suggestion, we are migrating from primefaces 5.2 to primefaces 6.2.. We are facing few issues such as "jquery.fileupload" is not a function error etc..

 

We would really appreciate if you can guide us on fixing the same. 

 

Thanks once again.

thumbnail
Kyle Joseph Stiemann, modified 6 Years ago. Liferay Master Posts: 760 Join Date: 1/14/13 Recent Posts

Hi Aliasgar,
Please upgrade to Bridge Ext 5.0.3 and Bridge Impl 4.1.2 and see if that fixes your issue:

runtime group: 'com.liferay.faces', name: 'com.liferay.faces.bridge.ext', version: '5.0.3'
runtime group: 'com.liferay.faces', name: 'com.liferay.faces.bridge.impl', version: '4.1.3'

If that doesn't fix your issue, please post the shortest, simplest steps to reproduce the issue (including a simple reproducer portlet if necessary).

- Kyle