NutzCN Logo
问答 nutz demo配置多源数据库,mysql配置成功,oracle配置报错
发布于 2407天前 作者 qq_635e6509 1506 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

这是部分db,

db_oracle_des.url=jdbc:oracle:thin:@//127.0.0.1:1521/orcl
db_oracle_des.username=space
db_oracle_des.password=space
db_oracle_des.validationQuery=select 1 from dual

这是完整dao

var ioc = {
		conf : {
			type : "org.nutz.ioc.impl.PropertiesProxy",
			fields : {
				paths : ["config/custom/"]
			}
		},
	    dataSource : {
			factory : "$conf#make",
			args : ["com.alibaba.druid.pool.DruidDataSource", "db."],
	        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"}
			}
		},
		
		
        dataSource2 : {
        factory : "$conf#make",
        args : ["com.alibaba.druid.pool.DruidDataSource", "db_safe_src."],
            type : "com.alibaba.druid.pool.DruidDataSource",
            events : {
              create : "init",
                depose : 'close'
            }
        },
        dao_safe_src : {
          type : "org.nutz.dao.impl.NutDao",
          args : [{refer:"dataSource2"}]
        },
        
        dataSource3 : {
        factory : "$conf#make",
        args : ["com.alibaba.druid.pool.DruidDataSource", "db_oracle_des."],
            type : "com.alibaba.druid.pool.DruidDataSource",
            events : {
              create : "init",
                depose : 'close'
            }
        },
        dao_oracle_des : {
          type : "org.nutz.dao.impl.NutDao",
          args : [{refer:"dataSource3"}]
        },
        
        
		cacheExecutor : {
			type : "org.nutz.plugins.cache.dao.CachedNutDaoExecutor",
			fields : {
				cacheProvider : {refer:"cacheProvider"},
				cachedTableNames : ["sys_user", "sys_role", "sys_menu"]
			}
		},
		/*
		// 基于内存的简单LRU实现
		cacheProvider : {
			type : "org.nutz.plugins.cache.dao.impl.provider.MemoryDaoCacheProvider",
			fields : {
				cacheSize : 10000 // 缓存的对象数
			},
			events : {
				create : "init"
			}
		}
		*/
		// 基于Ehcache的DaoCacheProvider
		cacheProvider : {
			type : "org.nutz.plugins.cache.dao.impl.provider.EhcacheDaoCacheProvider",
			fields : {
				cacheManager : {refer:"cacheManager"} // 引用ehcache.json中定义的CacheManager
			},
			events : {
				create : "init"
			}
		}
};

我在项目里写一个Job,调用oracle的实体类:
package cn.wizzer.app.web.commons.quartz.job;

import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import cn.wizzer.app.sys.modules.models.Sys_task;
import cn.wizzer.dataDes.modules.services.AccidentdetailDesService;
import cn.wizzer.dataSrc.modules.services.AccidentdetailSrcService;

@IocBean
public class HelloJob implements Job {

private static final Log log = Logs.get();
@Inject
protected Dao dao;

@Inject
private AccidentdetailDesService accidentdetailDesService;

public void execute(JobExecutionContext context) throws JobExecutionException {
    JobDataMap data = context.getJobDetail().getJobDataMap();

    String taskId = context.getJobDetail().getKey().getName();
    System.out.println("测试定时任务---------查询accident数据量");

    int testDes = accidentdetailDesService.count();
    System.err.println("--------------------des得到总数:" + testDes);

    dao.update(Sys_task.class, Chain.make("exeAt", (int) (System.currentTimeMillis() / 1000)).add("exeResult", "执行成功"), Cnd.where("id", "=", taskId));
}

}




下面是报错信息:

