Scala Lift - Cloudbees 500错误,mongo记录

时间:2013-03-26 23:09:11

标签: mongodb scala lift cloudbees

我在本地和专用服务器环境中都有一个完美的运行版本的应用程序。

我现在正在通过云托管服务,但遇到了一个奇怪的错误,我非常感谢一些帮助。

有问题的错误来自为此模型创建的新记录:

    class Panel_Model private() extends MongoRecord[Panel_Model] with ObjectIdPk[Panel_Model] {

    def meta = Panel_Model

    object dbid extends LongField(this)
    object handle extends StringField(this, 50)
    object room extends StringField(this, 50)
    object user extends StringField(this, 50)
    object name extends StringField(this, 50)
    object element extends StringField(this, 50)

    object slide extends MongoJsonObjectListField(this, Panel_Model_Slide)

    object state extends JsonObjectField(this, Panel_Model_State) {
        def defaultValue = null.asInstanceOf[Panel_Model_State]
    }

    object time extends JsonObjectField(this, Panel_Model_Time) {
        def defaultValue = null.asInstanceOf[Panel_Model_Time]
    }

}


object Panel_Model extends Panel_Model with MongoMetaRecord[Panel_Model] {
    override def collectionName = "panels"
}


case class Panel_Model_Slide (

    handle: String,
    media: String,
    param: Map[String, String],
    content: String,
    view: String,
    index: Int,
    active: Int

) extends JsonObject[Panel_Model_Slide] {
     def meta = Panel_Model_Slide
}


object Panel_Model_Slide extends JsonObjectMeta[Panel_Model_Slide]


case class Panel_Model_State (

    ready: Int,
    active: Int,
    locked: Int,
    slide: Map[String, Int]

) extends JsonObject[Panel_Model_State] {
    def meta = Panel_Model_State
}


object Panel_Model_State extends JsonObjectMeta[Panel_Model_State]


case class Panel_Model_Time (

    created: Long

) extends JsonObject[Panel_Model_Time] {
    def meta = Panel_Model_Time
}


object Panel_Model_Time extends JsonObjectMeta[Panel_Model_Time]

只有在cloudbees环境中产生错误的实际调用是:

Panel_Model.createRecord.
dbid(dbid).
room(Room_Session.is).
user(User_Session.is).
name(fph.fileName).
handle(handle).
element(element).
state(Panel_Model_State(

    0, active, 0, Map(

    ("active" -> 1),
    ("total" -> 1)

)

)).
time(Panel_Model_Time(unix)).
save 

非常感谢任何帮助,提前谢谢

1 个答案:

答案 0 :(得分:1)

你应该看看日志中的错误(bees app:tail或web控制台),看看实际发生的错误是什么。

bees app:tail -a yourAppId - 当它处于错误状态时查看结果 - 这将有很大帮助。