You have to make sure you update your pom.xml file to use Scala 2.7.4 with Lift 1.1
Thanks, David On Mon, Jul 6, 2009 at 8:17 AM, Mike Maul <mike.m...@gmail.com> wrote: > > After making changes to move from SNAPSHOT-1.0 to SHAPSHOT-1.1 > maven is refusing to start the LiftFilter > > Also since the 'loan' patterns seemed to go away is the > LiftSession.onBeginServicing/endServicing an approiate place for > instantiating my JPA entity manager? > > 2009-07-06 10:42:00.703::WARN: failed LiftFilter > java.lang.VerifyError: (class: net/liftweb/util/EmptyBox, method: open_ > $bang signature: ()Ljava/lang/Object;) Can only throw Throwable > objects > at net.liftweb.http.LiftRules$.<init>(LiftRules.scala:231) > at net.liftweb.http.LiftRules$.<clinit>(LiftRules.scala) > at net.liftweb.http.LiftFilter.init(LiftServlet.scala:528) > at org.mortbay.jetty.servlet.FilterHolder.doStart > (FilterHolder.java:97) > ------------------------ > Boot.scala---------------------------------------- > package bootstrap.liftweb > > import _root_.net.liftweb.util._ > import _root_.net.liftweb.http._ > import _root_.net.liftweb.sitemap._ > import _root_.net.liftweb.sitemap.Loc._ > import _root_.net.liftweb.mapper.{DB, ConnectionManager, Schemifier, > DefaultConnectionIdentifier, ConnectionIdentifier} > import java.sql.{Connection, DriverManager} > import com.test.model.Model > import com.test.model.User > import com.test.model.Conv1w > > /** > * A class that's instantiated early and run. It allows the > application > * to modify lift's environment > */ > class Boot { > def boot { > if (!DB.jndiJdbcConnAvailable_?) DB.defineConnectionManager > (DefaultConnectionIdentifier, DBVendor) > // where to search snippet > LiftRules.addToPackages("com.viper") > > Schemifier.schemify(true, Log.infoF _, User, Conv1w) > > val entries = Menu(Loc("Home", List("index"), "Home")) :: > Menu(Loc("Home", List("index"), > "Home")) :: > Menu(Loc("Manage.2", List("manage","locations"), > "Manage Locations")) :: > Menu(Loc("Manage.2.1", List("manage","addLocation"), > "Add Locations")) :: > Menu(Loc("Manage.2.2",List("manage","editLocation"), > "Edit Locations")) :: > Menu(Loc("Manage.2.3",List("manage","delete"), > "Delete Locations")) :: > Menu(Loc("Manage.3",List("manage","edit"), > "Edit")) :: Nil > > LiftRules.setSiteMap(SiteMap(entries:_*)) > > LiftSession.onBeginServicing = DBFactory.beginServicing _ :: > LiftSession.onBeginServicing > > LiftSession.onEndServicing = DBFactory.endServicing _ :: > LiftSession.onEndServicing > } > } > > > object DBVendor extends ConnectionManager { > def newConnection(name: ConnectionIdentifier): Box[Connection] = { > try { > Class.forName("org.postgresql.Driver") > val dm = DriverManager.getConnection("jdbc:postgresql:// > localhost/xxxx?user=xxxx") > Full(dm) > } catch { > case e : Exception => e.printStackTrace; Empty > } > } > def releaseConnection(conn: Connection) {conn.close} > } > object DBFactory { > def beginServicing(session: LiftSession, req: Req) { > val em = Model.factory.createEntityManager() > > // Add EM into S scope > Model.emVar.set(em) > > } > > def endServicing(session: LiftSession, req: Req, > response: Box[LiftResponse]) { > Model.em.close() > } > } > > > > > -- 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 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---