gpt4 book ai didi

开始服务后,Tomcat 为 Nio2Endpoint.setSocketOptions 抛出 NoSuchMethodError

转载 作者:行者123 更新时间:2023-11-28 21:49:31 25 4
gpt4 key购买 nike

我刚刚更新了一个服务器,在应用程序启动和 tomcat 开始处理请求后开始发生异常。

我更改了连接以验证它是否也有问题,但同样的事情发生了:

    19-Apr-2018 20:31:38.833 SEVERE [http-nio2-8080-Acceptor-0] org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
at org.apache.tomcat.util.net.SocketBufferHandler.reset(SocketBufferHandler.java:146)
at org.apache.tomcat.util.net.Nio2Channel.reset(Nio2Channel.java:58)
at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:317)
at org.apache.tomcat.util.net.Nio2Endpoint$Acceptor.run(Nio2Endpoint.java:454)
at java.lang.Thread.run(Thread.java:748)

这个应用程序是运行在 tomcat 8.5.30 debian 上的 java8使用此连接器配置

<Connector port="8080" protocol="org.apache.coyote.http11.Http11Nio2Protocol" executor="tomcatThreadPool"
URIEncoding="UTF-8" connectionTimeout="15000" disableUploadTimeout="false"
connectionUploadTimeout="60000" maxHttpHeaderSize="16384" acceptCount="1000">
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol"/>
</Connector>

使用常规 1.1 连接器

SEVERE [catalina-exec-44] org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun 
java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
at org.apache.coyote.http11.Http11InputBuffer.recycle(Http11InputBuffer.java:280)
at org.apache.coyote.http11.Http11Processor.recycle(Http11Processor.java:1709)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.release(AbstractProtocol.java:972)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:940)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

最佳答案

好的,这个问题是由 Debian 更新引起的,它不是为 jdk 8 准备的。不过他们正在修复。

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895866

关于开始服务后,Tomcat 为 Nio2Endpoint.setSocketOptions 抛出 NoSuchMethodError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49930097/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com