Bruce, thanks for your quick reply. It's in the directory where the class file is located. When I look at jdo with my debugger after the call to jdo.setConfiguration the dbConfig value is set as expected with a complete file path.
I'll have a look at the threa you suggest. Craig ----- Original Message ----- From: "Bruce Snyder" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 21, 2003 3:51 PM Subject: Re: [castor-dev] no configuration loaded problem > This one time, at band camp, Craig Johnson said: > > CJ>When I run the following code I get a "no configuration loaded for database > CJ>problem". > CJ> > CJ>My mapping file seems to be valid; ie, I can cause a mapping exception by > CJ>introducing an error. > CJ> > CJ>I assume it's something environmental, but every thing I've looked at seems > CJ>ok. > CJ> > CJ> > CJ>JDO jdo = new JDO(); > CJ>jdo.setDatabaseName( "sogn_membership" ); > CJ>jdo.setConfiguration( "database.xml" ); > CJ>jdo.setClassLoader( getClass().getClassLoader() ); > CJ>org.exolab.castor.jdo.Database db = jdo.getDatabase(); > > Craig, > > Where does the database descriptor reside on the filesystem? Based on the code > above, it will ONLY look for it in the directory from where the code is > executed. > > I always recommend loading it from the CLASSPATH. See the following thread > regarding this: > > http://www.mail-archive.com/[EMAIL PROTECTED]/msg07008.html > > Even though the suggestion is for a web container and a J2EE container, > either one will work in standalone code. > > Bruce > -- > perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");' > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev > ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
