开发者社区> 问答> 正文

Druid集成mybatis没报错!?报错

配置上阿里巴巴的druid pool后,一直发布不起来,报错详细信息如下:

[MediaCircle] INFO [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext(273) | Root WebApplicationContext: initialization started
[MediaCircle] INFO [localhost-startStop-1] org.springframework.context.support.AbstractApplicationContext.prepareRefresh(510) | Refreshing Root WebApplicationContext: startup date [Fri Sep 26 10:25:17 CST 2014]; root of context hierarchy
[MediaCircle] INFO [localhost-startStop-1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(315) | Loading XML bean definitions from class path resource [applicationContext.xml]
[MediaCircle] INFO [localhost-startStop-1] org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.registerDefaultFilters(231) | JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
[MediaCircle] INFO [localhost-startStop-1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(315) | Loading XML bean definitions from URL [file:/E:/MyWorkspaces/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cn.biznest.webMediaCircle/WEB-INF/classes/spring-druid.xml]
[MediaCircle] INFO [localhost-startStop-1] org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(172) | Loading properties file from URL [file:/E:/MyWorkspaces/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cn.biznest.webMediaCircle/WEB-INF/classes/init.properties]
[MediaCircle] INFO [localhost-startStop-1] org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(596) | Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5561bdc8: defining beans [adIssueServiceImpl,testCaseService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.mybatis.spring.mapper.MapperScannerConfigurer#0,org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,sqlSessionFactory,sqlSession,org.springframework.aop.config.internalAutoProxyCreator,transactionManager,transactionAdvice,txPointcut,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,druid-stat-interceptor,druid-stat-pointcut,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,adIssueMapper,baseMapper,contractMapper,mediumMapper,mediaDeviceDeployMapper,mediaEstateMapper,mediaLedDividMapper,mediaPrintscreenMapper,mediaResourcePlanMapper,projectMapper,schemeMapper,sysLogMapper,sysParSettingMapper,templateMapper,uploadFilesMapper,testCaseMapper]; root of factory hierarchy
[MediaCircle] INFO [localhost-startStop-1] com.alibaba.druid.pool.DruidDataSource.init(633) | {dataSource-1} inited



经过定位错误,问题已找到,是由于mybatis对象xmlSQL中的输入参数有错误,如下图

这个包名是我乱填写的!

注意:正常运行的时候,log4j能把SQL日志正常打印!

问题:为什么mybatis报错了,使用该链接池没有把错误抛出来?

展开
收起
爱吃鱼的程序员 2020-06-14 21:30:45 585 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    话说,我没看到啥错误信息,不都是INFO吗?<aclass='referer'target='_blank'>@雪兔,INFO后,一直卡住,没有错误信息,不久TOMCAT就挂了

    卡在最后一行

    [MediaCircle]INFO[localhost-startStop-1]com.alibaba.druid.pool.DruidDataSource.init(633)|{dataSource-1}inited

    2020-06-14 21:31:03
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
阿里邮箱—安全高效集成 立即下载
集成智能接入网关APP:优化企业级移动办公网络 立即下载
云效助力企业集成安全到DevOps中 立即下载