Re: [Lift] DB connection fail after upgrade from 1.1M7 to 1.1M8

2009-12-18 Thread David Pollak
I ran your app and when the DB connector was created, I got the following
exception:

2009-12-18 20:20:38.641:INFO::No Transaction manager found - if your webapp
requires one, please configure one.
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database
'test'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3996)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1284)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2142)
at com.mysql.jdbc.ConnectionImpl.init(ConnectionImpl.java:781)
at com.mysql.jdbc.JDBC4Connection.init(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:352)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:284)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at net.liftweb.mapper.StandardDBVendor.createOne(DB.scala:870)
at net.liftweb.mapper.ProtoDBVendor$class.newConnection(DB.scala:915)
at net.liftweb.mapper.StandardDBVendor.newConnection(DB.scala:861)
at net.liftweb.mapper.DB$$anonfun$1$$anonfun$apply$1.apply(DB.scala:90)
at net.liftweb.mapper.DB$$anonfun$1$$anonfun$apply$1.apply(DB.scala:90)
at net.liftweb.common.EmptyBox.or(Box.scala:374)
at net.liftweb.mapper.DB$$anonfun$1.apply(DB.scala:90)
at net.liftweb.mapper.DB$$anonfun$1.apply(DB.scala:90)
at net.liftweb.common.Full.flatMap(Box.scala:332)
at net.liftweb.mapper.DB$.newConnection(DB.scala:90)
at net.liftweb.mapper.DB$.getConnection(DB.scala:186)
at net.liftweb.mapper.DB$.use(DB.scala:446)
at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:54)
at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:37)
at bootstrap.liftweb.Boot.boot(Boot.scala:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:409)
at
net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:407)
at
net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:1261)
at
net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:1261)
at net.liftweb.common.Full.map(Box.scala:330)
at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:1261)
at
net.liftweb.http.provider.HTTPProvider$class.bootLift(HTTPProvider.scala:70)
at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:523)
at net.liftweb.http.provider.servlet.ServletFilterProvider$class.init(Se

*The problem is very simply that your database is rejecting the connection.
 I changed the connection to run against H2 as I didn't have MySQL installed
on my machine and everything ran fine.*
*
*
*In the future, please check to make sure you can actually connect to the
RDBMS and include *all* the exceptions generated from your app in postings.*
*
*

On Fri, Dec 18, 2009 at 7:22 PM, Jarod Liu liuyuan...@gmail.com wrote:

 *
 the attached package is the sources.  It just the lift-archetype-basic
 project with changes to use mysql. without the changes work fine using h2
 DB.

 On Dec 19, 8:51 am, David Pollak feeder.of.the.be...@gmail.com wrote:
  If you want to tar up your project (please remove the target directory)
 and
  send it to me privately, I'll look into it.
 
 *

 --
 You received this message because you are subscribed to the Google Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 

[Lift] DB connection fail after upgrade from 1.1M7 to 1.1M8

2009-12-17 Thread Jarod Liu
The same code works fine in 1.1M7. Anyone know what causes the
problem. Or maybe a bug in 1.1M8?

boot.scala:
  DB.defineConnectionManager(DefaultConnectionIdentifier,
 new StandardDBVendor
(com.mysql.jdbc.Driver,
  jdbc:mysql://
localhost/mydb?autoReconnectForPools=true,
  root, ))


the error message:

Looking for Connection Identifier ConnectionIdentifier(lift) but
failed to find either a JNDI data source with the name lift or a lift
connection manager with the correct name/pre/ph3Caused by:/
h3prejava.lang.NullPointerException: Looking for Connection
Identifier ConnectionIdentifier(lift) but failed to find either a JNDI
data source with the name lift or a lift connection manager with the
correct name
at net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
97)
at net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
97)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$.newConnection(DB.scala:90)
at net.liftweb.mapper.DB$.getConnection(DB.scala:186)
at net.liftweb.mapper.DB$.use(DB.scala:446)
at net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.recurseMe$1
(DB.scala:160)
at net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.apply(DB.scala:162)
at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:91)
at net.liftweb.mapper.DB$$anon$1$DepthCnt$.run(DB.scala:143)
at net.liftweb.mapper.DB$$anon$1.apply(DB.scala:146)
at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:912)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit
$1.apply(S.scala:1112)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$.net$liftweb$http$S$$_nest2InnerInit(S.scala:
)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
$anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30$$anonfun$apply
$31.apply(S.scala:1133)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
$anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30.apply(S.scala:
1132)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
$anonfun$apply$28$$anonfun$apply$29.apply(S.scala:1131)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
$anonfun$apply$28.apply(S.scala:1130)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1.apply
(S.scala:1129)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$.net$liftweb$http$S$$_innerInit(S.scala:1128)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
$apply$39$$anonfun$apply$40$$anonfun$apply$41$$anonfun$apply$42.apply
(S.scala:1175)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
$apply$39$$anonfun$apply$40$$anonfun$apply$41.apply(S.scala:1174)
at net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:248)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
$apply$39$$anonfun$apply$40.apply(S.scala:1173)
at net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at net.liftweb.http.TransientRequestVarHandler$.apply(Vars.scala:252)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
$apply$39.apply(S.scala:1172)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38.apply
(S.scala:1171)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1.apply(S.scala:1170)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$._init(S.scala:1169)
at net.liftweb.http.S$.init(S.scala:825)
at net.liftweb.http.S$.initIfUninitted(S.scala:1514)
at net.liftweb.http.Req$.apply(Req.scala:140)
at net.liftweb.http.provider.HTTPProvider$class.service
(HTTPProvider.scala:52)
at net.liftweb.http.LiftFilter.service(LiftServlet.scala:523)
at net.liftweb.http.provider.servlet.ServletFilterProvider
$class.protected$service(ServletFilterProvider.scala:43)
at 

