Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postgresql driver not found for maven dependency

I am running a spring project with maven and I am trying to use postgresql. I've added the dependency to pom.xml, but at tomcat startup, I get the following error:

java.lang.ClassNotFoundException: org.postgresql.Driver

pom.xml dependency:

<dependency>
  <groupId>org.postgresql</groupId>
  <artifactId>postgresql</artifactId>
  <version>9.3-1101-jdbc41</version>
</dependency>

It appears that Maven isn't downloading the jar so the Driver class is not found. Any ideas?

like image 368
Alex Avatar asked Mar 11 '14 12:03

Alex


1 Answers

What also worked for me if you are on intellj: right klick pom.xml->Maven->Reimport Don't know why it doesn't download the artifact on copy paste.

like image 122
FishingIsLife Avatar answered Sep 28 '22 04:09

FishingIsLife