Thanx for your help, but I am still a little bit confused about this problem, since I did not have the Error with my previous version. Furthermore ojb should (and I am sure it works!) with tomcat. Maybe there is a more straightforward way to solve this problem?
Thx , Stéphane. >>> [EMAIL PROTECTED] 28.08.2002 15.27 Uhr >>> Hi Stéphane, On Wed, Aug 28, 2002 at 04:51:30PM +0200, Stephane Felten wrote: > hi, > I am using OJB0.9.5 in a webapp running on tomcat. I am not using the J2EE >persistance broker but the default one. I am getting an Error since the >TransactionImpl are created with a null Database. > The db is open and exists, I can use it for queries but some times when I try to get >a new transaction, I am getting an Error. > Is this because I am not using the J2EE broker? I am using OJB since a few month and >I never got this problem, do the new release impose the use of the J2EE mode? > > The LogMessage I get is the following : > > [org.apache.ojb.odmg.TransactionImpl] WARN: TransactionImpl created with null >DatabaseImpl. > > The Error I get is the following : > > "java.lang.NullPointerException > at org.apache.ojb.odmg.TransactionImpl.getBroker(Unknown Source)" This error seems to occur in multithreaded environments only. The Database instances are stored in a ThreadLocal (pbKeysForThread in OJB.java), so when your request is processed in a different thread the still opened Database instance is not found. There was a posting by Andrey Chernyh on August 21st containing a patch to OJB.java giving you a method to register your Database instance with the current thread. Seems to work fine for me so far... hope this helps, Jens -- Jens Krämer [EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>