I'm configuring a mule app with log4j to use org.postgresql.Driver. Below is some of my log4j.properties config.
log4j.appender.postgres=org.apache.log4j.jdbc.JDBCAppender
log4j.appender.postgres.layout=org.apache.log4j.PatternLayout
log4j.appender.postgres.driver=org.postgresql.Driver
log4j.appender.postgres.URL=jdbc:postgresql://127.0.0.1:5432/edus-esb
log4j.appender.postgres.user=<username>
log4j.appender.postgres.password=<password>
log4j.appender.postgres.sql=INSERT INTO LOGS VALUES('%x','%d','%C','%p','%m')
According to the logs, everything for the log4j config loads except the driver.
log4j:ERROR Failed to load driver
java.lang.ClassNotFoundException: org.postgresql.Driver
I'm using maven to load the appropriate driver using the dependency below, but I've also tried adding the driver manually to the class path via Eclipse -> build path -> add external JARS.
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901.jdbc4</version>
</dependency>
No luck in either case. I've had some trouble loading classes in mule projects before, so I wonder if this has something to do with Mule's particular class loading strategy/implementation.
Any ideas? Thanks.