Re: [bug / rc6]

2004-04-07 Thread Rémi Bars
I have change my file (take the rc5 version of AbstractPersistentField ) and
it works fine.

I see your code and the new exception in the getFieldRecursive method : if
((c == Object.class) || (c.getSuperclass() == null) || c.isInterface()) {
throw e;}

I need update my code to make it more robust too

thanks

Remi



- Original Message - 
From: "Thomas Dudziak" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, April 07, 2004 2:06 PM
Subject: Re: [bug / rc6]


>> Recently I've made some changes to the AbstractPersistentField that makes
> it more robust in the case of the usage of interfaces with nested fields
> (see this
> thread:
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&by=thread&from=735638).
>
> So, you could try the current CVS version and check whether your problem
> is fixed there.
>
> Tom
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [bug / rc6]

2004-04-07 Thread Rémi Bars
i use :
PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFi
eldIntrospectorImpl

stacktrace :
org.apache.ojb.broker.metadata.MetadataException: Can't find member
'_Fichier::_Fabricant' in ConsultationServeur

 at
org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField.computeFi
eld(AbstractPersistentField.java:166)

 at
org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField.getField(
AbstractPersistentField.java:131)

 at
org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField.set(Abstr
actPersistentField.java:91)

 at
org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl.buildWithReflection(R
owReaderDefaultImpl.java:240)

 at
org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl.readObjectFrom(RowRea
derDefaultImpl.java:77)

 at
org.apache.ojb.broker.accesslayer.RsIterator.getObjectFromResultSet(RsIterat
or.java:441)

 at org.apache.ojb.broker.accesslayer.RsIterator.next(RsIterator.java:265)

 at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryRe
ferenceBroker.java:107)

 at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryRe
ferenceBroker.java:203)

 at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Persis
tenceBrokerImpl.java:1197)

 at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(
DelegatingPersistenceBroker.java:321)

 at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(
DelegatingPersistenceBroker.java:321)

 at org.apache.ojb.odmg.oql.OQLQueryImpl.execute(OQLQueryImpl.java:246)

 at  Gestionnaire.main(Gestionnaire.java:1743)

Caused by: java.lang.NoSuchFieldException: _Fabricant

 at java.lang.Class.getField0(Class.java:1735)

 at java.lang.Class.getDeclaredField(Class.java:1189)

 at
org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField.getFieldR
ecursive(AbstractPersistentField.java:178)

 at
org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField.getNested
RecursiveField(AbstractPersistentField.java:211)

 at
org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField.getNested
RecursiveField(AbstractPersistentField.java:207)

 at
org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField.computeFi
eld(AbstractPersistentField.java:151)

 ... 17 more


- Original Message - 
From: "Thomas Dudziak" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, April 07, 2004 11:57 AM
Subject: Re: [bug / rc6]


> On Wed, 7 Apr 2004, [iso-8859-1] Rémi Bars wrote:
>
> > Hi ,
> >
> > i m trying the rc6 released and i dont understant a "bug"
> >
> > in my repositery i have something like
> >  > jdbc-type="VARCHAR"/>
> >
> > where _Fichier is an interface (which is instantiate in my constructor)
,
> > this interface dont have setter and getter to  _Fabricant Field but the
> > instantiate Object have it.
> >
> > with the rc5 release it works fine, with the rc6 i get this error :
> > org.apache.ojb.broker.metadata.MetadataException: Can't find member
> > '_Fichier::_Fabricant'
> >
> > Why? Something has change? (maybe the introspector)
>
> Which PersistentFieldImpl do you use ? Could you post the stacktrace ?
>
> Tom
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [bug / rc6]

2004-04-07 Thread Rémi Bars
Hi ,

i m trying the rc6 released and i dont understant a "bug"

in my repositery i have something like


where _Fichier is an interface (which is instantiate in my constructor) ,
this interface dont have setter and getter to  _Fabricant Field but the
instantiate Object have it.

with the rc5 release it works fine, with the rc6 i get this error :
org.apache.ojb.broker.metadata.MetadataException: Can't find member
'_Fichier::_Fabricant'

Why? Something has change? (maybe the introspector)

Remi


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



add an attribut on a relational table

2004-03-02 Thread Rémi Bars
hello

i have 3 (A, B, C) tables wich mapp association between object

My problem is to put the attribute "anAttribute" in my table B, is it
possible?

thank for ur help

Remi

in my repositery i have something like

 
 
  
---
A {
idA,
somethingelse
}
B {
idA,
idC
anAttribute
}
C {
idC,
anything
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OQLQuery

2004-02-25 Thread Rémi Bars
when i put (select * from table where id is null)
 i got this message :
 line 1:107: unexpected token: id

Remi

- Original Message - 
From: "Rémi Bars" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 25, 2004 11:44 AM
Subject: OQLQuery


> i all i create a oqlQuery like this
>
> OQLQuery query = odmg.newOQLQuery();
>
> // 2. set the OQL select statement
> query.create(select * from table where id=null)
>
> when i try this i got this message :
>
> line 1:120: unexpected token: null
>
> what is wrong?
>
> Thank
>
> remi
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OQLQuery

2004-02-25 Thread Rémi Bars
i all i create a oqlQuery like this

OQLQuery query = odmg.newOQLQuery();

// 2. set the OQL select statement
query.create(select * from table where id=null)

when i try this i got this message :

line 1:120: unexpected token: null

what is wrong?

Thank

remi



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



standart SQL query??

2004-02-23 Thread Rémi Bars
hi all

i repost my question with the good subject :)

