Batch mode and foreign keys

2004-01-13 Thread Guillaume Nodet
Hi ! I've got a problem with RC5. I use the broker api to store several objets with collections and nested objets. Under certain circumstances (Oracle, batch mode), i've got the following exception thrown: java.sql.SQLException: ORA-02291: violation de contrainte (GNT.SYS_C00194175) d'integrite

Re: Batch mode and foreign keys

2004-01-13 Thread Oleg Nitz
Hi Guillaume, Please translate the text of the exception into English and give more details about this case. Is GNT the name of the table? What are related objects for GNT involved into this thansaction? And the most important question is: Do all database constraints correspond to some

RE: Connection: Socket Close Exception

2004-01-13 Thread Thierry Hanot
Thx to all for your answer But it's still only workaround Because the problem is not when the broker is not closed and the connection release for other broker But only when the broker is close by the gc I need to investigate . In fact after a few test of debug , when I apply the test case

Re: Real world OJB applications

2004-01-13 Thread Thomas Mahler
Hi Sean, We have a page listing reference usages and user testimonials: http://db.apache.org/ojb/references.html some of these projects are open source. We also have sample apps in our contributions package. You'll find more details on this page: http://db.apache.org/ojb/links.html#OJB

Re: Real world OJB applications

2004-01-13 Thread Thomas Mahler
Hi Sean, Sean Dockery wrote: Thanks. I've downloaded it and will look at it later this weekend. Is OpenEMed an example of a typical OJB application? Mhh, What do you mean by typical? OJB is used in large variety of application scenarios. (E.G. in Swing based clients, in Servlets, in EJB

RE: [Fwd: How to call a select store procedure in OJB]

2004-01-13 Thread Ron Gallagher
Suma -- Stored procedures are only supported for data persistence operations (insert, update or delete). Data retrieval (i.e. select) is still performed by 'basic' sql statements. Ron Gallagher Atlanta, GA [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

java.lang.ClassNotFoundException: org.apache.ojb.broker.util.collections.RemovalAwareCollection

2004-01-13 Thread Christopher Tava
Dear OJB User Group, I am using OJB in jboss and making an EJB connection to the server and it seems like the client application is trying to down a server side class. Any suggestion as to what can be the problem that cause the rmi classloader to reference the RemovalAwareCollection. Is

RE: Calling custom store procedures in OJB

2004-01-13 Thread Ron Gallagher
Suma -- At this point, OJB's support for stored procedures is limited to just data persistence operations (insert, update or delete). Data retrieval (i.e. select) is still performed by 'basic' sql statements. I am aware of no plans at this time to extend SP support to handle data retrieval.

Working on store procedure

2004-01-13 Thread suma . venkatesh
Hi I posted the below question 3 days ago. Is it that new joiners are not answered OR is my question too obvious !!! Iam completely new to OJB and trying to learn it. Please help me. Iam working on using store procedures using OJB. I want to call a store procedure which selects a number

Re: java.lang.ClassNotFoundException: org.apache.ojb.broker.util.collections.RemovalAwareCollection

2004-01-13 Thread Armin Waibel
Hi Christopher, per default OJB use a org.apache.ojb.broker.util.collections.RemovalAwareCollection for populating 1:n relations. Thus you need this class on client side too. You can change this default class by setting a 'collection-class' attribute in collection-descriptor. e.g.

RE: Batch mode and foreign keys

2004-01-13 Thread Guillaume Nodet
The Oracle error is: ORA-02291 integrity constraint (%s.%s) violated - parent key not found The constraint referenced in my case is an optional foreign key 'FOREIGN KEY (ACTDATA) REFERENCES ACTIVITIES (ID)' on table PROPERTIES. The ddl is following (i ommited all fields that i think are

Re: Working on store procedure

2004-01-13 Thread Thomas Mahler
Hi Suma [EMAIL PROTECTED] wrote: Hi I posted the below question 3 days ago. Is it that new joiners are not answered OR is my question too obvious !!! Your question was answered within 6 hours by Ron Gallagher. I've also forwarded his posting to you in case you missed it. cheers, thomas Iam

JDO: pmf

2004-01-13 Thread Pedro Salgado
In tutorial 4 I found something like: factory = new OjbStorePMF(); Isn't this a better way to create a PersistenceManagerFactory? Properties props = new Properties(); props.setProperty(javax.jdo.PersistenceManagerFactoryClass, org.apache.ojb.jdori.sql.OjbStorePMF);

Re: JDO: pmf

2004-01-13 Thread Thomas Mahler
Hi pedro, Pedro Salgado wrote: In tutorial 4 I found something like: factory = new OjbStorePMF(); Isn't this a better way to create a PersistenceManagerFactory? Properties props = new Properties(); props.setProperty(javax.jdo.PersistenceManagerFactoryClass,

Newbie: Problems with passing persistent Objects via a RMI-Connection

2004-01-13 Thread Steckel, Philipp
Hello, i am using the Persistence-Broker API and a mySQL-Database. My Server-Application holds persistent Objects in the following way: I have a Container-Object called ProductCon, which holds n Product-Objects in a Vector. I have made this struct persistent using a 1:n mapping and it works

Re: JDO: pmf

2004-01-13 Thread Thomas Mahler
Hi Pedro, Pedro Salgado wrote: snip Sure, this is much cleaner. But my code is only one line ;-) Yes, but if I make an additional util class I can get the same effect (1 line) and abstract from the JDO implementation ;)... Maybe one more private attribute for the pmf on usecase implementation

