Fórum

GA5 - NoClassDefFoundError: com/liferay/taglib/util/HtmlTopTag

thumbnail
William Gosse, modificado 6 Anos atrás.

GA5 - NoClassDefFoundError: com/liferay/taglib/util/HtmlTopTag

Liferay Master Postagens: 533 Data de Entrada: 04/07/10 Postagens Recentes
I deploy a new JSF portlet and it works fine. I restart my Liferay 7 GA5 instance and when I try access the same portlet I get:
18:00:31,805 ERROR [http-nio-8080-exec-6][render_portlet_jsp:131] null
java.lang.NoClassDefFoundError: com/liferay/taglib/util/HtmlTopTag
        at com.liferay.faces.bridge.ext.context.internal.HeadResponseWriterLiferayImpl.addResourceToHeadSection(HeadResponseWriterLiferayImpl.java:74)
        at com.liferay.faces.bridge.ext.context.internal.HeadResponseWriterBase.endElement(HeadResponseWriterBase.java:134)
        at com.sun.faces.renderkit.html_basic.StylesheetRenderer.encodeEnd(StylesheetRenderer.java:137)
        at javax.faces.render.RendererWrapper.encodeEnd(RendererWrapper.java:100)
        at com.liferay.faces.util.render.internal.ResourceRendererUtilImpl.encodeEnd(ResourceRendererUtilImpl.java:135)
        at javax.faces.render.RendererWrapper.encodeEnd(RendererWrapper.java:100)
        at com.liferay.faces.bridge.renderkit.html_basic.internal.ResourceRendererBridgeImpl.encodeEnd(ResourceRendererBridgeImpl.java:85)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
        at com.liferay.faces.bridge.renderkit.html_basic.internal.HeadRendererBridgeImpl.encodeChildren(HeadRendererBridgeImpl.java:212)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
        at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)
        at javax.faces.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:146)
        at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)
        at com.liferay.faces.bridge.application.internal.ViewHandlerCompatImpl.renderView(ViewHandlerCompatImpl.java:95)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)

I redeploy the portlet and it works fine again.
thumbnail
Kyle Joseph Stiemann, modificado 6 Anos atrás.

RE: GA5 - NoClassDefFoundError: com/liferay/taglib/util/HtmlTopTag

Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
Hi William,
You are facing LPS-74553. Take a look at the ticket for a potential workaround (or consider upgrading to a fix pack with the fix if you are an EE customer).

- Kyle
thumbnail
William Gosse, modificado 6 Anos atrás.

RE: GA5 - NoClassDefFoundError: com/liferay/taglib/util/HtmlTopTag

Liferay Master Postagens: 533 Data de Entrada: 04/07/10 Postagens Recentes
Hi Kyle,

I did look look at LPS-74553 and tried adding the Import-Package statement shown there to my liferay-plugin-package.properties. However when I tried to deploy my portlet it failed to complete the deployment correctly..

Also note that the same NoClassDefFoundError issue occurred when I deploy the primefaces-applicant-portlet demo as well. Is this a problem with GA5?

Thanks for the quick response,
Bill
thumbnail
William Gosse, modificado 6 Anos atrás.

RE: GA5 - NoClassDefFoundError: com/liferay/taglib/util/HtmlTopTag (Resposta)

Liferay Master Postagens: 533 Data de Entrada: 04/07/10 Postagens Recentes
After reading LPS-74553 more closely I was finally able the use it to fix the issue. Logging into the into Liferay's GoGo shell and finding out what additional packages needed to be added as optional did the trick. Here's the final list of packages I needed for the JSF Primefaces portlet I was working on:
Import-Package: \
    com.liferay.taglib.util,\
    com.swabunga.spell.*;resolution:=optional,\
    org.apache.*;resolution:=optional,\
    com.sun.enterprise.*;resolution:=optional,\
    com.sun.jdmk.comm.*;resolution:=optional,\
    com.sun.org.apache.*;resolution:=optional,\
    com.thoughtworks.paranamer.*;resolution:=optional,\
    groovy.*;resolution:=optional,\
    javax.ejb.*;resolution:=optional,\
    javax.enterprise.*;resolution:=optional,\
    javax.inject.*;resolution:=optional,\
    net.fortuna.ical4j.*;resolution:=optional,\
    org.jboss.logmanager.*;resolution:=optional,\
    org.joda.*;resolution:=optional,\
    org.jsoup.*;resolution:=optional,\
    org.mortbay.jetty.*;resolution:=optional,\
    com.hazelcast.*;resolution:=optional,\
    com.lowagie.text.*;resolution:=optional,\
    com.sun.jdi.*;resolution:=optional,\
    jersey.repackaged.com.google.common.*;resolution:=optional,\
    net.glxn.qrgen.*;resolution:=optional,\
    org.atmosphere.*;resolution:=optional,\
    org.glassfish.jersey.server.*;resolution:=optional,\
    org.hibernate.validator.*;resolution:=optional,\
    org.krysalis.barcode4j.*;resolution:=optional,\
    *
thumbnail
Kyle Joseph Stiemann, modificado 6 Anos atrás.

RE: GA5 - NoClassDefFoundError: com/liferay/taglib/util/HtmlTopTag

Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
Hi William, I just wanted to answer this question:

Also note that the same NoClassDefFoundError issue occurred when I deploy the primefaces-applicant-portlet demo as well. Is this a problem with GA5?

Yes this is a problem with Liferay 7.0 GA5 that manifests itself with all Liferay Faces portlets. The Liferay Faces Bridge (Ext) utilizes Liferay Taglib Util's HtmlTopTag to add elements to the <head> section of the page.* Therefore, the Liferay Taglib Util OSGi module must be started before your portlet is started since it relies on that module. Unfortunately, in Liferay 7.0 GA5 (unlike the previous GA versions), the module isn't started until after the Portal attempts to start your portlet, so the class is not visible to your portlet.

I'm glad you got it working though, and thanks for posting your Import-Package header. I'm sure that will be helpful to others. Thanks for using Liferay Faces emoticon

- Kyle

* The Bridge uses this vendor specific method since the standard method of adding elements to the <head> section of the page doesn't allow for removing duplicates. Note that the Bridge exposes this feature via the standardized h:head tag so your JSF pages can be written in a standard, portable way even though the Bridge is actually using vendor specific magic under the hood.
thumbnail
William Gosse, modificado 6 Anos atrás.

RE: GA5 - NoClassDefFoundError: com/liferay/taglib/util/HtmlTopTag

Liferay Master Postagens: 533 Data de Entrada: 04/07/10 Postagens Recentes
I just tested the primefaces applicant demo with this fix which works fine now.
Been using JSF with Liferay since 2010 which is the same year I met Neal at a training seminar he taught.
thumbnail
Neil Griffin, modificado 6 Anos atrás.

RE: GA5 - NoClassDefFoundError: com/liferay/taglib/util/HtmlTopTag

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
I remember teaching the class and meeting you! emoticon

Thanks for being such a faithful user of Liferay Portal, JSF, and Liferay Faces.
thumbnail
William Gosse, modificado 6 Anos atrás.

RE: GA5 - NoClassDefFoundError: com/liferay/taglib/util/HtmlTopTag

Liferay Master Postagens: 533 Data de Entrada: 04/07/10 Postagens Recentes
Yes it was an Admin class in Orlando. This is my sixth gig that I'm using Liferay on.