wood burning stoves 2.0*
The moose likes Spring and the fly likes BeanCreationException in an standalone application using Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "BeanCreationException in an standalone application using Spring" Watch "BeanCreationException in an standalone application using Spring" New topic
Author

BeanCreationException in an standalone application using Spring

noemi conde
Greenhorn

Joined: May 05, 2010
Posts: 14
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!
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Is the jar that contains org.postgresql.Driver

in your classpath at runtime?

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
noemi conde
Greenhorn

Joined: May 05, 2010
Posts: 14
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
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

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

Joined: May 05, 2010
Posts: 14
Hi,
finally I've just added the jar file instead of creating the library, and it works fine, thanks so much !!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BeanCreationException in an standalone application using Spring