NutzCN Logo
问答 多数据源注入失败 自动移除 无法正常运行程序
发布于 2435天前 作者 qq_c6c4ed69 7640 次浏览 复制 上一个帖子 下一个帖子
标签:

我配置了两个数据库(dao和daoYun),配置信息如下:
var ioc = {
conf : {
type : "org.nutz.ioc.impl.PropertiesProxy",
fields : {
paths : ["custom/","conf/"]
}
},
dataSource : {
factory : "$conf#make",
args : ["com.alibaba.druid.pool.DruidDataSource", "db.search."],
type : "com.alibaba.druid.pool.DruidDataSource",
events : {
create : "init",
depose : 'close'
}
},
dao : {
type : "org.nutz.dao.impl.NutDao",
args : [{refer:"dataSource"}],
fields : {
//executor : {refer: "cacheExecutor"},
//runner : {refer: "daoRunner"},
//interceptors : [{refer:"cacheExecutor"}, "log", "time"]
}
},

    dataSourceYun : {
        factory : "$conf#make",
        args : ["com.alibaba.druid.pool.DruidDataSource", "db.yun."],
        type : "com.alibaba.druid.pool.DruidDataSource",
        events : {
            create : "init",
            depose : 'close'
        }
    },
    daoYun : {
       type : "org.nutz.dao.impl.NutDao",
       args : [{refer:"dataSourceYun"}],
       fields : {
         //executor : {refer: "cacheExecutor"},
         //runner : {refer: "daoRunner"},
         //interceptors : [{refer:"cacheExecutor"}, "log", "time"]
       }
    }

};

错误代码如下:

ustom/db.search.properties]
18-04-23 19:26:45.627 DEBUG [localhost-startStop-1] load properties from File[/data/tomcat8089/webapps/cloudmanage/WEB-Icustom/db.yun.properties]
18-04-23 19:26:45.627 DEBUG [localhost-startStop-1] load properties from File[/data/tomcat8089/webapps/cloudmanage/WEB-Icustom/mail.properties]
18-04-23 19:26:45.627 DEBUG [localhost-startStop-1] load properties from File[/data/tomcat8089/webapps/cloudmanage/WEB-Icustom/cron.properties]
18-04-23 19:26:45.628 DEBUG [localhost-startStop-1] load properties from File[/data/tomcat8089/webapps/cloudmanage/WEB-Iconf/quartz.properties]
18-04-23 19:26:45.910 DEBUG [localhost-startStop-1] Remove object 'dataSource' from [app]
18-04-23 19:26:45.911 DEBUG [localhost-startStop-1] Remove object 'dao' from [app]
18-04-23 19:26:45.911 ERROR [localhost-startStop-1] Error happend during start serivce!
org.nutz.ioc.IocException: IocBean[dao -> dataSource] throw Exception when creating
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:75)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:146)
at com.kp.MainSetup.init(MainSetup.java:31)
at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:274)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4572)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1535)
at java.lang.ClassLoader.getClassLoadingLock(ClassLoader.java:463)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1152)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:559)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:697)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:18)
at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:72)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
... 28 more
18-04-23 19:26:45.913 ERROR [localhost-startStop-1] try to depose ioc
18-04-23 19:26:45.913 INFO [localhost-startStop-1] org.nutz.ioc.impl.NutIoc@1588303586 is closing. startup date [18-04-2590]
18-04-23 19:26:45.913 DEBUG [localhost-startStop-1] Depose object 'conf' ...
18-04-23 19:26:45.913 DEBUG [localhost-startStop-1] Depose object '$aop_async' ...
18-04-23 19:26:45.914 INFO [localhost-startStop-1] org.nutz.ioc.impl.NutIoc@1588303586 is deposed. startup date [18-04-2590]
23-Apr-2018 19:26:45.919 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or mofailed to start. Full details will be found in the appropriate container log file
23-Apr-2018 19:26:45.919 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [e] startup failed due to previous errors
19:26:45,924 |-INFO in ch.qos.logback.classic.servlet.LogbackServletContextListener@45ccd309 - About to stop ch.qos.logb.LoggerContext [default]
19:26:45,929 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_logback] - Worker thread will flush remaining events bng.
19:26:45,930 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_logback] - Queue flush finished successfully within ti
23-Apr-2018 19:26:45.934 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferenceeb application [cloudmanage] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister iweb application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
23-Apr-2018 19:26:45.935 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencee web application [cloudmanage] appears to have started a thread named [cluster-ClusterId{value='5addc2f5fc4c191366e7da8tion='null'}-172.16.205.55:27017] but has failed to stop it. This is very likely to create a memory leak. Stack trace of
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForSignalOrTimeout(DefaultServerMonitor.java:224)
com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForNext(DefaultServerMonitor.java:205)
com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:153)
java.lang.Thread.run(Thread.java:748)
23-Apr-2018 19:26:45.936 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencee web application [cloudmanage] appears to have started a thread named [pool-2-thread-1] but has failed to stop it. Thiskely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
23-Apr-2018 19:26:45.936 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencee web application [cloudmanage] appears to have started a thread named [cluster-ClusterId{value='5addc2f5fc4c191366e7da8tion='null'}-172.16.205.55:27017] but has failed to stop it. This is very likely to create a memory leak. Stack trace of
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForSignalOrTimeout(DefaultServerMonitor.java:224)
com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForNext(DefaultServerMonitor.java:205)
com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:153)
java.lang.Thread.run(Thread.java:748)
23-Apr-2018 19:26:45.937 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencee web application [cloudmanage] appears to have started a thread named [pool-3-thread-1] but has failed to stop it. Thiskely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
23-Apr-2018 19:26:45.937 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencee web application [cloudmanage] appears to have started a thread named [commons-pool-EvictionTimer] but has failed to st is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Timer.java:552)
java.util.TimerThread.run(Timer.java:505)
23-Apr-2018 19:26:45.946 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of webn archive /data/tomcat8089/webapps/cloudmanage.war has finished in 9,140 ms
23-Apr-2018 19:26:45.948 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-8089]
23-Apr-2018 19:26:45.953 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-8093]
23-Apr-2018 19:26:45.954 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 9195 ms
23-Apr-2018 19:26:55.375 INFO [cluster-ClusterId{value='5addc2f5fc4c191366e7da8e', description='null'}-172.16.205.55:270che.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance hased already. Could not load [ch.qos.logback.core.status.WarnStatus]. The following stack trace is thrown for debugging puell as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not loadgback.core.status.WarnStatus]. The following stack trace is thrown for debugging purposes as well as to attempt to termiread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at ch.qos.logback.classic.LoggerContext.noAppenderDefinedWarning(LoggerContext.java:186)
at ch.qos.logback.classic.Logger.callAppenders(Logger.java:264)
at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:421)
at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
at ch.qos.logback.classic.Logger.debug(Logger.java:482)
at com.mongodb.diagnostics.logging.SLF4JLogger.debug(SLF4JLogger.java:56)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonito
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:120)
at java.lang.Thread.run(Thread.java:748)

