Thanks, I didn't see that. Super helpful. Super product.
Phil Ralf Joachim a écrit : > > Hi Philip, > > if you try to use CVS version of castor you have to change your database.xml > as follows: > > <?xml version="1.0" ?> > <!DOCTYPE databases PUBLIC "-//EXOLAB/Castor JDO Configuration DTD Version > 1.0//EN" > > "http://castor.exolab.org/jdo-conf.dtd"> > > <jdo-conf> > <database name="aip9" engine="oracle" > > <driver url="jdbc:oracle:thin:@142.3.26.15:1526:AIP" > class-name="oracle.jdbc.driver.OracleDriver"> > <param name="user" value="aiptest"/> > <param name="password" value="aiptest"/> > </driver> > <mapping href="etc/mapping.xml" /> > </database> > <transaction-demarcation mode="local" /> > </jdo-conf> > > Regards > Ralf > > ----- Original Message ----- > From: "Philip DONAGHY" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, September 30, 2004 3:23 PM > Subject: [castor-dev] Unable to find FieldDescriptor for 'driver' in > ClassDescriptor of > > > > > Hi all, > > > > I just updated my castor jar using the daily snapshot source and I got > > this error. I am migrating from 0.9.5.3. I am using j2sdk1.4.2_04. Below > > is the stack trace, the database.xml, the mapping.xml, and even the > > source code that all works with 0.9.5.3. > > > > unable to find FieldDescriptor for 'driver' in ClassDescriptor of > > jdo-conf > > org.xml.sax.SAXException: unable to find FieldDescriptor for 'driver' in > > ClassDescriptor of jdo-conf > > at > > org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1802) > > at > > org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1302) > > at > > org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376) > > at > > org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1197) > > at > > org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862) > > at > > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1238) > > at > > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) > > at > > org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035) > > at > > org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:608) > > at > > org.exolab.castor.jdo.engine.JDOConfLoader.loadConfiguration(JDOConfLoader.java:95) > > at > > org.exolab.castor.jdo.engine.JDOConfLoader.getDatabase(JDOConfLoader.java:134) > > at > > org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:235) > > at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:584) > > at test.finaixm.oql.LoadRte.process(LoadRte.java:26) > > at test.finaixm.oql.LoadRte.main(LoadRte.java:60) > > > > I checked out the jdo-conf.xsd and the mapping.xsd files but I don't see > > any anomaly. > > > > <!DOCTYPE databases PUBLIC "-//EXOLAB/Castor JDO Configuration DTD > > Version 1.0//EN" > > "http://castor.exolab.org/jdo-conf.dtd"> > > > > <database name="aip9" engine="oracle"> > > <!-- Findev --> > > <driver class-name="oracle.jdbc.driver.OracleDriver" > > url="jdbc:oracle:thin:@142.3.26.15:1526:AIP"> > > <param name="user" value="aiptest" /> > > <param name="password" value="aiptest" /> > > </driver> > > <mapping href="etc/mapping.xml" /> > > </database> > > > > Mapping is XSLT generated so sorry for the formatting. > > > > <?xml version="1.0" encoding="UTF-8"?> > > <mapping> > > <key-generator alias="SEQ" name="SEQUENCE"> > > <param value="seq_id" name="sequence"/> > > </key-generator> > > > > > > <class identity="addrId " name="db.finaixm.Address" key-generator="SEQ"> > > <cache-type type="none"/> > > <map-to table="AIPTEST.ADDRESS"/> > > <field name="addmAddrMId" type="long"> > > <sql name="ADDM_ADDR_M_ID"/> > > </field> > > <field name="addrId" type="long"> > > <sql name="ADDR_ID"/> > > </field> > > <field name="codeTarget" type="string"> > > <sql name="CODE_TARGET"/> > > </field> > > <field name="codeType" type="string"> > > <sql name="CODE_TYPE"/> > > </field> > > <field name="dateCancelled" type="timestamp"> > > <sql name="DATE_CANCELLED"/> > > </field> > > <field name="dateEnd" type="timestamp"> > > <sql name="DATE_END"/> > > </field> > > <field name="dateStart" type="timestamp"> > > <sql name="DATE_START"/> > > </field> > > <field name="owner" type="string"> > > <sql name="OWNER"/> > > </field> > > <field name="txtAddress" type="string"> > > <sql name="TXT_ADDRESS"/> > > </field> > > <field name="txtRmk" type="string"> > > <sql name="TXT_RMK"/> > > </field> > > > > </class> > > > > .. > > > > <class identity="vid " name="db.finaixm.VorTimesheet" > > key-generator="SEQ"> > > <cache-type type="none"/> > > <map-to table="AIPTEST.VOR_TIMESHEET"/> > > <field name="codeCombTil" type="string"> > > <sql name="CODE_COMB_TIL"/> > > </field> > > <field name="codeCombWef" type="string"> > > <sql name="CODE_COMB_WEF"/> > > </field> > > <field name="codeDay" type="string"> > > <sql name="CODE_DAY"/> > > </field> > > <field name="codeDayTil" type="string"> > > <sql name="CODE_DAY_TIL"/> > > </field> > > <field name="codeEventTil" type="string"> > > <sql name="CODE_EVENT_TIL"/> > > </field> > > <field name="codeEventWef" type="string"> > > <sql name="CODE_EVENT_WEF"/> > > </field> > > <field name="codeTimeRef" type="string"> > > <sql name="CODE_TIME_REF"/> > > </field> > > <field name="codeType" type="string"> > > <sql name="CODE_TYPE"/> > > </field> > > <field name="dateValidTil" type="string"> > > <sql name="DATE_VALID_TIL"/> > > </field> > > <field name="dateValidWef" type="string"> > > <sql name="DATE_VALID_WEF"/> > > </field> > > <field name="timeRelEventTil" type="long"> > > <sql name="TIME_REL_EVENT_TIL"/> > > </field> > > <field name="timeRelEventWef" type="long"> > > <sql name="TIME_REL_EVENT_WEF"/> > > </field> > > <field name="timeTil" type="timestamp"> > > <sql name="TIME_TIL"/> > > </field> > > <field name="timeWef" type="timestamp"> > > <sql name="TIME_WEF"/> > > </field> > > <field name="vid" type="long"> > > <sql name="VID"/> > > </field> > > <field name="vorVerId" type="long"> > > <sql name="VOR_VER_ID"/> > > </field> > > > > > > > > </class> > > > > </mapping> > > > > And the code that is getting executed : > > > > public void process() throws Exception { > > // Obtain all Rte objects from the database > > JDO jdo = new JDO(); > > jdo.setDatabaseName("aip9"); > > jdo.setConfiguration("etc/database-findev.xml"); > > jdo.setClassLoader(getClass().getClassLoader()); > > Database database = jdo.getDatabase(); > > database.begin(); > > Query queryRte = database > > .getOQLQuery("SELECT v FROM db.finaixm.Rte v > > WHERE verId=$"); > > queryRte.bind(new Long(1)); > > QueryResults queryResultsRte = queryRte.execute(); > > TreeBidiMap RteUidMap = new TreeBidiMap(); > > while (queryResultsRte.hasMore()) { > > db.finaixm.Rte element = (db.finaixm.Rte) > > queryResultsRte > > .nextElement(); > > // Insert them as RteUid objects > > RteUid RteUid = new RteUid( > > element); > > RteUidMap.put(RteUid, element.getRtemCodeRteId()); > > } > > System.out.println("size : " + RteUidMap.size()); > > queryResultsRte.close(); > > queryRte.close(); > > database.commit(); > > database.close(); > > } > > > > Thanks for any help, > > Phil > > > > > > > > ----------------------------------------------------------- > > 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
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev