Postgre DB connection issue

50 views
Skip to first unread message

Amit Kumar Verma

unread,
Feb 25, 2009, 8:28:38 AM2/25/09
to Lift
Hi
all,
Boot.scala is costomised for jndi connection. Web.xml is also correct.
I am using apache-tomcat -6.0.10 and have context like this
-
<Resource name="jdbc/mysqlDS"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.p6spy.engine.spy.P6SpyDriver"
url="jdbc:postgresql://192.168.0.30:5000/somedbname"
username="someusername"
password="somepassword"
maxActive="4"
maxIdle="0"
maxWait="11000"
/
>
I have p6spy.jar both in my lib and endorsed folder of tomcat, and
even in lib of project but I am not able to connect to the postgre db.
I am getting following error
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC
driver class 'com.p6spy.engine.spy.P6SpyDriver'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource
(BasicDataSource.java:766)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection
(BasicDataSource.java:540)
at bootstrap.liftweb.DBVendor$.newConnection(Boot.scala:40)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:70)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:70)
at net.liftweb.util.Full.flatMap(Can.scala:259)
at net.liftweb.mapper.DB$.newConnection(DB.scala:70)
at net.liftweb.mapper.DB$.getConnection(DB.scala:87)
at net.liftweb.mapper.DB$.use(DB.scala:241)
at net.liftweb.mapper.MetaMapper$class.findMapDb
(MetaMapper.scala:158)
at com.vtech.travelmerchant.model.MLoginMapper$.findMapDb
(MLoginMapper.scala:7)
at net.liftweb.mapper.MetaMapper$class.findAll
(MetaMapper.scala:136)
at com.vtech.travelmerchant.model.MLoginMapper$.findAll
(MLoginMapper.scala:7)
at com.vtech.travelmerchant.snippet.login.loginUser$1
(login.scala:39)
at com.vtech.travelmerchant.snippet.login$$anonfun$getLogin
$1.apply(login.scala:44)
at com.vtech.travelmerchant.snippet.login$$anonfun$getLogin
$1.apply(login.scala:44)
at net.liftweb.http.S$NFuncHolder$$anonfun$apply$51.apply
(S.scala:644)
at net.liftweb.http.S$NFuncHolder$$anonfun$apply$51.apply
(S.scala:644)
at scala.List.map(List.scala:
734)
please help me, where I am going wrong.

David Pollak

unread,
Feb 25, 2009, 9:24:26 AM2/25/09
to lif...@googlegroups.com
Amit,

Is the JAR containing the com.p6spy.engine.spy.P6SpyDriver class in Tomcat's lib directory?

Thanks,

David
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

Amit Kumar Verma

unread,
Feb 25, 2009, 11:14:56 AM2/25/09
to Lift
Hi David,

Problem was with jar file only, It should be present in endorsed
folder under tomcat.
thanks it is working now.

Amit

On Feb 25, 7:24 pm, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> Amit,
> Is the JAR containing the com.p6spy.engine.spy.P6SpyDriver class in Tomcat's
> lib directory?
>
> Thanks,
>
> David
>
> Beginning Scalahttp://www.apress.com/book/view/1430219890

Amit Kumar Verma

unread,
Feb 25, 2009, 11:14:56 AM2/25/09
to Lift
Hi David,

Problem was with jar file only, It should be present in endorsed
folder under tomcat.
thanks it is working now.

Amit

On Feb 25, 7:24 pm, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> Amit,
> Is the JAR containing the com.p6spy.engine.spy.P6SpyDriver class in Tomcat's
> lib directory?
>
> Thanks,
>
> David
>
> Beginning Scalahttp://www.apress.com/book/view/1430219890
Reply all
Reply to author
Forward
0 new messages