Problem using strongly typed collections

2004-01-13 Thread Guillaume Nodet
I've got an object model with strongly typed collections: class A { private BList bs; public BList getBs(); } class B { ... } class BList implements Collection { ... } When I store

Re: XDoclet autoincrement oddities

2004-01-13 Thread Brian McCallister
How is this coming? It is a major headache for a project I am working on at the moment =/ Anything I can do to help? -Brian On Jan 7, 2004, at 5:53 PM, Brian McCallister wrote: I like none (default) / ojb / database the most. I never hit the problem running against PostgreSQL, but started a

Re: java.lang.ClassNotFoundException: org.apache.ojb.broker.util.collections.RemovalAwareCollection

2004-01-13 Thread Larry V. Streepy, Jr.
I'll try to answer your question, although I'm still somewhat new to OJB myself. OJB uses RemovalAwareCollection as the default implementation class for holding the collection instance. RemovalAwareCollection implements java.util.Collection. So, when your container class is serialized to

Re: Working on store procedure

2004-01-13 Thread Larry V. Streepy, Jr.
As has been stated a couple of times, there is no support for directly specifying the use of a stored procedure so that OJB will use it for data retrieval. However, I would expect that you could write the SP so that it returns a set of OIDs which you could then use to quickly materialize the

Re: XDoclet autoincrement oddities

2004-01-13 Thread Thomas Dudziak
On Tue, 13 Jan 2004, Brian McCallister wrote: How is this coming? It is a major headache for a project I am working on at the moment =/ I can't fix it in the source currently in CVS as I'm nearly finished with a major overhaul so my codebase is quite different from the one in CVS. I plan to

Re: Real world OJB applications

2004-01-13 Thread Sean Dockery
Hello, Thomas. Thanks for the link to the references page. I have looked at some of the sample applications, but I'm not sure that sample applications will provide the information that I'm looking for. The problem with sample applications is that you can't be sure whether or not how OJB is used

Re: Newbie: Problems with passing persistent Objects via a RMI-Connection

2004-01-13 Thread Larry V. Streepy, Jr.
Philipp, this appears to be the same problem/question asked by another posting last night. Here's the response I sent to that request: I'll try to answer your question, although I'm still somewhat new to OJB myself. OJB uses RemovalAwareCollection as the default implementation class for

Re: Problem using strongly typed collections