>
> i have to do a request on non persistent field, how can i do that? where
can
> i find some info?
>
> a query like standart SQL (select table.att1, table.att2, table2.att from
> table, table1 where table.att1>0 etc)
>
> thanks for ur help
>
> Remi
> - Original Message - 
> From: "eric barbe" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Monday, February 23, 2004 6:23 PM
> Subject: RE: Progress ?
>
>
> > JDBC driver exists, but is there a free version ?
> > And does it work with OJB ?
> >
> > Thanks
> >
> > Éric
> >
> > -Message d'origine-
> > De : eric barbe [mailto:[EMAIL PROTECTED]
> > Envoyé : lundi 23 février 2004 17:52
> > À : OJB
> > Objet : Progress ?
> >
> >
> > Hi,
> >
> > I want to know if somebody has worked with OJB and Progress V 8.
> > If yes, can this persons give me where to found the jdbc driver and mail
> us
> > the repository.
> >
> > Thanks,
> >
> > Éric
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Progress ?

2004-02-23 Thread Rémi Bars
hi all,

i have to do a request on non persistent field, how can i do that? where can
i find some info?

a query like standart SQL (select table.att1, table.att2, table2.att from
table, table1 where table.att1>0 etc)

thanks for ur help

Remi
- Original Message - 
From: "eric barbe" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Monday, February 23, 2004 6:23 PM
Subject: RE: Progress ?


> JDBC driver exists, but is there a free version ?
> And does it work with OJB ?
>
> Thanks
>
> Éric
>
> -Message d'origine-
> De : eric barbe [mailto:[EMAIL PROTECTED]
> Envoyé : lundi 23 février 2004 17:52
> À : OJB
> Objet : Progress ?
>
>
> Hi,
>
> I want to know if somebody has worked with OJB and Progress V 8.
> If yes, can this persons give me where to found the jdbc driver and mail
us
> the repository.
>
> Thanks,
>
> Éric
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ODMG Update Collection Problem

2004-02-18 Thread Rémi Bars
hi all,

is this bug resolved?

i have the same bug in my collection when i add a new object my collection
is fine updated, when i remove an object my collection is not updated

Thank

Remi

- Original Message - 
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Friday, January 09, 2004 7:15 PM
Subject: Re: ODMG Update Collection Problem


> Hi Ralf,
>
> I write some more tests and review my old ones.
> Now only one test fails. It's the one when exchange collection objects.
> You can find test case in test suite, it's called ...odmg.CollectionsTest
>
> Think it's a bug in OJB. The main object isn't get dirty when exchange
> the collection objects.
> See ...odmg.ObjectEnvelope line 317
>
> regards,
> Armin
>
> Ralf Geiger wrote:
>
> > Hi Armin,
> >
> > no I've never tried another OJB-Version.
> >
> > BTW I have another weird ODMG-API behavior:
> > I told you that the update of automatic M:N - Mapping works fine... this
is
> > not true at all :(
> > Following case:
> > Object A holds a Collection of B-Objects and the other way around.
> > So lets say: a1{b1}, b1{a1, a2}
> > If you update like this: a1{b1} --> a1{b1, b2, b3} it works good with
the
> > usual ODMG transaction:
> >
> > // newCollectionOfB {b1,b2,b3}
> > tx.begin();
> > tx.lock(a1, ..WRITE)
> > a1.setColOfB( newCollectionOfB )
> > tx.commit();
> >
> > BUT funny is, that it works in this case only if there is more than one
> > B-Object in the newCollectionOfB-Vector
> > so if you want to do it like this:
> > a1{b1} --> a1{b2}
> > it won't work !
> > It will only work if you edit a1 outside the transaction and then
> > txe.markDirty(a1}
> >
> > or you can do it like this: :)
> > a1{b1} --> a1{b2,b3} --> a1{b2}
> >
> > So everytime you want to update the collection and the amount of
residing
> > B-Objects is the same it won't work with the tx.begin()...
lock()...commit()
> > ... at least for me...
> > I really don't know what I am doing wrong but I am running into weird
> > problems all the time :(
> >
> > regards,
> >
> > Ralf
> >
> >
> >
> >
> > - Original Message - 
> > From: "Armin Waibel" <[EMAIL PROTECTED]>
> > To: "OJB Users List" <[EMAIL PROTECTED]>
> > Sent: Friday, January 09, 2004 2:24 PM
> > Subject: Re: ODMG Update Collection Problem
> >
> >
> >
> >>Hi Ralf,
> >>
> >>I can reproduce your problem and checked in a test case. I think you are
> >>right in expecting that OJB should do that job. But I'm not sure (not an
> >>ODMG expert). Did your test pass with a previous version of OJB?
> >>
> >>regards,
> >>Armin
> >>
> >>Ralf Geiger wrote:
> >>
> >>>- Original Message - 
> >>>From: "Armin Waibel" <[EMAIL PROTECTED]>
> >>>To: "OJB Users List" <[EMAIL PROTECTED]>
> >>>Sent: Friday, January 09, 2004 11:31 AM
> >>>Subject: Re: ODMG Update Collection Problem
> >>>
> >>>
> >>>
> >>>
> Ralf Geiger wrote:
> 
> ...
> 
> 
> >>>So now the Problem is updating the Collection of B-Objects
> >>>Lets say a1 has already 2 B-Objects within the collection (b1 and
> >
> > b2):
> >
> >>>Now I want to update the Collection and put the Objects (b3 and b4)
> >>>
> >>>into
> >>>
> >>>
> >it - b3 and b4 are already existing in the DB just belong to a2.
> >
> >
> >
> >>>The situation:
> >>>a1{b1,b2}, a2{b3,b4} ---> a1{b3,b4}, a2{}, (b1 and b2 have null
> >
> >references to any A-Object)
> >
> >
> >
> >>Do you lookup a1, a2 via PB-api too? If so, do you lock them before
> >>starting your modification?
> >>
> >
> >Yeah, every Object I have has been loaded via PB-API.
> >
> >My Applicationflow looks like this (web-application using Struts,
> >>>
> >>>running in
> >>>
> >>>
> >Tomcat):
> >1. Action: using PB-API to get all A-Objects and put them into
> >>>
> >>>Session-Scope
> >>>
> >>>
> >2. JSP: Show all A-Objects and referenced Bs.. just to see which Bs
are
> >pointing to which a.
> >3. User Interaction: Edit a1
> >4. EditAction: using PB-API to get all possible B-Objects so that the
> >>>
> >>>User
> >>>
> >>>
> >can define which B-Objects he wants.
> >5. JSP: Show a1 and a List of B-Objects where he can choose... Let's
> >
> > say
> >
> >>>he
> >>>
> >>>
> >chose the b3 and b4
> >6. SaveAction: I get the Object a1 (toBeSaved), the b3 and b4 from
the
> >>>
> >>>DB
> >>>
> >>>
> >(PB-API)  (could have got it from the session-scope bean as well )
> >7. Now I begin the transaction and lock the toBeSaved-Object...
> >8. make the changes and commit..
> >
> >that's all..
> 
> hmm, can you try to do a
> ((TransactionExt) tx).markDirty(a1);
> ((TransactionExt) tx).markDirty(a2); // if was modified too
> 
> before do the commit.
> 
> regards,
> Armin
> >>>
> >>>
> >>>No, there is no change.
> >>>The only way I can get it to work .. (at least see any change in the
db)
> >
> > is
> >
> >>>to loop all the B-Objects a

bug in store collection?

2004-02-16 Thread Rémi Bars
hi all,

i get this exception when i try to store a collection with a new object...

the metadata description



 
 
 


 

 

com.sybase.jdbc2.jdbc.SybSQLException: Explicit value specified for identity
field in table 'insertionordre' when IDENTITY_INSERT is set to OFF.
 at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2636)
 at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1996)
 at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
 at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:204)
 at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:187)
 at
com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1615)[org.ap
ache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException during the
execution of the Update SQL query (for a
fr.ouestfrance.sip.cezan.serveur.ordre.work.OrdreServeurSauvegarde):
Explicit value specified for identity field in table 'insertionordre' when
IDENTITY_INSERT is set to OFF.


Explicit value specified for identity field in table 'insertionordre' when
IDENTITY_INSERT is set to OFF.

thank 's for ur help

remi


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in doDelete with the markedForDelete list

2004-02-13 Thread Rémi Bars
Hi 

when i try to store or retrieve array of object i get this exception (rc5)

java.lang.ClassCastException
at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeCollections(PersistenceBrokerImpl.java)


i have change the code and it seems to work but is it correct to do that :

in  PersistenceBrokerImpl i put this code (line 807) (in store collection method)
..
// MBAIRD
// if the collection is a collectionproxy and it's not already loaded
// no need to store it.
if (col instanceof CollectionProxy && !((CollectionProxy) col).isLoaded())
 {
  continue;
}
//RBA 
 if (!(col instanceof Collection))
   col = java.util.Arrays.asList((Object[])col);
//RBA if col is not an array i ll get the same exception else it works :)
..


thank 

Remi

Re: Identity

2004-02-10 Thread Rémi Bars
i ll test it soon in a distributed application, and post my result here:)

Remi

- Original Message - 
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 10, 2004 11:57 AM
Subject: Re: Identity


> ok, I will add your patch.
> We may run into the same problems in an clustered environment with a
> distributed lock management (same temp values on different cluster
> nodes), but this will be another story... ;-)
>
> regards,
> Armin
>
> Rémi Bars wrote:
>
> >>Think the problem is the lock of the objects before insert.
> >>SequenceManagerNativeImpl returns a temp key and OJB builds an Identity
> >>object to do the lock. In an multithreaded environment it is possible
> >>that two threads lookup the same temp key.
> >
> >
> > yes it s th problem i have put a System.out.println  when the appli try
to
> > get the getUniqueLong -> i saw multiple reference on the same tempkey
> >
> >
> >>If your solution works for you I will update SequenceManagerNativeImpl.
> >>To verify my assumption (and your solution), can you post the whole
> >>stack trace (+ error log before the exception if available) if you use
> >>the "unmodified version" of SequenceManagerNativeImpl?
> >
> >
> > 0 DEBUG [main] sequence.SequenceManagerNativeImpl - After store -
> > newid=42
> >
> > org.odmg.LockNotGrantedException: Can not lock
> > [EMAIL PROTECTED] for
WRITE
> >
> >  at org.apache.ojb.odmg.TransactionImpl.lock(Unknown Source)
> >
> >  at
> >
fr.sip.cezan.framework.persistance.odmg.OJB_ODMG_PersistentManager.insert(OJ
> > B_ODMG_PersistentManager.java:143)
> >
> >  at
> >
fr.sip.cezan.framework.persistance.odmg.OJB_ODMG_CezanGestionnaireDAO.create
> > (OJB_ODMG_CezanGestionnaireDAO.java:64)
> >
> >  at
> >
fr.sip.cezan.serveur.ordre.work.GestionnaireOrdreImpl.creerFichierOrdre(Gest
> > ionnaireOrdreImpl.java:532)
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Identity

2004-02-10 Thread Rémi Bars
> Think the problem is the lock of the objects before insert.
> SequenceManagerNativeImpl returns a temp key and OJB builds an Identity
> object to do the lock. In an multithreaded environment it is possible
> that two threads lookup the same temp key.

yes it s th problem i have put a System.out.println  when the appli try to
get the getUniqueLong -> i saw multiple reference on the same tempkey

> If your solution works for you I will update SequenceManagerNativeImpl.
> To verify my assumption (and your solution), can you post the whole
> stack trace (+ error log before the exception if available) if you use
> the "unmodified version" of SequenceManagerNativeImpl?

0 DEBUG [main] sequence.SequenceManagerNativeImpl - After store -
newid=42

org.odmg.LockNotGrantedException: Can not lock
[EMAIL PROTECTED] for WRITE

 at org.apache.ojb.odmg.TransactionImpl.lock(Unknown Source)

 at
fr.sip.cezan.framework.persistance.odmg.OJB_ODMG_PersistentManager.insert(OJ
B_ODMG_PersistentManager.java:143)

 at
fr.sip.cezan.framework.persistance.odmg.OJB_ODMG_CezanGestionnaireDAO.create
(OJB_ODMG_CezanGestionnaireDAO.java:64)

 at
fr.sip.cezan.serveur.ordre.work.GestionnaireOrdreImpl.creerFichierOrdre(Gest
ionnaireOrdreImpl.java:532)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Identity

2004-02-10 Thread Rémi Bars


 Hi

> > it works when i put the private --> static <---long tempKey ,  is it
right
> > to do that in the  SequenceManagerNativeImpl?
> >

> hmm, seems the temp key has to be unique arcoss different threads.

>If
> you don't do that what's the problem, do you end with an
> LockNotGrantedException?

yes my insert in the database don t work

remi


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Identity

2004-02-10 Thread Rémi Bars
it works when i put the private --> static <---long tempKey ,  is it right
to do that in the  SequenceManagerNativeImpl?

thanks

Remi

- Original Message - 
From: "Rémi Bars" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 10, 2004 10:43 AM
Subject: Re: Identity


