Upgraded Java Project missing JSF Framework in Netbeans 16 - jsf

I have recently upgraded a java maven project from JDK 8 to JDK 17 as well as changed IDEs from Netbeans 13 to Netbeans 16.
The project builds but when I go to run I get errors about the java server faces.
When I look at the project properties -> Frameworks -> JavaServer Faces the libaries are blank.
Is this an issue with Netbeans 16 or am I missing something?
If I open the same project in Netbeans 13 it has JavaServer Faces library entries.
I have tried to update the JavaServer faces library's in maven, the JDK 17 and the tried to add a differnt version of JSF via maven into the project, but the proejct frameworks remain blank .

Related

Does Wildfly 18 Supports Seam 2.3 Applications?

I want to migrate an application from Wildfly 8 to the latest Wildfly 18. The web application uses the following frameworks: hibernate 3, seam 2.2, JSF 1.2, and Richfaces 3.3.3. Since hibernate 3 isn't supported anymore in Wildfly, we need to migrate to hibernate 4 which isn't compatible with Seam 2.2. Thus, we have to migrate to Seam 2.3 and this leads to migrating to JSF 2.3 (Wildfly modules) and to Richfaces 4.
My project is an ear that contains inside it a war folder.
For JSF, I am using the supported module by Wildfly both com.sun.faces.impl and javax.faces.api. I also added jsf-facelets-1.1.15.jar as a jar under web-inf/lib.
For hibernate, I included the following jars in my ear: hibernate-commons-annotations-4.0.5.Final.jar, hibernate-core-4.3.11.Final.jar, and hibernate-entitymanager-4.3.11.Final.jar.
For seam, I included the seam jars: jboss-seam.jar, jboss-seam-debug.jar, ...
For Richfaces, I included the following libraries under the war folder: richfaces-a4j-4.5.17.Final.jar, richfaces-core-4.5.17.Final.jar, and richfaces-rich-4.5.17.Final.jar. I also included their dependencies.
I am still getting this error which I am not able to debug: Unsupported Operation Exception.
Did anyone encountered this issue ? And do you know if Seam 2.3 is still supported by the latest Wildfly especially that on Seam documentation, they gave the project examples on Jboss As 7?
Thank you for your help.
The migration you are trying to achieve will result in a non-supported environment as well.
From http://seamframework.org/
Seam Moving Forward
As many of you may be aware, there have been a number of changes
within Seam over the past year. Here is a quick highlight of the
changes and how they may affect you and your application.
Seam 2
Seam 2.2 targets JBoss AS 5 and 6 as well as JBoss Enterprise
Application Platform 5 - Java EE 5 based architecture Seam 2.3 targets
Java EE 6 capabilities such as JSF2 and JPA2 on the JBoss Enterprise
Application Platform 6 - Seam 2.3 also supports RichFaces 4 which is
also available for commercial support via Web Framework Kit. If you
are looking for the long-term support with a service level agreement
of Seam 2.2 and/or Seam 2.3 then please contact us at
http://www.redhat.com/contact/sales.html Seam 2.3 is part of Web
Framework Kit, included as part of the JBoss Enterprise Application
Platform subscription .
Seam 2.3 was released in September 2012. This is an update to the Seam
2 code base to make it compatible with Jave EE 6. It runs well on
JBoss AS 7.
Seam 3
Active development of Seam 3 has been halted by Red Hat. Many projects
have moved over to Apache DeltaSpike , and others have been absorbed
into different projects. Please see the below table for information
about where the functionality from each module has gone and how you
can participate.
So no, it does not support WildFly 18 (Java EE 8)
Richfaces is 'dead' (sunset) for 4 years now. https://developer.jboss.org/wiki/RichFacesEnd-Of-LifeQuestionsAnswers
JSF 2.x has facelets built-in, so no need to include them. (Causes problems even)
Wildfly 18 has JPA2 built-in so no need to include hibernate manually (Might cause problems even)
Also read https://docs.jboss.org/seam/2.3.0.Final/reference/en-US/html/migration23.html
Switching to using
PrimeFaces (fully html 5, css3 etc compliant)
JPA2
CDI (with Deltaspike)
OmniFaces
OptimusFaces
is a way better thing to do (Although JSF is 'old' compared to e.t.c. Angular it is still modern when combined with the above technologies and more stable).

