gpt4 book ai didi

debugging - Squeryl 仅在 Debug模式下无法反射(reflect)

转载 作者:行者123 更新时间:2023-12-02 17:49:59 27 4
gpt4 key购买 nike

我无法调试(简单运行即可正常)我的单元测试。 Squeryl 失败并出现以下异常:

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

我使用 IntelliJ IDEA 最新版本(13.1.4)进行调试。在 IDEA 和控制台(sbt clean 编译测试)中运行都可以正常工作。

最佳答案

从 jdk 1.8 切换到 jdk 1.7 解决了该问题。

关于debugging - Squeryl 仅在 Debug模式下无法反射(reflect),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25666490/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com