Re: Deletion Bug!!!!!?
Hi, thanks - I think that was the solution. But I don't think that it was intended by the developers of OJB that OJB deletes instances by default, or was it? Tino - Original Message - From: "Philippe Boisaubert" <[EMAIL PROTECTED]> Newsgroups: gmane.comp.jakarta.ojb.user Sent: Thursday, November 27, 2003 4:16 PM Subject: Re: Deletion Bug!? > Always the same question, I ask it few days ago ! > First you need to configure your repository (with auto-delete="false"), i > think you've already do this. > Then use the ManagedArrayList as a collection class (by default it's a > RemovalAwareCollection) > > like this (as an a attribute of the collection descriptor element): > collection-class= > "org.apache.ojb.broker.util.collections.ManageableArrayList" > > > - Original Message - > From: "TINO SCHÖLLHORN" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, November 27, 2003 3:57 PM > Subject: Deletion Bug!? > > > > Hi, > > > > I have a really weird problem and I don't if I am doing something wrong or > > if this is a bug of OJB. > > > > I have basically 2 classes: Person and Department. I defined a N:M > relation > > between those two. > > > > Now I want to remove a Department from a Person. But what happens is, that > > OJB is trying to delete ALL relations to other classes and is then > deleting > > the Department as well!!! > > > > Do I have to change my configuration? Or is this a bug? > > > > In hope for help. > > > > Tino > > > > > > > > > > - > > 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: Re:Deletion Bug!!!!!?
Hi, the autodelte flag is set to false. Here is my complete collectin-descriptor Any ideas? Tino - Original Message - From: "balza" <[EMAIL PROTECTED]> Newsgroups: gmane.comp.jakarta.ojb.user Sent: Thursday, November 27, 2003 4:06 PM Subject: Re:Deletion Bug!? autodelete flag in your xml mapping file is true or false? an example: ... ... > Hi, > > I have a really weird problem and I don't if I am doing something wrong or > if this is a bug of OJB. > > I have basically 2 classes: Person and Department. I defined a N:M relation > between those two. > > Now I want to remove a Department from a Person. But what happens is, that > OJB is trying to delete ALL relations to other classes and is then deleting > the Department as well!!! > > Do I have to change my configuration? Or is this a bug? > > In hope for help. > > Tino > > > > > - > 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]
Instantiation PersistenceBroker failure in upgrading to .rc4
I'm upgrading my application from ojb-1.0.rc1 to .rc4. I've replaced old ojb jar and all needed library with new release's jar. I've replaced old ojb.properties with new standard ojb.properties. I haven't replaced my repository.xml. The following code is my PersistenceBroker instantiation import org.apache.ojb.broker.PersistenceBroker; import org.apache.ojb.broker.PersistenceBrokerFactory; import org.apache.ojb.broker.PersistenceBrokerException; public class OrderBF { private PersistenceBroker broker; public OrderBF() { broker = null; try{ broker = PersistenceBrokerFactory.defaultPersistenceBroker(); } catch (java.lang.Throwable t){ t.printStackTrace(); } } This is my error message: [BOOT] ERROR: The specified class "org.apache.ojb.broker.cache.ObjectCacheDefaultImpl" does not implement the interface org.apache.ojb.broker.cache.ObjectCache, which is a requirement for the key "ObjectCacheClass". Using default class org.apache.ojb.broker.cache.ObjectCacheDefaultImpl [BOOT] ERROR: The specified class "org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl" does not implement the interface org.apache.ojb.broker.accesslayer.ConnectionFactory, which is a requirement for the key "ConnectionFactoryClass". Using default class org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl [BOOT] ERROR: The specified class "org.apache.ojb.odmg.locking.LockManagerDefaultImpl" does not implement the interface org.apache.ojb.odmg.locking.LockManager, which is a requirement for the key "LockManagerClass". Using default class org.apache.ojb.odmg.locking.LockManagerDefaultImpl [BOOT] ERROR: The specified class "org.apache.ojb.odmg.locking.InMemoryLockMapImpl" does not implement the interface org.apache.ojb.odmg.locking.LockMap, which is a requirement for the key "LockMapClass". Using default class org.apache.ojb.odmg.locking.PersistentLockMapImpl [BOOT] ERROR: The specified class "org.apache.ojb.broker.util.logging.PoorMansLoggerImpl" does not implement the interface org.apache.ojb.broker.util.logging.Logger, which is a requirement for the key "LoggerClass". Using default class org.apache.ojb.broker.util.logging.PoorMansLoggerImpl [BOOT] ERROR: The specified class "org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl" does not implement the interface org.apache.ojb.broker.metadata.fieldaccess.PersistentField, which is a requirement for the key "PersistentFieldClass". Using default class org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldPrivilegedImpl [BOOT] ERROR: The specified class "org.apache.ojb.broker.core.PersistenceBrokerImpl" does not implement the interface org.apache.ojb.broker.PersistenceBroker, which is a requirement for the key "PersistenceBrokerClass". Using default class org.apache.ojb.broker.core.PersistenceBrokerImpl [BOOT] ERROR: The specified class "org.apache.ojb.odmg.collections.DListImpl" does not implement the interface org.apache.ojb.broker.ManageableCollection, which is a requirement for the key "OqlCollectionClass". Using default class org.apache.ojb.odmg.collections.DListImpl java.lang.ClassCastException at org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown Source) at org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source) at eo.bf.OrderBF.(OrderBF.java:67)[BOOT] ERROR: Error in instantiation of PersistenceBrokerFactory class class org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl, try to use default PersistenceBrokerFactory implementation null at eo.jdo.business.test.TestOrder.testFindAllStepsByIdOrder(TestOrder.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.swingui.TestRunner$16.run(TestRunner.java:623) java.lang.ExceptionInInitializerError at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.buildDefaultKey(Unknown Source) at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.(Unknown Source) at org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown Source) at org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.(Unknown Source) at org.apache.ojb.broker.Persi
Using Dynamic proxies
Hello all, In the tutorial about dynamic proxies, it has been written that we dont have to implement proxy class for each class. Also, in the top of the page, it is written that Dynamic proxies provided by OJB. They can simply be activated by setting certain switches in repository.xml. This is the solution recommemded for most cases. If your are in doubt use dynamic proxies. At the end of the section about dynamic proxy it is also written that To use dynamic proxies the persistent class in question (in our case the Article class) must implement an interface (for example InterfaceArticle). This interface is needed to allow replacement of the proper Article object with a dynamic proxy implementing the same interface. Please let me know, if it is just turning on the switch in repository.xml or creating interface for each class and using them as reference in class. Also, please let me know, if the tools to generate persistent class and repository.xml, also can provide these proxy interfaces. Thank you. Regards, Vijay Sargunam Icicle Consultancy, Web: www.icicleconsultancy.com
OJB in server
Hi, i just want to know whether there is any need to change old OJB version in application to a new one when the application uses Mysql4. please let me know this asap. bcse i am using old version of Mysql in my local machine. but in the server machine its Mysql4. but i am using the same versions of OJB both in the local machine and server. in the server OJB doesnt work. please help me resolve the issue. Regards.. Anish.. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003
Container managed Transaction
Can i programatic rollback managed transaction in ODMG api? I have the following challenge. 1. ((NarrowTransaction)tx).markDirty(document1); 2. ((NarrowTransaction)tx).markDirty(subDoc1); 3. ((NarrowTransaction)tx).markDelete(subDoc2); In the above sequence, says I excute statement 1 and 2 successfully, before reaching statement 3 I detected some errors and need to exit the method and rollback. In my testing, the SQL Statement in 1 and 2 will get excuted. My question is can I rollback sql statement 1 and 2 and assume I didn't mark document1 and subDoc1? Thanks Regards, Stephen Ting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Mapping question
Thanks, I defined it like that, but: >If A is 1 and B is n. >In A class descriptor write : >element-class-ref="url.B"> > > >And in B class descriptor write this > >Here mykey is the foreignkey but not a primary key ! OJB generates statements where mykey points to the pk of class A. The generated join looks like: A.pk = B.mykey We need: A.anyField = B.mykey In fact I think we've a m:n mapping without intermediary table... What can we do (the database model cannot be changed)? Is there a possibility to add to the collection-descriptor something like similar to the element? Thanks again. -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Envoyé : jeudi 27 novembre 2003 16:57 À : [EMAIL PROTECTED] Objet : Mapping question Hi, I've got a 1:n mapping from table A to table B. But the foreign key field of table A is not it's primary key. I can't find how to tell OJB to use another field to join table B. Thanks for help, Norbert. - 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
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(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 syb
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(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 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 unsubsc
RE: Mapping question
Hi, If A is 1 and B is n. In A class descriptor write : And in B class descriptor write this Here mykey is the foreignkey but not a primary key ! Hope it helps you, Éric -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Envoyé : jeudi 27 novembre 2003 16:57 À : [EMAIL PROTECTED] Objet : Mapping question Hi, I've got a 1:n mapping from table A to table B. But the foreign key field of table A is not it's primary key. I can't find how to tell OJB to use another field to join table B. Thanks for help, Norbert. - 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
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 > > 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] > > >>> > > >>> > > >>> > > >> > > >> > > >> > > >>-
Mapping question
Hi, I've got a 1:n mapping from table A to table B. But the foreign key field of table A is not it's primary key. I can't find how to tell OJB to use another field to join table B. Thanks for help, Norbert. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deletion Bug!!!!!?
Always the same question, I ask it few days ago ! First you need to configure your repository (with auto-delete="false"), i think you've already do this. Then use the ManagedArrayList as a collection class (by default it's a RemovalAwareCollection) like this (as an a attribute of the collection descriptor element): collection-class= "org.apache.ojb.broker.util.collections.ManageableArrayList" - Original Message - From: "TINO SCHÖLLHORN" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 27, 2003 3:57 PM Subject: Deletion Bug!? > Hi, > > I have a really weird problem and I don't if I am doing something wrong or > if this is a bug of OJB. > > I have basically 2 classes: Person and Department. I defined a N:M relation > between those two. > > Now I want to remove a Department from a Person. But what happens is, that > OJB is trying to delete ALL relations to other classes and is then deleting > the Department as well!!! > > Do I have to change my configuration? Or is this a bug? > > In hope for help. > > Tino > > > > > - > 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:Deletion Bug!!!!!?
autodelete flag in your xml mapping file is true or false? an example: ... ... > Hi, > > I have a really weird problem and I don't if I am doing something wrong or > if this is a bug of OJB. > > I have basically 2 classes: Person and Department. I defined a N:M relation > between those two. > > Now I want to remove a Department from a Person. But what happens is, that > OJB is trying to delete ALL relations to other classes and is then deleting > the Department as well!!! > > Do I have to change my configuration? Or is this a bug? > > In hope for help. > > Tino > > > > > - > 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]
Deletion Bug!!!!!?
Hi, I have a really weird problem and I don't if I am doing something wrong or if this is a bug of OJB. I have basically 2 classes: Person and Department. I defined a N:M relation between those two. Now I want to remove a Department from a Person. But what happens is, that OJB is trying to delete ALL relations to other classes and is then deleting the Department as well!!! Do I have to change my configuration? Or is this a bug? In hope for help. Tino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [odmg] memory leak on write
On Thursday, November 27, 2003, at 07:34 AM, Phil Warrick wrote: -the profiler OptimizeIt is very useful for memory leak investigation once learned. Very important to create a minimal test program otherwise the data explosion makes it difficult to isolate problem references. I haven't used Optimizeit but have used JProbe before and it rocks. I keep hearing good things about Optimizeit... Maybe I need to contact Borland and see if they will donate a license to OJB. -Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB in server
Anish, we really need more information than this. What type of container are you running it in on the server? What type of container are you running it in locally? (Servlet, EJB, simple jvm, etc). What error messages do you get? -Brian On Friday, November 28, 2003, at 06:09 AM, Anish wrote: Hi, i will explain the problem. my application uses OJB for database management and for SQL. OJB works well when i run my application on the local machine. then i have uploaded the same application to the server. i havent changed anything. but when i am trying to add some details to a table of my database, that doesnt add. is this a problem of OJB in server. what should i do to resolve this. Regards.. Anish.. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDO
Hello, You need to download the src for ojb. There in the src director you will have to put all the files in src\jdori\org\apache\ojb\jdori\sql. Regards, Vijay Sargunam Icicle Consultancy, Web: www.icicleconsultancy.com -Original Message- From: Stephan Wannenwetsch [mailto:[EMAIL PROTECTED] Sent: 27 November 2003 15:44 To: [EMAIL PROTECTED] Subject: JDO Hallo, I want to write a little demo programm using the JDO API for persistence. But I have problems to get the import for OjbStorePMF(). Which files do I have to include to my webproject to be able to use the JDO API. Thanks, Stephan - 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]
Regressiontest fails for db-ojb-1.0.rc4 and Oracle 9i
Hi folks, I'm having a look at OJB and make my first steps using Oracle9i junit-no-compile-no-prepare: [junit] Running org.apache.ojb.broker.AllTests [junit] Tests run: 247, Failures: 1, Errors: 0, Time elapsed: 61.781 sec [junit] TEST org.apache.ojb.broker.AllTests FAILED [junit] Running org.apache.ojb.odmg.AllTests [junit] [BOOT] INFO: OJB.properties: file:/C:/Programme/java/db-ojb-1.0.rc4/target/test/ojb/OJB.properties [junit] Tests run: 160, Failures: 0, Errors: 12, Time elapsed: 21.953 sec [junit] TEST org.apache.ojb.odmg.AllTests FAILED [junit] Running org.apache.ojb.soda.AllTests [junit] [BOOT] INFO: OJB.properties: file:/C:/Programme/java/db-ojb-1.0.rc4/target/test/ojb/OJB.properties [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 2.75 sec [junit] Running org.apache.ojb.otm.AllTests [junit] Tests run: 73, Failures: 0, Errors: 0, Time elapsed: 14.563 sec The offending test is Testcase: testDeleteWithRemovalAwareCollection took 0.078 sec FAILED expected:<1> but was:<2> junit.framework.AssertionFailedError: expected:<1> but was:<2> at org.apache.ojb.broker.OneToManyTest.testDeleteWithRemovalAwareCollection(OneToManyTest.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) The source code shows ... pg.getAllArticles().remove(c); pg.getAllArticles().remove(0); ... assertEquals(1,pg.getAllArticles().size()); ... I.e. one of the two removals fails I also get a couple of SQL Errors java.sql.SQLException: ORA-1: unique constraint (WEBSHOP.ARTIKEL_PK) violated - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [odmg] memory leak on write
Hi again, It was my problem, not OJB's. My mapping file and Java classes had gotten out of sync (OJB mapping tools are looking very promising now, perhaps it's time to stop manual synchronization...). Garbage collection is now keeping memory use stable. In the past, I had worked around this problem for production use by restarting jBoss every day. Hopefully this will no longer be required. Another benefit: I may be able to finally use a per-broker cache in production. Until now I have had to turn off caching altogether. Lessons learned: -manual maintenance of mapping is error-prone. I imagine, though, that even with the new tools, nothing replaces a careful human scan of the java_source/mapping/db_schema ensemble -the profiler OptimizeIt is very useful for memory leak investigation once learned. Very important to create a minimal test program otherwise the data explosion makes it difficult to isolate problem references. Phil Hi all, I'm in the midst of tracking down a leak that occurs when I do a write operation on an object graph. Garbage collection isn't removing these objects because they are referred to by internal ojb classes. Presumably some internal cleanup isn't occurring properly after each begin tx ... commit tx cycle. No leak seems to occur, however, if I simply do a read operation on the same graph. A preliminary observation that I have made is that for some reason, when I call lock() on the graph root, eventually that graph root is again retrieved from the db, as shown in the trace below (my two notes indicated by <--- ***). Thus an unnecessary copy is made of the root object, and this copy may not be gc'd because of the ojb references to it that presumably are not cleaned up. Does anyone have some insights that might help as I look at this under the microscope? (I using the profiler Optimizeit: couldn't find a decent open-source alternative). Is there some extra cleanup that I should be doing using the ODMG api? Is this known behaviour by any chance, or better, already fixed? I'm running 1.0.rc4 with per-broker caching and implicit locking at the moment. Thanks, Phil Allocated at ConstructorHelper.instantiate() (ConstructorHelper.java:158) <--root object gets instantatiated again here!!! *** RowReaderDefaultImpl.buildWithReflection() (RowReaderDefaultImpl.java:233) RowReaderDefaultImpl.readObjectFrom() (RowReaderDefaultImpl.java:116) RsIterator.getObjectFromResultSet() (RsIterator.java:433) RsIterator.next() (RsIterator.java:254) PersistenceBrokerImpl.getCollectionByQuery() (PersistenceBrokerImpl.java:1374) PersistenceBrokerImpl.getCollectionByQuery() (PersistenceBrokerImpl.java:1515) PersistenceBrokerImpl.getCollectionByQuery() (PersistenceBrokerImpl.java:1483) DelegatingPersistenceBroker.getCollectionByQuery() (DelegatingPersistenceBroker.java:307) DelegatingPersistenceBroker.getCollectionByQuery() (DelegatingPersistenceBroker.java:307) CollectionProxy.loadData() (CollectionProxy.java:141) ListProxy.loadData() (ListProxy.java:187) CollectionProxy.getData() (CollectionProxy.java:375) CollectionProxy.iterator() (CollectionProxy.java:199) CollectionProxy.ojbIterator() (CollectionProxy.java:429) TransactionImpl.lockCollections() (TransactionImpl.java:914) TransactionImpl.register() (TransactionImpl.java:809) TransactionImpl.lock() (TransactionImpl.java:291) TransactionImpl.lockCollections() (TransactionImpl.java:982) TransactionImpl.register() (TransactionImpl.java:809) TransactionImpl.lock() (TransactionImpl.java:291) TransactionImpl.lockReferences() (TransactionImpl.java:1018) TransactionImpl.register() (TransactionImpl.java:801) TransactionImpl.lock() (TransactionImpl.java:291) DB.lock() (DB.java:205) <---lock the root object here *** EventServer.commitEvent() (EventServer.java:621) EventServerLocal.commitEvent() (EventServerLocal.java:700) EventServerLoadTest.testEventReadLoad() (EventServerLoadTest.java:135) NativeMethodAccessorImpl.invoke() () DelegatingMethodAccessorImpl.invoke() () TestCase.runTest() (TestCase.java:154) TestCase.runBare() (TestCase.java:127) TestResult$1.protect() (TestResult.java:106) TestResult.runProtected() (TestResult.java:124) TestResult.run() (TestResult.java:109) TestCase.run() (TestCase.java:118) TestSuite.runTest() (TestSuite.java:208) TestSuite.run() (TestSuite.java:203) TestRunner.doRun() (TestRunner.java:116) TestRunner.start() (TestRunner.java:172) TestRunner.main() (TestRunner.java:138) EventServerLoadTest.main() (EventServerLoadTest.java:49) NativeMethodAccessorImpl.invoke() () DelegatingMethodAccessorImpl.invoke() () - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OJB in server
Hi, i will explain the problem. my application uses OJB for database management and for SQL. OJB works well when i run my application on the local machine. then i have uploaded the same application to the server. i havent changed anything. but when i am trying to add some details to a table of my database, that doesnt add. is this a problem of OJB in server. what should i do to resolve this. Regards.. Anish.. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003
JDO
Hallo, I want to write a little demo programm using the JDO API for persistence. But I have problems to get the import for OjbStorePMF(). Which files do I have to include to my webproject to be able to use the JDO API. Thanks, Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re:OJB with mysql4
What is the problem? > Hi, > i am using mysql4 in an application which use OJB. what details should i change in > > platform="MySQL" > jdbc-level="2.0" > driver="org.gjt.mm.mysql.Driver" > protocol="jdbc" > subprotocol="mysql" > dbalias="dburl" > > > please help me. > > Regadrs.. > Anish.. > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003 > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB on the server
What's wrong exactly ? What do you mean by "locally" ? Local appserver or direct launch (with a static main ...) ? Do you put your config files in a repositoy accessible via your AppServer classpath ? Why you don't use a datasource (managed by your appserver) instead a direct connection if you work with an AppServer ? - Original Message - From: "Anish" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 28, 2003 10:01 AM Subject: OJB on the server Hi, i have done an application using struts and OJB. my application runs well in local machine. but OJB doesnt work, when running the same application in a server. i havent changed anything for OJB in the server, should i? please help me to resolve this issue. Regards.. Anish.. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OJB with mysql4
Hi, i am using mysql4 in an application which use OJB. what details should i change in please help me. Regadrs.. Anish.. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003
Re: Identity
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
org.apache.ojb.broker.platforms package Armin Rémi Bars wrote: 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 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OJB on the server
Hi, i have done an application using struts and OJB. my application runs well in local machine. but OJB doesnt work, when running the same application in a server. i havent changed anything for OJB in the server, should i? please help me to resolve this issue. Regards.. Anish.. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003
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 > 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
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 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
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
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]
RE: MS Access Memo Field
Thanks, that was the problem. I thought I had tried this earlier but I guess not. Cheers, Graham -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of TINO SCHÖLLHORN Sent: November 26, 2003 4:14 AM To: [EMAIL PROTECTED] Subject: Re: MS Access Memo Field "Graham Lounder" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hey all,Hi, as I can see you only have to set the data-type in your repository.xml of the memo-field to LONGVARCHAR. I have had the same problem, but now it is running fine. Tino > > I'm trying to save a string greater than 255 characters to a MS Access memo > field with no luck. I'm getting the following error: > > java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]String data, > right truncated (null) > > I've done some search on the internet and it seems this is a problem without > many solutions. I did notice that this was suppose to be fixed in rc4. I > did read that someone said that it might have something to do with the > autocommit setting? > > Any Ideas? > > Graham > > > Graham Lounder - Java Developer > CARIS Spatial Components Division > [EMAIL PROTECTED] > Phone: (506) 458-8533 > Fax:(506) 459-3849 > > NO BINDING CONTRACT WILL RESULT FROM THIS EMAIL UNTIL SUCH TIME > AS A WRITTEN DOCUMENT IS SIGNED ON BEHALF OF THE COMPANY. - 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]