> sorry it works fine now i have found a old code in my ojb
>
> Remi
> - Original Message - 
> From: "Rémi Bars" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Tuesday, February 10, 2004 10:41 AM
> Subject: Re: Identity
>
>
> > Hello
> >
> > i have a bug on rc5, i got the same in rc4 (see beelow) but whith some
> > changes it has worked. I have try to put the same code in rc5 and i get
> the
> > following error. I m a on sybase with rc5 and i use identity columns
> >
> > rg.odmg.LockNotGrantedException: Can not lock
> >
>
[EMAIL PROTECTED]
> > for WRITE
> >  at org.apache.ojb.odmg.TransactionImpl.lock(Unknown Source
> >
> > thanks
> >
> > remi
> >
> >
> > - Original Message - 
> > From: "Rémi Bars" <[EMAIL PROTECTED]>
> > To: "OJB Users List" <[EMAIL PROTECTED]>
> > Sent: Thursday, November 27, 2003 5:45 PM
> > Subject: Re: Identity
> >
> >
> > > ok thanks it works fine now
> > >
> > > Remi
> > >
> > > - Original Message - 
> > > From: "Armin Waibel" <[EMAIL PROTECTED]>
> > > To: "OJB Users List" <[EMAIL PROTECTED]>
> > > Sent: Thursday, November 27, 2003 5:31 PM
> > > Subject: Re: Identity
> > >
> > >
> > > > Hi,
> > > >
> > > > I think this is a bug in SequenceManagerNativeImpl.
> > > > This should be fixed with current CVS.
> > > > A workaround for rc4 could be a replacement of
> > > >
> > > > protected long getUniqueLong(FieldDescriptor field) throws
> > > > SequenceManagerException
> > > > {
> > > >return -1;
> > > > }
> > > >
> > > > with
> > > >
> > > > private long tempKey = -1;
> > > >
> > > > protected long getUniqueLong(FieldDescriptor field) throws
> > > > SequenceManagerException
> > > > {
> > > >  /*
> > > >  workaround for locking problems of new objects
> > > >  We need unique 'dummy keys' for new objects before storing
> > > >  */
> > > >  return --tempKey;
> > > > }
> > > >
> > > > We need a different temporary key for each requested
> > > > key. This key will be replaced by the Identity value
> > > > after the object was written to DB.
> > > >
> > > > HTH
> > > > regards,
> > > > Armin
> > > >
> > > > Rémi Bars wrote:
> > > >
> > > > > hi,
> > > > >
> > > > > i have try to put this in my code
> > > > >
> > > > > public String getLastInsertIdentityQuery(String tableName)
> > > > > {
> > > > > return "select @@identity"; (i need wait for an upgrade on
> > > sybase
> > > > > and test select last_insert_id() )
> > > > > }
> > > > >
> > > > >
> > > > >
> > > > > it works fine for the first record when i try to insert a second
> > record
> > > i
> > > > > get :
> > > > >
> > > > > org.odmg.LockNotGrantedException: Can not lock
> > > > > [EMAIL PROTECTED] for WRITE
> > > > >
> > > > >  at
> org.apache.ojb.odmg.TransactionImpl.lock(TransactionImpl.java:279)
> > > > >
> > > > > what does it means? (sometimes it works.when i m a on
debugger)
> > > > >
> > > > > remi
> > > > >
> > > > > - Original Message - 
> > > > > From: "Rémi Bars" <[EMAIL PROTECTED]>
> > > > > To: "OJB Users List" <[EMAIL PROTECTED]>
> > > > > Sent: Thursday, November 27, 2003 10:02 AM
> > > > > Subject: Re: Identity
> > > > >
> > > > >
> > > > >
> > > > >>i m using sybase
> > > > >>
> > > > >&

Re: Identity

2004-02-10 Thread Rémi Bars
sorry it works fine now i have found a old code in my ojb

Remi
- Original Message - 
From: "Rémi Bars" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 10, 2004 10:41 AM
Subject: Re: Identity


> Hello
>
> i have a bug on rc5, i got the same in rc4 (see beelow) but whith some
> changes it has worked. I have try to put the same code in rc5 and i get
the
> following error. I m a on sybase with rc5 and i use identity columns
>
> rg.odmg.LockNotGrantedException: Can not lock
>
[EMAIL PROTECTED]
> for WRITE
>  at org.apache.ojb.odmg.TransactionImpl.lock(Unknown Source
>
> thanks
>
> remi
>
>
> - Original Message - 
> From: "Rémi Bars" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, November 27, 2003 5:45 PM
> Subject: Re: Identity
>
>
> > ok thanks it works fine now
> >
> > Remi
> >
> > - Original Message - 
> > From: "Armin Waibel" <[EMAIL PROTECTED]>
> > To: "OJB Users List" <[EMAIL PROTECTED]>
> > Sent: Thursday, November 27, 2003 5:31 PM
> > Subject: Re: Identity
> >
> >
> > > Hi,
> > >
> > > I think this is a bug in SequenceManagerNativeImpl.
> > > This should be fixed with current CVS.
> > > A workaround for rc4 could be a replacement of
> > >
> > > protected long getUniqueLong(FieldDescriptor field) throws
> > > SequenceManagerException
> > > {
> > >return -1;
> > > }
> > >
> > > with
> > >
> > > private long tempKey = -1;
> > >
> > > protected long getUniqueLong(FieldDescriptor field) throws
> > > SequenceManagerException
> > > {
> > >      /*
> > >  workaround for locking problems of new objects
> > >  We need unique 'dummy keys' for new objects before storing
> > >  */
> > >  return --tempKey;
> > > }
> > >
> > > We need a different temporary key for each requested
> > > key. This key will be replaced by the Identity value
> > > after the object was written to DB.
> > >
> > > HTH
> > > regards,
> > > Armin
> > >
> > > Rémi Bars wrote:
> > >
> > > > hi,
> > > >
> > > > i have try to put this in my code
> > > >
> > > > public String getLastInsertIdentityQuery(String tableName)
> > > > {
> > > > return "select @@identity"; (i need wait for an upgrade on
> > sybase
> > > > and test select last_insert_id() )
> > > > }
> > > >
> > > >
> > > >
> > > > it works fine for the first record when i try to insert a second
> record
> > i
> > > > get :
> > > >
> > > > org.odmg.LockNotGrantedException: Can not lock
> > > > [EMAIL PROTECTED] for WRITE
> > > >
> > > >  at
org.apache.ojb.odmg.TransactionImpl.lock(TransactionImpl.java:279)
> > > >
> > > > what does it means? (sometimes it works.when i m a on debugger)
> > > >
> > > > remi
> > > >
> > > > - Original Message - 
> > > > From: "Rémi Bars" <[EMAIL PROTECTED]>
> > > > To: "OJB Users List" <[EMAIL PROTECTED]>
> > > > Sent: Thursday, November 27, 2003 10:02 AM
> > > > Subject: Re: Identity
> > > >
> > > >
> > > >
> > > >>i m using sybase
> > > >>
> > > >>where can i find the platformù implementation?
> > > >>
> > > >>- Original Message - 
> > > >>From: "Armin Waibel" <[EMAIL PROTECTED]>
> > > >>To: "OJB Users List" <[EMAIL PROTECTED]>
> > > >>Sent: Thursday, November 27, 2003 9:59 AM
> > > >>Subject: Re: Identity
> > > >>
> > > >>
> > > >>
> > > >>>which DB do you use?
> > > >>>the platform implementation class have to
> > > >>>override
> > > >>>
> > > >>>public String getLastInsertIdentityQuery(String tableName)
> > > >>>{
> > > >>>// return the sql string to query last inserted Identity value
> > > >>>}
> > > >>>
> > > &

Re: Identity

2004-02-10 Thread Rémi Bars
Hello

i have a bug on rc5, i got the same in rc4 (see beelow) but whith some
changes it has worked. I have try to put the same code in rc5 and i get the
following error. I m a on sybase with rc5 and i use identity columns

rg.odmg.LockNotGrantedException: Can not lock
[EMAIL PROTECTED]
for WRITE
 at org.apache.ojb.odmg.TransactionImpl.lock(Unknown Source

thanks

remi


- Original Message - 
From: "Rémi Bars" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 5:45 PM
Subject: Re: Identity


> ok thanks it works fine now
>
> Remi
>
> - Original Message - 
> From: "Armin Waibel" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, November 27, 2003 5:31 PM
> Subject: Re: Identity
>
>
> > Hi,
> >
> > I think this is a bug in SequenceManagerNativeImpl.
> > This should be fixed with current CVS.
> > A workaround for rc4 could be a replacement of
> >
> > protected long getUniqueLong(FieldDescriptor field) throws
> > SequenceManagerException
> > {
> >return -1;
> > }
> >
> > with
> >
> > private long tempKey = -1;
> >
> > protected long getUniqueLong(FieldDescriptor field) throws
> > SequenceManagerException
> > {
> >  /*
> >  workaround for locking problems of new objects
> >  We need unique 'dummy keys' for new objects before storing
> >      */
> >  return --tempKey;
> > }
> >
> > We need a different temporary key for each requested
> > key. This key will be replaced by the Identity value
> > after the object was written to DB.
> >
> > HTH
> > regards,
> > Armin
> >
> > Rémi Bars wrote:
> >
> > > hi,
> > >
> > > i have try to put this in my code
> > >
> > > public String getLastInsertIdentityQuery(String tableName)
> > > {
> > > return "select @@identity"; (i need wait for an upgrade on
> sybase
> > > and test select last_insert_id() )
> > > }
> > >
> > >
> > >
> > > it works fine for the first record when i try to insert a second
record
> i
> > > get :
> > >
> > > org.odmg.LockNotGrantedException: Can not lock
> > > [EMAIL PROTECTED] for WRITE
> > >
> > >  at org.apache.ojb.odmg.TransactionImpl.lock(TransactionImpl.java:279)
> > >
> > > what does it means? (sometimes it works.when i m a on debugger)
> > >
> > > remi
> > >
> > > - Original Message - 
> > > From: "Rémi Bars" <[EMAIL PROTECTED]>
> > > To: "OJB Users List" <[EMAIL PROTECTED]>
> > > Sent: Thursday, November 27, 2003 10:02 AM
> > > Subject: Re: Identity
> > >
> > >
> > >
> > >>i m using sybase
> > >>
> > >>where can i find the platformù implementation?
> > >>
> > >>- Original Message - 
> > >>From: "Armin Waibel" <[EMAIL PROTECTED]>
> > >>To: "OJB Users List" <[EMAIL PROTECTED]>
> > >>Sent: Thursday, November 27, 2003 9:59 AM
> > >>Subject: Re: Identity
> > >>
> > >>
> > >>
> > >>>which DB do you use?
> > >>>the platform implementation class have to
> > >>>override
> > >>>
> > >>>public String getLastInsertIdentityQuery(String tableName)
> > >>>{
> > >>>// return the sql string to query last inserted Identity value
> > >>>}
> > >>>
> > >>>regards,
> > >>>Armin
> > >>>
> > >>>Rémi Bars wrote:
> > >>>
> > >>>
> > >>>>hi,
> > >>>>
> > >>>>i have done the change and all my records are in the database. But
now
> > >
> > > i
> > >
> > >>get
> > >>
> > >>>>this error :
> > >>>>
> > >>>>what does it mean?
> > >>>>
> > >>>>thanks !
> > >>>>
> > >>>>remi
> > >>>>
> > >>>>org.apache.ojb.broker.util.sequence.SequenceManagerException:
> > >>>>java.lang.UnsupportedOperationException: This feature is not
supported
> > >>
> > >>by
> > >>
> > >>&

Re: Identity

2003-11-27 Thread Rémi Bars
ok thanks it works fine now

Remi

- Original Message - 
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 5:31 PM
Subject: Re: Identity


> Hi,
>
> I think this is a bug in SequenceManagerNativeImpl.
> This should be fixed with current CVS.
> A workaround for rc4 could be a replacement of
>
> protected long getUniqueLong(FieldDescriptor field) throws
> SequenceManagerException
> {
>return -1;
> }
>
> with
>
> private long tempKey = -1;
>
> protected long getUniqueLong(FieldDescriptor field) throws
> SequenceManagerException
> {
>  /*
>  workaround for locking problems of new objects
>  We need unique 'dummy keys' for new objects before storing
>  */
>  return --tempKey;
> }
>
> We need a different temporary key for each requested
> key. This key will be replaced by the Identity value
> after the object was written to DB.
>
> HTH
> regards,
> Armin
>
> Rémi Bars wrote:
>
> > hi,
> >
> > i have try to put this in my code
> >
> > public String getLastInsertIdentityQuery(String tableName)
> > {
> > return "select @@identity"; (i need wait for an upgrade on
sybase
> > and test select last_insert_id() )
> > }
> >
> >
> >
> > it works fine for the first record when i try to insert a second record
i
> > get :
> >
> > org.odmg.LockNotGrantedException: Can not lock
> > [EMAIL PROTECTED] for WRITE
> >
> >  at org.apache.ojb.odmg.TransactionImpl.lock(TransactionImpl.java:279)
> >
> > what does it means? (sometimes it works.when i m a on debugger)
> >
> > remi
> >
> > - Original Message - 
> > From: "Rémi Bars" <[EMAIL PROTECTED]>
> > To: "OJB Users List" <[EMAIL PROTECTED]>
> > Sent: Thursday, November 27, 2003 10:02 AM
> > Subject: Re: Identity
> >
> >
> >
> >>i m using sybase
> >>
> >>where can i find the platformù implementation?
> >>
> >>- Original Message - 
> >>From: "Armin Waibel" <[EMAIL PROTECTED]>
> >>To: "OJB Users List" <[EMAIL PROTECTED]>
> >>Sent: Thursday, November 27, 2003 9:59 AM
> >>Subject: Re: Identity
> >>
> >>
> >>
> >>>which DB do you use?
> >>>the platform implementation class have to
> >>>override
> >>>
> >>>public String getLastInsertIdentityQuery(String tableName)
> >>>{
> >>>// return the sql string to query last inserted Identity value
> >>>}
> >>>
> >>>regards,
> >>>Armin
> >>>
> >>>Rémi Bars wrote:
> >>>
> >>>
> >>>>hi,
> >>>>
> >>>>i have done the change and all my records are in the database. But now
> >
> > i
> >
> >>get
> >>
> >>>>this error :
> >>>>
> >>>>what does it mean?
> >>>>
> >>>>thanks !
> >>>>
> >>>>remi
> >>>>
> >>>>org.apache.ojb.broker.util.sequence.SequenceManagerException:
> >>>>java.lang.UnsupportedOperationException: This feature is not supported
> >>
> >>by
> >>
> >>>>this implementation
> >>>>
> >>>> at
> >>>>
> >>
> >
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl.getLastInsert(
> >
> >>>>Unknown Source)
> >>>>
> >>>> at
> >>>>
> >>
> >
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl.afterStore(Unk
> >
> >>>>nown Source)
> >>>>
> >>>> at
> >>>>
> >>
> >
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBroker
> >
> >>>>Impl.java:1985)
> >>>>
> >>>> at
> >>>>
> >>
> >
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> >
> >>>>.java:1891)
> >>>>
> >>>> at
> >>>>
> >>
> >
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> >
> >>>>.java:1849)
> >>>>
> >>>> at
> >
> > org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(U

Re: Identity

2003-11-27 Thread Rémi Bars
hi,

i have try to put this in my code

public String getLastInsertIdentityQuery(String tableName)
{
return "select @@identity"; (i need wait for an upgrade on sybase
and test select last_insert_id() )
}



it works fine for the first record when i try to insert a second record i
get :

org.odmg.LockNotGrantedException: Can not lock
[EMAIL PROTECTED] for WRITE

 at org.apache.ojb.odmg.TransactionImpl.lock(TransactionImpl.java:279)

what does it means? (sometimes it works.when i m a on debugger)

remi

- Original Message - 
From: "Rémi Bars" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 10:02 AM
Subject: Re: Identity


> i m using sybase
>
> where can i find the platformù implementation?
>
> - Original Message - 
> From: "Armin Waibel" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, November 27, 2003 9:59 AM
> Subject: Re: Identity
>
>
> > which DB do you use?
> > the platform implementation class have to
> > override
> >
> > public String getLastInsertIdentityQuery(String tableName)
> > {
> > // return the sql string to query last inserted Identity value
> > }
> >
> > regards,
> > Armin
> >
> > Rémi Bars wrote:
> >
> > > hi,
> > >
> > > i have done the change and all my records are in the database. But now
i
> get
> > > this error :
> > >
> > > what does it mean?
> > >
> > > thanks !
> > >
> > > remi
> > >
> > > org.apache.ojb.broker.util.sequence.SequenceManagerException:
> > > java.lang.UnsupportedOperationException: This feature is not supported
> by
> > > this implementation
> > >
> > >  at
> > >
>
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl.getLastInsert(
> > > Unknown Source)
> > >
> > >  at
> > >
>
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl.afterStore(Unk
> > > nown Source)
> > >
> > >  at
> > >
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBroker
> > > Impl.java:1985)
> > >
> > >  at
> > >
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> > > .java:1891)
> > >
> > >  at
> > >
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> > > .java:1849)
> > >
> > >  at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
> > > Source)
> > >
> > >  at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
> > > Source)
> > >
> > >  at org.apache.ojb.odmg.states.StateNewDirty.commit(Unknown Source)
> > >
> > >  at org.apache.ojb.odmg.ObjectEnvelopeTable.commitAllEnvelopes(Unknown
> > > Source)
> > >
> > >  at org.apache.ojb.odmg.ObjectEnvelopeTable.commit(Unknown Source)
> > >
> > >  at org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(Unknown
> Source)
> > >
> > >  at org.apache.ojb.odmg.TransactionImpl.prepare(Unknown Source)
> > >
> > >  at org.apache.ojb.odmg.TransactionImpl.commit(Unknown Source)
> > >
> > >
> > > - Original Message - 
> > > From: "Armin Waibel" <[EMAIL PROTECTED]>
> > > To: "OJB Users List" <[EMAIL PROTECTED]>
> > > Sent: Wednesday, November 26, 2003 6:24 PM
> > > Subject: Re: Identity
> > >
> > >
> > >
> > >>doh! Seems I'm tired or dumb ;-)
> > >>I mean autoincrement="true"
> > >>Or did you implement your owm sequence manager?
> > >>
> > >>abashed,
> > >>Armin
> > >>
> > >>Armin Waibel wrote:
> > >>
> > >>
> > >>>Hi,
> > >>>
> > >>>assume you are using SequenceManagerNativeImpl?
> > >>>Please set primarykey="true"
> > >>>Which OJB version?
> > >>>
> > >>>regards
> > >>>Armin
> > >>>
> > >>>Rémi Bars wrote:
> > >>>
> > >>>
> > >>>>Hi all,
> > >>>>
> > >>>>i m trying to use identity on sybase with the odmg api. I don t
> > >>>>understand
> > >>>>

