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. Advertising

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. Shaguf
    Replies:
    0
    Views:
    368
    Shaguf
    Dec 24, 2008
  2. Shaguf
    Replies:
    0
    Views:
    463
    Shaguf
    Dec 26, 2008
  3. Raymond Schanks
    Replies:
    0
    Views:
    663
    Raymond Schanks
    Aug 3, 2010
  4. Shaguf
    Replies:
    0
    Views:
    250
    Shaguf
    Dec 26, 2008
  5. Shaguf
    Replies:
    0
    Views:
    227
    Shaguf
    Dec 24, 2008
Loading...

Share This Page