I was referring to the Apache classes in org.apache.ojb.sql.jdori.sql.*. I didn't find these in the OJB distrubution. I had to get them from CVS.
-----Original Message----- From: Mahler Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 11:43 PM To: 'OJB Users List' Subject: RE: JDO - getObjectById() Hi Shawn, > -----Original Message----- > From: Shawn Vincent [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 01, 2003 10:29 PM > To: 'OJB Users List' > Subject: RE: JDO - getObjectById() > > > I was able to get it to work by bringing in the soucre and > compiling it in > with my project. I suspect something wasn't on the classpath > correctly. I > also had to get the source for the JDO classes and compile > them since I > haven't found them in the OJB distribution. Is there a seperate > distribution for the JDO files that you know of? Which JDO classes do you mean? The javax.jdo.* stuff? (jdo.jar) Or the JDO Reference Implementation ? (jdori.jar) They are both shipped with the JDO reference implementation from SUN. Download and setup documented here: http://db.apache.org/ojb/tutorial4.html#Running%20the%20Tutorial%20Applicati on cheers, Thomas > > Thanks for your willingness to help, > Shawn > > > Here is the code that was giving the problem: > > public void importFile(String pathName){ > exceptions = ExceptionList.getInstance(); > createReader(pathName); > OjbStorePMF factory = new OjbStorePMF(); > PersistenceManager pm = factory.getPersistenceManager(); > > pm.currentTransaction().begin(); > > > while(reader.nextLine()){ > Pool newPool = getPool(); > Identity oid = new Identity(newPool); > > logger.finest("Identity obtained: " + (oid != > null)); > > Pool existingPool = (Pool)pm.getObjectById(oid, > false); > logger.finest("Pool obtained: " + > (existingPool != > null)); > if(existingPool != null){ > logger.finest("Pool obtained: " + > existingPool.toString()); > } > > if(existingPool == null){ > newPool.setAddDate(new Date()); > pm.makePersistent(newPool); > } > else { > > > existingPool.setPoolName(newPool.getPoolName()); > existingPool.setModUser("import > module"); > > existingPool.setModDate(newPool.getModDate()); > > } > > } > > pm.currentTransaction().commit(); > > > pm.close(); > } > > protected Pool getPool(){ > Pool pool = new Pool(); > > reader.nextField(); > pool.setPoolCode(reader.getField()); > > reader.nextField(); > pool.setPoolName(reader.getField()); > > pool.setModDate(new Date()); > > return pool; > } > > > > -----Original Message----- > From: Thomas Mahler [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 01, 2003 10:19 AM > To: OJB Users List > Subject: Re: JDO - getObjectById() > > > please post the code that produces the error, indicate where > the problem > occurs. Stacktrace would be nice. > > Shawn Vincent wrote: > > I am trying to duplicate the JDO example for using > getObjectById() to look > > up an object. I try to create the Identity class, but I > keep getting an > > exception that there are no implementors defined for the interface > > org.apache.ojb.broker.Identity. Can anyone help me with this? > > > > Thanks, > > Shawn Vincent > > Technical Architect > > Sogeti-USA > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