23-Apr-2018 19:26:55.377 INFO [cluster-ClusterId{value='5addc2f5fc4c191366e7da8e', description='null'}-172.16.205.55:270che.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance hased already. Could not load [ch.qos.logback.classic.spi.ThrowableProxy]. The following stack trace is thrown for debugginas well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not loadgback.classic.spi.ThrowableProxy]. The following stack trace is thrown for debugging purposes as well as to attempt to te thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at ch.qos.logback.classic.spi.LoggingEvent.(LoggingEvent.java:119)
at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
at ch.qos.logback.classic.Logger.info(Logger.java:595)
at com.mongodb.diagnostics.logging.SLF4JLogger.info(SLF4JLogger.java:76)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.logStateChange(DefaultServerMonitor.java:19
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:147)
at java.lang.Thread.run(Thread.java:748)

23-Apr-2018 19:26:55.377 INFO [cluster-ClusterId{value='5addc2f5fc4c191366e7da8e', description='null'}-172.16.205.55:270che.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance hased already. Could not load [com.mongodb.event.ConnectionClosedEvent]. The following stack trace is thrown for debugging well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not loaddb.event.ConnectionClosedEvent]. The following stack trace is thrown for debugging purposes as well as to attempt to terthread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at com.mongodb.connection.InternalStreamConnection.close(InternalStreamConnection.java:179)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:158)
at java.lang.Thread.run(Thread.java:748)

Exception in thread "cluster-ClusterId{value='5addc2f5fc4c191366e7da8e', description='null'}-172.16.205.55:27017" java.lDefFoundError: com/mongodb/event/ConnectionClosedEvent
at com.mongodb.connection.InternalStreamConnection.close(InternalStreamConnection.java:179)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:158)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: Illegal access: this web application instance has been stopped already. Cou [com.mongodb.event.ConnectionClosedEvent]. The following stack trace is thrown for debugging purposes as well as to attminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1295)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
... 3 more
Caused by: java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Coul[com.mongodb.event.ConnectionClosedEvent]. The following stack trace is thrown for debugging purposes as well as to atteinate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
... 5 more
是多数据源配置错误吗??? 求大佬解答

4 回复

看到 插入代码或日志 这个按钮没?

