Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report: load primefaces as lib will cause __admingui failure #6372

Closed
cidylong opened this issue Aug 20, 2023 · 20 comments
Closed

Bug Report: load primefaces as lib will cause __admingui failure #6372

cidylong opened this issue Aug 20, 2023 · 20 comments
Assignees
Labels
Status: Open Issue has been triaged by the front-line engineers and is being worked on verification Type: Bug Label issue as a bug defect

Comments

@cidylong
Copy link

Brief Summary

This issue (Issue #6306) was reported in payara-6.2023.5-7, and it is still here.

The main issue is, when primefaces-13.0.0.jar was loaded into domain, then restart domain, DAS server started properly but admin gui application __admingui will failure to start.

Expected Outcome

__admingui will dependent on mojarra instead of other jsf implementation.

Current Outcome

When other jsf implementation (such as primefaces) was load as lib, __admingui failed to load

Reproducer

configure payara-6.2023.5 or newer version.

add primefaces-12.0.0.jar or newer version as lib

restart payara domain.

__admingui failed.

Screenshot 2023-08-20 at 12 58 42 pm

Operating System

Rocky Linux 9

JDK Version

Oracle idk 17.0.7

Payara Distribution

Payara Server Full Profile

@cidylong cidylong added Status: Open Issue has been triaged by the front-line engineers and is being worked on verification Type: Bug Label issue as a bug defect labels Aug 20, 2023
@lprimak
Copy link
Contributor

lprimak commented Aug 20, 2023

You need the -jakarta classifier of PrimeFaces, the one that uses Jakarta 9+ namespace

@cidylong
Copy link
Author

This issue is talking about add primefaces as domain lib, it will cause __admingui failure.

Yeah. I already used it in my web application.

And this
Screenshot 2023-08-20 at 2 53 40 pm
is the piece of my pom.xml

@svendiedrichsen
Copy link
Contributor

This issue is talking about add primefaces as domain lib, it will cause __admingui failure.

Yeah. I already used it in my web application.

And this Screenshot 2023-08-20 at 2 53 40 pm is the piece of my pom.xml

The stacktrace states that the javax.faces... class is missing. Which IMO suggests that you haven't put the jakarta version of primefaces into the domain lib.

@cidylong
Copy link
Author

@svendiedrichsen , sorry, I was confused, in my understanding, payara-6 will support jarkata.faces.context.X name space and it will not dependent on javax.faces.context.X.

Otherwise, please advise!

@lprimak
Copy link
Contributor

lprimak commented Aug 20, 2023

I think you are still confused. Please re read the thread carefully.

@svendiedrichsen
Copy link
Contributor

@svendiedrichsen , sorry, I was confused, in my understanding, payara-6 will support jarkata.faces.context.X name space and it will not dependent on javax.faces.context.X.

Otherwise, please advise!

@cidylong I am talking about the primeface lib you put into the domain lib. Not the (provided) dependency from your app pom. I seems you have put the primefaces version referencing the javax.faces... namespace into the domain lib. But you should have put the primefaces version referencing the jakarata.faces... namespace there.

@cidylong
Copy link
Author

@svendiedrichsen , I had added primefaces to payara domain lib as common type [$PAYARA_HOME/bin/asadmin --password file add-library --type common /home/payara/software/lib/primefaces-13.0.0.jar], seems there is no way to use parameters to let payara to load this lib with extension "-jarkata".

Please advise!

@svendiedrichsen
Copy link
Contributor

svendiedrichsen commented Aug 20, 2023

There is no specific parameter to be used. Either the primefaces version you deploy uses the javax.faces or the jakarta.faces namespace. Have you ever tried not putting it in the domain/lib folder but have it deployed with your app? Does that work?

@cidylong
Copy link
Author

I had added it to $PAYARA_DOMAIN/lib by run [$PAYARA_HOME/bin/asadmin --passwordfile add-library --type common /home/payara/software/lib/primefaces-13.0.0.jar] and then use it by every individual applications (such as: EJBs and WARs) through pom.xml dependency with and tags (as above attached).

It works fine in my EJB applications, which means EJB applications will use jarkata.faces.context.X name space properly over pom.xml dependency configure.

I will test WAR application later, I believe it will works fine as well.

@cidylong
Copy link
Author

@svendiedrichsen , this is most likely __admingui application class loader issue. I mean __admingui web application should be able to handle multiple JSF implementations in the lib path and only dependents on Mojarra implementation (as it is proposed).

@svendiedrichsen
Copy link
Contributor

svendiedrichsen commented Aug 21, 2023

@cidylong Thanks for testing. Could you please check that the jar that you succesfully tested with you application is the same, and I mean literally the same, you put into the domain/lib folder? You wrote before that you intstalled the library from your local file sytem under home/payara/software/lib which is not the same that you use when you build your app using a maven dependency.

@cidylong
Copy link
Author

@svendiedrichsen , Yes. I had double checked. After I loaded the lib, primefaces-13.0.0.jar is seating in $PAYARA_DOMAIN/lib.

@svendiedrichsen
Copy link
Contributor

@cidylong we seem to talk past each other all the time.

As @lprimak stated there are two different versions of the primefaces library since version 10.0.0-RC2. One using the javax.faces namespace and one using the jakarta.faces namespace. Please make sure that you put the one using the jakarta.faces namespace into the domain/lib folder.

@cidylong
Copy link
Author

@svendiedrichsen , probably I have to build primefaces lib from sources by using -jarkata options?

please reply to confirm it.

@svendiedrichsen
Copy link
Contributor

svendiedrichsen commented Aug 22, 2023

No, this version already exists. You should be able, as @lprimak wrote earlier, to use the classifier jakarta in an application build. The jar that will be used by the app then should be the jakarta version and you should be able to find it under WEB-INF/lib af this application. You can then use this version for the domain/lib of the payara.

@lprimak
Copy link
Contributor

lprimak commented Aug 22, 2023

you have much patience @svendiedrichsen :)

@svendiedrichsen
Copy link
Contributor

you have much patience @svendiedrichsen :)

Thank you. But I'm afraid this was my last try. If this doesn't cut it I'm out of words.

@cidylong
Copy link
Author

@lprimak , @svendiedrichsen , Thank you for your advice.

I had find it from my MacOS local maven repository, location is: /Users/cidylong/.m2/repository/org/primefaces/primefaces/13.0.0/primefaces-13.0.0-jakarta.jar

I will test it later.

@Elifzeynepedman
Copy link

Greetings @cidylong,

I will close this issue as it seems that there are no errors. If you require further assistance please navigate to Payara Forum.

Best Regards,
Elif

@cidylong
Copy link
Author

@Elifzeynepedman . Hi Elif. I just tested it again. The issue is still here, I will raise another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Open Issue has been triaged by the front-line engineers and is being worked on verification Type: Bug Label issue as a bug defect
Projects
None yet
Development

No branches or pull requests

4 participants