Results 1 to 3 of 3
  1. #1
    JavaDreamer is offline Member
    Join Date
    Nov 2013
    Posts
    2
    Rep Power
    0

    Default My Jdbc Dao Implementation.....doesn't run....

    I get the following error when i try to run my jdbc dao implementation for connecting to my derby database...also, i have a problem with my Prepared SQL statement that java sql cannot resolve to derby's result set......here's my runtime error....

    Nov 17, 2013 12:29:24 PM org.springframework.context.support.ClassPathXmlAp plicationContext prepareRefresh
    INFO: Refreshing org.springframework.context.support.ClassPathXmlAp plicationContext@7b342572: startup date [Sun Nov 17 12:29:24 EST 2013]; root of context hierarchy
    Nov 17, 2013 12:29:24 PM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
    INFO: Loading XML bean definitions from class path resource [spring.xml]
    Nov 17, 2013 12:29:25 PM org.springframework.beans.factory.config.PropertyP laceholderConfigurer loadProperties
    INFO: Loading properties file from class path resource [jdbc.properties]
    Nov 17, 2013 12:29:25 PM org.springframework.beans.factory.support.DefaultL istableBeanFactory destroySingletons
    INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@c0e7403: defining beans [org.springframework.context.annotation.internalCon figurationAnnotationProcessor,org.springframework. context.annotation.internalAutowiredAnnotationProc essor,org.springframework.context.annotation.inter nalRequiredAnnotationProcessor,org.springframework .context.annotation.internalCommonAnnotationProces sor,jdbcDaoImpl,org.springframework.beans.factory. config.PropertyPlaceholderConfigurer#0,dataSource]; root of factory hierarchy
    Exception in thread "main" org.springframework.beans.factory.BeanInitializati onException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [jdbc.properties] cannot be opened because it does not exist
    at org.springframework.beans.factory.config.PropertyR esourceConfigurer.postProcessBeanFactory(PropertyR esourceConfigurer.java:78)
    at org.springframework.context.support.AbstractApplic ationContext.invokeBeanFactoryPostProcessors(Abstr actApplicationContext.java:663)
    at org.springframework.context.support.AbstractApplic ationContext.invokeBeanFactoryPostProcessors(Abstr actApplicationContext.java:638)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:407)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)
    at org.glover.javabrains.JdbcDemo.main(JdbcDemo.java: 11)
    Caused by: java.io.FileNotFoundException: class path resource [jdbc.properties] cannot be opened because it does not exist
    at org.springframework.core.io.ClassPathResource.getI nputStream(ClassPathResource.java:158)
    at org.springframework.core.io.support.PropertiesLoad erSupport.loadProperties(PropertiesLoaderSupport.j ava:181)
    at org.springframework.core.io.support.PropertiesLoad erSupport.mergeProperties(PropertiesLoaderSupport. java:161)
    at org.springframework.beans.factory.config.PropertyR esourceConfigurer.postProcessBeanFactory(PropertyR esourceConfigurer.java:69)
    ... 6 more..........

    Furthermore, do I have to modify my class path in any manner for a client server relationship with derby?....

    Love this forum, thanks

    Bobby

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,820
    Rep Power
    19

    Default Re: My Jdbc Dao Implementation.....doesn't run....

    "class path resource [jdbc.properties] cannot be opened because it does not exist"
    You can't get much clearer than that.
    It can't find a file it needs.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    JavaDreamer is offline Member
    Join Date
    Nov 2013
    Posts
    2
    Rep Power
    0

    Default Re: My Jdbc Dao Implementation.....doesn't run....

    Thanks for the reply.....getting into Maven to resolve all of the dependency issues in STS....but i thank you.

Similar Threads

  1. Replies: 2
    Last Post: 06-22-2013, 05:26 PM
  2. Replies: 5
    Last Post: 09-25-2012, 05:36 PM
  3. Replies: 0
    Last Post: 05-09-2011, 09:37 AM
  4. Replies: 0
    Last Post: 04-01-2008, 10:17 AM
  5. Replies: 0
    Last Post: 09-28-2007, 12:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •