Please use something like the method described at http://sourceforge.net/forum/message.php?msg_id=1720229
The critical point is that to let application containers have an feasible chance for providing the correct classloading a library (such as OJB) should do the following: If thread.contextclassloader exists use it (remember that it can be null) else use class forname as an fallback If this does not work in Jbuilder 5 and Tomcat there is something wrong with those tools :) /max ----- Original Message ----- From: "Strickstrock, Frank" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 26, 2002 9:18 PM Subject: getContextClassLoader > Hi, > I found a mail (see below) in the MailingListArchive, but no answer to the > issue. > When we upgraded to 0.9.5 we also had this problem and had to change several > OJB classes. > Now we'd like to jump to 0.9.7. > Looking at the new OJB classes, I see that still the classes are loaded via: > clazz = Class.forName(className, true, > Thread.currentThread().getContextClassLoader()); > This does not work within our develeopment environment (JBuilder5 & Tomcat). > Any idea, what's the problem ? > Is is also feasable to use "Class.forName(className);" ? > thanks > Frank Strickstrock. > > > From: Mark Rowell <[EMAIL PROTECTED]> > > Subject: getContextClassLoader returning null > > Date: Mon, 2 Sep 2002 15:36:53 +0100 > > Content-Type: text/plain; > > charset="iso-8859-1" > > > > > Hi > > > > I have been running with the latest version of OJB and SQL Server and all is > > OK. > > However, I need to use Excel as a front end and I am using the J-Integra > > Java/COM > > bridge to call my Java stuff (which is exposed as COM objects). When I run > > in this way > > OJB does not startup, as the call to getContextClassLoader in the load() > > method of > > the class ConfigurationAbstractImpl fails as the method returns null for the > > context class loader. > > > > I have patched it by setting the context class loader with the system class > > loader. > > First off, I was wondering if this was acceptable, and then if so, I was > > wondering if anyone could patch the CVS > > tree (I dont have access) so I dont have to reapply my patch when the next > > release comes out. > > > > Also, can I make a request or all methods in StatementManager to use the > > field conversions on primary key values > > as I need to use timestamps in some of my classes and I had to patch > > StatementManager to get it to work. > > > > Many thanks > > > > Mark Rowell > > > > ---------------------------------------------------------------- > > Mark Rowell > > CreditTrade > > > > T: +44 (020) 7400 5078 > > M: mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>