Number to big decimal mapping problem in ejb

B

Binu jose

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top