Fw: Apache Tomcat 10.1.6 is giving me java.lang.ClassNotFoundException: jakarta.servlet.jsp.JspFactory
Hi experts, I am not getting reply on this jakarta.servlet.jsp.JspFactory, can I have some feedback how to make Tomcat works with the libraries I need ? Tks & rgds,Karen - Forwarded Message - From: Karen Goh To: users@tomcat.apache.org Sent: Thursday, March 2, 2023 at 01:24:47 PM GMT+8Subject: Re: Apache Tomcat 10.1.6 is giving me java.lang.ClassNotFoundException: jakarta.servlet.jsp.JspFactory Hi Chris, I have forwarded you that SO URL to showed you that the scope provided needed to add it in but after you pointed out I realised it is wrong. Nope. I am not using jetty run. I right click on Eclipse run on server. So, the latest happening is that I got an advice from another SO user to put in the jar from Download jakarta.servlet.jsp-api JAR file with all dependencies I tried to exploded the jar to see if it contains all the dependencies I need but all i could find is byte code .class. | | | | Download jakarta.servlet.jsp-api JAR file with all dependencies Download jakarta.servlet.jsp-api JAR file ✓ With dependencies ✓ Documentation ✓ Source code | | | and Tomcat is able to run. Only thing is that the index.jsp doesn't show up. It only show localhost:8080/webclientv1/ and the browser appears moving like waiting. But, still I got to sort out the dependencies cos I need them for CICD. Could you advise me what is the full set of dependencies I need ? Tks. On Thursday, March 2, 2023 at 01:51:56 AM GMT+8, Christopher Schultz wrote: Karen, On 3/1/23 10:21 AM, Karen Goh wrote: > hi Chris, > I am following advice from ClassNotFoundException: > javax.servlet.jsp.JspFactory > ClassNotFoundException: javax.servlet.jsp.JspFactory > > I have a maven-based app that I copied exactly and tried to run mvn jetty:run > And now getting this error:Cau... > > where it says scope provided must be added > Anwyay, I have removed the scope and the jars that are put in the lib folder > in WEB-INF, it is no use. > The same error still persists. > I removed provided on all the Jakarat ee replated dependencies > as shown in the pom just now. > Hope you could advise me now. > Tks. If you are using jetty:run then you are probably not using Tomcat. >:| -chris > On Wednesday, March 1, 2023 at 10:19:18 PM GMT+8, Christopher Schultz > wrote: > > Karen, > > On 3/1/23 09:09, Karen Goh wrote: >> Hello experts, >> I need desperate help to fix this java.lang.ClassNotFoundException: >> jakarta.servlet.jsp.JspFactory >> Here are my dependencies which I have installed but still Tomcat will still >> purge out the ClassNotFound error : >> >> >> com.fasterxml.jackson.core >> jackson-databind >> 2.13.3 >> >> >> >> com.squareup.retrofit2 >> retrofit >> 2.9.0 >> >> >> com.squareup.retrofit2 >> converter-gson >> 2.9.0 >> >> >> >> com.google.code.gson >> gson >> 2.10.1 >> >> >> >> jakarta.servlet.jsp.jstl >> jakarta.servlet.jsp.jstl-api >> 3.0.0 >> provided >> >> >> >> jakarta.platform >> jakarta.jakartaee-web-api >> 10.0.0 >> provided >> >> >> jakarta.servlet >> jakarta.servlet-api >> 6.0.0 >> provided >> >> >> org.glassfish.web >> jakarta.servlet.jsp.jstl >> 3.0.1 >> provided >> >> >> jakarta.el >> jakarta.el-api >> 5.0.0 >> provided >> >> >> I have even attached the jar - jakarta.servlet.jsp.jstl-3.0.1.jar >> jakarta.servlet.jsp.jstl-api-3.0.0.jarto the lib folder. >> Java 17, Eclipse on Windows 10. >> I am not sure how to tackle this problem, as I need to get an assignment >> done.Would appreciate advice from this group.Tks. > > Your POM shows both jstl artifacts as "provided" meaning they won't be > downloaded and bundled into your application. I think you actually need >
Re: Apache Tomcat 10.1.6 is giving me java.lang.ClassNotFoundException: jakarta.servlet.jsp.JspFactory
Karen, On 3/2/23 00:24, Karen Goh wrote: I have forwarded you that SO URL to showed you that the scope provided needed to add it in but after you pointed out I realised it is wrong. Nope. I am not using jetty run. I right click on Eclipse run on server. Maybe I'm getting confused by what is copy/paste from your (unreferenced) sources and what is your own words. Your posts are difficult to interpret. So, the latest happening is that I got an advice from another SO user to put in the jar from Download jakarta.servlet.jsp-api JAR file with all dependencies I tried to exploded the jar to see if it contains all the dependencies I need but all i could find is byte code .class. JAR files typically only contain .class files. If you see a file in there with the class name + ".class" then that's where the class is. If you are providing a JAR file which contains jakarta/servlet/jsp/JspFactory.class then you are making a mistake and need to remove that file from your application. Download jakarta.servlet.jsp-api JAR file with all dependencies > Download jakarta.servlet.jsp-api JAR file ✓ With dependencies ✓ Documentation ✓ Source code > and Tomcat is able to run. Only thing is that the index.jsp doesn't show up. It only show localhost:8080/webclientv1/ and the browser appears moving like waiting. This is different than ClassNotFoundException. Unless this is the behavior of the client while the log file shows "ClassNotFoundException". But, still I got to sort out the dependencies cos I need them for CICD. Could you advise me what is the full set of dependencies I need ? Tomcat should provide jakarta.servlet.jsp-api and so you do not need it. If you want to add JSTL to use that in your JSPs then you need only the JSTL library and any of its dependencies (but not JSP-API, which is provided by Tomcat). -chris On Thursday, March 2, 2023 at 01:51:56 AM GMT+8, Christopher Schultz wrote: Karen, On 3/1/23 10:21 AM, Karen Goh wrote: hi Chris, I am following advice from ClassNotFoundException: javax.servlet.jsp.JspFactory ClassNotFoundException: javax.servlet.jsp.JspFactory I have a maven-based app that I copied exactly and tried to run mvn jetty:run And now getting this error:Cau... where it says scope provided must be added Anwyay, I have removed the scope and the jars that are put in the lib folder in WEB-INF, it is no use. The same error still persists. I removed provided on all the Jakarat ee replated dependencies as shown in the pom just now. Hope you could advise me now. Tks. If you are using jetty:run then you are probably not using Tomcat. >:| -chris On Wednesday, March 1, 2023 at 10:19:18 PM GMT+8, Christopher Schultz wrote: Karen, On 3/1/23 09:09, Karen Goh wrote: Hello experts, I need desperate help to fix this java.lang.ClassNotFoundException: jakarta.servlet.jsp.JspFactory Here are my dependencies which I have installed but still Tomcat will still purge out the ClassNotFound error : com.fasterxml.jackson.core jackson-databind 2.13.3 com.squareup.retrofit2 retrofit 2.9.0 com.squareup.retrofit2 converter-gson 2.9.0 com.google.code.gson gson 2.10.1 jakarta.servlet.jsp.jstl jakarta.servlet.jsp.jstl-api 3.0.0 provided jakarta.platform jakarta.jakartaee-web-api 10.0.0 provided jakarta.servlet jakarta.servlet-api 6.0.0 provided org.glassfish.web jakarta.servlet.jsp.jstl 3.0.1 provided jakarta.el jakarta.el-api 5.0.0 provided I have even attached the jar - jakarta.servlet.jsp.jstl-3.0.1.jar jakarta.servlet.jsp.jstl-api-3.0.0.jarto the lib folder. Java 17, Eclipse on Windows 10. I am not sure how to tackle this problem, as I need to get an assignment done.Would appreciate advice from this group.Tks. Your POM shows both jstl artifacts as "provided" meaning they won't be downloaded and bundled into your application. I think you actually need to allow those to be downloaded as they are not provided by Tomcat (I think! I'm no JSTL expert). But Tomcat definitely ships with a copy of jakarta.servlet.jsp.JspFactory so if you are adding a JAR which contains that class, you are likely causing a conflict.
Re: Apache Tomcat 10.1.6 is giving me java.lang.ClassNotFoundException: jakarta.servlet.jsp.JspFactory
Hi Chris, I have forwarded you that SO URL to showed you that the scope provided needed to add it in but after you pointed out I realised it is wrong. Nope. I am not using jetty run. I right click on Eclipse run on server. So, the latest happening is that I got an advice from another SO user to put in the jar from Download jakarta.servlet.jsp-api JAR file with all dependencies I tried to exploded the jar to see if it contains all the dependencies I need but all i could find is byte code .class. | | | | Download jakarta.servlet.jsp-api JAR file with all dependencies Download jakarta.servlet.jsp-api JAR file ✓ With dependencies ✓ Documentation ✓ Source code | | | and Tomcat is able to run. Only thing is that the index.jsp doesn't show up. It only show localhost:8080/webclientv1/ and the browser appears moving like waiting. But, still I got to sort out the dependencies cos I need them for CICD. Could you advise me what is the full set of dependencies I need ? Tks. On Thursday, March 2, 2023 at 01:51:56 AM GMT+8, Christopher Schultz wrote: Karen, On 3/1/23 10:21 AM, Karen Goh wrote: > hi Chris, > I am following advice from ClassNotFoundException: > javax.servlet.jsp.JspFactory > ClassNotFoundException: javax.servlet.jsp.JspFactory > > I have a maven-based app that I copied exactly and tried to run mvn jetty:run > And now getting this error:Cau... > > where it says scope provided must be added > Anwyay, I have removed the scope and the jars that are put in the lib folder > in WEB-INF, it is no use. > The same error still persists. > I removed provided on all the Jakarat ee replated dependencies > as shown in the pom just now. > Hope you could advise me now. > Tks. If you are using jetty:run then you are probably not using Tomcat. >:| -chris > On Wednesday, March 1, 2023 at 10:19:18 PM GMT+8, Christopher Schultz > wrote: > > Karen, > > On 3/1/23 09:09, Karen Goh wrote: >> Hello experts, >> I need desperate help to fix this java.lang.ClassNotFoundException: >> jakarta.servlet.jsp.JspFactory >> Here are my dependencies which I have installed but still Tomcat will still >> purge out the ClassNotFound error : >> >> >> com.fasterxml.jackson.core >> jackson-databind >> 2.13.3 >> >> >> >> com.squareup.retrofit2 >> retrofit >> 2.9.0 >> >> >> com.squareup.retrofit2 >> converter-gson >> 2.9.0 >> >> >> >> com.google.code.gson >> gson >> 2.10.1 >> >> >> >> jakarta.servlet.jsp.jstl >> jakarta.servlet.jsp.jstl-api >> 3.0.0 >> provided >> >> >> >> jakarta.platform >> jakarta.jakartaee-web-api >> 10.0.0 >> provided >> >> >> jakarta.servlet >> jakarta.servlet-api >> 6.0.0 >> provided >> >> >> org.glassfish.web >> jakarta.servlet.jsp.jstl >> 3.0.1 >> provided >> >> >> jakarta.el >> jakarta.el-api >> 5.0.0 >> provided >> >> >> I have even attached the jar - jakarta.servlet.jsp.jstl-3.0.1.jar >> jakarta.servlet.jsp.jstl-api-3.0.0.jarto the lib folder. >> Java 17, Eclipse on Windows 10. >> I am not sure how to tackle this problem, as I need to get an assignment >> done.Would appreciate advice from this group.Tks. > > Your POM shows both jstl artifacts as "provided" meaning they won't be > downloaded and bundled into your application. I think you actually need > to allow those to be downloaded as they are not provided by Tomcat (I > think! I'm no JSTL expert). > > But Tomcat definitely ships with a copy of > jakarta.servlet.jsp.JspFactory so if you are adding a JAR which contains > that class, you are likely causing a conflict. > > Tomcat really should be prohibiting that class from being provided by an > application, but maybe you have put it somewhere that is confusing the JVM. > > Which lib/ folder did you put those JARs into? > > -chris > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 10.1.6 is giving me java.lang.ClassNotFoundException: jakarta.servlet.jsp.JspFactory
Karen, On 3/1/23 10:21 AM, Karen Goh wrote: hi Chris, I am following advice from ClassNotFoundException: javax.servlet.jsp.JspFactory ClassNotFoundException: javax.servlet.jsp.JspFactory I have a maven-based app that I copied exactly and tried to run mvn jetty:run And now getting this error:Cau... where it says scope provided must be added Anwyay, I have removed the scope and the jars that are put in the lib folder in WEB-INF, it is no use. The same error still persists. I removed provided on all the Jakarat ee replated dependencies as shown in the pom just now. Hope you could advise me now. Tks. If you are using jetty:run then you are probably not using Tomcat. >:| -chris On Wednesday, March 1, 2023 at 10:19:18 PM GMT+8, Christopher Schultz wrote: Karen, On 3/1/23 09:09, Karen Goh wrote: Hello experts, I need desperate help to fix this java.lang.ClassNotFoundException: jakarta.servlet.jsp.JspFactory Here are my dependencies which I have installed but still Tomcat will still purge out the ClassNotFound error : com.fasterxml.jackson.core jackson-databind 2.13.3 com.squareup.retrofit2 retrofit 2.9.0 com.squareup.retrofit2 converter-gson 2.9.0 com.google.code.gson gson 2.10.1 jakarta.servlet.jsp.jstl jakarta.servlet.jsp.jstl-api 3.0.0 provided jakarta.platform jakarta.jakartaee-web-api 10.0.0 provided jakarta.servlet jakarta.servlet-api 6.0.0 provided org.glassfish.web jakarta.servlet.jsp.jstl 3.0.1 provided jakarta.el jakarta.el-api 5.0.0 provided I have even attached the jar - jakarta.servlet.jsp.jstl-3.0.1.jar jakarta.servlet.jsp.jstl-api-3.0.0.jarto the lib folder. Java 17, Eclipse on Windows 10. I am not sure how to tackle this problem, as I need to get an assignment done.Would appreciate advice from this group.Tks. Your POM shows both jstl artifacts as "provided" meaning they won't be downloaded and bundled into your application. I think you actually need to allow those to be downloaded as they are not provided by Tomcat (I think! I'm no JSTL expert). But Tomcat definitely ships with a copy of jakarta.servlet.jsp.JspFactory so if you are adding a JAR which contains that class, you are likely causing a conflict. Tomcat really should be prohibiting that class from being provided by an application, but maybe you have put it somewhere that is confusing the JVM. Which lib/ folder did you put those JARs into? -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 10.1.6 is giving me java.lang.ClassNotFoundException: jakarta.servlet.jsp.JspFactory
hi Chris, I am following advice from ClassNotFoundException: javax.servlet.jsp.JspFactory | | | | | | | | | | | ClassNotFoundException: javax.servlet.jsp.JspFactory I have a maven-based app that I copied exactly and tried to run mvn jetty:run And now getting this error:Cau... | | | where it says scope provided must be added Anwyay, I have removed the scope and the jars that are put in the lib folder in WEB-INF, it is no use. The same error still persists. I removed provided on all the Jakarat ee replated dependencies as shown in the pom just now. Hope you could advise me now. Tks. On Wednesday, March 1, 2023 at 10:19:18 PM GMT+8, Christopher Schultz wrote: Karen, On 3/1/23 09:09, Karen Goh wrote: > Hello experts, > I need desperate help to fix this java.lang.ClassNotFoundException: > jakarta.servlet.jsp.JspFactory > Here are my dependencies which I have installed but still Tomcat will still > purge out the ClassNotFound error : > > > com.fasterxml.jackson.core > jackson-databind > 2.13.3 > > > > com.squareup.retrofit2 > retrofit > 2.9.0 > > > com.squareup.retrofit2 > converter-gson > 2.9.0 > > > > com.google.code.gson > gson > 2.10.1 > > > > jakarta.servlet.jsp.jstl > jakarta.servlet.jsp.jstl-api > 3.0.0 > provided > > > > jakarta.platform > jakarta.jakartaee-web-api > 10.0.0 > provided > > > jakarta.servlet > jakarta.servlet-api > 6.0.0 > provided > > > org.glassfish.web > jakarta.servlet.jsp.jstl > 3.0.1 > provided > > > jakarta.el > jakarta.el-api > 5.0.0 > provided > > > I have even attached the jar - jakarta.servlet.jsp.jstl-3.0.1.jar > jakarta.servlet.jsp.jstl-api-3.0.0.jarto the lib folder. > Java 17, Eclipse on Windows 10. > I am not sure how to tackle this problem, as I need to get an assignment > done.Would appreciate advice from this group.Tks. Your POM shows both jstl artifacts as "provided" meaning they won't be downloaded and bundled into your application. I think you actually need to allow those to be downloaded as they are not provided by Tomcat (I think! I'm no JSTL expert). But Tomcat definitely ships with a copy of jakarta.servlet.jsp.JspFactory so if you are adding a JAR which contains that class, you are likely causing a conflict. Tomcat really should be prohibiting that class from being provided by an application, but maybe you have put it somewhere that is confusing the JVM. Which lib/ folder did you put those JARs into? -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 10.1.6 is giving me java.lang.ClassNotFoundException: jakarta.servlet.jsp.JspFactory
Karen, On 3/1/23 09:09, Karen Goh wrote: Hello experts, I need desperate help to fix this java.lang.ClassNotFoundException: jakarta.servlet.jsp.JspFactory Here are my dependencies which I have installed but still Tomcat will still purge out the ClassNotFound error : com.fasterxml.jackson.core jackson-databind 2.13.3 com.squareup.retrofit2 retrofit 2.9.0 com.squareup.retrofit2 converter-gson 2.9.0 com.google.code.gson gson 2.10.1 jakarta.servlet.jsp.jstl jakarta.servlet.jsp.jstl-api 3.0.0 provided jakarta.platform jakarta.jakartaee-web-api 10.0.0 provided jakarta.servlet jakarta.servlet-api 6.0.0 provided org.glassfish.web jakarta.servlet.jsp.jstl 3.0.1 provided jakarta.el jakarta.el-api 5.0.0 provided I have even attached the jar - jakarta.servlet.jsp.jstl-3.0.1.jar jakarta.servlet.jsp.jstl-api-3.0.0.jarto the lib folder. Java 17, Eclipse on Windows 10. I am not sure how to tackle this problem, as I need to get an assignment done.Would appreciate advice from this group.Tks. Your POM shows both jstl artifacts as "provided" meaning they won't be downloaded and bundled into your application. I think you actually need to allow those to be downloaded as they are not provided by Tomcat (I think! I'm no JSTL expert). But Tomcat definitely ships with a copy of jakarta.servlet.jsp.JspFactory so if you are adding a JAR which contains that class, you are likely causing a conflict. Tomcat really should be prohibiting that class from being provided by an application, but maybe you have put it somewhere that is confusing the JVM. Which lib/ folder did you put those JARs into? -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Apache Tomcat 10.1.6 is giving me java.lang.ClassNotFoundException: jakarta.servlet.jsp.JspFactory
Hello experts, I need desperate help to fix this java.lang.ClassNotFoundException: jakarta.servlet.jsp.JspFactory Here are my dependencies which I have installed but still Tomcat will still purge out the ClassNotFound error : com.fasterxml.jackson.core jackson-databind 2.13.3 com.squareup.retrofit2 retrofit 2.9.0 com.squareup.retrofit2 converter-gson 2.9.0 com.google.code.gson gson 2.10.1 jakarta.servlet.jsp.jstl jakarta.servlet.jsp.jstl-api 3.0.0 provided jakarta.platform jakarta.jakartaee-web-api 10.0.0 provided jakarta.servlet jakarta.servlet-api 6.0.0 provided org.glassfish.web jakarta.servlet.jsp.jstl 3.0.1 provided jakarta.el jakarta.el-api 5.0.0 provided I have even attached the jar - jakarta.servlet.jsp.jstl-3.0.1.jar jakarta.servlet.jsp.jstl-api-3.0.0.jarto the lib folder. Java 17, Eclipse on Windows 10. I am not sure how to tackle this problem, as I need to get an assignment done.Would appreciate advice from this group.Tks. Regards,Karen