Hello,
        Thanx I'll try 

Regards
        marco

-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED] 
Sent: 08 November 2004 10:03
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] FW: castor error


Marco,

in your JDO configuration, 

<database name="test" engine="mysql" >
    <data-source class-name="com.mysql.jdbc.Driver">
        <params server-name="localhost" database-name="test"
port-number="3306" user="***" password="***" />
    </data-source>

  <mapping href="mapping.xml" />
</database>

you are using the <data-source> element to specify that Castor should
use a JDBC DataSource fort database access. Problem is that in the
class-name 
attribute you are still using the vanilla 'Driver' class, which is
plainly wrong. I do not know the class names of the mySQL DataSource
implementations by 
heart, but try to use something along the lines 

com.mysql.jdbc.jdbc2.optional.MySqlDatSource

Or even better, have a look at the documentation that came with mySQL
JDBC driver.

Regards
Werner

On Mon, 8 Nov 2004 09:08:30 -0000, Marco Mistroni wrote:

>Hello there,
>       I am experiencing a problem in using Castor JDO together with 
>Mysql4.1.1 alpha.
>I am getting an exception whenever my code tries to read the
>database.xml file..
>The exception is as follow
>
>com.myapp.exceptions.PersistenceException: java.lang.Exception: Error
in
>initial
>izing cpmgr!org.exolab.castor.mapping.MappingException: Nested error:
>java.lang.
>IllegalStateException: Data source class name does not extend
>javax.sql.DataSour
>ce{file:
>file:C:/Sw/Budget-Project/Backend/target/test-classes/database.xml;
>lin
>e: 5; column: 113}
>
>I am using
>- mysql connector 3.0.15    -   3.1.4
>- castor 0.9.5.3
>
>anyone can tell me what's wrong?
>I have noticed that between castor 0.9.5.2 and castor 0.9.5.3 the
syntax
>of 
>Database.xml changes....
>
>Anyone can help?
>
>Thanx in advance and regards
>       Marco
>
>



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



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

Reply via email to