Re: Identity

2003-11-27 Thread Rémi Bars
ok i see nothing about this method in PlatformSybaseASEImpl.java..


- Original Message - 
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 9:59 AM
Subject: Re: Identity


> which DB do you use?
> the platform implementation class have to
> override
>
> public String getLastInsertIdentityQuery(String tableName)
> {
> // return the sql string to query last inserted Identity value
> }
>
> regards,
> Armin
>
> Rémi Bars wrote:
>
> > hi,
> >
> > i have done the change and all my records are in the database. But now i
get
> > this error :
> >
> > what does it mean?
> >
> > thanks !
> >
> > remi
> >
> > org.apache.ojb.broker.util.sequence.SequenceManagerException:
> > java.lang.UnsupportedOperationException: This feature is not supported
by
> > this implementation
> >
> >  at
> >
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl.getLastInsert(
> > Unknown Source)
> >
> >  at
> >
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl.afterStore(Unk
> > nown Source)
> >
> >  at
> >
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBroker
> > Impl.java:1985)
> >
> >  at
> >
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> > .java:1891)
> >
> >  at
> >
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> > .java:1849)
> >
> >  at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
> > Source)
> >
> >  at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
> > Source)
> >
> >  at org.apache.ojb.odmg.states.StateNewDirty.commit(Unknown Source)
> >
> >  at org.apache.ojb.odmg.ObjectEnvelopeTable.commitAllEnvelopes(Unknown
> > Source)
> >
> >  at org.apache.ojb.odmg.ObjectEnvelopeTable.commit(Unknown Source)
> >
> >  at org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(Unknown
Source)
> >
> >  at org.apache.ojb.odmg.TransactionImpl.prepare(Unknown Source)
> >
> >  at org.apache.ojb.odmg.TransactionImpl.commit(Unknown Source)
> >
> >
> > - Original Message - 
> > From: "Armin Waibel" <[EMAIL PROTECTED]>
> > To: "OJB Users List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, November 26, 2003 6:24 PM
> > Subject: Re: Identity
> >
> >
> >
> >>doh! Seems I'm tired or dumb ;-)
> >>I mean autoincrement="true"
> >>Or did you implement your owm sequence manager?
> >>
> >>abashed,
> >>Armin
> >>
> >>Armin Waibel wrote:
> >>
> >>
> >>>Hi,
> >>>
> >>>assume you are using SequenceManagerNativeImpl?
> >>>Please set primarykey="true"
> >>>Which OJB version?
> >>>
> >>>regards
> >>>Armin
> >>>
> >>>Rémi Bars wrote:
> >>>
> >>>
> >>>>Hi all,
> >>>>
> >>>>i m trying to use identity on sybase with the odmg api. I don t
> >>>>understand
> >>>>why only one object is insert in my table, when i try to add a second
> >>>>object
> >>>>i get no error but no record too.
> >>>>
> >>>>have u an idea?
> >>>>
> >>>>thanks for ur help!
> >>>>
> >>>>here is my repository
> >>>>
> >>>>
> >>>>>>>>name="id"
> >>>>column="id"
> >>>>jdbc-type="numeric"
> >>>>primarykey="true"
> >>>>autoincrement="false"
> >>>>   access="readonly"
> >>>> />
> >>>>>>>>jdbc-type='VARCHAR'/>
> >>>>
> >>>>
> >>>>here is my table
> >>>>CREATE TABLE Structure (
> >>>>
> >>>>id numeric(4,0) identity not null,
> >>>>
> >>>>nom VARCHAR(50) NULL )
> >>>>
> >>>>
> >>>>-
> >>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>-
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Identity

