JFinal启动后修改代码就会报错是为什么

Loading changes ......

三月 22, 2019 2:17:32 下午 com.alibaba.druid.pool.DruidDataSource info

信息: {dataSource-1} closed

Exception in thread "HotSwapWatcher" java.lang.NoClassDefFoundError: controller/LoginController

at controller.DingDingConfig.configRoute(DingDingConfig.java:38)

at com.jfinal.core.Config.configJFinal(Config.java:54)

at com.jfinal.core.JFinal.init(JFinal.java:61)

at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:63)

at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:111)

at io.undertow.servlet.core.ManagedFilter.createFilter(ManagedFilter.java:80)

at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:589)

at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:554)

at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)

at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:596)

at com.jfinal.server.undertow.UndertowServer.configHttp(UndertowServer.java:277)

at com.jfinal.server.undertow.UndertowServer.doStart(UndertowServer.java:255)

at com.jfinal.server.undertow.UndertowServer.restart(UndertowServer.java:409)

at com.jfinal.server.undertow.hotswap.HotSwapWatcher.doRun(HotSwapWatcher.java:133)

at com.jfinal.server.undertow.hotswap.HotSwapWatcher.run(HotSwapWatcher.java:91)

Caused by: java.lang.ClassNotFoundException: controller.LoginController

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

at com.jfinal.server.undertow.hotswap.HotSwapClassLoader.loadClass(HotSwapClassLoader.java:106)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

... 16 more


评论区

jounzhang

2019-03-22 15:16

idea?老版本idea遇到过一样的问题,要么升级idea,要么关掉undertow的开发模式

123456798

2019-03-22 15:45

@jounzhang 只有这两种办法吗,我之前的都是好的,突然就这样了

123456798

2019-03-22 15:49

@jounzhang 那怎么关掉开发模式呢

jounzhang

2019-03-22 16:05

@123456798 undertow.txt中undertow.devMode=false,或者删掉这个配置,默认就是false

123456798

2019-03-22 16:12

@jounzhang 改了这个配置后,还是一样报错

JFinal

2019-03-22 17:12

java.lang.NoClassDefFoundError 是最基本的异常, google 搜索解决一下

热门反馈

扫码入社