Number to big decimal mapping problem in ejb

Discussion in 'Java' started by Binu jose, Jul 2, 2003.

  1. Binu jose

    Binu jose Guest

    hi all
    i am writing a CMP ,with oracle 9i as database and blazix as ejb
    server. i mapped my number fields in oracle db to
    java.math,BigDecimal, it compiles ok ,



    when i call create with java.math.BigNumber arguement , error comes
    saying
    javax.ejb.FinderException: java.rmi.RemoteException: SQL Error:
    [Microsoft][ODBC driver for Oracle][Oracle]ORA-00932: inconsistent
    datatypes: expected NUMBER got BINARY


    My code snippet follows
    java.math.BigDecimal id = new java.math.BigDecimal("44.22");
    try
    {
    // Obtain the EJB home
    Properties env = new Properties();
    env.put( "java.naming.factory.initial",
    "desisoft.ejb.client.JRMPFactory" );
    env.put( "desisoft.ejb.nameServer1",
    "localhost:2050" );
    Context ctx = new InitialContext( env );
    temp.TempHome sitesHome = (temp.TempHome)
    PortableRemoteObject.narrow(
    ctx.lookup( "Temp" ),
    temp.TempHome.class );


    temp.Temp bean = sitesHome.create(id);
    System.out.println(bean.getId().toString());




    TIA
    Binu Jose
     
    Binu jose, Jul 2, 2003
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. makok
    Replies:
    1
    Views:
    7,821
    Anders Hellerup Madsen
    Feb 23, 2004
  2. muss
    Replies:
    13
    Views:
    895
    Vladimir S. Oka
    Mar 27, 2006
  3. Replies:
    14
    Views:
    1,305
    Simon Biber
    Nov 16, 2006
  4. Shaguf
    Replies:
    0
    Views:
    797
    Shaguf
    Dec 24, 2008
  5. Shaguf
    Replies:
    0
    Views:
    689
    Shaguf
    Dec 26, 2008
  6. Raymond Schanks
    Replies:
    0
    Views:
    907
    Raymond Schanks
    Aug 3, 2010
  7. Shaguf
    Replies:
    0
    Views:
    439
    Shaguf
    Dec 26, 2008
  8. Shaguf
    Replies:
    0
    Views:
    442
    Shaguf
    Dec 24, 2008
Loading...