java.lang.ClassNotFoundException: javax.servlet.Filter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

java.lang.ClassNotFoundException: javax.servlet.Filter

Jason Wee
Using Apache Tomcat 10.0.2, build owb and cxf and placed into lib directory

tomcat-cxf-3.4.1.jar
tomcat-owb-2.0.20.jar

reading reference,  https://tomcat.apache.org/tomcat-10.0-doc/cdi.html

and when i start tomcat, I get the following exception

==> localhost.2021-02-15.log <==
15-Feb-2021 16:19:04.700 INFO [main]
org.apache.catalina.core.ApplicationContext.log Marking servlet
[ApacheTomcatCXFServlet] as unavailable
15-Feb-2021 16:19:04.700 SEVERE [main]
org.apache.catalina.core.StandardContext.loadOnStartup Servlet
[ApacheTomcatCXFServlet] in web application [/rest] threw load()
exception
java.lang.ClassNotFoundException: javax.servlet.Filter
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:151)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1043)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:984)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4851)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5160)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1093)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1810)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1013)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:428)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1520)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:795)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)

==> catalina.out <==
15-Feb-2021 16:19:04.703 INFO [main]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of
web application directory
[/home/jason/tomcat/apache-tomcat-10.0.2/webapps/rest] has finished in
[435] ms

any idea how to change from javax to jakarta?

Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.ClassNotFoundException: javax.servlet.Filter

Mark Thomas-2
On 15/02/2021 08:26, Jason Wee wrote:
> Using Apache Tomcat 10.0.2, build owb and cxf and placed into lib directory
>
> tomcat-cxf-3.4.1.jar
> tomcat-owb-2.0.20.jar
>
> reading reference,  https://tomcat.apache.org/tomcat-10.0-doc/cdi.html
>
> and when i start tomcat, I get the following exception

Quoting from the top of the Tomcat 10 download page:

"Users of Tomcat 10 onwards should be aware that, as a result of the
move from Java EE to Jakarta EE as part of the transfer of Java EE to
the Eclipse Foundation, the primary package for all implemented APIs has
changed from javax.* to jakarta.*. This will almost certainly require
code changes to enable applications to migrate from Tomcat 9 and earlier
to Tomcat 10 and later. A migration tool is under development to aid
this process."

https://tomcat.apache.org/download-10.cgi

Mark


>
> ==> localhost.2021-02-15.log <==
> 15-Feb-2021 16:19:04.700 INFO [main]
> org.apache.catalina.core.ApplicationContext.log Marking servlet
> [ApacheTomcatCXFServlet] as unavailable
> 15-Feb-2021 16:19:04.700 SEVERE [main]
> org.apache.catalina.core.StandardContext.loadOnStartup Servlet
> [ApacheTomcatCXFServlet] in web application [/rest] threw load()
> exception
> java.lang.ClassNotFoundException: javax.servlet.Filter
> at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
> at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
> at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
> at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:151)
> at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1043)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:984)
> at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4851)
> at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5160)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
> at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1093)
> at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1810)
> at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
> at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1013)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:428)
> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1520)
> at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
> at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
> at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
> at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
> at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
> at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
> at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at org.apache.catalina.core.StandardService.startInternal(StandardService.java:434)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:795)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
>
> ==> catalina.out <==
> 15-Feb-2021 16:19:04.703 INFO [main]
> org.apache.catalina.startup.HostConfig.deployDirectory Deployment of
> web application directory
> [/home/jason/tomcat/apache-tomcat-10.0.2/webapps/rest] has finished in
> [435] ms
>
> any idea how to change from javax to jakarta?
>
> Jason
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.ClassNotFoundException: javax.servlet.Filter

Jason Wee
okay, currently there is no custom application code, I just build two
of the libs and place into tomcat lib using the tomcat documentation.

Do you mean I have to change the reference? Example
https://github.com/apache/openwebbeans/blob/master/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java#L36
?

Jason

On Mon, Feb 15, 2021 at 6:19 PM Mark Thomas <[hidden email]> wrote:

