萝卜白菜。 2021-06-01 08:36 采纳率: 100%
浏览 171
已结题

TongWeb报错java.lang.SecurityException

查看TongWeb的端口状态close_wait过多,且日志中有如下异常。

Exception in thread "InnocuousThread-25" java.lang.SecurityException: setContextClassLoader]
    at sun.misc.InnocuousThread.setContextClassLoader(InnocuousThread.java:96)]
    at com.tongweb.web.util.security.PrivilegedSetTccl.run(PrivilegedSetTccl.java:31)]
    at com.tongweb.web.util.security.PrivilegedSetTccl.run(PrivilegedSetTccl.java:21)]
    at java.security.AccessController.doPrivileged(Native Method)]
    at com.tongweb.web.util.threads.TaskThreadFactory.newThread(TaskThreadFactory.java:66)]
    at com.tongweb.web.util.threads.TWThreadPoolExecutor$Worker.<init>(TWThreadPoolExecutor.java:622)]
    at com.tongweb.web.util.threads.TWThreadPoolExecutor.addWorker(TWThreadPoolExecutor.java:950)]
    at com.tongweb.web.util.threads.TWThreadPoolExecutor.execute(TWThreadPoolExecutor.java:1406)]
    at com.tongweb.web.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:163)]
    at com.tongweb.web.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:141)]
    at sun.nio.ch.AsynchronousChannelGroupImpl.executeOnPooledThread(AsynchronousChannelGroupImpl.java:188)]
    at sun.nio.ch.Invoker.invokeIndirectly(Invoker.java:212)]
    at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishRead(UnixAsynchronousSocketChannelImpl.java:434)]
    at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:191)]
    at sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213)]
    at sun.nio.ch.EPollPort$EventHandlerTask.run(EPollPort.java:293)]
    at java.lang.Thread.run(Thread.java:748)]

  • 写回答

1条回答 默认 最新

  • 萝卜白菜。 2021-06-01 08:39
    关注

    当TongWeb7.0.4.3及之前版本  http通道为NIO2方式,且TongWeb增加了 -Djava.security.manager=com.tongweb.checkcode.CheckSystemExitSecurityManager参数,就会引发此问题。解决办法选其一:

    方式一. 将NIO2改为BIO模式。

    方式二:若确保没有System,exit代码,则去掉 -Djava.security.manager=com.tongweb.checkcode.CheckSystemExitSecurityManager参数

    方式三:升级到TongWeb7.0.4.3之后的版本。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 1月16日

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