2004-01-13 Thread Thomas Mahler
Hi Guilaume, Guillaume Nodet wrote: I've got an object model with strongly typed collections: class A { private BList bs; public BList getBs(); } class B { ... } class BList implements Collection {

Re: Real world OJB applications

2004-01-13 Thread Sean Dockery
I mean typical as in a good example of how to use OJB. I'm not concerned with what the user interface medium happens to be; I just want some exposure to approaches taken in the real world applications using OJB that have been proven to be viable. Do you have a sense of which of the ODMG or PB

RE: Problem using strongly typed collections

2004-01-13 Thread Guillaume Nodet
The problem is the object model cannot be modified. -Message d'origine- De : Thomas Mahler [mailto:[EMAIL PROTECTED] Envoye : mardi 13 janvier 2004 17:41 A : OJB Users List Objet : Re: Problem using strongly typed collections Hi Guilaume, Guillaume Nodet wrote: I've got an object

Re: Problem using strongly typed collections

2004-01-13 Thread Larry V. Streepy, Jr.
I know that it may have just been omitted from your example data model, but do you have a public void setBs( Collection ) method in A? Guillaume Nodet wrote: The problem is the object model cannot be modified. -Message d'origine- De : Thomas Mahler [mailto:[EMAIL PROTECTED] Envoye :

RE: Problem using strongly typed collections

2004-01-13 Thread Guillaume Nodet
Yes, I have one, but it cannot be used by PersistentFieldIntrospectorImpl because the getPropertyDescriptor().getWriteMethod() returns null. I think this is because the set accessor public void setBs( Collection ) is not recognized as a setter for the property public BList getBs()

Re: XDoclet autoincrement oddities

2004-01-13 Thread Brian McCallister
Excellent, thank you! -Brian On Jan 13, 2004, at 11:39 AM, Thomas Dudziak wrote: On Tue, 13 Jan 2004, Brian McCallister wrote: How is this coming? It is a major headache for a project I am working on at the moment =/ I can't fix it in the source currently in CVS as I'm nearly finished with a

Cache Mechanism

2004-01-13 Thread Ronen Yaari
All, I noticed that the Cache Mechanism works only with the Broker API, Is it true ? I want to use the ODMG API, is it possible somehow to use the Cache Mechanism with this API ? Thanxs, Ronen Yaari Traiana Technologies

Re: How to program against the ODMG personality correctly?

2004-01-13 Thread Sean Dockery
Hello, Philippe. Thanks for the analysis and tip about the performance of ODMG in relation to caching objects. That is helpful. I have a question for you about your little snippet... PersistenceBroker broker = ((TransactionImpl) tx).getBroker(); A aDummyObject = new A();

Re: JDO: pmf

2004-01-13 Thread Pedro Salgado
On 13/01/2004 15:44, Thomas Mahler [EMAIL PROTECTED] wrote: Hi Pedro, Pedro Salgado wrote: snip Sure, this is much cleaner. But my code is only one line ;-) Yes, but if I make an additional util class I can get the same effect (1 line) and abstract from the JDO implementation

Re: JDO: pmf

2004-01-13 Thread Pedro Salgado
On 13/01/2004 15:44, Thomas Mahler [EMAIL PROTECTED] wrote: Hi Pedro, Pedro Salgado wrote: snip Sure, this is much cleaner. But my code is only one line ;-) Yes, but if I make an additional util class I can get the same effect (1 line) and abstract from the JDO implementation

Re: Batch mode and foreign keys

2004-01-13 Thread Oleg Nitz
Guillaume, I guess I know what's the bug: now only reference-descriptors are counted as a source of constraints, and in your case I guess there is only collection-descriptor without reference-descriptor in the inverse direction, am I right? I'll fix the bug tonight. On Tuesday 13 January 2004

Re: Working on store procedure

2004-01-13 Thread Suma Venkatesh
Hi Ron,thomas and Larry Thank you so much for the response. I did not receive any answers prior to todays email and hence was my frustration.Sorry about that. If OJB doesnt support a store procedure performing only selects, can i atleast call a custom store procedure ? Larry's answer:

