0

I'm running a web application on WildFly 8.1 and using SQL Server 2012. Project is a maven project and I'm running it in IntelliJ IDEA.

Everything works fine with normal Run AND with JRebel Run, except ONE part.

There's a method where I make following query and get a single result from it:

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

When I run it normally without JRebel, it just makes the query and everything is fine.

However, when I run my project with JRebel, I get following Exception and application gets Internal Server Error:

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

How can it be, that this works when application is Run normally in IDEA (and when the query is executed manually in SQL Management Studio) but not when running it with JRebel?

Both Running plans have, of course, same maven goals, same deployment strategy etc. since they are edited in the same, IDEA's Edit Configuration... window.

Any ideas where to look?

EDIT:

Trace-level jrebel logging gives this in the beginning of the problem:

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)
Steve Waters
  • 3,348
  • 9
  • 54
  • 94
  • 2
    Seems to be a bug, but can not tell for sure without having a peek in the logs. I'd suggest turning to JRebel support by mailing support@zeroturnaround.com with the error description, its stack trace and a jrebel.log file from a reproducing runtime. – Tiit May 30 '17 at 08:48
  • I actually got a trace level log out of JRebel and might have found something. I updated it on the answer. I'll send that to zeroturnaround with the description of the problem. Thanks. – Steve Waters May 30 '17 at 09:36

0 Answers0