• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

BeanCreationException in an standalone application using Spring

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic