lift / framework Goto Github PK
View Code? Open in Web Editor NEWLift Framework
Home Page: http://liftweb.net
License: Apache License 2.0
Lift Framework
Home Page: http://liftweb.net
License: Apache License 2.0
deprecate lift:bind/
Lighthouse #33: http://liftweb.lighthouseapp.com/projects/26102/tickets/33-deprecate-liftbind
I just tried to run the todo app.
(http://liftweb.net/docs/getting_started/mod_master.html) against our Oracle (10.2) database. I used Oracle's SQLDeveloper to confirm that the tables had been created and had the right columns. However, when I tried to "Sign Up" in the todo app., I got this stuff right in the browser (nothing in the log):
Exception occured while processing /user_mgt/sign_up
Message: java.sql.SQLException: Invalid column type
More details about this exception can be found here:
http://groups.google.com/group/liftweb/browse_thread/thread/9adaf97d0ccb1fbd
I'm using Lift 1.0.
/Jon
When accessing a session variable from the constructor of a CometActor
, deadlock will sometimes occur (usually with another comet thread already running against the session). The issue is comet actors are created from within LiftSession#findComet
, which locks the session. If you access a SessionVar
during this construction process, you will then lock the corresponding variable. However, most often it is the variable which locks first, and then the session (e.g. when accessing a session var during the normal course of execution). This of course can lead to deadlock when one thread is attempting to access a session var while another thread is creating a comet actor.
There is an issue with the mapper schemifier when using an H2 database. Specifically, if a user and password are specified, an exception is thrown during the boot process when attempting to verify the schema. If a user/password are not specified there is no problem.
A reproduce-able example can be found at:
http://github.com/eltimn/lift_1_1_sample/tree/master
Here is a partial stack-trace:
[INFO] Starting jetty 6.1.16 ...
2009-07-30 13:54:55.416::INFO: jetty-6.1.16
2009-07-30 13:54:55.566::INFO: No Transaction manager found - if your webapp requires one, please configure one.
INFO - CREATE TABLE users (id BIGINT NOT NULL AUTO_INCREMENT , firstname VARCHAR(32) , lastname VARCHAR(32) , email VARCHAR(48) , locale VARCHAR(16) , timezone VARCHAR(32) , password_pw VARCHAR(48) , password_slt VARCHAR(20) , textarea VARCHAR(2048) , validated BOOLEAN , uniqueid VARCHAR(32) , superuser BOOLEAN)
ERROR - Failed to Boot
java.util.NoSuchElementException: key not found: users
at scala.collection.Map$class.default(Map.scala:169)
at scala.collection.mutable.HashMap.default(HashMap.scala:33)
at scala.collection.Map$class.apply(Map.scala:80)
at scala.collection.mutable.HashMap.apply(HashMap.scala:33)
at net.liftweb.mapper.Schemifier$$anonfun$6$$anonfun$apply$7.apply(Schemifier.scala:189)
at net.liftweb.mapper.Schemifier$$anonfun$6$$anonfun$apply$7.apply(Schemifier.scala:189)
at net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier$$using(Schemifier.scala:43)
it seems doing even Hello World in Lift means getting acquainted with maven. There is no stand-alone ZIP of Lift for easy download (especially on Linux).
Maven is a fairly divisive platform, with lots of supporters and naysayers. I don't think it's in Lift's interest to force it upon users (I personally prefer running with just plain embedded Jetty in my web app and no Maven).
Gregg Bolinger mentions in one of his blogs that the Maven dependency is the reason he never looked into Lift seriously:
http://www.greggbolinger.com/blog/2009/07/29/1248925200000.html
Re: Grails: The Search Really Is Over (For Now)
Comment from Gregg Bolinger on August 5, 2009 3:02:02 AM CDT #
I've looked at Scala. It is supported in Grails now, as is Clojure and something else I can't remember. Anyway, looking at list my first big issue was every tutorial I saw was using Maven. I know some folks like it, I personally don't. Other than that, I have no real opinion of Lift. I haven't looked at it enough.
Please provide a regular ZIP or TAR.GZ of the stable Lift version, together with all dependencies.
Thanks
Prior state:
Trigger:
Current Result:
The next jQuery request from the open browser window results in the browser being returned to the start page. This can be problematic during development, because the prior state then often has to be manually reinstated again before work can continue.
Desired Result:
It would be great to be able to continue work in the browser without be sent back to the start page again.
Hello,
I'm playing with the Autocomplete widget in Lift 1.1 current SNAPTHOT version (generated on Sat Jun 20 06:47:53 PDT 2009) and I get the submitted value back in the Scala code, everything else works fine (autocomplete elements are shonw, etc). I'm quite new to lift, so perhaps I miss somthing obious.
I think that the problem is in the generated Javascript, when the selected value should be copied in the hidden field (line 131 of lift-widgets-1.1-SNAPSHOT-sources.jar!/net/liftweb/widgets/autocomplete/AutoComplete.scala, in "onLoad" value definition):
8<--------------
jQuery("#"""+id+"""").autocomplete(data, """+autocompleteOptions.toJsCmd+""").result(function(event, dt, formatted) {
jQuery("#"""+hidden+"""").val(dt.nonce);
8<--------------
The problem seems to be that dt has no "nonce" field, it's an array. If I modify the code as follow:
8<--------------
jQuery("#"""+id+"""").autocomplete(data, """+autocompleteOptions.toJsCmd+""").result(function(event, dt, formatted) {
jQuery("#"""+hidden+"""").val(formatted);
8<--------------
Everything works as expected.
Hope it may help ! Francois Armand
This really blows. First I got a javarebel expiration. Then I ran the uninstaller for lift. Now I can't run mvn - maven - from the command line. I get this:
./mvn
Error opening zip file: /Applications/liftweb-1.0/java-rebel/javarebel.jar
Error occurred during initialization of VM
agent library failed to init: instrument
Abort trap
How can I fix this!!!!! I need to use mvn. I have work to do!!!!
Run the following code
import root.net.liftweb.util._
import Helpers._
import root.java.sql.{Connection, DriverManager}
class M extends LongKeyedMapper[M] with IdPK {
def getSingleton = M
object field extends MappedString(this, 10)
}
object M extends M with LongKeyedMetaMapper[M]
object H2TestCase {
def main(args: Array[String]) {
DB.defineConnectionManager(DefaultConnectionIdentifier, new ConnectionManager {
def newConnection(name: ConnectionIdentifier): Box[Connection] = {
Class.forName("org.h2.Driver")
Full(DriverManager.getConnection("jdbc:h2:mem:lift;DB_CLOSE_DELAY=-1"))
}
def releaseConnection(conn: Connection) {
try {
conn.close
} catch {
case e => Empty //ignore
}
}
})
Schemifier.schemify(true, Log.infoF _, M)
}
}
The output is:
INFO - CREATE TABLE m (field VARCHAR(10) , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE INDEX m_id ON m ( id )
I'm using adhoc queries and I'm running into a problem where the results
of aggregate functions get mapped to integers:
I have this
val (,result) = DB.runQuery("SELECT AVG(vt.fuel_efficiency), vt.fuel_type, vt.category FROM "+
"vehicles v JOIN vehicle_types vt ON v.vehicle_type_id= vt.id "+
"WHERE v.account_id=? "+
"GROUP BY vt.fuel_type, vt.category "+
"ORDER BY vt.fuel_type, vt.category",
List(User.currentUser.open!.account.is))
in Postgres, the first column is returned as NUMERIC, ie with decimals, but in
private def asString(pos: Int, rs: ResultSet, md: ResultSetMetaData)
we have this:
case BIGINT | INTEGER | DECIMAL | NUMERIC | SMALLINT | TINYINT =>
rs.getLong(pos).toString
which seems wrong.
So... numeric should be rs.getDouble(pos).toString ?
Yes, or BigDecimal. Same goes for DECIMAL I think. "The recommended Java
mapping for the DECIMAL and NUMERIC types is java.math.BigDecimal" [1]
[1] http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/mapping.html
SQL Server Alter Table Fail
Lighthouse #25: http://liftweb.lighthouseapp.com/projects/26102/tickets/25
Disappearing whitespace
Lighthouse #29: http://liftweb.lighthouseapp.com/projects/26102/tickets/29
I'm having trouble parsing xhtml pages as xml if that page contains special characters like ® or The html im parsing is created by lift.
The problem is generated whenever referencing a variable.xml and the result is:
[Fatal Error] :54:46: The entity "reg" was referenced, but not declared.
And the printout of the xml.
Code example:
val result: String =
get("/some_page/here/" + variable) match {
case h: HttpResponse =>
val input = (h.xml \ "input")
println("I got something" + input)
""
case other =>
println("Got something weird - got "+other)
""
}
result
I have a problem with URLs whose last path segment contains a
fullstop, eg: /x/3.1/y/1.11
To illustrate the issue, I created a new lift project and added the
following to the Boot:
LiftRules.dispatch.prepend {
case Req(List("x", x,"y", y), _, _) => () => Full(XmlResponse( <p>x={ x } y={ y } </p> ))
}
Pointing a browser at /x/3.1/y/1.11 returns: x=3.1 y=1
So y is being truncated at the fullstop.
Doing this in Java with Jetty and a servlet, I can get the full path
out and parse it correctly so is Lift misbehaving?
The Liftweb installer for Mac OS X generates a .bash_profile file whether .profile exists already or not. As a result of this, the shell will ignore the preexisting environment variables defined by .profile. The installer should detect the presence of .profile, and perform an append operation instead.
The current file upload API slurps the whole file into a byte array. This could exhaust server memory for large concurrency and/or large files. Add an API that allows streaming access.
See discussion here:
http://groups.google.com/group/l...
This was moved from lighthouse .. and I am the assignee.
1# * and _. Look at the following:
scala> import net.liftweb.textile._
import net.liftweb.textile._
scala> TextileParser.toHtml("foo bar")
res7: scala.xml.NodeSeq =
foo __bar__
scala> TextileParser.toHtml("bar")
res8: scala.xml.NodeSeq =
bar
scala> TextileParser.toHtml("bar foo")
res9: scala.xml.NodeSeq =
bar *foo*
Something clearly isn't working with __ and ** ;)
#2 links with classes
scala> TextileParser.toHtml(""" "(cmsadmin-link)click here":# """)
res10: scala.xml.NodeSeq =
(cmsadmin-link)click here
Usually this should work too.
"<lift:snippet type=""Foo.bar""> != lift:Foo.bar"
Lighthouse #21: http://liftweb.lighthouseapp.com/projects/26102/tickets/21
Calling save on a keyless Mapper object results in a NullPointerException: Trying to open an empty Box.
A simple example to reproduce the issue is attached along with the full stack trace.
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 Helpers._
import com.spiralarm.liftbug.mapperissue.model._
import _root_.java.sql.{Connection, DriverManager}
import _root_.net.liftweb.mapper.{DB, ConnectionManager, Schemifier, DefaultConnectionIdentifier, ConnectionIdentifier}
/**
* A class that's instantiated early and run. It allows the application
* to modify lift's environment
*/
class Boot {
def boot {
// where to search snippet
LiftRules.addToPackages("com.spiralarm.liftbug.mapperissue")
// Build SiteMap
val entries = Menu(Loc("Home", List("index"), "Home")) :: Nil
LiftRules.setSiteMap(SiteMap(entries:_*))
DB.defineConnectionManager(DefaultConnectionIdentifier, DBVendor)
DB.addLogFunc((query, time) => Log.debug("DBQUERY {" +query + "} time{" + time + "} ms") )
Schemifier.schemify(true,Log.infoF _,Parent,Child,ParentChild)
Log.info("Parent Child join " + ParentChild.join("parent","child"))
}
}
object DBVendor extends ConnectionManager {
// Force load the driver
Class.forName("com.mysql.jdbc.Driver")
// define methods
def newConnection(name : ConnectionIdentifier) = {
try {
Full(DriverManager.getConnection("jdbc:mysql://localhost:3306/bugs", "bugs", "bugs"))
} catch {
case e : Exception => e.printStackTrace; Empty
}
}
def releaseConnection (conn : Connection) { conn.close }
}
Parent.scala
package com.spiralarm.liftbug.mapperissue.model
import net.liftweb._
import net.liftweb.mapper._
class Parent extends LongKeyedMapper[Parent] with IdPK {
def getSingleton = Parent
object name extends MappedString(this,10)
}
object Parent extends Parent with LongKeyedMetaMapper[Parent]
class Child extends LongKeyedMapper[Child] with IdPK {
def getSingleton = Child
object name extends MappedString(this,10)
}
object Child extends Child with LongKeyedMetaMapper[Child]
class ParentChild extends Mapper[ParentChild] {
def getSingleton = ParentChild
object parent extends MappedLongForeignKey(this, Parent)
object child extends MappedLongForeignKey(this, Child)
object index extends MappedInt(this)
}
object ParentChild extends ParentChild with MetaMapper[ParentChild]{
def join (parent :String, child :String):Boolean = {
val p = Parent.create.name(parent).saveMe
val c = Child.create.name(parent).saveMe
join(p,c)
}
def join (parent :Parent, child :Child):Boolean = {
val list = ParentChild.findAll(By(ParentChild.parent,parent))
val i = list.isEmpty match {
case true => 0
case false => list.size
}
this.create.parent(parent).child(child).index(i).save
}
}
java.lang.NullPointerException: Trying to open an empty Box
at net.liftweb.util.EmptyBox.open_$bang(Box.scala:370)
at net.liftweb.util.EmptyBox.open_$bang(Box.scala:366)
at net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:583)
at net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:578)
at net.liftweb.mapper.DB$.use(DB.scala:305)
at net.liftweb.mapper.MetaMapper$class.save(MetaMapper.scala:577)
at com.spiralarm.liftbug.mapperissue.model.ParentChild$.save(Parent.scala:35)
at net.liftweb.mapper.Mapper$$anonfun$save$1.apply(Mapper.scala:84)
at net.liftweb.mapper.Mapper$$anonfun$save$1.apply(Mapper.scala:84)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65)
at net.liftweb.mapper.Safe$.runSafe(Safe.scala:44)
at net.liftweb.mapper.Mapper$class.runSafe(Mapper.scala:50)
at com.spiralarm.liftbug.mapperissue.model.ParentChild.runSafe(Parent.scala:26)
at net.liftweb.mapper.Mapper$class.save(Mapper.scala:83)
at com.spiralarm.liftbug.mapperissue.model.ParentChild.save(Parent.scala:26)
at com.spiralarm.liftbug.mapperissue.model.ParentChild$.join(Parent.scala:51)
at com.spiralarm.liftbug.mapperissue.model.ParentChild$.join(Parent.scala:41)
at bootstrap.liftweb.Boot$$anonfun$boot$3.apply(Boot.scala:29)
at bootstrap.liftweb.Boot$$anonfun$boot$3.apply(Boot.scala:29)
at net.liftweb.util.Log4JLogger.info(Log.scala:240)
at net.liftweb.util.Log$.info(Log.scala:54)
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:585)
at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:392)
at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:390)
at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:909)
at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:909)
at net.liftweb.util.Full.map(Box.scala:330)
at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:909)
at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:573)
at net.liftweb.http.LiftFilter.init(LiftServlet.scala:548)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:653)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1239)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466)
at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:124)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:441)
at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:383)
at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
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:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
When running in development mode (and upcoming Bespin mode), flag pages that are not served because they are not in SiteMap as such in the error message (404)
Triage this:
[ERROR] /private/var/www/xxx-master/spa/src/main/scala
[ERROR] /private/var/www/xxx-master/spa/src/main/scala/../scala
[INFO] Compiling 9 source files to
/private/var/www/xxx-master/spa/target/classes
[WARNING]
/private/var/www/xxx-master/spa/src/main/scala/com/xxx/model/EnumvType.scala:48:
error: value valueOf is not a member of Enumeration with com.xxx.model.Enumv
[WARNING] return et.valueOf(value).getOrElse(null)
[WARNING] ^
[WARNING] one error found
"Getting Started" has string terminators"
Lighthouse #35: http://liftweb.lighthouseapp.com/projects/26102/tickets/35-getting-started-has-string-terminators
Just looking at the source, we have:
def buildSetActualValue(accessor: Method, inst: AnyRef, columnName: String): (T, AnyRef) => Unit =
(inst, v) => doField(inst, accessor, {case f: MappedBinary[T] =>
val toSet = v match {
case null => null
case ba: Array[Byte] => ba
case other => other.toString.getBytes("UTF-8")
}
f.data() = toSet
f.orgData() = toSet
})
But the toSet doesn't have a case for getting a java.sql.Blob instance. I think that converting a BLOB to a String and then back to bytes is much less efficient than just doing:
val toSet = v match {
case null => null
case ba: Array[Byte] => ba
case blob : Blob => blob.getBytes(1, blob.length)
case other => other.toString.getBytes("UTF-8")
}
I’m cranky that I’m not coding enough
The DOM processing should be done in 3 distinguished phases:
Marius
For the last couple of days I get the MatchErro on boot of ESME (see below for full stack trace).
I guess this is related to the following commit, although I verified that dchenbecker's fix on 20 July is updated on my system, and the error persists:
http://groups.google.com/group/liftweb/browse_thread/thread/722c75462e400a4c
We are using Lift 1.1-SNAPSHOT. This is ESME constructs the index:
override def dbIndexes = Index(user, message) :: super.dbIndexes
Full stack trace follows:
scala.MatchError: Index(Array(IndexField(NULL), IndexField(NULL)))
at net.liftweb.mapper.Schemifier$$anonfun$net$liftweb$mapper$Schemifier$$ensureIndexes$2.apply(Schemifier.scala:266)
at net.liftweb.mapper.Schemifier$$anonfun$net$liftweb$mapper$Schemifier$$ensureIndexes$2.apply(Schemifier.scala:261)
at scala.List.foreach(List.scala:841)
at net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier$$ensureIndexes(Schemifier.scala:260)
at net.liftweb.mapper.Schemifier$$anonfun$schemify$1$$anonfun$3.apply(Schemifier.scala:62)
at net.liftweb.mapper.Schemifier$$anonfun$schemify$1$$anonfun$3.apply(Schemifier.scala:62)
at scala.List.foldLeft(List.scala:1066)
at net.liftweb.mapper.Schemifier$$anonfun$schemify$1.apply(Schemifier.scala:62)
at net.liftweb.mapper.Schemifier$$anonfun$schemify$1.apply(Schemifier.scala:54)
at net.liftweb.mapper.DB$.use(DB.scala:317)
at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:53)
at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:36)
at bootstrap.liftweb.Boot.boot(Boot.scala:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:408)
at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:406)
at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:1096)
at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:1096)
at net.liftweb.util.Full.map(Box.scala:330)
at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:1096)
at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:556)
at net.liftweb.http.LiftFilter.init(LiftServlet.scala:530)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:653)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1239)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466)
at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:124)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:441)
at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:383)
at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
I have a test case which issues http gets/posts to our server running the Innovation Games application. It is our 'stress test' for the Buy-A-Feature game. It currently works using an older variant of the lift-testkit library. When I run it with the current lift-testkit library I get the exception below.
I have isolated it down to the line in the library which is failing. Below I list both the working and non-working code.
TestFramework.scala: line 280 (non-working):
override lazy val xml = XML.load(new root.java.io.ByteArrayInputStream(body))
TestFramework.scala (working):
override lazy val xml = {
try3{
val s = new String(body, "UTF-8").replaceAll("""<!.*>""","")
XML.loadString(s)}
Stack Trace/Exception:
First test instance get headers: Map(Content-Length -> List(2711), Expires -> List(Wed, 8 Jul 2009 17:41:35 UTC), Set-Cookie -> List(JSESSIONID=1x0d2w2cmflwg;Path=/), Pragma -> List(no-cache), Server -> List(Jetty(6.1.16)), Content-Type -> List(text/html), X-Lift-Version -> List(1.1-SNAPSHOT), Cache-Control -> List(no-cache; private; no-store; must-revalidate; max-stale=0; post-check=0; pre-check=0; max-age=0))
Exception in thread "Thread-7" java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1290)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1315)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1282)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:283)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1192)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1089)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1002)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at scala.xml.parsing.FactoryAdapter.loadXML(FactoryAdapter.scala:292)
at scala.xml.parsing.NoBindingFactoryAdapter.loadXML(NoBindingFactoryAdapter.scala:60)
at scala.xml.XML$.load(XML.scala:64)
at net.liftweb.http.testing.HttpResponse.xml(TestFramework.scala:280)
at com.enthiosys.buyafeature.stress_test.TestInstance.runWith(StressTest.scala:66)
at com.enthiosys.buyafeature.stress_test.StressTest$$anonfun$main$2$$anon$2.run(StressTest.scala:44)
From the list:
Hi,
I have been having trouble reading a list of HTTP parameters with the
same name that may or may not exist. If I call S.params("nn") and "nn"
doesn't exist, it throws a NoSuchElementException: "key not found". I
was expecting an empty List.
The code for S.params is
def params(n: String): List[String] = request.map(_.params(n)).openOr
(Nil)
Shouldn't it be something like:
def params(n: String): List[String] = request.map(_.params.getOrElse
(n,Nil)).openOr(Nil)
Add an XHTML validator to Lift during development and testing modes.
Schemifier seems to decide for you what schema to schemify tables in. When the DriverType doesn't specify a default schema, the username is used. This precludes automatically creating an H2 database with a username because it doesn't have the schema. Should the default schema name for H2 be ""?
So people can put static content there
Add Twitter IDs to the team page.
Lighthouse #3: http://liftweb.lighthouseapp.com/projects/26102/tickets/3
I’m a cat and I want catfood
MappedDateTime does not store time portion in Derby 10.4.2.0
Lighthouse #28: http://liftweb.lighthouseapp.com/projects/26102/tickets/28
Fix varchar and text types in SqlServerDriver
Lighthouse #22: http://liftweb.lighthouseapp.com/projects/26102/tickets/22
Update Mapper/Record to handle unique indices
Lighthouse #14: http://liftweb.lighthouseapp.com/projects/26102/tickets/14
Update Lift and JPA page on Wiki
Lighthouse #23: http://liftweb.lighthouseapp.com/projects/26102/tickets/23
Problems with MappedStringIndex (Derby / H2)
Lighthouse #26: http://liftweb.lighthouseapp.com/projects/26102/tickets/26
See this thread:
http://groups.google.com/group/the-lift-book/browse_thread/thread/61bfa890adcdb752
Derby supports BLOB, so we should probably use it unless there are compelling reasons not to.
From the list. Unconfirmed, but it sounds like overriding pdtPath makes the module stop working.
Currently, lift appears to generate JSON string values enclosed in single quotes such as ['hello', 'world']. Although this is valid for JavaScript strings, the same is not true for JSON strings, which must (for strict parsers) always be encloded in double quotes.
This occurred with lift 1.0 and server generated JSON via the JsonResponse class.
Test Mapper against Oracle
Lighthouse #8: http://liftweb.lighthouseapp.com/projects/26102/tickets/8
the default autocomplete options i.e.
val autocompleteOptions = JsRaw(...
need to be more easily set. I had to override and copy-paste the render function to change these. Making them settable without extending the class would be ideal. making the autocompleteOptions val an overridable outer function would be fine though.
Duplicate repository ids in JPA archetypes' POMs
Lighthouse #38: http://liftweb.lighthouseapp.com/projects/26102/tickets/38-duplicate-repository-ids-in-jpa-archetypes-poms
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.