2003-11-27 Thread Rémi Bars
i m using sybase

where can i find the platformù implementation?

- Original Message - 
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 9:59 AM
Subject: Re: Identity


> which DB do you use?
> the platform implementation class have to
> override
>
> public String getLastInsertIdentityQuery(String tableName)
> {
> // return the sql string to query last inserted Identity value
> }
>
> regards,
> Armin
>
> Rémi Bars wrote:
>
> > hi,
> >
> > i have done the change and all my records are in the database. But now i
get
> > this error :
> >
> > what does it mean?
> >
> > thanks !
> >
> > remi
> >
> > org.apache.ojb.broker.util.sequence.SequenceManagerException:
> > java.lang.UnsupportedOperationException: This feature is not supported
by
> > this implementation
> >
> >  at
> >
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl.getLastInsert(
> > Unknown Source)
> >
> >  at
> >
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl.afterStore(Unk
> > nown Source)
> >
> >  at
> >
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBroker
> > Impl.java:1985)
> >
> >  at
> >
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> > .java:1891)
> >
> >  at
> >
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> > .java:1849)
> >
> >  at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
> > Source)
> >
> >  at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
> > Source)
> >
> >  at org.apache.ojb.odmg.states.StateNewDirty.commit(Unknown Source)
> >
> >  at org.apache.ojb.odmg.ObjectEnvelopeTable.commitAllEnvelopes(Unknown
> > Source)
> >
> >  at org.apache.ojb.odmg.ObjectEnvelopeTable.commit(Unknown Source)
> >
> >  at org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(Unknown
Source)
> >
> >  at org.apache.ojb.odmg.TransactionImpl.prepare(Unknown Source)
> >
> >  at org.apache.ojb.odmg.TransactionImpl.commit(Unknown Source)
> >
> >
> > - Original Message - 
> > From: "Armin Waibel" <[EMAIL PROTECTED]>
> > To: "OJB Users List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, November 26, 2003 6:24 PM
> > Subject: Re: Identity
> >
> >
> >
> >>doh! Seems I'm tired or dumb ;-)
> >>I mean autoincrement="true"
> >>Or did you implement your owm sequence manager?
> >>
> >>abashed,
> >>Armin
> >>
> >>Armin Waibel wrote:
> >>
> >>
> >>>Hi,
> >>>
> >>>assume you are using SequenceManagerNativeImpl?
> >>>Please set primarykey="true"
> >>>Which OJB version?
> >>>
> >>>regards
> >>>Armin
> >>>
> >>>Rémi Bars wrote:
> >>>
> >>>
> >>>>Hi all,
> >>>>
> >>>>i m trying to use identity on sybase with the odmg api. I don t
> >>>>understand
> >>>>why only one object is insert in my table, when i try to add a second
> >>>>object
> >>>>i get no error but no record too.
> >>>>
> >>>>have u an idea?
> >>>>
> >>>>thanks for ur help!
> >>>>
> >>>>here is my repository
> >>>>
> >>>>
> >>>>>>>>name="id"
> >>>>column="id"
> >>>>jdbc-type="numeric"
> >>>>primarykey="true"
> >>>>autoincrement="false"
> >>>>   access="readonly"
> >>>> />
> >>>>>>>>jdbc-type='VARCHAR'/>
> >>>>
> >>>>
> >>>>here is my table
> >>>>CREATE TABLE Structure (
> >>>>
> >>>>id numeric(4,0) identity not null,
> >>>>
> >>>>nom VARCHAR(50) NULL )
> >>>>
> >>>>
> >>>>-
> >>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>-
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Identity

2003-11-27 Thread Rémi Bars
i forgot this : i m using ojb rc4

remi

- Original Message - 
From: "Rémi Bars" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 9:44 AM
Subject: Re: Identity


> hi,
>
> i have done the change and all my records are in the database. But now i
get
> this error :
>
> what does it mean?
>
> thanks !
>
> remi
>
> org.apache.ojb.broker.util.sequence.SequenceManagerException:
> java.lang.UnsupportedOperationException: This feature is not supported by
> this implementation
>
>  at
>
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl.getLastInsert(
> Unknown Source)
>
>  at
>
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl.afterStore(Unk
> nown Source)
>
>  at
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBroker
> Impl.java:1985)
>
>  at
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> .java:1891)
>
>  at
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> .java:1849)
>
>  at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
> Source)
>
>  at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
> Source)
>
>  at org.apache.ojb.odmg.states.StateNewDirty.commit(Unknown Source)
>
>  at org.apache.ojb.odmg.ObjectEnvelopeTable.commitAllEnvelopes(Unknown
> Source)
>
>  at org.apache.ojb.odmg.ObjectEnvelopeTable.commit(Unknown Source)
>
>  at org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(Unknown Source)
>
>  at org.apache.ojb.odmg.TransactionImpl.prepare(Unknown Source)
>
>  at org.apache.ojb.odmg.TransactionImpl.commit(Unknown Source)
>
>
> - Original Message - 
> From: "Armin Waibel" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 26, 2003 6:24 PM
> Subject: Re: Identity
>
>
> > doh! Seems I'm tired or dumb ;-)
> > I mean autoincrement="true"
> > Or did you implement your owm sequence manager?
> >
> > abashed,
> > Armin
> >
> > Armin Waibel wrote:
> >
> > > Hi,
> > >
> > > assume you are using SequenceManagerNativeImpl?
> > > Please set primarykey="true"
> > > Which OJB version?
> > >
> > > regards
> > > Armin
> > >
> > > Rémi Bars wrote:
> > >
> > >> Hi all,
> > >>
> > >> i m trying to use identity on sybase with the odmg api. I don t
> > >> understand
> > >> why only one object is insert in my table, when i try to add a second
> > >> object
> > >> i get no error but no record too.
> > >>
> > >> have u an idea?
> > >>
> > >> thanks for ur help!
> > >>
> > >> here is my repository
> > >>
> > >> 
> > >> > >> name="id"
> > >> column="id"
> > >> jdbc-type="numeric"
> > >> primarykey="true"
> > >> autoincrement="false"
> > >>access="readonly"
> > >>  />
> > >> > >> jdbc-type='VARCHAR'/>
> > >> 
> > >>
> > >> here is my table
> > >> CREATE TABLE Structure (
> > >>
> > >> id numeric(4,0) identity not null,
> > >>
> > >> nom VARCHAR(50) NULL )
> > >>
> > >>
> > >> -
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Identity

2003-11-27 Thread Rémi Bars
hi,

i have done the change and all my records are in the database. But now i get
this error :

what does it mean?

thanks !

remi

org.apache.ojb.broker.util.sequence.SequenceManagerException:
java.lang.UnsupportedOperationException: This feature is not supported by
this implementation

 at
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl.getLastInsert(
Unknown Source)

 at
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl.afterStore(Unk
nown Source)

 at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBroker
Impl.java:1985)

 at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
.java:1891)

 at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
