Migrating PF 13 app from Tomcat 8.5/JDK11 to Tomcat 10.1/JDK17 #3499
-
I have a working website app on PF 13.0.4, MyFaces 2.3.1, Tomcat 8.5 and Java 11. I need to migrate Tomcat and Java to Tomcat 10.5 and Java 17. I first tried migrating to MyFaces 3.4.0, made appropriate import statement changes and built. But when Tomcat starts I get this error: TldScanner#scanJars;At least one JAR was scanned for TLDs yet contained no TLDs I then tried going back to MyFaces 2,3,1, and that didn't help, although I get an exception at JVM startup: java.lang.IllegalStateException: Error starting child: So this is apparently something lookng for the javax-based Servlet but 10.1 has the jakarta-based servlet. It's not clear in the stack trace if this call was in myfaces or in primecode. Is there a magic sauce here to get the right PrimeFaces and MyFaces versions for Tomcat 10.1? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
Tomcat 10.1 is jakarta, MyFaces 3,4 and 4.1 is jakarta you need to adjust all your code and also check all configs; javax is gone |
Beta Was this translation helpful? Give feedback.
-
Thanks, tandrashcko, I've done a lot based on your suggestions, but still seem to be having an issue. Assuming by "MyFaces 3, 4" you mean either version 3 or 4 of MyFaces, as I don't find a 3.4 version. Based on that, I have cleaned out all javax, but still get errors. Pertinent errors from the log:
I'm using the bundle in myfaces-bundle-3.0.2.jar. I'm using the bundle in myfaces-bundle-3.0.2.jar. This would insinuate that the primefaces-13.0.4 jar file still has a reference (in org.primefaces.webapp.UploadedFileCleanerListener) to the javax (not jakarta) servlet classes. I have no javax remaining in my source or in any config files, and I get clean compiles from the JDK 17 javac compiler. Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
tandrashko, Thanks. As I mentioned at the beginning of my original post, I am using PF 13.0.4, and the website isn't much help in figuring out versions to match with JDK and JSP verions. Do you know which primefaces version 13 is the jakarta one? I'd prefer not to try to go to 14 if I can avoid it in order to keep the migration effort as small as possible. Bill |
Beta Was this translation helpful? Give feedback.
-
tandrashko, I tried using 13.0.10 and 14.0.10. No difference. Also, I noticed the problem seems to be happening in org.primefaces.webapp.UploadedFileCleanerListener. My app doesn't have file upload logic; in fact, I searched the entire project (source files) for the word 'Upload' and it's not there. Bill |
Beta Was this translation helpful? Give feedback.
-
Melloware, I'm old school and am not using Maven. Another post in the github discussions (https://github.com/orgs/primefaces/discussions/1264) tells me there may be a different jar file. I found the download links in the README file at https://github.com/primefaces/primefaces?tab=readme-ov-file, where it only has one download per version. How do I get the 'jakarta' version without Maven? |
Beta Was this translation helpful? Give feedback.
Tomcat 10.1 is jakarta, MyFaces 3,4 and 4.1 is jakarta
you need to adjust all your code and also check all configs; javax is gone