PW,

I did the work to understand log4j and you're right, it is amazingly
powerful.  I added a new appender to my configuration in log4j.xml
because all the literature I found said that the .properties approach
was being deprecated.  However, this has not worked, so I'm going to
try your method from the other post.

This should work...

   <!-- ======================= -->
   <!-- Hibernate -->
   <!-- ======================= -->
   
   <appender name="HIBERNATE"
class="org.jboss.logging.appender.DailyRollingFileAppender">
      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
      <param name="File" value="${jboss.server.log.dir}/hibernate.log"/>
      <param name="Append" value="false"/>

      <!-- Rollover at midnight each day -->
      <param name="DatePattern" value="'.'yyyy-MM-dd"/>

      <!-- Rollover at the top of each hour
      <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
      -->

      <layout class="org.apache.log4j.PatternLayout">
         <!-- The default pattern: Date Priority [Category] Message\n -->
         <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>

         <!-- The full pattern: Date MS Priority [Category]
(Thread:NDC) Message\n
         <param name="ConversionPattern" value="%d %-5r %-5p [%c]
(%t:%x) %m%n"/>
          -->
      </layout>
   </appender>
   
<logger name="org.hibernate">
<level value="DEBUG" />
</logger> 

   <category name="org.hibernate">
     <priority value="TRACE" />
     <appender-ref ref="HIBERNATE"/>
   </category>
   <category name="org.hibernate.SQL">
     <priority value="TRACE" />
     <appender-ref ref="HIBERNATE"/>
   </category>
   <category name="org.hibernate.type">
     <priority value="TRACE" />
     <appender-ref ref="HIBERNATE"/>
   </category>



--- In [email protected], "parkerwhirlow" <[EMAIL PROTECTED]>
wrote:
>
> 
> > All-in-all a very worthwhile exercise and my dev environment is now
> > more under my control.
> 
> Good to hear. was just replying to your previous post in this thread,
> and now I see you got it figured out. Excellent.
> 
> > 
> > I still can't figure out how to turn on debug logging in Hibernate,
> 
> See this other post where I figured out how to turn on the Hibernate
> logging. If you don't know about log4j, I suggest doing a few searches
> on it, and reading up about the log4j.properties file. It's a very
> powerful tool, and Hibernate has a TON of good logging, but its easy
> to get lost in it all if you just turn everything on to debug...
> 
> http://tech.groups.yahoo.com/group/flexcoders/message/59623
> 
> Hibernate has a sample log4j.properties in the Hibernate/etc directory
> 
> 
> 
> > The exception is thrown way down in the bowels of the Hibernate
> > session.save() method which is being called by
> > HibernateAssembler.createItem.  From Jeff's last post he seemed to be
> > suggesting that updateItem was in some way at fault.  I'm not quite
> > seeing how that relates to my problem, although I am clearly no
expert.
> > 
> 
> I'm not exactly sure how the problem would occur from createItem(),
> but take a look at my post here I mention what was causing it for me
> (was a lazy=false setting on the collection association of the object
> being updated)
> 
> http://tech.groups.yahoo.com/group/flexcoders/message/63471
> 
> The issue with the NOT NULL column was that once I had everything
> "working" the behavior it was doing was to null out all the FK values
> for the association, thereby dis-associating the children from the
> parent, then updating all the entries in the collection to point back
> to the parent. Once I made the association nullable, the update
> started working. (at least as far as FDS was concerned.
> 
> 
> > 
> > Jeff, if you have a new version of the Assembler code and want a
> > guinea-pig, send it my way.
> > 
> 
> Likewise!
> 
> cheers,
> PW
>


Reply via email to