1 Reply Latest reply on Dec 6, 2007 10:36 AM by kukeltje

    [Howto]: Hide WARN StatefulPersistenceContext : Narrowing pr

    dleerob

      There have been a number of threads and posts about the WARN message that appears, which looks something like:

      WARN StatefulPersistenceContext : Narrowing proxy to class org.jbpm.graph.node.StartState - this operation breaks ==

      As has been mentioned numerous times before, it's not serious, it's just a warning, so you can ignore it. But, I find it does get annoying. So if you don't want that WARN message to be displayed, then Hibernate has kindly added a seperate logger for that warning message. As long as you have Hibernate version 3.1.2 or above, you can hide it. The logger is "org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog".
      So, for example, in my log4j.properties file, I have added a line:
      log4j.logger.org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog=ERROR

      This will mean that the WARN message does not get logged, and wont fill up your console or log files.

      Hope this helps some of you, and maybe this post will save Ronald some future headaches :)

      Here's where I learnt about this: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1367