Payara Server 5.2021.4 - Problem with PrimeFaces 10 used in a Jakarta EE 9 application

543 views
Skip to first unread message

Richard Grin

unread,
Jul 20, 2021, 12:37:05 PM7/20/21
to Payara Forum
I use PrimeFaces 10 in a Jakarta EE 9 web application. The server is Payara 5.2021.4 and the JDK is Java 11.

My code uses the namespace "jakarta" but, if I understood correctly, Payara transforms jakarta in the package names..

My application works if I have no dependency to PrimeFaces in pom.xml. In particular, a JSF table (not a PF table) in a JSF page retrieves a lot of items.

If I add a dependency to PrimeFaces 10 (without the classifier "jakarta") without modifying the code of the application, the build has no error but I get this message when I launch the application (I have emphasized "jarkata in the message):
"WELD-000119: Not generating any bean definitions from ....session.CustomerManager because of underlying class loading error: Type jakarta.persistence.EntityManager not found. If this is unexpected, enable DEBUG logging to see the full error."
and my application is not working anymore: no items are retrieved by the JSF table.

I can't understand why I get this error. Can you help me? Is it linked to the transformer from Jakarta EE 9 to Jakarta EE 8? Did anyone use PrimeFaces 10 in the same context? How can I do?

Regards,

Richard

Eduard Drenth

unread,
Jul 23, 2021, 10:19:38 AM7/23/21
to Richard Grin, Payara Forum
Hi,

I postponed my update to jakarta ee 9 because hibernate isn't ready yet as I understand: https://hibernate.atlassian.net/browse/HHH-13946.

Is there any special reason why you chose not to update your code and not to use the jakarta classifier and let payara do its magic?

Another thing, perhaps it is necessary to include a provided dependency to eclipselink?

Regards, Eduard
--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/68fab65c-d270-4023-9c11-fa177e364c2bn%40googlegroups.com.
signature.asc

Richard Grin

unread,
Jul 23, 2021, 10:57:14 AM7/23/21
to Payara Forum
Hi Eduard,

I updated the code of my application to adapt it to Jakarta EE 9: I changed the names of the packages and the namespaces in the XML files. 

Perhaps there is a problem with CDI when the transformer is used? I don't understand where is the problem when I add the dependency to PrimeFaces.

If I had the <classifier>jakarta</classifier> in the dependency for PrimeFaces in pom.xml, it's worse: the application is not deployed because of errors.  The error messages say that the classes from the packages "jarkarta" (used by PrimeFaces?) are not found. Probably the transformer used by Payara does not modify the package names in the PrimeFaces jar. 

Richard Grin

unread,
Jul 23, 2021, 11:00:07 AM7/23/21
to Payara Forum
I forgot to say that I use EclipseLink for JPA.

Regards,

Richard

Steve Millidge

unread,
Jul 23, 2021, 11:20:14 AM7/23/21
to Payara Forum
Hi Richard,

If you can pare the application down to a simple reproducer with primefaces as a project on GitHub I would recommend raising a bug on GitHub. You could also try Payara 6 alpha 1  Payara Platform Community Edition – Payara Services Ltd which has passed the Jakarta EE 9 TCK.

Steve

Message has been deleted
Message has been deleted
Message has been deleted

Richard Grin

unread,
Jul 23, 2021, 3:02:21 PM7/23/21
to Payara Forum
Hi Steve,

Thank you for your interest in my case.

I'm going on vacation tomorrow morning for a week.
I have just created quickly a simplified application: https://github.com/richard-grin/payaratestjakartaee9primefaces. The application works with a table which contains only a table Customer with 2 columns CUSTOMER_ID and NAME. If you comment the dependency to PrimeFaces in pom.xml, the application works: CustomerList displays the customers. Else, you get the message "WELD-000119: Not generating any bean definitions from fr.grin.tpcustomer.session.CustomerManager because of underlying class loading error: Type jakarta.persistence.EntityManager not found.  If this is unexpected, enable DEBUG logging to see the full error.|#]
  ".
Sorry, I have not enough time to write code to add customers in the table and to write a @DataSourceDefinition for the data source. If it does not suit you, I will write it when I come back.

Before filing a bug I wanted to be sure I didn't make a mistake by modifying this application that worked with Jakarta EE 8..

I wanted to test with a stable version of Payara but I will try with Payara 6 alpha 1 if it is a bug of Payara 5.2021.4.

Richard
Reply all
Reply to author
Forward
0 new messages