Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Number to big decimal mapping problem in ejb

Reply
Thread Tools

Number to big decimal mapping problem in ejb

 
 
Binu jose
Guest
Posts: n/a
 
      07-02-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to generate "ejb-jar.xml" from EJB class (source)? "ejb-jar.xml" appserver independent? Raymond Schanks Java 0 08-03-2010 08:21 AM
GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf ASP .Net 0 12-26-2008 09:29 AM
GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf ASP .Net Web Controls 0 12-26-2008 06:11 AM
GIDS 2009 Java:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf Python 0 12-24-2008 07:35 AM
GIDS 2009 Java:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf Ruby 0 12-24-2008 05:07 AM



Advertisments