OK, I see where I broke things. Let me fix this. Derek
On Wed, Sep 16, 2009 at 1:56 AM, Ewan <ehar...@gmail.com> wrote: > > Derek > > This one is for you I think. After updating my Boot.scala with > revised DB.addLogFunc I have found an issue with logging prepared > statements. My usecase is an insert/update that sets a MappedString - > this MappedString is to hold a url such as "http:// > www.northnorfolkholidaylet.com". No problem there but if the url also > contains a query param the logger stacktraces (below). The string > causing the problem is "http://www.northnorfolkholidaylet.com? > property=33". Looking at LoggingStatementWrappers.scala line 313 it > replaces prepared statements placeholders '?' with the the required > values but my string value introduces/injects an extra '?' which > causes it to fail badly. > > Exception occured while processing /property/edit/5 > > Message: java.util.NoSuchElementException: key not found: 4 > scala.collection.Map$class.default(Map.scala:169) > scala.collection.immutable.Map3.default(Map3.scala:22) > scala.collection.Map$class.apply(Map.scala:80) > scala.collection.immutable.Map3.apply(Map3.scala:22) > net.liftweb.mapper.LoggedPreparedStatement.substitute$1 > (LoggingStatementWrappers.scala:315) > net.liftweb.mapper.LoggedPreparedStatement.net$liftweb$mapper > $LoggedPreparedStatement$$paramified(LoggingStatementWrappers.scala: > 318) > net.liftweb.mapper.LoggedPreparedStatement$$anonfun$executeUpdate > $9.apply(LoggingStatementWrappers.scala:347) > net.liftweb.mapper.LoggedPreparedStatement$$anonfun$executeUpdate > $9.apply(LoggingStatementWrappers.scala:347) > net.liftweb.mapper.DBLog$class.logStatement > (LoggingStatementWrappers.scala:46) > net.liftweb.mapper.LoggedStatement.logStatement > (LoggingStatementWrappers.scala:71) > net.liftweb.mapper.LoggedPreparedStatement.executeUpdate > (LoggingStatementWrappers.scala:347) > net.liftweb.mapper.MetaMapper$$anonfun$14$$anonfun$15.apply > (MetaMapper.scala:653) > net.liftweb.mapper.MetaMapper$$anonfun$14$$anonfun$15.apply > (MetaMapper.scala:636) > > net.liftweb.mapper.DB$$anonfun$runPreparedStatement$1.apply(DB.scala: > 375) > > net.liftweb.mapper.DB$$anonfun$runPreparedStatement$1.apply(DB.scala: > 372) > net.liftweb.util.TimeHelpers$class.calcTime(TimeHelpers.scala:241) > net.liftweb.util.Helpers$.calcTime(Helpers.scala:29) > net.liftweb.mapper.DB$.runPreparedStatement(DB.scala:372) > net.liftweb.mapper.DB$.prepareStatement(DB.scala:316) > > net.liftweb.mapper.MetaMapper$$anonfun$14.apply(MetaMapper.scala:635) > > net.liftweb.mapper.MetaMapper$$anonfun$14.apply(MetaMapper.scala:630) > net.liftweb.mapper.DB$.use(DB.scala:389) > net.liftweb.mapper.MetaMapper$class.save(MetaMapper.scala:629) > org.harrow.findaholidaylet.model.Property$.save(Property.scala:98) > > -- Ewan > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---