0 Replies Latest reply on Oct 12, 2012 3:37 AM by David Aden

    Hibernate configuration survives CF restart -- ??

    David Aden

      On several occasions, most recently over the last two days, I ran into a problem where Hibernate appears to be holding onto incorrect configuration information even through a CF restart. I have found other posts about people running into similar problems but have yet to see any word from Adobe on this incredibly frustrating problem. Here's how it showed up for me:


      1. I'm on Win 7, CF9.0.2.
      2. I removed two many-to-many properties from a persisted CFC that had been in the CFC for a long time but weren't being used yet (put there early in the project for future use).
      3. On trying to ormReload() with dbCreate = "DropCreate", Java threw a nullPointer Error.
      4. I searched to see if the properties were being referenced anywhere else or if I'd left the other side of the relationship in place by mistake and confirmed it wasn't used anywhere else.
      5. I tore my hair out for about 3 hours trying to trace it down, got another developer to look at it and with a little tweaking (nothing significant) he got it to start fine. On my system if I put the unused properties back it would start just fine. Remove them and NPE.
      6. I can only describe the behavior as flakey. Actually the debugging spanned a couple of days. The second day I came back and started the app fresh and it started fine without the properties in there. I stopped/started CF to test it and restarted the ap and the NPE showed up again.
      7. It got to the point where it would sort of work once, but showed up again on ormReload() unless I stopped/started CF


      As I said, it was all flakey -- it came and went somewhat randomly but if I left out the properties that were not used and hadn't been used for weeks, it showed up. Put them in and it worked fine.


      I searched the CF install directory for possible generated config files. I deleted everything in cfcclasses.


      Having read that someone else had a similar problem that was solved by creating a new site and newly installing the app,


      I did the same and it worked fine -- starts with no problem and ormReload() works as it should.


      The point is that Hibernate appears to be writing some record somewhere that survives CF restart which I haven't found documented anywhere.


      Could Adobe please identify what the hell is retained between CF start/stops because this was 5 or more hours of time utterly wasted on this project. I ran into a similar thing on an earlier project that due to the same kind of flakiness in which some config seemed to survive CF restart and threw errors I couldn't get rid of with any amount of changes to the CFCs, I had to abandon using Hibernate all together.