I tried to attached the requested material, unfortunately it was too large
and was kicked back by the list. If anyone would like a copy of the
material, I would be happy to forward it to you.

I really have two issues. I can't load ExtraServicesPrice without getting
the stack trace shown below. Also, I can't create a new
PurchaseOrderExtraServices because I get:

java.sql.SQLException: Invalid column type
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:219)
        at
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement
.java:2091)
        at
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement
.java:2210)
        at
com.codestudio.sql.PoolManPreparedStatement.setObject(PoolManPreparedStateme
nt.java:244)
        at org.exolab.castor.jdo.engine.SQLEngine.create(SQLEngine.java:561)
        at
org.exolab.castor.persist.ClassMolder.create(ClassMolder.java:891)
        at org.exolab.castor.persist.LockEngine.create(LockEngine.java:458)
        at
org.exolab.castor.persist.TransactionContext.create(TransactionContext.java:
833)
        at
org.exolab.castor.jdo.engine.DatabaseImpl.create(DatabaseImpl.java:345)
        at
com.itn.integration.schnucks.Inbound_850.processOrder(Inbound_850.java:146)
        at
com.itn.integration.schnucks.Inbound_850.processEntry(Inbound_850.java:358)
        at
com.itradenetwork.mdf.MessageDrivenProcess.run(MessageDrivenProcess.java:211
)
        at java.lang.Thread.run(Thread.java:479)

I going to implement the workaround solution submitted by Denis in the
previous email. Thanks Denis! ;->  I'll let everyone know how that works
out.

I appreciate eveyones feedback.

-john:m


-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 31, 2003 9:59 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Compound object identities


John,

can you please post the relevant mappings for ExtraServices and
PurchaseOrder as well, and if possible the code you are using ? By
looking at the stacktrace, I assume that you have a class
ExtraServicesPrice with an attribute named memberCompany, right ?

Werner

> This is the stack trace that I get when I use the configuation I've
outlined
> below:
> 
> org.exolab.castor.jdo.DataObjectAccessException: Type conversion error:
> could not set value of FieldMolder of
>
com.itn.common.bizbeans.ExtraServicesPrice.setmemberCompany(com.itn.common.b
> izbeans.MemberCompany memberCompany) with value of type
java.math.BigDecimal
>         at
> org.exolab.castor.persist.FieldMolder.setValue(FieldMolder.java:330)
>         at
> org.exolab.castor.persist.ClassMolder.setIdentity(ClassMolder.java:2640)
>         at
org.exolab.castor.persist.ClassMolder.load(ClassMolder.java:695)
>         at org.exolab.castor.persist.LockEngine.load(LockEngine.java:359)
>         at
>
org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:59
> 9)
>         at
> org.exolab.castor.persist.QueryResults.fetch(QueryResults.java:229)
>         at
>
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImp
> l.java:601)
>         at
>
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImp
> l.java:584)
>         at
>
com.itn.common.bizbeans.helpers.ExtraServicesHelper.getESPFromCode(ExtraServ
> icesHelper.java:32)
>         at
>
com.itn.integration.schnucks.Inbound_850.updateLineItems(Inbound_850.java:25
> 2)
>         at
>
com.itn.integration.schnucks.Inbound_850.processOrder(Inbound_850.java:138)
>         at
>
com.itn.integration.schnucks.Inbound_850.processEntry(Inbound_850.java:349)
>         at
>
com.itradenetwork.mdf.MessageDrivenProcess.run(MessageDrivenProcess.java:211
> )
>         at java.lang.Thread.run(Thread.java:479)
> 
> I'm assuming that it is trying to convert the the object to BigDecimal? I
> guess it doesn't understand. Additionaly, as you can see, it has the set
> method name wrong as well. I assume it was able to find it though since
it's
> throwing this exception.
> 
> -john:m
> 
> -----Original Message-----
> From: Werner Guttmann [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 30, 2003 11:38 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] Compound object identities
> 
> 
> Just to make my own statement more specific: the problem I am refering
> to relates to queries only. Iow, at the moment is is not possible to
> query for objects with a multi-key identity where one or more of the
> fields is a primary key. You might still be able to achieve what you
> originally highlighted.
> 
> As to your problem, can you identify the problems you are seeing ? Iow,
> do you get stack traces or some other errosrs ?
> 
> Regards
> Werner
> 
> On Thu, 30 Jan 2003 16:01:26 -0800, Werner Guttmann wrote:
> 
> > John,
> > 
> > I am afraid this is not possible (yet), as there is a bug (or call it a
> > feature that never got implemented ... ;-)) that prevents you from
> > having FKs as part of multi-field identiy.
> > 
> > Regards
> > Werner
> > 
> > On Wed, 29 Jan 2003 17:34:30 -0800, John McDonald wrote:
> > 
> > > Is this possible?
> > > 
> > >    <class name="com.itn.common.bizbeans.PurchaseOrderExtraServices"
> > > identity="extraServices purchaseOrder" >
> > >    
> > >       <map-to table="PurchaseOrder2_ExtraServices"
> > > xml="PurchaseOrderExtraServices" />
> > >       <cache-type type="none" />
> > >     
> > >       <field name="price" type="double">
> > >          <sql name="price" type="numeric" />
> > >          <bind-xml name="price" node="element" />
> > >       </field>
> > >       <field name="boToDivPrice" type="double">
> > >          <sql name="boToDivPrice" type="numeric" />
> > >          <bind-xml name="boToDivPrice" node="element" />
> > >       </field>
> > >       <field name="addedFrom" type="string">
> > >          <sql name="addedFrom" type="varchar" />
> > >          <bind-xml name="addedFrom" node="element" />
> > >       </field>
> > >       <field name="quantity" type="double">
> > >          <sql name="quantity" type="numeric" />
> > >          <bind-xml name="quantity" node="element" />
> > >       </field>
> > >       <field name="extraServices"
> > > type="com.itn.common.bizbeans.ExtraServices">
> > >          <sql name="extraServicesID" />
> > >          <bind-xml name="ExtraServicesID" node="element" />
> > >       </field>
> > >       <field name="purchaseOrder"
> > > type="com.itn.common.bizbeans.PurchaseOrder">
> > >          <sql name="purchaseOrderID" />
> > >          <bind-xml name="PurchaseOrder" node="element" />
> > >       </field>
> > >       <field name="invoiceID" type="integer">
> > >          <sql name="invoiceID" type="numeric" />
> > >          <bind-xml name="invoiceID" node="element" />
> > >       </field>
> > >    </class>
> > > 
> > > 
> > > The primary key on this table is extraServicesID & purchaseOrderID.
How
> do I
> > > use these when create this object.? The way I have shown above does
not
> seem
> > > to work. 
> > > 
> > > Thanks
> > > 
> > > -john:m
> > > 
> > > ----------------------------------------------------------- 
> > > If you wish to unsubscribe from this mailing, send mail to
> > > [EMAIL PROTECTED] with a subject of:
> > >   unsubscribe castor-dev
> > > 
> > 
> > ----------------------------------------------------------- 
> > If you wish to unsubscribe from this mailing, send mail to
> > [EMAIL PROTECTED] with a subject of:
> >     unsubscribe castor-dev
> > 
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
> 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to