org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource [spring/applicationContext-database.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/applicationContext-database.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [spring/applicationContext-database.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'int' for property 'maxPoolSize'; nested exception is java.lang.NumberFormatException: For input string: "${jdbc.maxPoolSize}"

GitHub | 0312birdzhang | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    始终没跑起来

    GitHub | 8 months ago | 0312birdzhang
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource [spring/applicationContext-database.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/applicationContext-database.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [spring/applicationContext-database.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'int' for property 'maxPoolSize'; nested exception is java.lang.NumberFormatException: For input string: "${jdbc.maxPoolSize}"
  2. 0

    NumberFormatException due to not loaded property source

    Stack Overflow | 1 month ago | hadilq
    java.lang.IllegalStateException: Failed to load ApplicationContext
  3. 0

    Spring+mybatis+maven整合过程加载配置文件jdbc.properties - Preserve - 博客频道 - CSDN.NET

    csdn.net | 2 years ago
    java.lang.IllegalStateException: Failed to load ApplicationContext
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.NumberFormatException if property "com.saggs.terracotta.nrplugin.nr.proxy.port" is left empty

    GitHub | 3 years ago | lanimall
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'metricReporter': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: int com.terracotta.nrplugin.rest.nr.MetricReporter.proxyPort; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'int'; nested exception is java.lang.NumberFormatException: For input string: ""
  6. 0

    How to integrate Spring Cloud Netflix to existing Spring MVC application

    Stack Overflow | 2 years ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: int org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration.nonSecurePort; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'int'; nested exception is java.lang.NumberFormatException: For input string: "${server.port:${SERVER_PORT:${PORT:8080}}}"

  1. Axelo 1 times, last 3 weeks ago
  2. Dunmer 8 times, last 4 weeks ago
  3. mauritius 2 times, last 4 months ago
  4. chenjunjun 2 times, last 5 months ago
  5. kid 16 times, last 9 months ago
15 more registered users
15 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NumberFormatException

    For input string: "${jdbc.maxPoolSize}"

    at java.lang.NumberFormatException.forInputString()
  2. Java RT
    Integer.valueOf
    1. java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    2. java.lang.Integer.parseInt(Integer.java:481)
    3. java.lang.Integer.valueOf(Integer.java:582)
    3 frames
  3. Spring Core
    NumberUtils.parseNumber
    1. org.springframework.util.NumberUtils.parseNumber(NumberUtils.java:155)
    1 frame
  4. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.propertyeditors.CustomNumberEditor.setAsText(CustomNumberEditor.java:115)
    2. org.springframework.beans.TypeConverterDelegate.doConvertTextValue(TypeConverterDelegate.java:455)
    3. org.springframework.beans.TypeConverterDelegate.doConvertValue(TypeConverterDelegate.java:427)
    4. org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:181)
    5. org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:448)
    6. org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:494)
    7. org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:488)
    8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1464)
    9. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1423)
    10. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1159)
    11. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    12. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    13. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    14. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    15. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    16. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    17. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
    18. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    19. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1418)
    20. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1159)
    21. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    22. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    23. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    24. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    25. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    26. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    27. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
    28. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    29. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1418)
    30. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1159)
    31. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    32. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    33. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    34. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    35. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    36. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
    36 frames
  5. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1121)
    2. org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:682)
    3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
    3 frames
  6. Spring
    ContextLoaderListener.contextInitialized
    1. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    3 frames
  7. Jetty
    WebAppContext.doStart
    1. org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:771)
    2. org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:411)
    3. org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:763)
    4. org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:247)
    5. org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1238)
    6. org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
    7. org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:480)
    7 frames
  8. Jetty :: Jetty Maven Plugin
    JettyWebAppContext.doStart
    1. org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:293)
    1 frame
  9. Jetty
    Server.doStart
    1. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    2. org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
    3. org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:172)
    4. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    5. org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
    6. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    7. org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
    8. org.eclipse.jetty.server.Server.doStart(Server.java:277)
    8 frames
  10. Jetty :: Jetty Maven Plugin
    JettyServer.doStart
    1. org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65)
    1 frame
  11. Jetty
    AbstractLifeCycle.start
    1. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    1 frame
  12. Jetty :: Jetty Maven Plugin
    JettyRunMojo.execute
    1. org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:511)
    2. org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:364)
    3. org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:516)
    3 frames
  13. Maven Plugin
    DefaultBuildPluginManager.executeMojo
    1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    1 frame
  14. Maven Core
    DefaultMaven.execute
    1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    6. org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    9. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    10. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    10 frames
  15. M3 Interceptor
    MavenCli.main
    1. org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    2. org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    3. org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    3 frames
  16. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  17. Plexus
    Launcher.main
    1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    4. org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    4 frames