>
> On 15/02/2021 08:26, Jason Wee wrote:
> > Using Apache Tomcat 10.0.2, build owb and cxf and placed into lib directory
> >
> > tomcat-cxf-3.4.1.jar
> > tomcat-owb-2.0.20.jar
> >
> > reading reference,  https://tomcat.apache.org/tomcat-10.0-doc/cdi.html
> >
> > and when i start tomcat, I get the following exception
>
> Quoting from the top of the Tomcat 10 download page:
>
> "Users of Tomcat 10 onwards should be aware that, as a result of the
> move from Java EE to Jakarta EE as part of the transfer of Java EE to
> the Eclipse Foundation, the primary package for all implemented APIs has
> changed from javax.* to jakarta.*. This will almost certainly require
> code changes to enable applications to migrate from Tomcat 9 and earlier
> to Tomcat 10 and later. A migration tool is under development to aid
> this process."
>
> https://tomcat.apache.org/download-10.cgi
>
> Mark
>
>
> >
> > ==> localhost.2021-02-15.log <==
> > 15-Feb-2021 16:19:04.700 INFO [main]
> > org.apache.catalina.core.ApplicationContext.log Marking servlet
> > [ApacheTomcatCXFServlet] as unavailable
> > 15-Feb-2021 16:19:04.700 SEVERE [main]
> > org.apache.catalina.core.StandardContext.loadOnStartup Servlet
> > [ApacheTomcatCXFServlet] in web application [/rest] threw load()
> > exception
> > java.lang.ClassNotFoundException: javax.servlet.Filter
> > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
> > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
> > at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
> > at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:151)
> > at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1043)
> > at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:984)
> > at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4851)
> > at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5160)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
> > at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
> > at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
> > at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1093)
> > at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1810)
> > at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> > at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> > at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> > at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
> > at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1013)
> > at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:428)
> > at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1520)
> > at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
> > at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> > at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
> > at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
> > at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
> > at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
> > at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
> > at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> > at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> > at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
> > at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
> > at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > at org.apache.catalina.core.StandardService.startInternal(StandardService.java:434)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > at org.apache.catalina.startup.Catalina.start(Catalina.java:795)
> > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
> > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
> >
> > ==> catalina.out <==
> > 15-Feb-2021 16:19:04.703 INFO [main]
> > org.apache.catalina.startup.HostConfig.deployDirectory Deployment of
> > web application directory
> > [/home/jason/tomcat/apache-tomcat-10.0.2/webapps/rest] has finished in
> > [435] ms
> >
> > any idea how to change from javax to jakarta?
> >
> > Jason
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.ClassNotFoundException: javax.servlet.Filter

Woonsan Ko-3
On Mon, Feb 15, 2021 at 7:19 AM Jason Wee <[hidden email]> wrote:
>
> okay, currently there is no custom application code, I just build two
> of the libs and place into tomcat lib using the tomcat documentation.
>
> Do you mean I have to change the reference? Example
> https://github.com/apache/openwebbeans/blob/master/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java#L36
> ?

It should be your decision. ;-)
Please see the linked page from the download page:
- https://tomcat.apache.org/whichversion.html

For example, I think you may stick with Tomcat 9, or you may ask or
help the libraries to be compatible with Jakarta EE in their own
communities.
It is up to you.

Regards,
Woonsan

>
> Jason
>
> On Mon, Feb 15, 2021 at 6:19 PM Mark Thomas <[hidden email]> wrote:
> >
> > On 15/02/2021 08:26, Jason Wee wrote:
> > > Using Apache Tomcat 10.0.2, build owb and cxf and placed into lib directory
> > >
> > > tomcat-cxf-3.4.1.jar
> > > tomcat-owb-2.0.20.jar
> > >
> > > reading reference,  https://tomcat.apache.org/tomcat-10.0-doc/cdi.html
> > >
> > > and when i start tomcat, I get the following exception
> >
> > Quoting from the top of the Tomcat 10 download page:
> >
> > "Users of Tomcat 10 onwards should be aware that, as a result of the
> > move from Java EE to Jakarta EE as part of the transfer of Java EE to
> > the Eclipse Foundation, the primary package for all implemented APIs has
> > changed from javax.* to jakarta.*. This will almost certainly require
> > code changes to enable applications to migrate from Tomcat 9 and earlier
> > to Tomcat 10 and later. A migration tool is under development to aid
> > this process."
> >
> > https://tomcat.apache.org/download-10.cgi
> >
> > Mark
> >
> >
> > >
> > > ==> localhost.2021-02-15.log <==
> > > 15-Feb-2021 16:19:04.700 INFO [main]
> > > org.apache.catalina.core.ApplicationContext.log Marking servlet
> > > [ApacheTomcatCXFServlet] as unavailable
> > > 15-Feb-2021 16:19:04.700 SEVERE [main]
> > > org.apache.catalina.core.StandardContext.loadOnStartup Servlet
> > > [ApacheTomcatCXFServlet] in web application [/rest] threw load()
> > > exception
> > > java.lang.ClassNotFoundException: javax.servlet.Filter
> > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > > at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > > at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > > at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
> > > at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
> > > at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:151)
> > > at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1043)
> > > at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:984)
> > > at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4851)
> > > at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5160)
> > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > > at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
> > > at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
> > > at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
> > > at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1093)
> > > at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1810)
> > > at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> > > at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> > > at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> > > at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
> > > at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1013)
> > > at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:428)
> > > at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1520)
> > > at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
> > > at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> > > at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
> > > at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
> > > at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
> > > at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
> > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > > at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
> > > at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
> > > at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> > > at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> > > at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
> > > at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
> > > at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
> > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > > at org.apache.catalina.core.StandardService.startInternal(StandardService.java:434)
> > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > > at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
> > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > > at org.apache.catalina.startup.Catalina.start(Catalina.java:795)
> > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > Method)
> > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > > at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
> > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
> > >
> > > ==> catalina.out <==
> > > 15-Feb-2021 16:19:04.703 INFO [main]
> > > org.apache.catalina.startup.HostConfig.deployDirectory Deployment of
> > > web application directory
> > > [/home/jason/tomcat/apache-tomcat-10.0.2/webapps/rest] has finished in
> > > [435] ms
> > >
> > > any idea how to change from javax to jakarta?
> > >
> > > Jason
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.ClassNotFoundException: javax.servlet.Filter