[DEBUG] 2018-04-13 18:01:30,084 org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:107) - Lock 'TRIGGER_ACCESS' is desired by: defaultScheduler_Worker-2
[DEBUG] 2018-04-13 18:01:30,087 org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:92) - Lock 'TRIGGER_ACCESS' is being obtained: defaultScheduler_Worker-2
[DEBUG] 2018-04-13 18:01:30,089 org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:116) - Lock 'TRIGGER_ACCESS' given to: defaultScheduler_Worker-2
[DEBUG] 2018-04-13 18:01:30,140 org.quartz.impl.jdbcjobstore.DBSemaphore.releaseLock(DBSemaphore.java:141) - Lock 'TRIGGER_ACCESS' returned by: defaultScheduler_Worker-2
[DEBUG] 2018-04-13 18:01:33,662 org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3877) - ClusterManager: Check-in complete.
[DEBUG] 2018-04-13 18:01:40,001 org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:107) - Lock 'TRIGGER_ACCESS' is desired by: defaultScheduler_QuartzSchedulerThread
[DEBUG] 2018-04-13 18:01:40,002 org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:92) - Lock 'TRIGGER_ACCESS' is being obtained: defaultScheduler_QuartzSchedulerThread
[DEBUG] 2018-04-13 18:01:40,002 org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:116) - Lock 'TRIGGER_ACCESS' given to: defaultScheduler_QuartzSchedulerThread
[DEBUG] 2018-04-13 18:01:40,118 org.quartz.impl.jdbcjobstore.DBSemaphore.releaseLock(DBSemaphore.java:141) - Lock 'TRIGGER_ACCESS' returned by: defaultScheduler_QuartzSchedulerThread
[DEBUG] 2018-04-13 18:01:40,119 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:165) - Get 'helloJob'<class cn.wizzer.app.web.commons.quartz.job.HelloJob>
[DEBUG] 2018-04-13 18:01:40,119 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:191) - >> Load definition name=helloJob
[DEBUG] 2018-04-13 18:01:40,119 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(helloJob) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,119 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:222) - >> Make...'helloJob'<class cn.wizzer.app.web.commons.quartz.job.HelloJob>
[DEBUG] 2018-04-13 18:01:40,119 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object 'helloJob' to [app] [DEBUG] 2018-04-13 18:01:40,119 cn.wizzer.app.web.commons.plugin.PluginAopConfigure.getInterceptorPairList(PluginAopConfigure.java:33) - skip -- cn.wizzer.app.web.commons.quartz.job.HelloJob
[DEBUG] 2018-04-13 18:01:40,120 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:76) - Load class cn.wizzer.app.web.commons.quartz.job.HelloJob without AOP
[DEBUG] 2018-04-13 18:01:40,120 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:165) - Get 'dao'<interface org.nutz.dao.Dao>
[DEBUG] 2018-04-13 18:01:40,120 org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:64) - name=AccidentdetailDesService not found, search for type=cn.wizzer.dataDes.modules.services.AccidentdetailDesService
[DEBUG] 2018-04-13 18:01:40,120 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(videoUpload) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,120 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(dao_safe_src) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,120 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(conf) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,121 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(uploadVideoContext) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,121 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(imageUpload) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,121 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(fileUpload) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,121 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(cacheManager) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,121 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(dao) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,121 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(cacheProvider) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,121 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(emailAuthenticator) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,121 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(uploadFileContext) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,121 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(htmlEmail) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,122 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(cacheExecutor) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,122 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(tmpFilePool) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,122 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(uploadImageContext) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,122 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(dataSource) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,122 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(dataSource3) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,122 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(dataSource2) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,122 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(dao_oracle_des) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,122 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxTplListController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,122 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(uploadController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,122 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxReplyTxtServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,122 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(sysDictController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,122 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxMassSendServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,123 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(rSAUtil) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,123 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxReplyNewsServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,123 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(sysLoginController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,123 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxTplLogServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,123 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(dateUtil) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,123 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(sysUserServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,123 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxConfigController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,123 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(stringUtil) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,123 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(sysRoleServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,123 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(qrcodeService) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,123 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(sysRouteController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,124 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(idcardUtil) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,125 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxTplListServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,125 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(tplService) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,125 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(sysPluginServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,125 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxUserServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,125 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(cmsController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,125 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(cmsChannelServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,126 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(cmsArticleController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,126 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxMenuController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,126 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(nutShiroMethodInterceptor) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,126 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(dynamicInterceptor) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,126 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(weixinController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,126 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(sysLogController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,126 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxMassController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,126 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(emailService) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,126 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(code128Util) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,127 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxMsgReplyServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,127 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxMenuServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,127 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxReplyNewsController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,127 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(cmsLinkClassServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,127 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(sysRouteServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,127 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(sysHomeController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,127 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(cmsLinkClassController) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxMassNewsServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(wxMassServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(cmsArticleServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(accidentdetailSrcServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(sysMenuServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(accidentdetailDesServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:165) - Get 'accidentdetailDesServiceImpl'<interface cn.wizzer.dataDes.modules.services.AccidentdetailDesService>
[DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:191) - >> Load definition name=accidentdetailDesServiceImpl
[DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(accidentdetailDesServiceImpl) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:222) - >> Make...'accidentdetailDesServiceImpl'<interface cn.wizzer.dataDes.modules.services.AccidentdetailDesService>
[DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object 'accidentdetailDesServiceImpl' to [app] [DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:165) - Get 'dao_oracle_des'<>
[DEBUG] 2018-04-13 18:01:40,128 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:191) - >> Load definition name=dao_oracle_des
[DEBUG] 2018-04-13 18:01:40,129 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(dao_oracle_des) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,129 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:222) - >> Make...'dao_oracle_des'<>
[DEBUG] 2018-04-13 18:01:40,129 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object 'dao_oracle_des' to [app] [DEBUG] 2018-04-13 18:01:40,129 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:165) - Get 'dataSource3'<>
[DEBUG] 2018-04-13 18:01:40,129 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:191) - >> Load definition name=dataSource3
[DEBUG] 2018-04-13 18:01:40,129 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(dataSource3) in JsonLoader(paths=[config/ioc/])
[DEBUG] 2018-04-13 18:01:40,129 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:222) - >> Make...'dataSource3'<>
[DEBUG] 2018-04-13 18:01:40,130 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object 'dataSource3' to [app] [DEBUG] 2018-04-13 18:01:40,130 cn.wizzer.app.web.commons.plugin.PluginAopConfigure.getInterceptorPairList(PluginAopConfigure.java:33) - skip -- com.alibaba.druid.pool.DruidDataSource
[DEBUG] 2018-04-13 18:01:40,130 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:76) - Load class com.alibaba.druid.pool.DruidDataSource without AOP
[DEBUG] 2018-04-13 18:01:40,130 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:165) - Get 'conf'<>
[ERROR] 2018-04-13 18:01:40,139 com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:776) - {dataSource-4} init error
java.sql.SQLException: oracle.jdbc.OracleDriver
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:570)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:697)
at com.alibaba.druid.pool.DruidDataSource$FM$init$62febe830a4a6764c634d9e263964cee.invoke(DruidDataSource.java)
at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:180)
at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:89)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:240)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:64)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:240)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:64)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:240)
at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:456)
at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:66)
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:240)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:270)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:160)
at org.nutz.integration.quartz.NutQuartzJobFactory.newJob(NutQuartzJobFactory.java:27)
at org.quartz.core.JobRunShell.initialize(JobRunShell.java:127)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:375)
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:568)
... 23 more
[DEBUG] 2018-04-13 18:01:40,140 org.nutz.ioc.impl.ScopeContext.remove(ScopeContext.java:84) - Remove object 'dataSource3' from [app] [DEBUG] 2018-04-13 18:01:40,140 org.nutz.ioc.impl.ScopeContext.remove(ScopeContext.java:84) - Remove object 'dao_oracle_des' from [app] [DEBUG] 2018-04-13 18:01:40,140 org.nutz.ioc.impl.ScopeContext.remove(ScopeContext.java:84) - Remove object 'accidentdetailDesServiceImpl' from [app] [DEBUG] 2018-04-13 18:01:40,140 org.nutz.ioc.impl.ScopeContext.remove(ScopeContext.java:84) - Remove object 'helloJob' from [app] [WARN ] 2018-04-13 18:01:40,140 org.nutz.integration.quartz.NutQuartzJobFactory.newJob(NutQuartzJobFactory.java:30) - Not ioc bean? fallback to SimpleJobFactory
org.nutz.ioc.IocException: IocBean[helloJob] throw Exception when creating
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:240)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:270)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:160)
at org.nutz.integration.quartz.NutQuartzJobFactory.newJob(NutQuartzJobFactory.java:27)
at org.quartz.core.JobRunShell.initialize(JobRunShell.java:127)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:375)
Caused by: java.lang.RuntimeException: IocBean[helloJob] fail at field=[AccidentdetailDesService]
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
... 6 more
Caused by: org.nutz.ioc.IocException: IocBean[accidentdetailDesServiceImpl -> dao_oracle_des -> dataSource3] throw Exception when creating
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:240)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:64)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:240)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:64)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:240)
at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:456)
at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:66)
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
... 8 more
Caused by: java.lang.RuntimeException: java.sql.SQLException: oracle.jdbc.OracleDriver
at org.nutz.lang.Lang.wrapThrow(Lang.java:185)
at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:182)
at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:89)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
... 18 more
Caused by: java.sql.SQLException: oracle.jdbc.OracleDriver
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:570)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:697)
at com.alibaba.druid.pool.DruidDataSource$FM$init$62febe830a4a6764c634d9e263964cee.invoke(DruidDataSource.java)
at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:180)
... 20 more
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:568)
... 23 more
[DEBUG] 2018-04-13 18:01:40,140 org.quartz.simpl.SimpleJobFactory.newJob(SimpleJobFactory.java:51) - Producing instance of Job 'eb681e3f4af5462381967aa482ecae53.eb681e3f4af5462381967aa482ecae53', class=cn.wizzer.app.web.commons.quartz.job.HelloJob
[INFO ] 2018-04-13 18:01:40,142 org.quartz.plugins.history.LoggingJobHistoryPlugin.jobToBeExecuted(LoggingJobHistoryPlugin.java:469) - Job eb681e3f4af5462381967aa482ecae53.eb681e3f4af5462381967aa482ecae53 fired (by trigger eb681e3f4af5462381967aa482ecae53.eb681e3f4af5462381967aa482ecae53) at: 18:01:40 04/13/2018
[DEBUG] 2018-04-13 18:01:40,142 org.quartz.core.JobRunShell.run(JobRunShell.java:201) - Calling execute on job eb681e3f4af5462381967aa482ecae53.eb681e3f4af5462381967aa482ecae53
测试定时任务---------查询accident数据量
[ERROR] 2018-04-13 18:01:40,142 org.quartz.core.JobRunShell.run(JobRunShell.java:211) - Job eb681e3f4af5462381967aa482ecae53.eb681e3f4af5462381967aa482ecae53 threw an unhandled Exception:
java.lang.NullPointerException
at cn.wizzer.app.web.commons.quartz.job.HelloJob.execute(HelloJob.java:44)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
[ERROR] 2018-04-13 18:01:40,142 org.quartz.core.ErrorLogger.schedulerError(QuartzScheduler.java:2425) - Job (eb681e3f4af5462381967aa482ecae53.eb681e3f4af5462381967aa482ecae53 threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: java.lang.NullPointerException
at cn.wizzer.app.web.commons.quartz.job.HelloJob.execute(HelloJob.java:44)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
... 1 more
[WARN ] 2018-04-13 18:01:40,148 org.quartz.plugins.history.LoggingJobHistoryPlugin.jobWasExecuted(LoggingJobHistoryPlugin.java:497) - Job eb681e3f4af5462381967aa482ecae53.eb681e3f4af5462381967aa482ecae53 execution failed at 18:01:40 04/13/2018 and reports: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
org.quartz.JobExecutionException: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException] [See nested exception: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]]
at org.quartz.core.JobRunShell.run(JobRunShell.java:218)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
... 1 more
Caused by: java.lang.NullPointerException
at cn.wizzer.app.web.commons.quartz.job.HelloJob.execute(HelloJob.java:44)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
... 1 more

```

ojdbc6已经放到Maven Dependencies里;

2 回复
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver

明显没找到驱动包

试试class12.jar

谢谢,我的ojdbc6配置不正确,刚刚解决了

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