Could not resolve placeholder ' jdbc.driverclassname ' in string value ' ${jdbc.driverclassname}

Source: Internet
Author: User

Org.springframework.beans.factory.BeanDefinitionStoreException:Invalid Bean definition with name ' DataSource ' defined in file [D:\Workspaces\MyEclipse 10\springjdbc2\bin\applicationcontext.xml]: Could not resolve placeholder ' Jdbc.driverclassname ' in string value ' ${jdbc.driverclassname} '
At Org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties ( placeholderconfigurersupport.java:209)
At Org.springframework.context.support.PropertySourcesPlaceholderConfigurer.processProperties ( propertysourcesplaceholderconfigurer.java:174)
At Org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory ( propertysourcesplaceholderconfigurer.java:151)
At Org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors ( abstractapplicationcontext.java:694)
At Org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors ( abstractapplicationcontext.java:669)
At Org.springframework.context.support.AbstractApplicationContext.refresh (abstractapplicationcontext.java:461)
At Org.springframework.context.support.classpathxmlapplicationcontext.<init> ( classpathxmlapplicationcontext.java:139)
At Org.springframework.context.support.classpathxmlapplicationcontext.<init> ( CLASSPATHXMLAPPLICATIONCONTEXT.JAVA:83)
At Www.csdn.springjdbc.dao.DeptTest.test (depttest.java:14)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25)
At Java.lang.reflect.Method.invoke (method.java:597)
At Org.junit.runners.model.frameworkmethod$1.runreflectivecall (frameworkmethod.java:44)
At Org.junit.internal.runners.model.ReflectiveCallable.run (reflectivecallable.java:15)
At org.junit.runners.model.FrameworkMethod.invokeExplosively (frameworkmethod.java:41)
At Org.junit.internal.runners.statements.InvokeMethod.evaluate (invokemethod.java:20)
At Org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored (blockjunit4classrunner.java:79)
At Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:71)
At Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:49)
At Org.junit.runners.parentrunner$3.run (parentrunner.java:193)
At Org.junit.runners.parentrunner$1.schedule (parentrunner.java:52)
At Org.junit.runners.ParentRunner.runChildren (parentrunner.java:191)
At org.junit.runners.parentrunner.access$000 (parentrunner.java:42)
At Org.junit.runners.parentrunner$2.evaluate (parentrunner.java:184)
At Org.junit.runners.ParentRunner.run (parentrunner.java:236)
At Org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run (junit4testreference.java:50)
At Org.eclipse.jdt.internal.junit.runner.TestExecution.run (testexecution.java:38)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:467)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:683)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (remotetestrunner.java:390)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (remotetestrunner.java:197)

The simple error is that the name in your jdbc.properties is wrong, and the reference to ApplicationContext is inconsistent.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.