Jason Wee
No problem, just wanna understand better if this will tackle in the near future.

On another note, I did custom patch on one of the lib,
https://github.com/jasonwee/jakarta-taglibs-mailer for my own usage.

I guess I will do the same for this lib if I found time. If you want a
custom or specific patch, please also let me know so I can contribute
back to the tomcat community.

Thank.

Jason

On Mon, Feb 15, 2021 at 11:35 PM Woonsan Ko <[hidden email]> wrote:

>
> On Mon, Feb 15, 2021 at 7:19 AM Jason Wee <[hidden email]> wrote:
> >
> > okay, currently there is no custom application code, I just build two
> > of the libs and place into tomcat lib using the tomcat documentation.
> >
> > Do you mean I have to change the reference? Example
> > https://github.com/apache/openwebbeans/blob/master/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java#L36
> > ?
>
> It should be your decision. ;-)
> Please see the linked page from the download page:
> - https://tomcat.apache.org/whichversion.html
>
> For example, I think you may stick with Tomcat 9, or you may ask or
> help the libraries to be compatible with Jakarta EE in their own
> communities.
> It is up to you.
>
> Regards,
> Woonsan
>
> >
> > Jason
> >
> > On Mon, Feb 15, 2021 at 6:19 PM Mark Thomas <[hidden email]> wrote:
> > >
> > > On 15/02/2021 08:26, Jason Wee wrote:
> > > > Using Apache Tomcat 10.0.2, build owb and cxf and placed into lib directory
> > > >
> > > > tomcat-cxf-3.4.1.jar
> > > > tomcat-owb-2.0.20.jar
> > > >
> > > > reading reference,  https://tomcat.apache.org/tomcat-10.0-doc/cdi.html
> > > >
> > > > and when i start tomcat, I get the following exception
> > >
> > > Quoting from the top of the Tomcat 10 download page:
> > >
> > > "Users of Tomcat 10 onwards should be aware that, as a result of the
> > > move from Java EE to Jakarta EE as part of the transfer of Java EE to
> > > the Eclipse Foundation, the primary package for all implemented APIs has
> > > changed from javax.* to jakarta.*. This will almost certainly require
> > > code changes to enable applications to migrate from Tomcat 9 and earlier
> > > to Tomcat 10 and later. A migration tool is under development to aid
> > > this process."
> > >
> > > https://tomcat.apache.org/download-10.cgi
> > >
> > > Mark
> > >
> > >
> > > >
> > > > ==> localhost.2021-02-15.log <==
> > > > 15-Feb-2021 16:19:04.700 INFO [main]
> > > > org.apache.catalina.core.ApplicationContext.log Marking servlet
> > > > [ApacheTomcatCXFServlet] as unavailable
> > > > 15-Feb-2021 16:19:04.700 SEVERE [main]
> > > > org.apache.catalina.core.StandardContext.loadOnStartup Servlet
> > > > [ApacheTomcatCXFServlet] in web application [/rest] threw load()
> > > > exception
> > > > java.lang.ClassNotFoundException: javax.servlet.Filter
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > > > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > > > at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > > > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > > > at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > > > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > > > at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > > > at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > > at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
> > > > at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
> > > > at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:151)
> > > > at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1043)
> > > > at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:984)
> > > > at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4851)
> > > > at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5160)
> > > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > > > at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
> > > > at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
> > > > at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
> > > > at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1093)
> > > > at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1810)
> > > > at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> > > > at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> > > > at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> > > > at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
> > > > at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1013)
> > > > at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:428)
> > > > at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1520)
> > > > at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
> > > > at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> > > > at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
> > > > at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
> > > > at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
> > > > at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
> > > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > > > at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
> > > > at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
> > > > at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> > > > at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> > > > at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
> > > > at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
> > > > at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
> > > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > > > at org.apache.catalina.core.StandardService.startInternal(StandardService.java:434)
> > > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > > > at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
> > > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > > > at org.apache.catalina.startup.Catalina.start(Catalina.java:795)
> > > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > > Method)
> > > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > > > at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > > > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
> > > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
> > > >
> > > > ==> catalina.out <==
> > > > 15-Feb-2021 16:19:04.703 INFO [main]
> > > > org.apache.catalina.startup.HostConfig.deployDirectory Deployment of
> > > > web application directory
> > > > [/home/jason/tomcat/apache-tomcat-10.0.2/webapps/rest] has finished in
> > > > [435] ms
> > > >
> > > > any idea how to change from javax to jakarta?
> > > >
> > > > Jason
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [hidden email]
> > > > For additional commands, e-mail: [hidden email]
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]