ustom/db.search.properties]
18-04-23 19:26:45.627 DEBUG [localhost-startStop-1] load properties from File[/data/tomcat8089/webapps/cloudmanage/WEB-Icustom/db.yun.properties]
18-04-23 19:26:45.627 DEBUG [localhost-startStop-1] load properties from File[/data/tomcat8089/webapps/cloudmanage/WEB-Icustom/mail.properties]
18-04-23 19:26:45.627 DEBUG [localhost-startStop-1] load properties from File[/data/tomcat8089/webapps/cloudmanage/WEB-Icustom/cron.properties]
18-04-23 19:26:45.628 DEBUG [localhost-startStop-1] load properties from File[/data/tomcat8089/webapps/cloudmanage/WEB-Iconf/quartz.properties]
18-04-23 19:26:45.910 DEBUG [localhost-startStop-1] Remove object 'dataSource' from [app]
18-04-23 19:26:45.911 DEBUG [localhost-startStop-1] Remove object 'dao' from [app]
18-04-23 19:26:45.911 ERROR [localhost-startStop-1] Error happend during start serivce!
org.nutz.ioc.IocException: IocBean[dao -> dataSource] throw Exception when creating
 at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
 at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
 at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
 at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:75)
 at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
 at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
 at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:146)
 at com.kp.MainSetup.init(MainSetup.java:31)
 at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:274)
 at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
 at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
 at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
 at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
 at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
 at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4572)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
 at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
 at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
 at java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1535)
 at java.lang.ClassLoader.getClassLoadingLock(ClassLoader.java:463)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1152)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
 at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:559)
 at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:697)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:18)
 at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:72)
 at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
 ... 28 more
18-04-23 19:26:45.913 ERROR [localhost-startStop-1] try to depose ioc
18-04-23 19:26:45.913 INFO [localhost-startStop-1] org.nutz.ioc.impl.NutIoc@1588303586 is closing. startup date [18-04-2590]
18-04-23 19:26:45.913 DEBUG [localhost-startStop-1] Depose object 'conf' ...
18-04-23 19:26:45.913 DEBUG [localhost-startStop-1] Depose object '$aop_async' ...
18-04-23 19:26:45.914 INFO [localhost-startStop-1] org.nutz.ioc.impl.NutIoc@1588303586 is deposed. startup date [18-04-2590]
23-Apr-2018 19:26:45.919 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or mofailed to start. Full details will be found in the appropriate container log file
23-Apr-2018 19:26:45.919 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [e] startup failed due to previous errors
19:26:45,924 |-INFO in ch.qos.logback.classic.servlet.LogbackServletContextListener@45ccd309 - About to stop ch.qos.logb.LoggerContext [default]
19:26:45,929 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_logback] - Worker thread will flush remaining events bng.
19:26:45,930 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_logback] - Queue flush finished successfully within ti
23-Apr-2018 19:26:45.934 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferenceeb application [cloudmanage] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister iweb application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
23-Apr-2018 19:26:45.935 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencee web application [cloudmanage] appears to have started a thread named [cluster-ClusterId{value='5addc2f5fc4c191366e7da8tion='null'}-172.16.205.55:27017] but has failed to stop it. This is very likely to create a memory leak. Stack trace of
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForSignalOrTimeout(DefaultServerMonitor.java:224)
 com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForNext(DefaultServerMonitor.java:205)
 com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:153)
 java.lang.Thread.run(Thread.java:748)
23-Apr-2018 19:26:45.936 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencee web application [cloudmanage] appears to have started a thread named [pool-2-thread-1] but has failed to stop it. Thiskely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)
23-Apr-2018 19:26:45.936 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencee web application [cloudmanage] appears to have started a thread named [cluster-ClusterId{value='5addc2f5fc4c191366e7da8tion='null'}-172.16.205.55:27017] but has failed to stop it. This is very likely to create a memory leak. Stack trace of
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForSignalOrTimeout(DefaultServerMonitor.java:224)
 com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForNext(DefaultServerMonitor.java:205)
 com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:153)
 java.lang.Thread.run(Thread.java:748)
23-Apr-2018 19:26:45.937 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencee web application [cloudmanage] appears to have started a thread named [pool-3-thread-1] but has failed to stop it. Thiskely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)
23-Apr-2018 19:26:45.937 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencee web application [cloudmanage] appears to have started a thread named [commons-pool-EvictionTimer] but has failed to st is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.util.TimerThread.mainLoop(Timer.java:552)
 java.util.TimerThread.run(Timer.java:505)
