我在WildFly 8.1上运行Web应用程序并使用SQL Server 2012。 Project是一个maven项目,我在IntelliJ IDEA中运行它。
使用JRebel Run进行正常运行和一切都可以正常工作,除了一部分。
我可以通过以下方法进行以下查询并从中获取单个结果:
select IIF(number.accountnumber is not null,number.accountnumber,def.accountnumber)
from salesaccountnumber def
left join salesaccountnumber number on
number.fk_service = def.fk_service
and number.pricetitle= 'STARTINGPRICE'
where def.pricetitle = 'STARTINGPRICE'
and def.fk_service = 2
当我在没有JRebel的情况下正常运行时,它只是进行查询,一切都很好。
然而,当我使用JRebel运行我的项目时,我得到以下异常并且应用程序获得内部服务器错误:
11:00:15,801 INFO [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] (default task-18) HHH000010: On release of batch it still contained JDBC statements
11:00:15,802 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-18) SQL Error: 515, SQLState: 23000
11:00:15,802 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-18) Cannot insert the value NULL into column 'fk_task', table 'myproject.dbo.workmonitoring'; column does not allow nulls. UPDATE fails.
11:00:15,810 ERROR [org.hibernate.engine.jdbc.batch.internal.BatchingBatch] (default task-18) HHH000315: Exception executing batch [could not execute batch]
11:00:15,811 ERROR [com.mycompany.myproject.tasks.billing.bill.BillSendingAction] (default task-18) [SESSION=2ZaTeQJ3T7ETUdaHz4SnH2Tc]Could not build/send INVOICE out of bill : javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute batch
11:00:15,812 ERROR [stderr] (default task-18) javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute batch
当应用程序在IDEA中正常运行时(以及在SQL Management Studio中手动执行查询时),但是在使用JRebel运行应用程序时,它是如何工作的?
当然,两个运行计划都具有相同的maven目标,相同的部署策略等,因为它们是在同一个IDEA Edit Configuration...
窗口中编辑的。
任何想法在哪里看?
编辑:
跟踪级jrebel日志记录在问题的开头给出了这个:
2017-05-30 12:15:02.170 DEBUG [172] [Hibernate] Entity Persister not found for 'mycompany.pricing.PriceTitle', triggering reload if enough time has passed
2017-05-30 12:15:02.171 TRACE [172] [Hibernate] $Thread: default task-38: java.lang.Exception
at org.zeroturnaround.javarebel.integration.hibernate.HibernateWrapper.logThreadStackTrace(HibernateWrapper.java:88)