• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

BeanCreationException in an standalone application using Spring

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm developing an standalone application with spring + hibernate + swing, and maven.
I've got no problems when I run the junit test with maven, but when I try to run my application I've got a BeanCreationException.

Exception:


bean datasource in spring-config:



and the code where the exception is thrown :



And by the way, this class (Controller) is singleton,
Does anybody know what I'm doing wrong ?
Should I use another dataSource ? which one ?
Thanks!
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the jar that contains org.postgresql.Driver

in your classpath at runtime?

Mark
 
noemi conde
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

To add the jar file to the classpath I've just added a library called "PostgreSQL JDBC Driver" and put the .jar file into it.
I'm using eclipse IDE, I thought this is the way to do it, I'm wrong ? Anything else to do it ?

Thanks so much!
 
Mark Spritzler
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

noemi rc wrote:Hi,

To add the jar file to the classpath I've just added a library called "PostgreSQL JDBC Driver" and put the .jar file into it.
I'm using eclipse IDE, I thought this is the way to do it, I'm wrong ? Anything else to do it ?

Thanks so much!



That sounds correct. What if you just add the jar to the classpath instead of creating a user library?

Mark
 
noemi conde
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
finally I've just added the jar file instead of creating the library, and it works fine, thanks so much !!!
 
Don't mess with me you fool! I'm cooking with gas! Here, read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic