-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 
Author Message
 Post subject: Logging Change in alpha 5?
PostPosted: Sat Sep 03, 2005 6:42 pm 
Beginner
Beginner

Joined: Fri Mar 04, 2005 7:12 pm
Posts: 34
Have been working with alpha 4 tools and have set of objects and mapping files that work. Current software launchable in a plug in app that load some tables and makes a treeviewer. Updated to 5.0 tools (removed earlier version first).

My JUnit tests, which simply load some entities and persist them, and then delete them, did not initially work because I had a delete-orphan cascade on a single valued association (worked with 3.0). Eliminated the cascade and then all the unit tests work.

When I try to run a plug in app and load the tables in the same way, the program goes into a debug logging mode. I have had a log4j.properties file that previously worked. Changes in this file had no impact on this behavior, so I removed the file completely. Nevertheless, Hibernate goes into DEBUG mode in the logger. Still running and logging after nearly ten minutes.

Rebuilt entire Eclipse environment from scratch, and verified that only change made was updating to alpha 5, then had to fix the Buddy registering system, tests run, app goes into apparently infinite debug log.

Is there a default logging setup in the new tools that flips into debug mode? Have searched project for other log4j configuration files to no avail.

_________________
J. Michael Dean, MD


Top
 Profile  
 
 Post subject: Follow up
PostPosted: Sat Sep 03, 2005 7:21 pm 
Beginner
Beginner

Joined: Fri Mar 04, 2005 7:12 pm
Posts: 34
Rebuilt Eclipse and returned to 3.0 with alpha 4 distribution and software launches as initially described without flipping into DEBUG logging mode. However, there is more logging activity when I launch as app than when I am running unit tests, so Eclipse is obviously doing something different with respect to logging.

_________________
J. Michael Dean, MD


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 04, 2005 1:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
The logging of hibernate tools in alpha5 and previous is controlled by the log4j.properties inside the org.hibernate.eclipse-x.x.jar.

Are you doing something else than just using the tools ? Are you adding something on top or how ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 04, 2005 8:15 pm 
Beginner
Beginner

Joined: Fri Mar 04, 2005 7:12 pm
Posts: 34
Not doing anything else on top - I run all the code through HibernateUtil as on the CVS (months ago). I am using the Eclipse Buddy registration. I did not realize there was a log4j.properties file in the org.hibernate.eclipse jar.

BTW - you may want to add the buddy registration line at the end of your manifest.mf file anyway. Eliminates the problem with Eclipse.

Thanks for the reply. The product is superb and the tone of this forum keeps me in the books before asking, but that has taught me a lot more than a simple answer.

_________________
J. Michael Dean, MD


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 05, 2005 12:39 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
which problem ? and what buddy class loading line(s) is it you are exactly using ?

i know about buddy classloading but it does not solve my biggest need (dynamic loading of classes only known at runtime) so we use a custom classloader.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 05, 2005 11:17 pm 
Beginner
Beginner

Joined: Fri Mar 04, 2005 7:12 pm
Posts: 34
As I put in the Wiki at your request a few months ago. If you put the following line in MANIFEST.MF right at the end:

Eclipse-BuddyPolicy: registered

then the user of the Hibernate library places in their plugin or RCP MANIFEST.MF

Eclipse-RegisterBuddy:org.hibernate.eclipse

In the user's plugin class start method, they add the line

Class.forName("myplugin.HibernateUtil"); // insert full class name

(assuming they use HibernateUtil as their entry into Hibernate).

This eliminates the problem with Hibernate not being available to code that doesn't yet exist, etc.

From user standpoint, if you insert that single line in manifest.mf, then user only has to work on own code, etc.

_________________
J. Michael Dean, MD


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 1:06 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Again - I don't understand why you want it in the eclipse hibernate tools plugin unless you are building on top of the plugins - and that is not what the hibernate tools plugins are for (yet).

Please tell me what does not work when you dont have the buddy class loading activated in the plugins ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Logging Change in alpha5?
PostPosted: Tue Sep 06, 2005 2:35 pm 
Beginner
Beginner

Joined: Wed Nov 03, 2004 6:24 pm
Posts: 24
I have read the Q&A in this thread. I'm not able to locate log4j.properties in org.hibernate.eclipse.3.1.0.alpha5 or in the other three org.hibernate.eclipse.xxx jar files in the alpha5 download bundle.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 4:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
its in the jar, that is in the jar

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 12, 2005 9:47 am 
Beginner
Beginner

Joined: Fri Mar 04, 2005 7:12 pm
Posts: 34
Max - I realize now that I got a bit lazy, and I have been building on top of the tool plugins instead of a simple wrapped hibernate library. So I should simply wrap hibernate and put the Buddy Registration lines into the manifest.mf of that plugin.

The behavior that is fixed by buddy registration is the problem of Hibernate not being seen by code in Eclipse when running outside the JDT environment; since the classpath for Hibernate includes the mapping files, the code will fail because of failure to find any of these. Problem is solved by the buddy registration system.

_________________
J. Michael Dean, MD


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.