精华内容
下载资源
问答
  • 重启Tomcat时或(tomcat服务开启,重新部署项目时),出现如下异常:信息: Illegal access: this web application instance has been stopped already. Could not load java.net.BindException. The eventual ...

    重启Tomcat时或(tomcat服务开启,重新部署项目时),出现如下异常:

    信息: Illegal access: this web application instance has been stopped already.  Could not load java.net.BindException.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    java.lang.IllegalStateException
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1272)
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
     at com.mysql.jdbc.CommunicationsException.<init>(CommunicationsException.java:161)
     at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2759)
     at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1410)
     at com.mysql.jdbc.Connection.realClose(Connection.java:4947)
     at com.mysql.jdbc.Connection.cleanup(Connection.java:2063)
     at com.mysql.jdbc.Connection.finalize(Connection.java:3403)
     at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
     at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
     at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
     at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

    原因是:tomcat重新装载web应用程序失败导致的。当应用程序卸载时,并不会关闭所有的线程。当tomcat已经关闭了其类加载器后,一些线程依然会继续运行,这样就导致出错。不过这个不影响正常使用,不管影响不影响,看到异常信息就不顺眼。

    解决方案:修改tomcat目录下的context.xml,找到<Context>标签,设置reloadble的属性值为"false",即<Context reloadable="false">。


    参考:https://blog.csdn.net/etjnety/article/details/7782965

    展开全文
  • Tomcat 启动程序时出现:严重: The web application [/codeMarket] registered the JBDC driver [com.mysql.jdbc.Driver] butfailed to unregister it when the web application was stopped. To prevent a memory ...

    Tomcat 启动程序时出现:严重: The web application [/codeMarket] registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

    网上查找了很久,但是我程序原先运行是没问题的。只是增加了一个功能之后出现了这个警告,并且程序无法访问,出现404的错误。后面仔细检查mybatis-conf.xml配置文件,发现是有一个Model没有注册,注册完Model之后,程序正常运行

    展开全文
  • tomcat启动出现异常 org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [pmm] registered the JDBC driver [com.mysql.cj.jdbc.Driver] but failed to unregister it when...

    tomcat启动出现异常

    org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [pmm] registered the JDBC driver [com.mysql.cj.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    

    新增如下类即可

    
    import lombok.extern.slf4j.Slf4j;
    
    import javax.servlet.ServletContextEvent;
    import javax.servlet.ServletContextListener;
    import javax.servlet.annotation.WebListener;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.util.Enumeration;
    
    /**
     * @author liyongfei
     */
    @WebListener
    @Slf4j
    public class JdbcUnregisterListener implements ServletContextListener {
        @Override
        public void contextDestroyed(ServletContextEvent sce) {
            try {
                log.info("Calling MySQL AbandonedConnectionCleanupThread checkedShutdown");
                // Or com.mysql.jdbc.AbandonedConnectionCleanupThread
                Class cls = Class.forName("com.mysql.cj.jdbc.AbandonedConnectionCleanupThread");
                Method method = cls.getMethod("checkedShutdown");
                method.invoke(null);
            } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
                log.error("Cannot call MySQL AbandonedConnectionCleanupThread.checkedShutdown!", e);
            }
    
            // Now deregister JDBC drivers in this context's ClassLoader:
            // Get the webapp's ClassLoader
            ClassLoader cl = Thread.currentThread().getContextClassLoader();
            // Loop through all drivers
            Enumeration<Driver> drivers = DriverManager.getDrivers();
            while (drivers.hasMoreElements()) {
                Driver driver = drivers.nextElement();
                if (driver.getClass().getClassLoader() == cl) {
                    // This driver was registered by the webapp's ClassLoader, so deregister it:
                    try {
                        log.info("Deregistering JDBC driver {}", driver);
                        DriverManager.deregisterDriver(driver);
                    } catch (SQLException ex) {
                        log.error("Error deregistering JDBC driver {}", driver, ex);
                    }
                } else {
                    // driver was not registered by the webapp's ClassLoader and may be in use elsewhere
                    log.trace("Not deregistering JDBC driver {} as it does not belong to this webapp's ClassLoader", driver);
                }
            }
        }
    }
    
    展开全文
  • 23-Mar-2021 22:24:20.199 璀﹀憡 [RMI TCP Connection(11)-127.0.0.1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [4.0]. Default version will be used. 23-Mar-2021 22:24...
  • 异常如下图所示(有时会出现同一tomcat多个进程现象): 原因是因为在tomcat重启的时候,之前的tomcat的线程还没有完全关闭,最新启动tomcat就会报这个异常,只要把tomcat的server.xml 中的reloadable=”true” ...

    背景:未停止Tomcat服务时,直接更新服务器上面项目。

    使用命令bin/shutdown.sh停止又重启。

    异常如下图所示(有时会出现同一tomcat多个进程现象):

    这里写图片描述


    原因是因为在tomcat重启的时候,之前的tomcat的线程还没有完全关闭,最新启动tomcat就会报这个异常,只要把tomcat的server.xml 中的reloadable=”true” 改成false就OK

    解决方案:

    修改tomcat conf目录下的context.xml,找到<Context>标签,
    把reloadble的属性值设为:reloadable="false",即<Context reloadable="false">。

    这里写图片描述

    另外,在停止Tomcat时,一定要再检查tomcat进程是否完全停掉再重启!

    展开全文
  • SEVERE: The required Server component failed to start so Tomcat is unable to start. org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]] at org.apache.catalina....
  • SEVERE: The web application [] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, t...
  • 重启Tomcat时或(tomcat服务开启,重新部署项目时),出现如下异常: 信息: Illegal access: this web application instance has been stopped already. Could not load java.net.BindException. The eventual ...
  • 出现情况1 启动tomcat的时候,默认会启动这个“/tomcat/webapps/ROOT”路径下的tomcat自带的程序包,当启动这个路径下的程序包后,如果tomcat扫描到还有其他的程序包,就会标题中的错误,为了避免这种情况,处理...
  • 最近部署项目到购买的jsp虚拟主机上,使用mysql数据库连接池出现错误提示,导致tomcat7启动不了,首先是百度了几个,用下面这个博主的方法解决了问题。首先我的数据库配置是没问题的,本地eclipse可以正常连接的,...
  • ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])]) but failed to remove it when the web application was stopped. Threads are going ...
  • but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 11-Nov-2017 08:52:40.364 警告 [ContainerBackgroundProcessor...
  • 警告: The web application [wljx] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been...
  • Illegal access: this web application instance has been stopped already. Could not load java.net.BindException. The eventual following stack trace is caused by an error thrown for debugging pur...
  • 使用Hudson做CI,进行自动部署时,出现如下异常:   The web application [/XXX] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To ...
  • **错误信息是在Server startup后立马就出现的**,还没来得及访问index.jsp呢!求指点,谢谢。 web.xml存放在WEB-INF文件夹下 ![图片说明](https://img-ask.csdn.net/upload/201907/20/1563607667_370819.png) ...
  • 大致就是80端口被占用的问题,然后你就立即看了一下tomcat,之前布上去的项目已经被删掉了,而且tomcat也显示stopped, 然后就机制地在任务管理器(Task Manager)上关掉了eclipse,然后重新启动,发现还是会出现...
  • 严重: The web application [/marketservice] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the ...
  • tomcat 项目部署问题

    2014-09-15 17:42:00
    我本地Tomcat版本:...之前项目运行正常,在我更新了一些模块后,重新部署(导出WAR包)出现问题,但是在我本机上测试没有问题,服务端提示错误如下: The following web applications were stopped (reloaded...
  • 06-Nov-2018 09:13:17.652 INFO [Timer-1] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not ...
  • Eclipse里调出Tomcat server视图

    万次阅读 2017-09-09 11:06:33
    设置之后,在eclipse右下方区域就出现了Servers视图 新建一个Tomcat Server 点击Finish之后就建好了一个Server 这个时候还是Stopped的状态。修改Tomcat Server配置为了部署webapp在这个Server上运行,还需要做...
  • Dynamic Web Project出现 第二步新建包 第三步新建类 第四步在WebContent文件中new->HTML File 第五步 第六步 第七步选择合适的tomcat版本 第八步将左侧新建的类add右侧中 第九步start ...
  • 最近tomcat过一段时间发生memory leak,在tomcat管理界面上点击find leak出现如下信息 The following web applications were stopped (reloaded, undeployed), but their classes from previous runs are still ...
  • 当我们使用xampp的时候,启动tomcat...下面说一下遇到的问题,使用xampp启动tomcat的时候出现如下错误:17:07:17 [Tomcat] Attempting to start Tomcat app… 17:07:18 [TomcatTomcat Started/Stopped with...
  • 当你项目使用mybaits+tomcat,并且在启动tomcat时一直出现以下信息,无法正常运行项目时: 信息: Illegal access: this web application instance has been stopped already. Could not load . The eventual ...
  • javaweb开发中,Tomcat7,项目运行过程中,出现下面的错误 报错 控制台报错内容如下 信息: Illegal access: this web application instance has been stopped already. Could not load ...
  • ... 处理Socket。 ...stopped) { ...stopped) ...stopped) {osing server socket");...2.问题:我理解:明明在run()方法中,每个socket请求都会对应从...源码贴不上来,有需要可以邮件发送该tomcat对应完整源码

空空如也

空空如也

1 2 3
收藏数 52
精华内容 20
关键字:

tomcat出现stopped