Hi,
I am getting the following exception when using Castor JDO:

Loading mapping descriptors from
file:/C:/technical/XML/castor-0.9.3/castor-0.9.3/examples/examples/jdo/mappi
ng.xml
SQL for creating myapp.Employee: INSERT INTO "ODDS_EMP" ("ID","NAME") VALUES
(?,?)
SQL for deleting myapp.Employee: DELETE FROM "ODDS_EMP" WHERE "ID"=?
SQL for updating myapp.Employee: UPDATE "ODDS_EMP" SET "NAME"=? WHERE "ID"=?
AND "NAME"=?
SQL for loading myapp.Employee:  SELECT "ODDS_EMP"."NAME" FROM "ODDS_EMP"
WHERE "ODDS_EMP"."ID"=?
Castor: Creating myapp.Employee (0)
org.exolab.castor.jdo.PersistenceException: Nested error:
java.sql.SQLException: invalid arguments in call
org.exolab.castor.jdo.PersistenceException: Nested error:
java.sql.SQLException: invalid arguments in call
        at
org.exolab.castor.jdo.engine.TransactionContextImpl.getConnection(Transactio
nContextImpl.java:207)
        at
org.exolab.castor.persist.ClassMolder.create(ClassMolder.java:866)
        at org.exolab.castor.persist.LockEngine.create(LockEngine.java:440)
        at
org.exolab.castor.persist.TransactionContext.create(TransactionContext.java:
705)
        at
org.exolab.castor.jdo.engine.DatabaseImpl.create(DatabaseImpl.java:337)
        at jdo.Test.run(Test.java:212)
        at jdo.Test.main(Test.java:53)


Here is the code that I am using:
           db.begin();//db is Database
         Employee emp = new Employee();
         emp.setId("0");
         emp.setName("pradeep");
         db.create(emp);
         db.commit();
The error occurs at the create statement.
I am using Oracle database.
Here is the mapping.xml file:
<!DOCTYPE databases PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
                           "http://castor.exolab.org/mapping.dtd";>
<mapping>

  <class name="myapp.Employee"  identity="id">
     <description>Computer definition, extends generic product</description>
     <map-to table="odds_emp" />
     <field name="id" type="string">
       <sql name="id" type="char" />
     </field>
     <field name="name" type="string">
       <sql name="name" type="char"/>
      </field>
  </class>
</mapping>

I am getting the same exception for /jdo/Test.java example given in ur
download.
Please let me know what is wrong.
Thanks in advance.
Pradeep Bhat

============================================================================
=====

DISCLAIMER

The information contained and transmitted by this e-mail is proprietary to
SLK Software Services Private Limited and is intended solely for the use of
the individual or entity to whom it is addressed and others authorized to
receive it. It may contain privileged or confidential information or
information exempt from disclosure as per applicable law. If you are not the
intended recipient or responsible for delivery to the intended recipient,
you may not copy, deliver, distribute or print this message. If it is a
forwarded message it may not have been sent with the authority of the
company. Any views or opinions are individual to the sender and are not the
opinion of or endorsed by the company. The attachments to this message have
been virus checked. However, the recipients may conduct their own virus
checks. SLK Software Services Pvt. Ltd. will not accept any claims for loss
or damages arising out of viruses.
============================================================================

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

Reply via email to