Hi-

Ah, you're right.  Works like a charm.  Thanks!

-Mike


On Thu, Feb 03, 2000 at 08:24:42AM +0000, Dirk Haase wrote:
> Hi Mike,
> 
> the bean field should probably be a java.math.BigDecimal. This is a
> common type for primary keys.
> 
> dirk
> 
> 
> Mike Bridge wrote:
> > 
> > Hi-
> > 
> > Oops, sorry, that should read that it throws an
> > exception "when this field has a non-null value, but works when
> > the field contains a NULL".  The double is quite small, e.g.
> > 10000.00
> > 
> > -Mike
> > 
> > On Wed, Feb 02, 2000 at 04:19:29PM -0700, Mike Bridge wrote:
> > > I have a container managed entity bean which corresponds to an
> > > MSSQL 7 table with a field with an DECIMAL(18,2) type.  I'm trying
> > > to load a bean from an existing record, but I get the following
> > > stack from the EJBServer when this field has a NULL value (it works
> > > ok with non-null values):
> > >
> > > Failed to load bean from database
> > > java.lang.ClassCastException: java.math.BigDecimal
> > >         at 
>com.gsnet.ejb.entity.Advertisements.JOnASAdvertisementsBeanAdvertisements.loadData(JOnASAdvertisementsBeanAdvertisements.j
> > >         at 
>org.objectweb.jonas.container.EntitySynchroImpl.considerRequest(EntitySynchroImpl.java:179)
> > >         at 
>org.objectweb.jonas.container.JBeanEntity.preinvoke(JBeanEntity.java:450)
> > >         at 
>com.gsnet.ejb.entity.Advertisements.JOnASAdvertisementsBeanAdvertisements.getAdID(JOnASAdvertisementsBeanAdvertisements.ja
> > >         at 
>com.gsnet.ejb.entity.Advertisements.JOnASAdvertisementsBeanAdvertisements_Skel.dispatch(JOnASAdvertisementsBeanAdvertiseme
> > >         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:164)
> > >         at sun.rmi.transport.Transport.serviceCall(Transport.java:154)
> > >         at 
>sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:600)
> > >         at sun.rmi.transport.tcp.TCPTransport.run(TCPTransport.java:506)
> > >         at java.lang.Thread.run(Thread.java)
> > >
> > > I tried the entity bean field with both a java.lang.Double and a
> > > java.lang.Float, but both times it gave me this error.
> > >
> > > I'm using Jonas 1.5 with Blackdown's JDK1.1.7B and the inetsoftware
> > > TDS driver for JDK1.1.
> > >
> > > Any ideas on this?
> > >
> > > Thanks,
> > >
> > > -Mike
> > >
> > > --
> > > Mike Bridge <[EMAIL PROTECTED]>
> > > System Administrator
> > > Global Sourcing Network
> > > ----
> > > To unsubscribe, send email to [EMAIL PROTECTED] and
> > > include in the body of the message "unsubscribe jonas-users".
> > > For general help, send email to [EMAIL PROTECTED] and
> > > include in the body of the message "help".
> > 
> > --
> > Mike Bridge <[EMAIL PROTECTED]>
> > System Administrator
> > Global Sourcing Network
> > ----
> > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in the body of the message "unsubscribe jonas-users".
> > For general help, send email to [EMAIL PROTECTED] and
> > include in the body of the message "help".
> 
> --
> Dirk Haase     mailto: [EMAIL PROTECTED]

-- 
Mike Bridge <[EMAIL PROTECTED]>
System Administrator
Global Sourcing Network
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to