On Thu, 23 May 2002, Ned Wolpert wrote:
> Why are you setting the class loader twice? It can only use one?
I thought you had to do it for every class in the mapping file; I guess I
need to research exactly what it does. Sorry; I'm new to JDO. (I was
calling this stuff at one point from a static method, where getClass()
didn't work.)
> JDO jdo = new JDO();
> jdo.setClassLoader(theOneClassLoaderYouWant);
> jdo.setConfiguration(getClass().getResource("/database.xml").toString());
> jdo.setDatabaseName("clownbike");
> db = jdo.getDatabase();
> db.begin();
JDO jdo = new JDO();
jdo.setDatabaseName("clownbike");
jdo.setConfiguration(getClass().getResource("/database.xml").toString());
jdo.setClassLoader(getClass().getClassLoader());
db = jdo.getDatabase();
Okay, this is interesting:
Error: Nested error: java.io.FileNotFoundException:
/home/jphekman/src/clownbike/mapping.xml (No such file or directory)
The old error was:
> > Error: Nested error: org.xml.sax.SAXException: Parsing Error : File
> > "file:///home/jphekman/src/clownbike/mapping.xml" not found.
> > Line : 0 Column : 0
It is still looking for the same file, but that's interesting that it
seems to break at a slightly different point.
j
---
"Users complain that they receive too much spam, while spammers protest
messages are legal." -InfoWorld
"You do not have to do everything disagreeable that you have a right to
do." -Judith Martin (Miss Manners)
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev