NutzCN Logo
问答 有迁移到jakarta的nutz版本嘛
发布于 359天前 作者 duzige 1870 次浏览 复制 上一个帖子 下一个帖子
标签:

有迁移到jakarta的nutz版本嘛,看还用的是javax

package org.nutz.mvc;

import java.io.IOException;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.net.URLDecoder;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import javax.servlet.ServletContext;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
1 回复

换tomcat10.1.x启动貌似也不兼容javax了,用tomcat 9.0.30是好的
当前tomcat版本是10.1.17

29-Dec-2023 16:18:06.317 严重 [main] org.apache.catalina.core.StandardContext.filterStart 启动过滤器异常[nutz]
	java.lang.ClassCastException: class com.xxx.filter.Nut cannot be cast to class jakarta.servlet.Filter (com.xxxx.filter.Nut is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @176b75f7; jakarta.servlet.Filter is in unnamed module of loader java.net.URLClassLoader @156643d4)
		at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:243)
		at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:98)
		at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4271)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4886)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:683)
		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:712)
		at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:643)
		at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1939)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
		at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
		at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:536)
		at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:426)
		at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1661)
		at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:114)
		at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
		at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:345)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:893)
		at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:845)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
		at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866)
		at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:240)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
		at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
		at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:917)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
		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:77)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:568)
		at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:347)
		at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
添加回复
请先登陆
回到顶部