23-Apr-2018 19:26:45.946 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of webn archive /data/tomcat8089/webapps/cloudmanage.war has finished in 9,140 ms
23-Apr-2018 19:26:45.948 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-8089]
23-Apr-2018 19:26:45.953 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-8093]
23-Apr-2018 19:26:45.954 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 9195 ms
23-Apr-2018 19:26:55.375 INFO [cluster-ClusterId{value='5addc2f5fc4c191366e7da8e', description='null'}-172.16.205.55:270che.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance hased already. Could not load [ch.qos.logback.core.status.WarnStatus]. The following stack trace is thrown for debugging puell as to attempt to terminate the thread which caused the illegal access.
 java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not loadgback.core.status.WarnStatus]. The following stack trace is thrown for debugging purposes as well as to attempt to termiread which caused the illegal access.
 at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305
 at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
 at ch.qos.logback.classic.LoggerContext.noAppenderDefinedWarning(LoggerContext.java:186)
 at ch.qos.logback.classic.Logger.callAppenders(Logger.java:264)
 at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:421)
 at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
 at ch.qos.logback.classic.Logger.debug(Logger.java:482)
 at com.mongodb.diagnostics.logging.SLF4JLogger.debug(SLF4JLogger.java:56)
 at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonito
 at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:120)
 at java.lang.Thread.run(Thread.java:748)

23-Apr-2018 19:26:55.377 INFO [cluster-ClusterId{value='5addc2f5fc4c191366e7da8e', description='null'}-172.16.205.55:270che.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance hased already. Could not load [ch.qos.logback.classic.spi.ThrowableProxy]. The following stack trace is thrown for debugginas well as to attempt to terminate the thread which caused the illegal access.
 java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not loadgback.classic.spi.ThrowableProxy]. The following stack trace is thrown for debugging purposes as well as to attempt to te thread which caused the illegal access.
 at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305
 at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
 at ch.qos.logback.classic.spi.LoggingEvent.(LoggingEvent.java:119)
 at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
 at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
 at ch.qos.logback.classic.Logger.info(Logger.java:595)
 at com.mongodb.diagnostics.logging.SLF4JLogger.info(SLF4JLogger.java:76)
 at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.logStateChange(DefaultServerMonitor.java:19
 at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:147)
 at java.lang.Thread.run(Thread.java:748)

23-Apr-2018 19:26:55.377 INFO [cluster-ClusterId{value='5addc2f5fc4c191366e7da8e', description='null'}-172.16.205.55:270che.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance hased already. Could not load [com.mongodb.event.ConnectionClosedEvent]. The following stack trace is thrown for debugging well as to attempt to terminate the thread which caused the illegal access.
 java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not loaddb.event.ConnectionClosedEvent]. The following stack trace is thrown for debugging purposes as well as to attempt to terthread which caused the illegal access.
 at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305
 at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
 at com.mongodb.connection.InternalStreamConnection.close(InternalStreamConnection.java:179)
 at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:158)
 at java.lang.Thread.run(Thread.java:748)

Exception in thread "cluster-ClusterId{value='5addc2f5fc4c191366e7da8e', description='null'}-172.16.205.55:27017" java.lDefFoundError: com/mongodb/event/ConnectionClosedEvent
 at com.mongodb.connection.InternalStreamConnection.close(InternalStreamConnection.java:179)
 at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:158)
 at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: Illegal access: this web application instance has been stopped already. Cou [com.mongodb.event.ConnectionClosedEvent]. The following stack trace is thrown for debugging purposes as well as to attminate the thread which caused the illegal access.
 at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1295)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
 ... 3 more
Caused by: java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Coul[com.mongodb.event.ConnectionClosedEvent]. The following stack trace is thrown for debugging purposes as well as to atteinate the thread which caused the illegal access.
 at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305
 at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
 ... 5 more
var ioc = {
 conf : {
 type : "org.nutz.ioc.impl.PropertiesProxy",
 fields : {
 paths : ["custom/","conf/"]
 }
 },
 dataSource : {
 factory : "$conf#make",
 args : ["com.alibaba.druid.pool.DruidDataSource", "db.search."],
 type : "com.alibaba.druid.pool.DruidDataSource",
 events : {
 create : "init",
 depose : 'close'
 }
 },
 dao : {
 type : "org.nutz.dao.impl.NutDao",
 args : [{refer:"dataSource"}],
 fields : {
 //executor : {refer: "cacheExecutor"},
 //runner : {refer: "daoRunner"},
 //interceptors : [{refer:"cacheExecutor"}, "log", "time"]
 }
 },

    dataSourceYun : {
        factory : "$conf#make",
        args : ["com.alibaba.druid.pool.DruidDataSource", "db.yun."],
        type : "com.alibaba.druid.pool.DruidDataSource",
        events : {
            create : "init",
            depose : 'close'
        }
    },
    daoYun : {
       type : "org.nutz.dao.impl.NutDao",
       args : [{refer:"dataSourceYun"}],
       fields : {
         //executor : {refer: "cacheExecutor"},
         //runner : {refer: "daoRunner"},
         //interceptors : [{refer:"cacheExecutor"}, "log", "time"]
       }
    }
};

db.yun.properties里面的配置项,前缀是db还是db.yun?

不要跟原本的前缀一样,改成dbyun.之类的前缀

ps一句,文件名不会自动变成前缀.

添加回复
请先登陆
回到顶部