Squeryl fails to reflect in debug mode only

这一生的挚爱 提交于 2020-01-02 08:16:06

问题


I can't debug (simple run works fine) my unit tests. Squeryl fails with the following exception:

error while reflecting on metadata for (Some(private scala.Option
com.company.play.model.db.mapping.Position.orgUnit2id),Some(public scala.Option
com.company.play.model.db.mapping.Position.orgUnit2id()),None,Set(@org.squeryl.annotations.ColumnBase(optionType=class java.lang.Object, name=, length=-1, scale=-1, value=ORG_UNIT2ID))) of class com.company.play.model.db.mapping.Position

java.lang.RuntimeException: error while reflecting on metadata for (Some(private scala.Option com.company.play.model.db.mapping.Position.orgUnit2id),Some(public scala.Option com.company.play.model.db.mapping.Position.orgUnit2id()),None,Set(@org.squeryl.annotations.ColumnBase(optionType=class java.lang.Object, name=, length=-1, scale=-1, value=ORG_UNIT2ID))) of class com.company.play.model.db.mapping.Position
    at org.squeryl.internals.PosoMetaData$$anonfun$4.apply(PosoMetaData.scala:115)
    at org.squeryl.internals.PosoMetaData$$anonfun$4.apply(PosoMetaData.scala:80)
    at org.squeryl.internals.PosoMetaData.<init>(PosoMetaData.scala:80)
    at org.squeryl.View.<init>(View.scala:66)
    at org.squeryl.Table.<init>(Table.scala:29)
    at org.squeryl.Schema$class.table(Schema.scala:340)
    at com.******.play.model.db.mapping.DBLibrary$.table(DBLibrary.scala:5)
    ...
Caused by: scala.MatchError: null
    at org.squeryl.internals.FieldMetaData$$anon$1.build(FieldMetaData.scala:466)
    at org.squeryl.internals.PosoMetaData$$anonfun$4.apply(PosoMetaData.scala:112)
    ... 22 more

I debug using IntelliJ IDEA latest version (13.1.4). Running both in IDEA & in console (sbt clean compile test) works fine.


回答1:


Switching from jdk 1.8 to jdk 1.7 solved the issue.



来源:https://stackoverflow.com/questions/25666490/squeryl-fails-to-reflect-in-debug-mode-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!