Re: Working on store procedure

2004-01-13 Thread Suma Venkatesh
Hi Larry, Thanks for the response. Will work this way. suma Larry V. Streepy, Jr. [EMAIL PROTECTED] wrote: Suma, I was suggesting that you could use JDBC directly to execute the stored procedure and retrieve the results. The use the results to feed OJB queries to materialize the objects.

RE: FW: NetBeans and OJB

2004-01-13 Thread Coup, Robert Muir
Hi, I really strongly suggest you make a module using an ANT build file. There are lots of docs on the netbeans site and templates in the OpenAPIs Support module. Otherwise it will just get messier and messier every time you try to do something. Once you have a module, use nice netbeans-style

error on query.create(...

2004-01-13 Thread Fabiano Fernandes de Souza
I am getting a NullPointerException when the execution reaches the line: query.create(select users from users in +FlUserBO.class.getName()+ where users.identification = $1); in the code above. Some one can tell me what's wrong? Thanks. Implementation impl = OJB.getInstance(); Database

Re: How to program against the ODMG personality correctly?

2004-01-13 Thread Philippe Hacquin
Sean Dockery wrote: Hello, Philippe. Thanks for the analysis and tip about the performance of ODMG in relation to caching objects. That is helpful. I have a question for you about your little snippet... PersistenceBroker broker = ((TransactionImpl) tx).getBroker(); A aDummyObject = new

Re: OJB behavior question

2004-01-13 Thread Larry V. Streepy, Jr.
Thomas, I tried removing the collection-class entry and it had no effect. The only difference in the two executions is the existence of the reference from Trait to Person. When that is in place, the traPerOID field is not updated with the person's OID. This is smelling more like a bug. Is

question about default collection class

2004-01-13 Thread Larry V. Streepy, Jr.
I've got a question regarding the default behavior of OJB. Given a M:N relation which is being decomposed with a standard indirection table, the default collection class (RemovalAwareCollection) is deleting the target objects when they are removed from the subject. This seems

Re: Batch mode and foreign keys

2004-01-13 Thread Oleg Nitz
Guillaume, can you try now, with CVS version? Thanks, Oleg On Tuesday 13 January 2004 12:53, Guillaume Nodet wrote: The Oracle error is: ORA-02291 integrity constraint (%s.%s) violated - parent key not found The constraint referenced in my case is an optional foreign key 'FOREIGN KEY

Re: upgrade to RC5, ClassCastException on getCollectionByQuery

2004-01-13 Thread Raymond Barlow
Hi Armin, I found Jacob's fixes and incorporated them into my local source branch, rebuilt jars etc, and now it all works!! Thanks Armin. Thanks Jacob. -Raymond Armin Waibel wrote: Hi Raymond, Jakob has checked in a fix. Will be included in the upcoming 1.0 version. regards, Armin Armin

Ordered Collections, Lists, DList

2004-01-13 Thread Coup, Robert Muir
Hi all, What is the best way of storing an ordered list without using Dlist which requires additional tables SQL lookups? OrderBy works great if the positioning has some underlying field (eg. Object id, name) but if the only thing specifying the position is the list index then it doesn't work

Qualified Collection Relationships

2004-01-13 Thread Coup, Robert Muir
Hi All, What I have : Root Object RO has: - a collection of CO objects specified using collection-descriptor Child Object CO has: - a collection of CO objects specified using collection-descriptor - a reference to a parent CO (null if the object has no CO parent) - a reference to the RO

Two 1:N mappings to one table

2004-01-13 Thread Dirk Manske
Hi, how can I map two tables with each having a 1:N relation to the same table? I always get a null pointer exception for class Person. I have three tables: PERSON with a 1:N relation to ACTIVITY and VENTURE with a 1:N relation to ACTIVITY Table PERSON and VENTURE both references