Serenity theme 3.0.2

Post Reply
valexiscg
Posts: 5
Joined: 07 Jul 2010, 22:26

12 Oct 2021, 20:54

Hello, I am migrating from serenity 2.0 to 3.0.2 and from JSF 2.3 to jakarta EE 9.1, when I want to migrate my project (I am using primefaces for jakarta) with Glassfish 6.2.2 I get the error in the SIDEBAR:

Cause: Class 'org.primefaces.serenity.component.SerenityMenuRenderer' is missing a runtime dependency: java.lang.NoClassDefFoundError: javax/faces/component/UIComponent
at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:246)
at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:191)
at com.sun.faces.config.processor.RenderKitConfigProcessor.addRenderers(RenderKitConfigProcessor.java:288)
at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:165)
at com.sun.faces.config.ConfigManager.lambda$initialize$1(ConfigManager.java:293)
at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:276)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:207)
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:5005)
at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:562)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5574)
at com.sun.enterprise.web.WebModule.start(WebModule.java:510)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:877)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:860)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:644)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2020)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1666)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:82)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:98)

web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">

<context-param>
<param-name>jakarta.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>jakarta.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>serenity-#{guestPreferencesBean.theme}#{guestPreferencesBean.compactMode ? '-compact' : ''}</param-value>
</context-param>
<context-param>
<param-name>jakarta.faces.FACELETS_LIBRARIES</param-name>
<param-value>/WEB-INF/primefaces-serenity.taglib.xml</param-value>
</context-param>
...


index.xhtml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:ps="http://primefaces.org/serenity"
lang="es">
...
<div class="layout-menu-container">
<h:form id="menuform">
<ps:menu widgetVar="serenityMenuWidget">
...


taglib.xhtml
<?xml version="1.0" encoding="UTF-8"?>
<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-f ... ry_2_0.xsd"
version="2.0">
...
<attribute>
<description><![CDATA[An el expression referring to a server side UIComponent instance in a backing bean.]]></description>
<name>binding</name>
<required>false</required>
<type>jakarta.faces.component.UIComponent</type>
</attribute>



Please, could someone tell me if the theme is compatible with jakarta or if I am doing something wrong ?. Thanks.

mert.sincan
Posts: 4765
Joined: 29 Jun 2013, 12:38

14 Oct 2021, 15:40

Hi,

Unfortunately, Premium Layouts are not compatible with jakarta for now. After PF11 is released, we'll work on this issue. Thanks a lot for your understanding!

Best Regards,

Post Reply

Return to “Serenity - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests