Hi
I am trying to get a simple example of Castor JDO running. I am
using the following database and mapping files:
<!DOCTYPE databases PUBLIC "-//EXOLAB/Castor JDO Configuration DTD Version
1.0//EN"
"http://castor.exolab.org/jdo-conf.dtd">
<database name="CASTORTST" engine="mysql" >
<data-source class-name="org.gjt.mm.mysql.Driver"
url="jdbc:mysql://localhost/CASTORTST" >
<params user="" password="" server-name="localhost" />
</data-source>
<mapping href="ProductGroup.xml" />
</database>
<!DOCTYPE databases PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
"http://castor.exolab.org/mapping.dtd">
<mapping>
<!-- Mapping for ProductGroup -->
<class name="myapp.ProductGroup"
identity="id">
<description>Product group</description>
<map-to table="prod_group" xml="group" />
<field name="id">
<sql/>
<xml node="attribute"/>
</field>
<field name="name">
<sql dirty="check" />
<xml node="text" />
</field>
</class>
<mapping>
I get the following exception when I call jdo.getDatabase();
java.lang.IllegalStateException: Data source class name does not extend
javax.sql.DataSource at
org.exolab.castor.jdo.conf.DataSource.createParams(DataSource.java:131)
at
org.exolab.castor.jdo.conf.DataSourceDescriptor$2.newInstance(DataSourceDesc
riptor.java:130) at
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:10
23) at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
ava:321) at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXML
DocumentParser.java:209) at
org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator
.java:420) at
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.ja
va:580) at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidato
r.java:2675) at
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java
:797) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
cumentFragmentScannerImpl.java:743) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1445) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:328) at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:479) at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:521) at
org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:148) at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:972
) at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:338) at
org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.
java:241) at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:559) at
CastorTst.<init>(CastorTst.java:19) at CastorTst.main(CastorTst.java:44)
My class path is:
C:\Documents and Settings\jr.MPV\My
Documents\Downloads\Castor\extract\castor-0.9.3.9\jta1.0.1.jar;C:\Documents
and Settings\jr.MPV\My
Documents\Downloads\Castor\extract\castor-0.9.3.9\castor-0.9.3.9-xml.jar;C:\
Documents and Settings\jr.MPV\My
Documents\Downloads\Castor\extract\castor-0.9.3.9\jdbc-se2.0.jar;C:\Document
s and Settings\jr.MPV\My
Documents\Downloads\Castor\extract\castor-0.9.3.9\castor-0.9.3.9.jar;.;c:\Ka
wa4.01\kawaclasses.zip;c:\jdk1.3.1_01\lib\tools.jar;c:\jdk1.3.1_01\jre\lib\r
t.jar;c:\jdk1.3.1_01\jre\lib\i18n.jar
Anyone have any ideas what would cause this exception?
J.R.
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev