Thanks. Getting closer but not quite there. Exactly did you put in 
your src/examples/jdo/database.xml to get it to work? I guessed
it wanted the jdbc driver class but that's apparently not it.

PS: Might I suggest adding a readme with the instructions you sent me?

<!DOCTYPE databases PUBLIC "-//EXOLAB/Castor JDO Configuration DTD 
Version 1.0//EN"
   "http://castor.exolab.org/jdo-conf.dtd";>
<database name="test" engine="mysql" >
   <data-source class-name="org.gjt.mm.mysql.Driver">
     <params
       user="xxxx"
       password="xxxxx"
       port-number="3306"
       server-name="localhost"
     />
   </data-source>
   <mapping href="mapping.xml" />
</database>


[bcox@linux:/usr/local/castor-0.9.3.9]$ example.sh jdo
[test] Loading mapping descriptors from 
file:/usr/local/castor-0.9.3.9/build/examples/jdo/mapping.xml
java.lang.IllegalStateException: Data source class name does not 
extend javax.sql.DataSource
[test] org.exolab.castor.jdo.DatabaseNotFoundException: Nested error: 
java.lang.IllegalStateException: Data source class name does not 
extend javax.sql.DataSource{file: 
file:/usr/local/castor-0.9.3.9/build/examples/jdo/database.xml; line: 
10; column: 5}
[test] java.lang.IllegalStateException: Data source class name does 
not extend javax.sql.DataSource
[test]  at 
org.exolab.castor.jdo.conf.DataSource.createParams(DataSource.java:131)
[test]  at 
org.exolab.castor.jdo.conf.DataSourceDescriptor$2.newInstance(DataSourceDescriptor.java:130)
[test]  at 
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1023)
[test]  at 
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
[test]  at 
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1197)
[test]  at 
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862)
[test]  at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1238)
[test]  at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
[test]  at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
[test]  at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:338)
[test]  at 
org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:241)
[test]  at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:559)
[test]  at jdo.Test.run(Test.java:98)
[test]  at jdo.Test.main(Test.java:62)


At 5:46 PM -0700 2/18/02, Bruce Snyder wrote:
>This one time, at band camp, Brad Cox said:
>
>BC>No, belay that. Tests work but examples still don't.
>BC>
>BC>I've tried
>BC>    sh build.sh all
>BC>    sh build.sh tests
>BC>    sh build.sh examples
>BC>
>BC>    sh text.sh xml # this works
>BC>    sh examples.sh # this doesn't; xml/Test not found
>BC>
>BC>Might have small typos in the above; I'm typing this from memory from
>BC>my other machine.
>
>Brad,
>
>I'm not exactly sure what's going on in your situation, but I just
>got everything working in about 10 minutes time. Here are the steps
>I took to run the examples using MySQL:
>
>1) wget ftp://ftp.exolab.org/pub/castor/castor_0.9.3.9/castor-0.9.3.9-src.tgz
>    (The other alternative is to get the source from the CVS tree.
>     See http://castor.exolab.org/cvs.html)
>
>2) tar zxvf ./castor-0.9.3.9-src.tgz
>3) cd castor-0.9.3.9
>4) chmod +x ./*.sh
>5) for i in ./*.sh; do dos2unix $i $i; done
>6) echo $JAVA_HOME (just to be sure it's properly set)
>7) edit src/examples/jdo/database.xml appropriately
>8) create database tables using src/examples/jdo/create.sql
>9) ./build.sh examples (builds everything because of dependencies in 
>the build descriptor)
>10) add mm.mysql-2.0.8-bin.jar to the CLASSPATH
>11) ./example.sh jdo
>
>I hope this helps.
>
>Bruce
>--
>
>perl -e 'print 
>unpack("u30","<0G)U8V4\@4VYY9&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

-- 
Brad Cox, PhD; [EMAIL PROTECTED] 703 361 4751
o For industrial age goods there were checks and credit cards.
    For everything else there is http://virtualschool.edu/mybank
o Java Interactive Learning Environment http://virtualschool.edu/jile
o Java Web Application Architecture: http://virtualschool.edu/jwaa

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to