Re: [Lift] DB connection fail after upgrade from 1.1M7 to 1.1M8

2009-12-17 Thread David Pollak
Please try doing a mvn clean and then retry your application.

I have seen no problems with the dozen+ Lift apps I work with related to
connections not working between M7 and M8.

On Thu, Dec 17, 2009 at 5:59 AM, Jarod Liu liuyuan...@gmail.com wrote:

 The same code works fine in 1.1M7. Anyone know what causes the
 problem. Or maybe a bug in 1.1M8?

 boot.scala:
  DB.defineConnectionManager(DefaultConnectionIdentifier,
 new StandardDBVendor
 (com.mysql.jdbc.Driver,
  jdbc:mysql://
 localhost/mydb?autoReconnectForPools=true,
  root, ))


 the error message:

Looking for Connection Identifier ConnectionIdentifier(lift) but
 failed to find either a JNDI data source with the name lift or a lift
 connection manager with the correct name/pre/ph3Caused by:/
 h3prejava.lang.NullPointerException: Looking for Connection
 Identifier ConnectionIdentifier(lift) but failed to find either a JNDI
 data source with the name lift or a lift connection manager with the
 correct name
at net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
 97)
at net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
 97)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$.newConnection(DB.scala:90)
at net.liftweb.mapper.DB$.getConnection(DB.scala:186)
at net.liftweb.mapper.DB$.use(DB.scala:446)
at net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.recurseMe$1
 (DB.scala:160)
at
 net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.apply(DB.scala:162)
at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:91)
at net.liftweb.mapper.DB$$anon$1$DepthCnt$.run(DB.scala:143)
at net.liftweb.mapper.DB$$anon$1.apply(DB.scala:146)
at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:912)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit
 $1.apply(S.scala:1112)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$.net$liftweb$http$S$$_nest2InnerInit(S.scala:
 )
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30$$anonfun$apply
 $31.apply(S.scala:1133)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30.apply(S.scala:
 1132)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29.apply(S.scala:1131)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28.apply(S.scala:1130)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at
 net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1.apply
 (S.scala:1129)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$.net$liftweb$http$S$$_innerInit(S.scala:1128)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40$$anonfun$apply$41$$anonfun$apply$42.apply
 (S.scala:1175)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40$$anonfun$apply$41.apply(S.scala:1174)
at
 net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:248)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40.apply(S.scala:1173)
at
 net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at
 net.liftweb.http.TransientRequestVarHandler$.apply(Vars.scala:252)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39.apply(S.scala:1172)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38.apply
 (S.scala:1171)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1.apply(S.scala:1170)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$._init(S.scala:1169)
at net.liftweb.http.S$.init(S.scala:825)
at net.liftweb.http.S$.initIfUninitted(S.scala:1514)
at net.liftweb.http.Req$.apply(Req.scala:140)
at 

Re: [Lift] DB connection fail after upgrade from 1.1M7 to 1.1M8

2009-12-17 Thread Derek Chen-Becker
I've been fixing quite a few mapper bugs lately, but nothing that should
have anything to do with connection handling...

On Thu, Dec 17, 2009 at 5:16 PM, Timothy Perrett timo...@getintheloop.euwrote:

 This is funny - I actually recently started getting a strange drop in
 connection on one of my applications. Others that use mapper are fine, but
 this one in particular seems to bone after a while.

 I changed the connection info to localhost as the sql server is on the
 same machine, and that appears to have corrected the problem... to that end,
 has any of the connection stuff changed in mapper of late? If so,
 potentially there is a problem.

 Cheers, Tim

 On 18 Dec 2009, at 00:05, David Pollak wrote:

 Please try doing a mvn clean and then retry your application.

 I have seen no problems with the dozen+ Lift apps I work with related to
 connections not working between M7 and M8.

 On Thu, Dec 17, 2009 at 5:59 AM, Jarod Liu liuyuan...@gmail.com wrote:

 The same code works fine in 1.1M7. Anyone know what causes the
 problem. Or maybe a bug in 1.1M8?

 boot.scala:
  DB.defineConnectionManager(DefaultConnectionIdentifier,
 new StandardDBVendor
 (com.mysql.jdbc.Driver,
  jdbc:mysql://
 localhost/mydb?autoReconnectForPools=true,
  root, ))


 the error message:

Looking for Connection Identifier ConnectionIdentifier(lift) but
 failed to find either a JNDI data source with the name lift or a lift
 connection manager with the correct name/pre/ph3Caused by:/
 h3prejava.lang.NullPointerException: Looking for Connection
 Identifier ConnectionIdentifier(lift) but failed to find either a JNDI
 data source with the name lift or a lift connection manager with the
 correct name
at
 net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
 97)
at
 net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
 97)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$.newConnection(DB.scala:90)
at net.liftweb.mapper.DB$.getConnection(DB.scala:186)
at net.liftweb.mapper.DB$.use(DB.scala:446)
at net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.recurseMe$1
 (DB.scala:160)
at
 net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.apply(DB.scala:162)
at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:91)
at net.liftweb.mapper.DB$$anon$1$DepthCnt$.run(DB.scala:143)
at net.liftweb.mapper.DB$$anon$1.apply(DB.scala:146)
at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:912)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit
 $1.apply(S.scala:1112)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$.net$liftweb$http$S$$_nest2InnerInit(S.scala:
 )
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30$$anonfun$apply
 $31.apply(S.scala:1133)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30.apply(S.scala:
 1132)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29.apply(S.scala:1131)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28.apply(S.scala:1130)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at
 net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1.apply
 (S.scala:1129)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$.net$liftweb$http$S$$_innerInit(S.scala:1128)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40$$anonfun$apply$41$$anonfun$apply$42.apply
 (S.scala:1175)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40$$anonfun$apply$41.apply(S.scala:1174)
at
 net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:248)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40.apply(S.scala:1173)
at
 net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at
 

Re: [Lift] DB connection fail after upgrade from 1.1M7 to 1.1M8

2009-12-17 Thread David Pollak
On Thu, Dec 17, 2009 at 8:28 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 I've been fixing quite a few mapper bugs lately, but nothing that should
 have anything to do with connection handling...


I've been working on StandardDBVendor lately.




 On Thu, Dec 17, 2009 at 5:16 PM, Timothy Perrett 
 timo...@getintheloop.euwrote:

 This is funny - I actually recently started getting a strange drop in
 connection on one of my applications. Others that use mapper are fine, but
 this one in particular seems to bone after a while.

 I changed the connection info to localhost as the sql server is on the
 same machine, and that appears to have corrected the problem... to that end,
 has any of the connection stuff changed in mapper of late? If so,
 potentially there is a problem.

 Cheers, Tim

 On 18 Dec 2009, at 00:05, David Pollak wrote:

 Please try doing a mvn clean and then retry your application.

 I have seen no problems with the dozen+ Lift apps I work with related to
 connections not working between M7 and M8.

 On Thu, Dec 17, 2009 at 5:59 AM, Jarod Liu liuyuan...@gmail.com wrote:

 The same code works fine in 1.1M7. Anyone know what causes the
 problem. Or maybe a bug in 1.1M8?

 boot.scala:
  DB.defineConnectionManager(DefaultConnectionIdentifier,
 new StandardDBVendor
 (com.mysql.jdbc.Driver,
  jdbc:mysql://
 localhost/mydb?autoReconnectForPools=true,
  root, ))


 the error message:

Looking for Connection Identifier ConnectionIdentifier(lift) but
 failed to find either a JNDI data source with the name lift or a lift
 connection manager with the correct name/pre/ph3Caused by:/
 h3prejava.lang.NullPointerException: Looking for Connection
 Identifier ConnectionIdentifier(lift) but failed to find either a JNDI
 data source with the name lift or a lift connection manager with the
 correct name
at
 net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
 97)
at
 net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
 97)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$.newConnection(DB.scala:90)
at net.liftweb.mapper.DB$.getConnection(DB.scala:186)
at net.liftweb.mapper.DB$.use(DB.scala:446)
at net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.recurseMe$1
 (DB.scala:160)
at
 net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.apply(DB.scala:162)
at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:91)
at net.liftweb.mapper.DB$$anon$1$DepthCnt$.run(DB.scala:143)
at net.liftweb.mapper.DB$$anon$1.apply(DB.scala:146)
at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:912)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit
 $1.apply(S.scala:1112)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at
 net.liftweb.http.S$.net$liftweb$http$S$$_nest2InnerInit(S.scala:
 )
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30$$anonfun$apply
 $31.apply(S.scala:1133)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30.apply(S.scala:
 1132)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29.apply(S.scala:1131)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28.apply(S.scala:1130)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at
 net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1.apply
 (S.scala:1129)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at
 net.liftweb.http.S$.net$liftweb$http$S$$_innerInit(S.scala:1128)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40$$anonfun$apply$41$$anonfun$apply$42.apply
 (S.scala:1175)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40$$anonfun$apply$41.apply(S.scala:1174)
at
 net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:248)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40.apply(S.scala:1173)