.java:1849)

 at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
Source)

 at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
Source)

 at org.apache.ojb.odmg.states.StateNewDirty.commit(Unknown Source)

 at org.apache.ojb.odmg.ObjectEnvelopeTable.commitAllEnvelopes(Unknown
Source)

 at org.apache.ojb.odmg.ObjectEnvelopeTable.commit(Unknown Source)

 at org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(Unknown Source)

 at org.apache.ojb.odmg.TransactionImpl.prepare(Unknown Source)

 at org.apache.ojb.odmg.TransactionImpl.commit(Unknown Source)


- Original Message - 
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 26, 2003 6:24 PM
Subject: Re: Identity


> doh! Seems I'm tired or dumb ;-)
> I mean autoincrement="true"
> Or did you implement your owm sequence manager?
>
> abashed,
> Armin
>
> Armin Waibel wrote:
>
> > Hi,
> >
> > assume you are using SequenceManagerNativeImpl?
> > Please set primarykey="true"
> > Which OJB version?
> >
> > regards
> > Armin
> >
> > Rémi Bars wrote:
> >
> >> Hi all,
> >>
> >> i m trying to use identity on sybase with the odmg api. I don t
> >> understand
> >> why only one object is insert in my table, when i try to add a second
> >> object
> >> i get no error but no record too.
> >>
> >> have u an idea?
> >>
> >> thanks for ur help!
> >>
> >> here is my repository
> >>
> >> 
> >> >> name="id"
> >> column="id"
> >> jdbc-type="numeric"
> >> primarykey="true"
> >> autoincrement="false"
> >>access="readonly"
> >>  />
> >> >> jdbc-type='VARCHAR'/>
> >> 
> >>
> >> here is my table
> >> CREATE TABLE Structure (
> >>
> >> id numeric(4,0) identity not null,
> >>
> >> nom VARCHAR(50) NULL )
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Identity

2003-11-26 Thread Rémi Bars
Hi all,

i m trying to use identity on sybase with the odmg api. I don t understand
why only one object is insert in my table, when i try to add a second object
i get no error but no record too.

have u an idea?

thanks for ur help!

here is my repository


   
   


here is my table
CREATE TABLE Structure (

id numeric(4,0) identity not null,

nom VARCHAR(50) NULL )


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mapping association in one table

2003-11-14 Thread Rémi Bars
Thank  it works fine

remi
- Original Message - 
From: "Nick Ohanian" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, November 13, 2003 7:36 PM
Subject: Re: Mapping association in one table


> Hi-
>
> I'm a little new at OJB, but I think it's possible.  Take a look at the
> section on nested objects at
> http://db.apache.org/ojb/tutorial3.html#nested%20objects, specifically
> the class-descriptor listed in that section.
>
> Your repository.xml should something like
>
> 
> 
>name="firstB::string1"
>   column="firstB_string1"
> />
>name="firstB::string2"
>   column="firstB_string2"
> />
>name="secondB::string1"
>   column="secondB_string1"
> />
>name="secondB::string2"
>   column="secondB_string2"
> />
> 
>
> Hope that helps.
>
> -Nick
>
>
>
> On Thu, 2003-11-13 at 08:54, RÃmi Bars wrote:
> > Hi all,
> >
> > in my application i have an association between 2 objects A and B. i
want to
> > store the items of B in the A table ,  is it possible? how can i do that
> > with the odmg api, how can i map that in the repository?is it a stupid
> > question?
> >
> > Sample :
> > class A {
> > int id
> > B firstB;
> > B secondB
> > }
> > class B {
> > string string1;
> > string string2;
> > }
> >
> > create table A(id int primary key not null, firstB_string1 varchar(20),
> > firstB_string2 varchar(20),secondB_string1 varchar(20),secondB_string2
> > varchar(20))
> >
> > thank
> >
> > Remi
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Mapping association in one table

2003-11-13 Thread Rémi Bars
Hi all,

in my application i have an association between 2 objects A and B. i want to
store the items of B in the A table ,  is it possible? how can i do that
with the odmg api, how can i map that in the repository?is it a stupid
question?

Sample :
class A {
int id
B firstB;
B secondB
}
class B {
string string1;
string string2;
}

create table A(id int primary key not null, firstB_string1 varchar(20),
firstB_string2 varchar(20),secondB_string1 varchar(20),secondB_string2
varchar(20))

thank

Remi


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



store object[]

2003-10-30 Thread Rémi Bars
How do u store a m:n relation which looks like an array?

when i try to do that i get the following error

java.lang.ClassCastException

 at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeCollections(Persistenc
eBrokerImpl.java:785)

 at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBroker
Impl.java:2007)

(normal in the code we try to cast the array as a collection :
deleteMtoNImplementor(cds, obj, (Collection)col, currentMtoNKeys);

)

remi


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PersistentFieldIntrospectorImpl

2003-10-30 Thread Rémi Bars
> I'm not familiar with java.beans package.
> So what's wrong invoking
> "Method m = getPropertyDescriptor().getWriteMethod();"
> write method for the property to set the value?

this method (getPropertyDescriptor().) don't see the parent's field.

remi

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PersistentFieldIntrospectorImpl

2003-10-30 Thread Rémi Bars
ok it is in the doc tutorial3.htm

sorry :)

remi

- Original Message - 
From: "Rémi Bars" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 3:34 PM
Subject: PersistentFieldIntrospectorImpl


> Hi all,
>
> i don't understand the use of the PersistentFieldIntrospectorImpl class.
>
> in the OJB.properties i read:
>
> # - PersistentFieldIntrospectorImpl
> #   uses JavaBeans compliant calls only to access persistent attributes.
> #   No Reflection is needed. But for each attribute xxx there must be
> #   public getXxx() and setXxx() methods.
>
> and in the code i read
>
> org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl
>
>  protected PropertyDescriptor findPropertyDescriptor(Class aClass, String
> aPropertyName) {
> ...
>  pd = info.getPropertyDescriptors();
> ...
> }
>
> when my class extends another class, the introspector don't find the field
> from the parent,
>
> -> why don't u use the info.getMethodDescriptors() as mentionned in the
> properties file?
>
> how do u do that?
>
> thank for ur help
>
> Remi
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PersistentFieldIntrospectorImpl

2003-10-30 Thread Rémi Bars
Hi all,

i don't understand the use of the PersistentFieldIntrospectorImpl class.

in the OJB.properties i read:

# - PersistentFieldIntrospectorImpl
#   uses JavaBeans compliant calls only to access persistent attributes.
#   No Reflection is needed. But for each attribute xxx there must be
#   public getXxx() and setXxx() methods.

and in the code i read

org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl

 protected PropertyDescriptor findPropertyDescriptor(Class aClass, String
aPropertyName) {
...
 pd = info.getPropertyDescriptors();
...
}

when my class extends another class, the introspector don't find the field
from the parent,

-> why don't u use the info.getMethodDescriptors() as mentionned in the
properties file?

how do u do that?

thank for ur help

Remi


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Queries for M:N collections?

2003-10-28 Thread Rémi Bars
Hi all, i found my bug !

it is in my p6spy library (a bug in the log module, this bug is referenced
in bugzilla)

Remi

- Original Message - 
From: "Rémi Bars" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 27, 2003 5:10 PM
Subject: Queries for M:N collections?


