从3.6.0升级到3.6.9后出现ExceptionInInitializerError

时间:2015-11-11 21:07:47

标签: querydsl

我已经从querydsl 3.6.0升级到3.6.9并且一些查询因 ExceptionInInitializerError 而失败。
我已经仔细检查了所有实体,它们至少有一个受保护的空构造函数。我试图调试它,但没有找到任何有用的东西。

我试图展示实体的用法

Position -> Order -> ProfitCenter

查询

new JPAQuery(em).from(QPosition.position).list(QPosition.position)

堆栈跟踪

java.lang.ExceptionInInitializerError
    at de.company.prodplan.position.QPosition.<init>(QPosition.java:147)
    at de.company.prodplan.position.QPosition.<init>(QPosition.java:126)
    at de.company.prodplan.position.QPosition.<clinit>(QPosition.java:23)
    at de.company.prodplan.position.PositionRepository.findPositionFrom(PositionRepository.java:262)
    at de.company.prodplan.position.PositionRepositoryTest.shouldFindPositionWithOneDimensionInWidthOrHeight(PositionRepositoryTest.java:540)
Caused by: java.lang.NullPointerException
    at de.company.core.QProfitcenterName.<init>(QProfitcenterName.java:31)
    at de.company.prodplan.data.company.QProfitcenter.<init>(QProfitcenter.java:38)
    at de.company.prodplan.data.company.QProfitcenter.<init>(QProfitcenter.java:61)
    at de.company.prodplan.order.QOrder.<init>(QOrder.java:96)
    at de.company.prodplan.order.QOrder.<init>(QOrder.java:75)
    at de.company.prodplan.order.QOrder.<clinit>(QOrder.java:23)
    ... 39 more

感谢任何提示。

0 个答案:

没有答案