jsf facelets cannot find property in tomcat 7 but works in glassfish 3.1

I am trying to figure out which jar I need to download for tomcat 7. I am making a call and passing an argument to a method such "availableEmployees(DepartmentName)" in my faces web page. This does not work in tomcat 7 but works in glassfish 3.1. I have added the javax.faces.2.1.20.jar "Mojarra" to my web app for jsf dependency. I have also javax.servlet.jsp.jstl.1.2.1 in my tomcat library folder.
Did anyone run into such problem ? Do I need to add more than the above jars for jsf support ? Thanks. Not using maven since it is somebody else' project.
I am using netbeans and I linked to an eclipse project. I added my own primefaces library. When I looked at the build output from netbeans, I have noticed that there were two copies of primefaces library. One with 3.4.2 and another with 3.3.1.
Removed one of them and everything worked.

Java Server Faces not present in Eclipse

I'm developing on a Mac OS 10.5.8
I have installed java 1.6 (soylatte) and it is correctly set :
java -version
java version "1.6.0_03-p3"
Java(TM) SE Runtime Environment (build 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00)
I downloaded Eclipse Juno with the WTP stuffs.
I created a web app using JSP technology.
I'm thinking about doing the code modifications to use JSF technology.
So i downloaded Apache myFaces 2.1 jars and added them in my WEB-INF/lib directory.
The problem is that in the project properties / Project Faces section,
I don't have access to Java Server Faces checkbox.
What am I missing ?
[Edit] In response to BalusC comment.
In the "Project Faces" section from my project's properties, there is no checkbox with "Java Server Faces" displayed.
There are a lot of checkboxes (e.g. JPA, XDoclet, etc etc) but not JSF
Here are two good tutorials which walk you through the process of creating a JSF application using Eclipse:
Creating JavaServer Faces JSF application in Eclipse
How to make Eclipse IDE supports JSF 2.0
Your Java version 1.6 and Eclipse version (Juno, version 4) are correct. Since you clarified that JSF is not even present, my first instinct is that Eclipse cannot, for some reason, read the JSF jar files. A similar question was already asked here.

Does JSF 1.2 support JDK 1.5 and Servlets 2.4?

I am currently developing a J2EE project using Servlets 2.4 and JSF 1.2. If I deploy my app in WebSphere 6.1, the page renders properly. If I deploy it in Tomcat 6.0 that uses JDK 1.5, the page doesn't render properly and show something like below:
<h:outputText value="#{msg.my_value}" />
I am just curious to know what is the root cause that cause the problem and it's just so interesting that it works in WebSphere and doesn't work in Tomcat although both of them are using JDK 1.5.
WebSphere as being a concrete Java EE application server ships with bundled JSF libraries, but Tomcat as being a simple JSP/Servlet container does not ship with any bundled JSF libraries. If you have paid close attention to your Tomcat server logs, then you should have noticed that there's a ClassNotFoundException on the FacesServlet which should already be enough hint as to the root cause of this problem.
You need to supply your own JSF implementation for Tomcat. This can be done by manually downloading the JSF libraries and placing them in either the /WEB-INF/lib folder of your webapp, or the /lib folder of the Tomcat installation. The latter will apply on all of its deployed webapps, like as happens in WebSphere.

Error on deploying Java EE 6 on WAS7

I'm trying to deploy an EJB 3 EAR project to WebSphere 7.
From RSA 8.0 I select the EAR file. When I select the EAR project > run as > Server > WAS7 I get the following error:
"the server does not support version 6.0 of the J2EE Enterprise application specification"
I changed my JRE/JDK to 1.5 in RSA, but the same thing happens. Is it a specific jar which causes this>
Java EE versions (J2EE 1.3, J2EE 1.4, Java EE 5, Java EE 6) are not the same like JRE/JDK version, this are two different things.
JRE/JDK is about the language, compiler and the java core frameworks.
J2EE/Java EE is about high level frameworks like EJB, JPA, JSF, CDI....
WebSphere Application Server 7 supports (only) Java EE 5 but not Java EE 6.
So you need to build a Java EE 5 application, reducing JRE/JDK from 6 to 5 is not enough, you also need to build a Java EE 5 EAR, without usage of any of the great Java EE 6 features.
So if it is only for your own, then I recommend to use GlassFish v3 instead, it has Java EE 6 support.

Resources