Dear Payara community members,
I am a new user of Payara server and a beginner of Java web application development.
The problem I encountered was that I failed to deploy the war file which was compiled successfully on NetBeans IDE. I googled the issue for a while but did not find any clues.
I used Payara Server 6.2023.2 and JDK11.
The error information below repeatedly appeared throughout the sever
SEVERE: Exception while loading the app
SEVERE: Undeployment failed for context /MetaboAnalyst
SEVERE: Exception while loading the app : CDI deployment failure:javax/faces/component/behavior/ClientBehaviorHolder – javax/faces/component/behavior/ClientBehaviorHolder
The basic system information extracted from IDE log is as follows,
Product Version = Apache NetBeans IDE 17
Operating System = Mac OS X version 13.2.1 running on aarch64
Java; VM; Vendor = 19.0.2; Java HotSpot™ 64-Bit Server VM 19.0.2+7-44; Oracle Corporation
Runtime = Java™ SE Runtime Environment 19.0.2+7-44
Java Home = /Library/Java/JavaVirtualMachines/jdk-19.jdk/Contents/Home
System Locale; Encoding = en_CA (nb); UTF-8
Pleas let me know if any more information I need to provide.
I think that Payara 6 is for Jakarta with the packages jakarta, not javax.
Thank you so much, Ric. If your assumption is right, what am I supposed to do? Switch to other versions of Payara, or install jakarta packages? - David
If I am right (read carefully What's New in the November 2022 Payara Platform Release?), you can use the version 5 of Payara or transform your application to use Jakarta EE 10, that is not so easy if the application is not very simple. Installing jakarta packages is not a solution because your application was written for an old version of Java EE or JakartaEE (“javax/faces”, in your logs, shows it; it refers to a package of JSF that is now jakarta/faces in Jakarta EE 10).
Thanks, again, Ric. Very clear explanation to me. So, using version 5 of Payara is worth trying first, I think.
Hi, Ric. I tried Payara Server 5.181 to deploy the application but it failed …
The server log displayed an error:
Xbootclasspath/p is no longer a supported option.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
What are your thoughts? What else I should check up on?
I have just googled “Xbootclasspath/p is no longer a supported option. payara” and I have gotten many links. JDK 9 deprecated some classpath arguments and perhaps Payara supported only Java 8 for version 5 (I don’t remember…).
Pass this start parameter to the server:
It should convert every javax.-namespace to jakarta. at deployment time.
But it can increase the deployment time significantly.
Did this attitude achieve anything? Did you solve the problem?