> Hi all,
>
> i m trying to store an object A wich have a list of A element, when i try
> that it works first time and after i got this exception
>
> org.apache.ojb.broker.PersistenceBrokerException:
> java.lang.StringIndexOutOfBoundsException: String index out of range: -2
>  at
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getMtoNImplementor(Persiste
> nceBrokerImpl.java:921)
>  at
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeCollections(Persistenc
> eBrokerImpl.java:783)
>  at
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBroker
> Impl.java:2007)
>  t
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> .java:1889)
>  at
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> .java:1851)
>  at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
> Source)
>  at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
> Source)
>  at org.apache.ojb.odmg.states.StateOldDirty.commit(Unknown Source)
>  at org.apache.ojb.odmg.ObjectEnvelopeTable.commitAllEnvelopes(Unknown
> Source)
>  at org.apache.ojb.odmg.ObjectEnvelopeTable.commit(Unknown Source)
>  at org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(Unknown Source)
>  at org.apache.ojb.odmg.TransactionImpl.prepare(Unknown Source)
>  at org.apache.ojb.odmg.TransactionImpl.commit(Unknown Source)
>
> create table A(id int primary key not null)
>
> create table A_A(ParentID int not null, ID int not null,primary key
> (ParentID , ID))
>
>
>
> 
> name="id"
> column="id"
> jdbc-type="INTEGER"
> primarykey="true"
> autoincrement="true"
>  />
>
>  name="listOfA"
>element-class-ref="A"
>auto-retrieve="true"
>auto-update="true"
>auto-delete="false"
>indirection-table="A_A"
>  >
>
>
>  
>
>  
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Queries for M:N collections?

2003-10-27 Thread Rémi Bars
Hi all,

i m trying to store an object A wich have a list of A element, when i try
that it works first time and after i got this exception

org.apache.ojb.broker.PersistenceBrokerException:
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
 at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getMtoNImplementor(Persiste
nceBrokerImpl.java:921)
 at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeCollections(Persistenc
eBrokerImpl.java:783)
 at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBroker
Impl.java:2007)
 t
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
.java:1889)
 at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
.java:1851)
 at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
Source)
 at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
Source)
 at org.apache.ojb.odmg.states.StateOldDirty.commit(Unknown Source)
 at org.apache.ojb.odmg.ObjectEnvelopeTable.commitAllEnvelopes(Unknown
Source)
 at org.apache.ojb.odmg.ObjectEnvelopeTable.commit(Unknown Source)
 at org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(Unknown Source)
 at org.apache.ojb.odmg.TransactionImpl.prepare(Unknown Source)
 at org.apache.ojb.odmg.TransactionImpl.commit(Unknown Source)

create table A(id int primary key not null)

create table A_A(ParentID int not null, ID int not null,primary key
(ParentID , ID))




   

 
   
   
 

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Antwort: 1:1-Mapping

2003-09-30 Thread Rémi Bars
ok thanks it s working now

remi

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 30, 2003 3:47 PM
Subject: Antwort: 1:1-Mapping


The problem is that your field descriptor and reference descriptor have
the same name attributes. The name of your field-descriptor must
correspond to an Integer property of your class. The name of the reference
descriptor must correspond to an Object (ThemeSurveurImpl) property of
your class.

HTH
Gerhard





Rémi Bars <[EMAIL PROTECTED]>
30.09.2003 15:25
Bitte antworten an "OJB Users List"


An: "OJB Users List" <[EMAIL PROTECTED]>
Kopie:
Thema:  1:1-Mapping


Hi all

i m trying to do a 1:1 mapping  on rc4 with the xml file at the end
when i try to store a Catalogue i get this error :

Thanks for ur help


org.apache.ojb.broker.PersistenceBrokerException:
org.apache.ojb.broker.PersistenceBrokerException:
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
java.lang.Integer not found in OJB Repository

 at org.apache.ojb.odmg.TransactionImpl.assignReferenceFKs(Unknown Source)

 at org.apache.ojb.odmg.TransactionImpl.lock(Unknown Source)

 at
fr.ouestfrance.sip.cezan.framework.persistance.odmg.OJB_ODMG_PersistentManag
er.insert(OJB_ODMG_PersistentManager.java:126)

 at
fr.ouestfrance.sip.cezan.framework.persistance.odmg.OJB_ODMG_CezanGestionnai
reDAO.create(OJB_ODMG_CezanGestionnaireDAO.java:55)

 at
fr.ouestfrance.sip.cezan.serveur.catalogue.work.GestionnaireCatalogueServeur
Impl.main(GestionnaireCatalogueServeurImpl.java:165)

Caused by: org.apache.ojb.broker.PersistenceBrokerException:
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
java.lang.Integer not found in OJB Repository

 at org.apache.ojb.odmg.TransactionImpl.assertFkAssignment(Unknown Source)

 ... 5 more



  
  
  

  

 
 
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 1:1-Mapping

2003-09-30 Thread Rémi Bars
i only use integer in my repository.xml, and i use int in my classes

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 30, 2003 3:28 PM
Subject: Re: 1:1-Mapping


> Have you tried using int, instead of Integer?
>
> - Original Message - 
> From: "Rémi Bars" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Tuesday, September 30, 2003 9:25 AM
> Subject: 1:1-Mapping
>
>
> > Hi all
> >
> > i m trying to do a 1:1 mapping  on rc4 with the xml file at the end
> > when i try to store a Catalogue i get this error :
> >
> > Thanks for ur help
> >
> >
> > org.apache.ojb.broker.PersistenceBrokerException:
> > org.apache.ojb.broker.PersistenceBrokerException:
> > org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
> > java.lang.Integer not found in OJB Repository
> >
> >  at org.apache.ojb.odmg.TransactionImpl.assignReferenceFKs(Unknown
Source)
> >
> >  at org.apache.ojb.odmg.TransactionImpl.lock(Unknown Source)
> >
> >  at
> >
>
fr.ouestfrance.sip.cezan.framework.persistance.odmg.OJB_ODMG_PersistentManag
> > er.insert(OJB_ODMG_PersistentManager.java:126)
> >
> >  at
> >
>
fr.ouestfrance.sip.cezan.framework.persistance.odmg.OJB_ODMG_CezanGestionnai
> > reDAO.create(OJB_ODMG_CezanGestionnaireDAO.java:55)
> >
> >  at
> >
>
fr.ouestfrance.sip.cezan.serveur.catalogue.work.GestionnaireCatalogueServeur
> > Impl.main(GestionnaireCatalogueServeurImpl.java:165)
> >
> > Caused by: org.apache.ojb.broker.PersistenceBrokerException:
> > org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
> > java.lang.Integer not found in OJB Repository
> >
> >  at org.apache.ojb.odmg.TransactionImpl.assertFkAssignment(Unknown
Source)
> >
> >  ... 5 more
> >
> >
> > 
> >>name="id"
> >column="id"
> >jdbc-type="INTEGER"
> >primarykey="true"
> >autoincrement="true"
> > />
> >jdbc-type='VARCHAR'/>
> >   
> > 
> >>  name="id"
> >  column="id"
> >  jdbc-type="INTEGER"
> >  primarykey="true"
> >  autoincrement="true"
> >   />
> >  > jdbc-type="INTEGER"/>
> >   >name="_ThemeParentId"
> >class-ref="ThemeServeurImpl"
> > auto-retrieve="true"
> >   auto-update="true"
> >  auto-delete="true"
> > >
> >  
> >   
> >   
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



1:1-Mapping

2003-09-30 Thread Rémi Bars
Hi all

i m trying to do a 1:1 mapping  on rc4 with the xml file at the end
when i try to store a Catalogue i get this error :

Thanks for ur help


org.apache.ojb.broker.PersistenceBrokerException:
org.apache.ojb.broker.PersistenceBrokerException:
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
java.lang.Integer not found in OJB Repository

 at org.apache.ojb.odmg.TransactionImpl.assignReferenceFKs(Unknown Source)

 at org.apache.ojb.odmg.TransactionImpl.lock(Unknown Source)

 at
fr.ouestfrance.sip.cezan.framework.persistance.odmg.OJB_ODMG_PersistentManag
er.insert(OJB_ODMG_PersistentManager.java:126)

 at
fr.ouestfrance.sip.cezan.framework.persistance.odmg.OJB_ODMG_CezanGestionnai
reDAO.create(OJB_ODMG_CezanGestionnaireDAO.java:55)

 at
fr.ouestfrance.sip.cezan.serveur.catalogue.work.GestionnaireCatalogueServeur
Impl.main(GestionnaireCatalogueServeurImpl.java:165)

Caused by: org.apache.ojb.broker.PersistenceBrokerException:
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
java.lang.Integer not found in OJB Repository

 at org.apache.ojb.odmg.TransactionImpl.assertFkAssignment(Unknown Source)

 ... 5 more



  
  
  

  

 
 
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]