objectbridge-developers Mailing List for ObJectRelationalBridge (Page 7)
Brought to you by:
thma
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(14) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(33) |
Feb
(8) |
Mar
(3) |
Apr
(1) |
May
(18) |
Jun
(6) |
Jul
(15) |
Aug
(71) |
Sep
(29) |
Oct
(43) |
Nov
(77) |
Dec
(54) |
2002 |
Jan
(54) |
Feb
(147) |
Mar
(144) |
Apr
(163) |
May
(307) |
Jun
(240) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Matthew B. <ma...@so...> - 2002-06-08 19:25:50
|
Thanks for the input. Upon analysis, your patch is 1/2 correct. We can shut the resultset, but we have to keep the statement around as it is re-used. I put in the resultset closure code, and ran all tests and it works fine. Haven't tested it with Oracle, but it *should* solve the problem. Let me know if you find otherwise. Regards, Matthew -----Original Message----- From: Galvin Hsiu [mailto:gk...@ya...] Sent: Friday, June 07, 2002 2:24 PM To: obj...@li... Subject: [OJB-developers] Fixes for ORA-01000 (open cursor problem) In 0.9, I encountered an open cursor problem with Oracle, which is caused by prepared statements and results not getting closed properly (happened using the PersistentBrokerImpl in singleVM mode). The problem: Resultsets and PreparedStatements were not getting closed when issuing any kind of JdbcAccess calls. The cause of this is because there is nothing defined in StatementManager.closeResources()! Furthermore, the materializeObject is incorrect - in the older CVS version, it attempts to close just the resultset but not the prepared statement (this is for references and collections within the materialized object). The version in CVS attempts to close both, which would raise an exception. I unit tested this codefix while using SELECT * FROM V_$OPEN_CURSOR (internal user) - So far tests indicate everything is ok. In 0.8375 prior to this, this problem did not occur. The 2 fixes: 1) StatementManager.java public void closeResources(Statement stmt, ResultSet rs) { /* START NEW CODE */ // if the resultset is valid, close it now try { if (rs != null) { rs.close(); } } catch (SQLException ignored) { LoggerFactory.getDefaultLogger().warn("closing resultset had error: "+ ignored.getMessage()); } // if the stmt is valid get the connection from it, // then close both if (stmt != null) { try { stmt.close(); } catch (SQLException ignored) { LoggerFactory.getDefaultLogger().warn("closing statement had error: "+ ignored.getMessage()); } } // now set them all to null rs = null; stmt = null; /* END NEW CODE */ } 2) JdbcAccess.java public Object materializeObject(ClassDescriptor mif, Identity oid) throws PersistenceBrokerException { Object obj = null; ResultSet rs = null; PreparedStatement stmt = null; try { stmt = broker.getStatementManager().getSelectByPKStatement(mif); synchronized (stmt) { broker.getStatementManager().bindSelect(stmt, oid); rs = stmt.executeQuery(); // data available read object, else return null if (rs.next()) { RowReader reader = mif.getRowReader(); Object[] row = new Object[mif.getFieldDescriptions().length]; reader.readObjectArrayFrom(rs, mif, row); obj = mif.getRowReader().readObjectFrom(row, mif); } else { obj = null; } } } catch (PersistenceBrokerException e) { logger.error("PersistenceBrokerException during the execution of materializeObject: " + e.getMessage(), e); throw e; } catch (SQLException e) { logger.error("SQLException during the execution of materializeObject: " + e.getMessage(), e); throw new PersistenceBrokerSQLException(e); } finally { /* START MODIFIED CODE */ broker.getStatementManager().closeResources(null, rs); /* END MODIFIED CODE */ } return obj; } __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________ Objectbridge-developers mailing list Obj...@li... https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |
From: Matthew B. <ma...@so...> - 2002-06-08 17:59:03
|
Mapping multiple objects to a single table does not work. It appears to work, because the test cases are trivial. Problem: (see my other email about materializing objects that have the ojbConcreteClass attribute, but have different fields they want to materialize) If you have 2 objects mapped to the same table with 3 String elements being persisted, those String fields have to be the *same* string fields, in the same order, otherwise the buildWithMultiArgsConstructor call will build the object improperly, and it will be nearly impossible to debug :) I propose to remove the buildWithMultiArgsConstructor in order to properly support multiple classes mapped to the same table, until we find a way to do this "safely". Yes, this means you could lose the performance gain of using the mult-arg constructor, but remember, this is temporary until we find a better solution, and it allows much needed features (inheritance, and multiple classes mapped to one table) to actually work for non-trivial examples. I have test cases to show off complex mappings to a single table working, which you can make fail if you enable the buildWithMultiArgsConstructor code that I have commented out. Please comment, as I would like to check this in before the move to Jakarta. m |
From: Galvin H. <gk...@ya...> - 2002-06-07 21:23:54
|
In 0.9, I encountered an open cursor problem with Oracle, which is caused by prepared statements and results not getting closed properly (happened using the PersistentBrokerImpl in singleVM mode). The problem: Resultsets and PreparedStatements were not getting closed when issuing any kind of JdbcAccess calls. The cause of this is because there is nothing defined in StatementManager.closeResources()! Furthermore, the materializeObject is incorrect - in the older CVS version, it attempts to close just the resultset but not the prepared statement (this is for references and collections within the materialized object). The version in CVS attempts to close both, which would raise an exception. I unit tested this codefix while using SELECT * FROM V_$OPEN_CURSOR (internal user) - So far tests indicate everything is ok. In 0.8375 prior to this, this problem did not occur. The 2 fixes: 1) StatementManager.java public void closeResources(Statement stmt, ResultSet rs) { /* START NEW CODE */ // if the resultset is valid, close it now try { if (rs != null) { rs.close(); } } catch (SQLException ignored) { LoggerFactory.getDefaultLogger().warn("closing resultset had error: "+ ignored.getMessage()); } // if the stmt is valid get the connection from it, // then close both if (stmt != null) { try { stmt.close(); } catch (SQLException ignored) { LoggerFactory.getDefaultLogger().warn("closing statement had error: "+ ignored.getMessage()); } } // now set them all to null rs = null; stmt = null; /* END NEW CODE */ } 2) JdbcAccess.java public Object materializeObject(ClassDescriptor mif, Identity oid) throws PersistenceBrokerException { Object obj = null; ResultSet rs = null; PreparedStatement stmt = null; try { stmt = broker.getStatementManager().getSelectByPKStatement(mif); synchronized (stmt) { broker.getStatementManager().bindSelect(stmt, oid); rs = stmt.executeQuery(); // data available read object, else return null if (rs.next()) { RowReader reader = mif.getRowReader(); Object[] row = new Object[mif.getFieldDescriptions().length]; reader.readObjectArrayFrom(rs, mif, row); obj = mif.getRowReader().readObjectFrom(row, mif); } else { obj = null; } } } catch (PersistenceBrokerException e) { logger.error("PersistenceBrokerException during the execution of materializeObject: " + e.getMessage(), e); throw e; } catch (SQLException e) { logger.error("SQLException during the execution of materializeObject: " + e.getMessage(), e); throw new PersistenceBrokerSQLException(e); } finally { /* START MODIFIED CODE */ broker.getStatementManager().closeResources(null, rs); /* END MODIFIED CODE */ } return obj; } __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com |
From: Leandro R. S. C. <le...@ib...> - 2002-06-07 18:18:22
|
I really don't . Thats not the first time I have problems with IBM JVM. Once upon a I was learning mavem and lost a day of work because of IBM JVM and jikes ! On Fri, 2002-06-07 at 15:11, Jakob Braeuchi wrote: > hi leandro, > > that's interesting. do you know what exactly failed ? > > jakob > > ----- Original Message ----- > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > To: "Jakob Braeuchi" <jbr...@ho...> > Cc: <obj...@li...> > Sent: Friday, June 07, 2002 7:21 PM > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > JVM problem ! > > > > on IBM JVM all some tests fail > > java -version > > java version "1.3.1" > > Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1) > > Classic VM (build 1.3.1, J2RE 1.3.1 IBM build cxia32131-20020410 (JIT > > enabled: jitc)) > > > > on Backdown JVM all tests pass > > java -version > > java version "1.3.1" > > Java(TM) 2 Runtime Environment, Standard Edition (build > > Blackdown-1.3.1-FCS) > > Java HotSpot(TM) Client VM (build Blackdown-1.3.1-FCS, mixed mode) > > > > Sorry for the incovenient ! I will use blackdown VM to test my changes > > and remove any bugs > > > > On Fri, 2002-06-07 at 13:11, Jakob Braeuchi wrote: > > > hi leandro, > > > > > > i successfully ran the tests with the current version from cvs (not > 0.9): > > > > > > junit: > > > [junit] Running test.ojb.broker.AllTests > > > [junit] [BOOT] INFO: OJB.properties: > > > > file:/D:/Java/eclipse_0602/workspace/ojb-1-0/target/test/ojb/OJB.properties > > > [junit] [BOOT] INFO: loading XML took 831 msecs > > > [junit] [DEFAULT] WARN: Please define a public constructor for class > > > test.ojb.broker.ArticleWithReferenceProxy > > > [junit] with the following signature: (int, java.lang.String, int, > int, > > > java.lang.String, double, int, int, int, boolean). > > > [junit] It must initialize the classes persistent attributes. This > is > > > recommended to increase performance but it's not mandatory! > > > [junit] Tests run: 68, Failures: 0, Errors: 0, Time elapsed: 8.642 > sec > > > [junit] Running test.ojb.odmg.AllTests > > > [junit] [BOOT] INFO: OJB.properties: > > > > file:/D:/Java/eclipse_0602/workspace/ojb-1-0/target/test/ojb/OJB.properties > > > [junit] [BOOT] INFO: loading XML took 861 msecs > > > [junit] Tests run: 95, Failures: 0, Errors: 0, Time elapsed: 9.323 > sec > > > [junit] Running test.ojb.soda.AllTests > > > [junit] [BOOT] INFO: OJB.properties: > > > > file:/D:/Java/eclipse_0602/workspace/ojb-1-0/target/test/ojb/OJB.properties > > > [junit] [BOOT] INFO: loading XML took 892 msecs > > > [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5.638 > sec > > > > > > i do also have no problems running build junit out of the box of > rel-0.9: > > > > > > junit: > > > [junit] Running test.ojb.broker.AllTests > > > [junit] [BOOT] INFO: OJB.properties: > > > file:/D:/Java/Db/ojb-0.9/target/test/ojb/OJB.properties > > > [junit] [BOOT] INFO: loading XML took 821 msecs > > > [junit] Tests run: 66, Failures: 0, Errors: 0, Time elapsed: 6.148 > sec > > > [junit] Running test.ojb.odmg.AllTests > > > [junit] [BOOT] INFO: OJB.properties: > > > file:/D:/Java/Db/ojb-0.9/target/test/ojb/OJB.properties > > > [junit] [BOOT] INFO: loading XML took 942 msecs > > > [junit] Tests run: 95, Failures: 0, Errors: 0, Time elapsed: 9.313 > sec > > > [junit] Running test.ojb.soda.AllTests > > > [junit] [BOOT] INFO: OJB.properties: > > > file:/D:/Java/Db/ojb-0.9/target/test/ojb/OJB.properties > > > [junit] [BOOT] INFO: loading XML took 861 msecs > > > [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5.438 > sec > > > > > > jakob > > > > > > ----- Original Message ----- > > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > > To: "Jakob Braeuchi" <jbr...@ho...> > > > Cc: <obj...@li...> > > > Sent: Friday, June 07, 2002 4:58 PM > > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > > > > Jakob. I checked rel-0-9 out and ran the tests, They failed (see > > > > attachement) and they don't have any changes of mine which were part > of > > > > my last commit on his files. > > > > o.b.s.PersistenseBrokerImpl > > > > o.b.m.PersistentField > > > > o.b.m.PersistentFieldDefaltImpl > > > > o.b.m.PersistentFieldPropertyImpl. > > > > > > > > I'm assuming that this tests are broken as of rel-0-9 and we should > fix > > > > them in order to push other changes/bugfixes to the cvs repo ! > > > > > > > > Does anyone can point out if this tests were broken ? > > > > Is anyone running the tests on a daily basis ? > > > > > > > > On Fri, 2002-06-07 at 11:05, Jakob Braeuchi wrote: > > > > > hi leandro, > > > > > > > > > > yes that's the problem, you need to comment the logger line. > > > > > yesterday i only loaded your fixes and the tests failed because of > this > > > > > logger-line ??? > > > > > > > > > > jakob > > > > > > > > > > ----- Original Message ----- > > > > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > > > > To: "Jakob Braeuchi" <jbr...@ho...> > > > > > Cc: <obj...@li...> > > > > > Sent: Friday, June 07, 2002 3:48 PM > > > > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > > > > > > > > > > I checked rel-0-9 and run the tests ! > > > > > > They are failing too ! I dunno what was the state of this tests > before > > > > > > rel-0-9 > > > > > > > > > > > > On Fri, 2002-06-07 at 10:30, Jakob Braeuchi wrote: > > > > > > > hi leandro, > > > > > > > > > > > > > > with the current state of the test objects i prefer to comment > this > > > > > line. > > > > > > > afaik it was no problem before your changes, but i do not know > the > > > > > reason it > > > > > > > fails now. > > > > > > > > > > > > > > jakob > > > > > > > > > > > > > > ----- Original Message ----- > > > > > > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > > > > > > To: "Jakob Braeuchi" <jbr...@ho...> > > > > > > > Cc: <obj...@li...> > > > > > > > Sent: Thursday, June 06, 2002 11:10 PM > > > > > > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > > > > > > > > > > > > > > > > Hi. I believe I was the last one to change this file. > > > > > > > > When I commited this changes the ant target junit was failing > due > > > to > > > > > > > > SQLExceptions. I can comment this line if you want. > > > > > > > > > > > > > > > > My opinion is that every testcase should be ok at all times ! > > > > > > > > Can we work on that ? > > > > > > > > > > > > > > > > On Thu, 2002-06-06 at 17:51, Jakob Braeuchi wrote: > > > > > > > > > hi , > > > > > > > > > > > > > > > > > > i just loaded the newest version of > PersistentFieldDefaultImpl > > > and > > > > > now i > > > > > > > get > > > > > > > > > NPE caused by the statement > > > > > > > > > > > > > > > > > > logger.debug("Setting field:"+f.getName()+" in obj:"+obj+" > > > > > > > value:"+value); > > > > > > > > > > > > > > > > > > in method set(obj, value). the npe is mainly caused by the > > > > > toString() > > > > > > > > > implementation of obj. > > > > > > > > > ie. obj is a ProductGroupWithCollectionProxy and toString() > > > fails > > > > > bcause > > > > > > > > > allArticlesInGroup() is null. > > > > > > > > > the point is that we just try to set allArticlesInGroup for > > > > > > > > > ProductGroupWithCollectionProxy in PersistenFieldDefaultImpl > . > > > > > > > > > > > > > > > > > > the simplest fix is to comment the logger call. but it may > be > > > > > cleaner to > > > > > > > fix > > > > > > > > > the various toString() in the test objects. > > > > > > > > > > > > > > > > > > jakob > > > > > > > > > > > > > > > > > > > _______________________________________________________________ > > > > > > > > > > > > > > > > > > Don't miss the 2002 Sprint PCS Application Developer's > > > Conference > > > > > > > > > August 25-28 in Las Vegas -- > > > > > http://devcon.sprintpcs.com/adp/index.cfm > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > Objectbridge-developers mailing list > > > > > > > > > Obj...@li... > > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > > > > > -- > > > > > > > > Leandro Rodrigo Saad Cruz > > > > > > > > IT - Inter Business Tecnologia e Servicos (IB) > > > > > > > > http://www.ibnetwork.com.br > > > > > > > > > > > > > > > > > > > > > > _______________________________________________________________ > > > > > > > > > > > > > > Don't miss the 2002 Sprint PCS Application Developer's > Conference > > > > > > > August 25-28 in Las Vegas -- > > > http://devcon.sprintpcs.com/adp/index.cfm > > > > > > > > > > > > > > _______________________________________________ > > > > > > > Objectbridge-developers mailing list > > > > > > > Obj...@li... > > > > > > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > > > -- > > > > > > Leandro Rodrigo Saad Cruz > > > > > > IT - Inter Business Tecnologia e Servicos (IB) > > > > > > http://www.ibnetwork.com.br > > > > > > > > > > > > > > > > -- > > > > Leandro Rodrigo Saad Cruz > > > > IT - Inter Business Tecnologia e Servicos (IB) > > > > http://www.ibnetwork.com.br > > > > > > > > > > _______________________________________________________________ > > > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > > > _______________________________________________ > > > Objectbridge-developers mailing list > > > Obj...@li... > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > -- > > Leandro Rodrigo Saad Cruz > > IT - Inter Business Tecnologia e Servicos (IB) > > http://www.ibnetwork.com.br > > > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servicos (IB) http://www.ibnetwork.com.br |
From: Jakob B. <jbr...@ho...> - 2002-06-07 18:05:59
|
hi leandro, that's interesting. do you know what exactly failed ? jakob ----- Original Message ----- From: "Leandro Rodrigo Saad Cruz" <le...@ib...> To: "Jakob Braeuchi" <jbr...@ho...> Cc: <obj...@li...> Sent: Friday, June 07, 2002 7:21 PM Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > JVM problem ! > > on IBM JVM all some tests fail > java -version > java version "1.3.1" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1) > Classic VM (build 1.3.1, J2RE 1.3.1 IBM build cxia32131-20020410 (JIT > enabled: jitc)) > > on Backdown JVM all tests pass > java -version > java version "1.3.1" > Java(TM) 2 Runtime Environment, Standard Edition (build > Blackdown-1.3.1-FCS) > Java HotSpot(TM) Client VM (build Blackdown-1.3.1-FCS, mixed mode) > > Sorry for the incovenient ! I will use blackdown VM to test my changes > and remove any bugs > > On Fri, 2002-06-07 at 13:11, Jakob Braeuchi wrote: > > hi leandro, > > > > i successfully ran the tests with the current version from cvs (not 0.9): > > > > junit: > > [junit] Running test.ojb.broker.AllTests > > [junit] [BOOT] INFO: OJB.properties: > > file:/D:/Java/eclipse_0602/workspace/ojb-1-0/target/test/ojb/OJB.properties > > [junit] [BOOT] INFO: loading XML took 831 msecs > > [junit] [DEFAULT] WARN: Please define a public constructor for class > > test.ojb.broker.ArticleWithReferenceProxy > > [junit] with the following signature: (int, java.lang.String, int, int, > > java.lang.String, double, int, int, int, boolean). > > [junit] It must initialize the classes persistent attributes. This is > > recommended to increase performance but it's not mandatory! > > [junit] Tests run: 68, Failures: 0, Errors: 0, Time elapsed: 8.642 sec > > [junit] Running test.ojb.odmg.AllTests > > [junit] [BOOT] INFO: OJB.properties: > > file:/D:/Java/eclipse_0602/workspace/ojb-1-0/target/test/ojb/OJB.properties > > [junit] [BOOT] INFO: loading XML took 861 msecs > > [junit] Tests run: 95, Failures: 0, Errors: 0, Time elapsed: 9.323 sec > > [junit] Running test.ojb.soda.AllTests > > [junit] [BOOT] INFO: OJB.properties: > > file:/D:/Java/eclipse_0602/workspace/ojb-1-0/target/test/ojb/OJB.properties > > [junit] [BOOT] INFO: loading XML took 892 msecs > > [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5.638 sec > > > > i do also have no problems running build junit out of the box of rel-0.9: > > > > junit: > > [junit] Running test.ojb.broker.AllTests > > [junit] [BOOT] INFO: OJB.properties: > > file:/D:/Java/Db/ojb-0.9/target/test/ojb/OJB.properties > > [junit] [BOOT] INFO: loading XML took 821 msecs > > [junit] Tests run: 66, Failures: 0, Errors: 0, Time elapsed: 6.148 sec > > [junit] Running test.ojb.odmg.AllTests > > [junit] [BOOT] INFO: OJB.properties: > > file:/D:/Java/Db/ojb-0.9/target/test/ojb/OJB.properties > > [junit] [BOOT] INFO: loading XML took 942 msecs > > [junit] Tests run: 95, Failures: 0, Errors: 0, Time elapsed: 9.313 sec > > [junit] Running test.ojb.soda.AllTests > > [junit] [BOOT] INFO: OJB.properties: > > file:/D:/Java/Db/ojb-0.9/target/test/ojb/OJB.properties > > [junit] [BOOT] INFO: loading XML took 861 msecs > > [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5.438 sec > > > > jakob > > > > ----- Original Message ----- > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > To: "Jakob Braeuchi" <jbr...@ho...> > > Cc: <obj...@li...> > > Sent: Friday, June 07, 2002 4:58 PM > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > Jakob. I checked rel-0-9 out and ran the tests, They failed (see > > > attachement) and they don't have any changes of mine which were part of > > > my last commit on his files. > > > o.b.s.PersistenseBrokerImpl > > > o.b.m.PersistentField > > > o.b.m.PersistentFieldDefaltImpl > > > o.b.m.PersistentFieldPropertyImpl. > > > > > > I'm assuming that this tests are broken as of rel-0-9 and we should fix > > > them in order to push other changes/bugfixes to the cvs repo ! > > > > > > Does anyone can point out if this tests were broken ? > > > Is anyone running the tests on a daily basis ? > > > > > > On Fri, 2002-06-07 at 11:05, Jakob Braeuchi wrote: > > > > hi leandro, > > > > > > > > yes that's the problem, you need to comment the logger line. > > > > yesterday i only loaded your fixes and the tests failed because of this > > > > logger-line ??? > > > > > > > > jakob > > > > > > > > ----- Original Message ----- > > > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > > > To: "Jakob Braeuchi" <jbr...@ho...> > > > > Cc: <obj...@li...> > > > > Sent: Friday, June 07, 2002 3:48 PM > > > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > > > > > > > I checked rel-0-9 and run the tests ! > > > > > They are failing too ! I dunno what was the state of this tests before > > > > > rel-0-9 > > > > > > > > > > On Fri, 2002-06-07 at 10:30, Jakob Braeuchi wrote: > > > > > > hi leandro, > > > > > > > > > > > > with the current state of the test objects i prefer to comment this > > > > line. > > > > > > afaik it was no problem before your changes, but i do not know the > > > > reason it > > > > > > fails now. > > > > > > > > > > > > jakob > > > > > > > > > > > > ----- Original Message ----- > > > > > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > > > > > To: "Jakob Braeuchi" <jbr...@ho...> > > > > > > Cc: <obj...@li...> > > > > > > Sent: Thursday, June 06, 2002 11:10 PM > > > > > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > > > > > > > > > > > > > Hi. I believe I was the last one to change this file. > > > > > > > When I commited this changes the ant target junit was failing due > > to > > > > > > > SQLExceptions. I can comment this line if you want. > > > > > > > > > > > > > > My opinion is that every testcase should be ok at all times ! > > > > > > > Can we work on that ? > > > > > > > > > > > > > > On Thu, 2002-06-06 at 17:51, Jakob Braeuchi wrote: > > > > > > > > hi , > > > > > > > > > > > > > > > > i just loaded the newest version of PersistentFieldDefaultImpl > > and > > > > now i > > > > > > get > > > > > > > > NPE caused by the statement > > > > > > > > > > > > > > > > logger.debug("Setting field:"+f.getName()+" in obj:"+obj+" > > > > > > value:"+value); > > > > > > > > > > > > > > > > in method set(obj, value). the npe is mainly caused by the > > > > toString() > > > > > > > > implementation of obj. > > > > > > > > ie. obj is a ProductGroupWithCollectionProxy and toString() > > fails > > > > bcause > > > > > > > > allArticlesInGroup() is null. > > > > > > > > the point is that we just try to set allArticlesInGroup for > > > > > > > > ProductGroupWithCollectionProxy in PersistenFieldDefaultImpl . > > > > > > > > > > > > > > > > the simplest fix is to comment the logger call. but it may be > > > > cleaner to > > > > > > fix > > > > > > > > the various toString() in the test objects. > > > > > > > > > > > > > > > > jakob > > > > > > > > > > > > > > > > _______________________________________________________________ > > > > > > > > > > > > > > > > Don't miss the 2002 Sprint PCS Application Developer's > > Conference > > > > > > > > August 25-28 in Las Vegas -- > > > > http://devcon.sprintpcs.com/adp/index.cfm > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > Objectbridge-developers mailing list > > > > > > > > Obj...@li... > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > > > > -- > > > > > > > Leandro Rodrigo Saad Cruz > > > > > > > IT - Inter Business Tecnologia e Servicos (IB) > > > > > > > http://www.ibnetwork.com.br > > > > > > > > > > > > > > > > > > > _______________________________________________________________ > > > > > > > > > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > > > > > August 25-28 in Las Vegas -- > > http://devcon.sprintpcs.com/adp/index.cfm > > > > > > > > > > > > _______________________________________________ > > > > > > Objectbridge-developers mailing list > > > > > > Obj...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > > -- > > > > > Leandro Rodrigo Saad Cruz > > > > > IT - Inter Business Tecnologia e Servicos (IB) > > > > > http://www.ibnetwork.com.br > > > > > > > > > > > > > -- > > > Leandro Rodrigo Saad Cruz > > > IT - Inter Business Tecnologia e Servicos (IB) > > > http://www.ibnetwork.com.br > > > > > > > _______________________________________________________________ > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > _______________________________________________ > > Objectbridge-developers mailing list > > Obj...@li... > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > -- > Leandro Rodrigo Saad Cruz > IT - Inter Business Tecnologia e Servicos (IB) > http://www.ibnetwork.com.br > > |
From: Leandro R. S. C. <le...@ib...> - 2002-06-07 17:20:37
|
JVM problem ! on IBM JVM all some tests fail java -version java version "1.3.1" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1) Classic VM (build 1.3.1, J2RE 1.3.1 IBM build cxia32131-20020410 (JIT enabled: jitc)) on Backdown JVM all tests pass java -version java version "1.3.1" Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.3.1-FCS) Java HotSpot(TM) Client VM (build Blackdown-1.3.1-FCS, mixed mode) Sorry for the incovenient ! I will use blackdown VM to test my changes and remove any bugs On Fri, 2002-06-07 at 13:11, Jakob Braeuchi wrote: > hi leandro, > > i successfully ran the tests with the current version from cvs (not 0.9): > > junit: > [junit] Running test.ojb.broker.AllTests > [junit] [BOOT] INFO: OJB.properties: > file:/D:/Java/eclipse_0602/workspace/ojb-1-0/target/test/ojb/OJB.properties > [junit] [BOOT] INFO: loading XML took 831 msecs > [junit] [DEFAULT] WARN: Please define a public constructor for class > test.ojb.broker.ArticleWithReferenceProxy > [junit] with the following signature: (int, java.lang.String, int, int, > java.lang.String, double, int, int, int, boolean). > [junit] It must initialize the classes persistent attributes. This is > recommended to increase performance but it's not mandatory! > [junit] Tests run: 68, Failures: 0, Errors: 0, Time elapsed: 8.642 sec > [junit] Running test.ojb.odmg.AllTests > [junit] [BOOT] INFO: OJB.properties: > file:/D:/Java/eclipse_0602/workspace/ojb-1-0/target/test/ojb/OJB.properties > [junit] [BOOT] INFO: loading XML took 861 msecs > [junit] Tests run: 95, Failures: 0, Errors: 0, Time elapsed: 9.323 sec > [junit] Running test.ojb.soda.AllTests > [junit] [BOOT] INFO: OJB.properties: > file:/D:/Java/eclipse_0602/workspace/ojb-1-0/target/test/ojb/OJB.properties > [junit] [BOOT] INFO: loading XML took 892 msecs > [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5.638 sec > > i do also have no problems running build junit out of the box of rel-0.9: > > junit: > [junit] Running test.ojb.broker.AllTests > [junit] [BOOT] INFO: OJB.properties: > file:/D:/Java/Db/ojb-0.9/target/test/ojb/OJB.properties > [junit] [BOOT] INFO: loading XML took 821 msecs > [junit] Tests run: 66, Failures: 0, Errors: 0, Time elapsed: 6.148 sec > [junit] Running test.ojb.odmg.AllTests > [junit] [BOOT] INFO: OJB.properties: > file:/D:/Java/Db/ojb-0.9/target/test/ojb/OJB.properties > [junit] [BOOT] INFO: loading XML took 942 msecs > [junit] Tests run: 95, Failures: 0, Errors: 0, Time elapsed: 9.313 sec > [junit] Running test.ojb.soda.AllTests > [junit] [BOOT] INFO: OJB.properties: > file:/D:/Java/Db/ojb-0.9/target/test/ojb/OJB.properties > [junit] [BOOT] INFO: loading XML took 861 msecs > [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5.438 sec > > jakob > > ----- Original Message ----- > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > To: "Jakob Braeuchi" <jbr...@ho...> > Cc: <obj...@li...> > Sent: Friday, June 07, 2002 4:58 PM > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > Jakob. I checked rel-0-9 out and ran the tests, They failed (see > > attachement) and they don't have any changes of mine which were part of > > my last commit on his files. > > o.b.s.PersistenseBrokerImpl > > o.b.m.PersistentField > > o.b.m.PersistentFieldDefaltImpl > > o.b.m.PersistentFieldPropertyImpl. > > > > I'm assuming that this tests are broken as of rel-0-9 and we should fix > > them in order to push other changes/bugfixes to the cvs repo ! > > > > Does anyone can point out if this tests were broken ? > > Is anyone running the tests on a daily basis ? > > > > On Fri, 2002-06-07 at 11:05, Jakob Braeuchi wrote: > > > hi leandro, > > > > > > yes that's the problem, you need to comment the logger line. > > > yesterday i only loaded your fixes and the tests failed because of this > > > logger-line ??? > > > > > > jakob > > > > > > ----- Original Message ----- > > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > > To: "Jakob Braeuchi" <jbr...@ho...> > > > Cc: <obj...@li...> > > > Sent: Friday, June 07, 2002 3:48 PM > > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > > > > I checked rel-0-9 and run the tests ! > > > > They are failing too ! I dunno what was the state of this tests before > > > > rel-0-9 > > > > > > > > On Fri, 2002-06-07 at 10:30, Jakob Braeuchi wrote: > > > > > hi leandro, > > > > > > > > > > with the current state of the test objects i prefer to comment this > > > line. > > > > > afaik it was no problem before your changes, but i do not know the > > > reason it > > > > > fails now. > > > > > > > > > > jakob > > > > > > > > > > ----- Original Message ----- > > > > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > > > > To: "Jakob Braeuchi" <jbr...@ho...> > > > > > Cc: <obj...@li...> > > > > > Sent: Thursday, June 06, 2002 11:10 PM > > > > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > > > > > > > > > > Hi. I believe I was the last one to change this file. > > > > > > When I commited this changes the ant target junit was failing due > to > > > > > > SQLExceptions. I can comment this line if you want. > > > > > > > > > > > > My opinion is that every testcase should be ok at all times ! > > > > > > Can we work on that ? > > > > > > > > > > > > On Thu, 2002-06-06 at 17:51, Jakob Braeuchi wrote: > > > > > > > hi , > > > > > > > > > > > > > > i just loaded the newest version of PersistentFieldDefaultImpl > and > > > now i > > > > > get > > > > > > > NPE caused by the statement > > > > > > > > > > > > > > logger.debug("Setting field:"+f.getName()+" in obj:"+obj+" > > > > > value:"+value); > > > > > > > > > > > > > > in method set(obj, value). the npe is mainly caused by the > > > toString() > > > > > > > implementation of obj. > > > > > > > ie. obj is a ProductGroupWithCollectionProxy and toString() > fails > > > bcause > > > > > > > allArticlesInGroup() is null. > > > > > > > the point is that we just try to set allArticlesInGroup for > > > > > > > ProductGroupWithCollectionProxy in PersistenFieldDefaultImpl . > > > > > > > > > > > > > > the simplest fix is to comment the logger call. but it may be > > > cleaner to > > > > > fix > > > > > > > the various toString() in the test objects. > > > > > > > > > > > > > > jakob > > > > > > > > > > > > > > _______________________________________________________________ > > > > > > > > > > > > > > Don't miss the 2002 Sprint PCS Application Developer's > Conference > > > > > > > August 25-28 in Las Vegas -- > > > http://devcon.sprintpcs.com/adp/index.cfm > > > > > > > > > > > > > > _______________________________________________ > > > > > > > Objectbridge-developers mailing list > > > > > > > Obj...@li... > > > > > > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > > > -- > > > > > > Leandro Rodrigo Saad Cruz > > > > > > IT - Inter Business Tecnologia e Servicos (IB) > > > > > > http://www.ibnetwork.com.br > > > > > > > > > > > > > > > > _______________________________________________________________ > > > > > > > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > > > > August 25-28 in Las Vegas -- > http://devcon.sprintpcs.com/adp/index.cfm > > > > > > > > > > _______________________________________________ > > > > > Objectbridge-developers mailing list > > > > > Obj...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > -- > > > > Leandro Rodrigo Saad Cruz > > > > IT - Inter Business Tecnologia e Servicos (IB) > > > > http://www.ibnetwork.com.br > > > > > > > > > > -- > > Leandro Rodrigo Saad Cruz > > IT - Inter Business Tecnologia e Servicos (IB) > > http://www.ibnetwork.com.br > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servicos (IB) http://www.ibnetwork.com.br |
From: Jakob B. <jbr...@ho...> - 2002-06-07 16:06:17
|
hi leandro, i successfully ran the tests with the current version from cvs (not 0.9): junit: [junit] Running test.ojb.broker.AllTests [junit] [BOOT] INFO: OJB.properties: file:/D:/Java/eclipse_0602/workspace/ojb-1-0/target/test/ojb/OJB.properties [junit] [BOOT] INFO: loading XML took 831 msecs [junit] [DEFAULT] WARN: Please define a public constructor for class test.ojb.broker.ArticleWithReferenceProxy [junit] with the following signature: (int, java.lang.String, int, int, java.lang.String, double, int, int, int, boolean). [junit] It must initialize the classes persistent attributes. This is recommended to increase performance but it's not mandatory! [junit] Tests run: 68, Failures: 0, Errors: 0, Time elapsed: 8.642 sec [junit] Running test.ojb.odmg.AllTests [junit] [BOOT] INFO: OJB.properties: file:/D:/Java/eclipse_0602/workspace/ojb-1-0/target/test/ojb/OJB.properties [junit] [BOOT] INFO: loading XML took 861 msecs [junit] Tests run: 95, Failures: 0, Errors: 0, Time elapsed: 9.323 sec [junit] Running test.ojb.soda.AllTests [junit] [BOOT] INFO: OJB.properties: file:/D:/Java/eclipse_0602/workspace/ojb-1-0/target/test/ojb/OJB.properties [junit] [BOOT] INFO: loading XML took 892 msecs [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5.638 sec i do also have no problems running build junit out of the box of rel-0.9: junit: [junit] Running test.ojb.broker.AllTests [junit] [BOOT] INFO: OJB.properties: file:/D:/Java/Db/ojb-0.9/target/test/ojb/OJB.properties [junit] [BOOT] INFO: loading XML took 821 msecs [junit] Tests run: 66, Failures: 0, Errors: 0, Time elapsed: 6.148 sec [junit] Running test.ojb.odmg.AllTests [junit] [BOOT] INFO: OJB.properties: file:/D:/Java/Db/ojb-0.9/target/test/ojb/OJB.properties [junit] [BOOT] INFO: loading XML took 942 msecs [junit] Tests run: 95, Failures: 0, Errors: 0, Time elapsed: 9.313 sec [junit] Running test.ojb.soda.AllTests [junit] [BOOT] INFO: OJB.properties: file:/D:/Java/Db/ojb-0.9/target/test/ojb/OJB.properties [junit] [BOOT] INFO: loading XML took 861 msecs [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5.438 sec jakob ----- Original Message ----- From: "Leandro Rodrigo Saad Cruz" <le...@ib...> To: "Jakob Braeuchi" <jbr...@ho...> Cc: <obj...@li...> Sent: Friday, June 07, 2002 4:58 PM Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > Jakob. I checked rel-0-9 out and ran the tests, They failed (see > attachement) and they don't have any changes of mine which were part of > my last commit on his files. > o.b.s.PersistenseBrokerImpl > o.b.m.PersistentField > o.b.m.PersistentFieldDefaltImpl > o.b.m.PersistentFieldPropertyImpl. > > I'm assuming that this tests are broken as of rel-0-9 and we should fix > them in order to push other changes/bugfixes to the cvs repo ! > > Does anyone can point out if this tests were broken ? > Is anyone running the tests on a daily basis ? > > On Fri, 2002-06-07 at 11:05, Jakob Braeuchi wrote: > > hi leandro, > > > > yes that's the problem, you need to comment the logger line. > > yesterday i only loaded your fixes and the tests failed because of this > > logger-line ??? > > > > jakob > > > > ----- Original Message ----- > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > To: "Jakob Braeuchi" <jbr...@ho...> > > Cc: <obj...@li...> > > Sent: Friday, June 07, 2002 3:48 PM > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > I checked rel-0-9 and run the tests ! > > > They are failing too ! I dunno what was the state of this tests before > > > rel-0-9 > > > > > > On Fri, 2002-06-07 at 10:30, Jakob Braeuchi wrote: > > > > hi leandro, > > > > > > > > with the current state of the test objects i prefer to comment this > > line. > > > > afaik it was no problem before your changes, but i do not know the > > reason it > > > > fails now. > > > > > > > > jakob > > > > > > > > ----- Original Message ----- > > > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > > > To: "Jakob Braeuchi" <jbr...@ho...> > > > > Cc: <obj...@li...> > > > > Sent: Thursday, June 06, 2002 11:10 PM > > > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > > > > > > > Hi. I believe I was the last one to change this file. > > > > > When I commited this changes the ant target junit was failing due to > > > > > SQLExceptions. I can comment this line if you want. > > > > > > > > > > My opinion is that every testcase should be ok at all times ! > > > > > Can we work on that ? > > > > > > > > > > On Thu, 2002-06-06 at 17:51, Jakob Braeuchi wrote: > > > > > > hi , > > > > > > > > > > > > i just loaded the newest version of PersistentFieldDefaultImpl and > > now i > > > > get > > > > > > NPE caused by the statement > > > > > > > > > > > > logger.debug("Setting field:"+f.getName()+" in obj:"+obj+" > > > > value:"+value); > > > > > > > > > > > > in method set(obj, value). the npe is mainly caused by the > > toString() > > > > > > implementation of obj. > > > > > > ie. obj is a ProductGroupWithCollectionProxy and toString() fails > > bcause > > > > > > allArticlesInGroup() is null. > > > > > > the point is that we just try to set allArticlesInGroup for > > > > > > ProductGroupWithCollectionProxy in PersistenFieldDefaultImpl . > > > > > > > > > > > > the simplest fix is to comment the logger call. but it may be > > cleaner to > > > > fix > > > > > > the various toString() in the test objects. > > > > > > > > > > > > jakob > > > > > > > > > > > > _______________________________________________________________ > > > > > > > > > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > > > > > August 25-28 in Las Vegas -- > > http://devcon.sprintpcs.com/adp/index.cfm > > > > > > > > > > > > _______________________________________________ > > > > > > Objectbridge-developers mailing list > > > > > > Obj...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > > -- > > > > > Leandro Rodrigo Saad Cruz > > > > > IT - Inter Business Tecnologia e Servicos (IB) > > > > > http://www.ibnetwork.com.br > > > > > > > > > > > > > _______________________________________________________________ > > > > > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > > > > > _______________________________________________ > > > > Objectbridge-developers mailing list > > > > Obj...@li... > > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > -- > > > Leandro Rodrigo Saad Cruz > > > IT - Inter Business Tecnologia e Servicos (IB) > > > http://www.ibnetwork.com.br > > > > > > > -- > Leandro Rodrigo Saad Cruz > IT - Inter Business Tecnologia e Servicos (IB) > http://www.ibnetwork.com.br > |
From: Leandro R. S. C. <le...@ib...> - 2002-06-07 14:58:07
|
Jakob. I checked rel-0-9 out and ran the tests, They failed (see attachement) and they don't have any changes of mine which were part of my last commit on his files. o.b.s.PersistenseBrokerImpl o.b.m.PersistentField o.b.m.PersistentFieldDefaltImpl o.b.m.PersistentFieldPropertyImpl. I'm assuming that this tests are broken as of rel-0-9 and we should fix them in order to push other changes/bugfixes to the cvs repo ! Does anyone can point out if this tests were broken ? Is anyone running the tests on a daily basis ? On Fri, 2002-06-07 at 11:05, Jakob Braeuchi wrote: > hi leandro, > > yes that's the problem, you need to comment the logger line. > yesterday i only loaded your fixes and the tests failed because of this > logger-line ??? > > jakob > > ----- Original Message ----- > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > To: "Jakob Braeuchi" <jbr...@ho...> > Cc: <obj...@li...> > Sent: Friday, June 07, 2002 3:48 PM > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > I checked rel-0-9 and run the tests ! > > They are failing too ! I dunno what was the state of this tests before > > rel-0-9 > > > > On Fri, 2002-06-07 at 10:30, Jakob Braeuchi wrote: > > > hi leandro, > > > > > > with the current state of the test objects i prefer to comment this > line. > > > afaik it was no problem before your changes, but i do not know the > reason it > > > fails now. > > > > > > jakob > > > > > > ----- Original Message ----- > > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > > To: "Jakob Braeuchi" <jbr...@ho...> > > > Cc: <obj...@li...> > > > Sent: Thursday, June 06, 2002 11:10 PM > > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > > > > Hi. I believe I was the last one to change this file. > > > > When I commited this changes the ant target junit was failing due to > > > > SQLExceptions. I can comment this line if you want. > > > > > > > > My opinion is that every testcase should be ok at all times ! > > > > Can we work on that ? > > > > > > > > On Thu, 2002-06-06 at 17:51, Jakob Braeuchi wrote: > > > > > hi , > > > > > > > > > > i just loaded the newest version of PersistentFieldDefaultImpl and > now i > > > get > > > > > NPE caused by the statement > > > > > > > > > > logger.debug("Setting field:"+f.getName()+" in obj:"+obj+" > > > value:"+value); > > > > > > > > > > in method set(obj, value). the npe is mainly caused by the > toString() > > > > > implementation of obj. > > > > > ie. obj is a ProductGroupWithCollectionProxy and toString() fails > bcause > > > > > allArticlesInGroup() is null. > > > > > the point is that we just try to set allArticlesInGroup for > > > > > ProductGroupWithCollectionProxy in PersistenFieldDefaultImpl . > > > > > > > > > > the simplest fix is to comment the logger call. but it may be > cleaner to > > > fix > > > > > the various toString() in the test objects. > > > > > > > > > > jakob > > > > > > > > > > _______________________________________________________________ > > > > > > > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > > > > August 25-28 in Las Vegas -- > http://devcon.sprintpcs.com/adp/index.cfm > > > > > > > > > > _______________________________________________ > > > > > Objectbridge-developers mailing list > > > > > Obj...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > -- > > > > Leandro Rodrigo Saad Cruz > > > > IT - Inter Business Tecnologia e Servicos (IB) > > > > http://www.ibnetwork.com.br > > > > > > > > > > _______________________________________________________________ > > > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > > > _______________________________________________ > > > Objectbridge-developers mailing list > > > Obj...@li... > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > -- > > Leandro Rodrigo Saad Cruz > > IT - Inter Business Tecnologia e Servicos (IB) > > http://www.ibnetwork.com.br > > > > -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servicos (IB) http://www.ibnetwork.com.br |
From: Jakob B. <jbr...@ho...> - 2002-06-07 14:55:00
|
hi georg and oleg, i just checked in a testcase for unidirectional m:n relationship: MtoNMapping#testMNLoadingUnidirectional() this test case will FAIL with the current implementation, but it runs ok with the fixes i sent you yesterday. i'll also have a look the oleg's proposal to generate the inverse relation ship dynamically. jakob |
From: Leandro R. S. C. <le...@ib...> - 2002-06-07 14:41:20
|
DONE ! On Fri, 2002-06-07 at 11:05, Jakob Braeuchi wrote: > hi leandro, > > yes that's the problem, you need to comment the logger line. > yesterday i only loaded your fixes and the tests failed because of this > logger-line ??? > > jakob > > ----- Original Message ----- > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > To: "Jakob Braeuchi" <jbr...@ho...> > Cc: <obj...@li...> > Sent: Friday, June 07, 2002 3:48 PM > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > I checked rel-0-9 and run the tests ! > > They are failing too ! I dunno what was the state of this tests before > > rel-0-9 > > > > On Fri, 2002-06-07 at 10:30, Jakob Braeuchi wrote: > > > hi leandro, > > > > > > with the current state of the test objects i prefer to comment this > line. > > > afaik it was no problem before your changes, but i do not know the > reason it > > > fails now. > > > > > > jakob > > > > > > ----- Original Message ----- > > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > > To: "Jakob Braeuchi" <jbr...@ho...> > > > Cc: <obj...@li...> > > > Sent: Thursday, June 06, 2002 11:10 PM > > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > > > > Hi. I believe I was the last one to change this file. > > > > When I commited this changes the ant target junit was failing due to > > > > SQLExceptions. I can comment this line if you want. > > > > > > > > My opinion is that every testcase should be ok at all times ! > > > > Can we work on that ? > > > > > > > > On Thu, 2002-06-06 at 17:51, Jakob Braeuchi wrote: > > > > > hi , > > > > > > > > > > i just loaded the newest version of PersistentFieldDefaultImpl and > now i > > > get > > > > > NPE caused by the statement > > > > > > > > > > logger.debug("Setting field:"+f.getName()+" in obj:"+obj+" > > > value:"+value); > > > > > > > > > > in method set(obj, value). the npe is mainly caused by the > toString() > > > > > implementation of obj. > > > > > ie. obj is a ProductGroupWithCollectionProxy and toString() fails > bcause > > > > > allArticlesInGroup() is null. > > > > > the point is that we just try to set allArticlesInGroup for > > > > > ProductGroupWithCollectionProxy in PersistenFieldDefaultImpl . > > > > > > > > > > the simplest fix is to comment the logger call. but it may be > cleaner to > > > fix > > > > > the various toString() in the test objects. > > > > > > > > > > jakob > > > > > > > > > > _______________________________________________________________ > > > > > > > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > > > > August 25-28 in Las Vegas -- > http://devcon.sprintpcs.com/adp/index.cfm > > > > > > > > > > _______________________________________________ > > > > > Objectbridge-developers mailing list > > > > > Obj...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > -- > > > > Leandro Rodrigo Saad Cruz > > > > IT - Inter Business Tecnologia e Servicos (IB) > > > > http://www.ibnetwork.com.br > > > > > > > > > > _______________________________________________________________ > > > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > > > _______________________________________________ > > > Objectbridge-developers mailing list > > > Obj...@li... > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > -- > > Leandro Rodrigo Saad Cruz > > IT - Inter Business Tecnologia e Servicos (IB) > > http://www.ibnetwork.com.br > > > > -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servicos (IB) http://www.ibnetwork.com.br |
From: Jakob B. <jbr...@ho...> - 2002-06-07 14:05:03
|
hi leandro, yes that's the problem, you need to comment the logger line. yesterday i only loaded your fixes and the tests failed because of this logger-line ??? jakob ----- Original Message ----- From: "Leandro Rodrigo Saad Cruz" <le...@ib...> To: "Jakob Braeuchi" <jbr...@ho...> Cc: <obj...@li...> Sent: Friday, June 07, 2002 3:48 PM Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > I checked rel-0-9 and run the tests ! > They are failing too ! I dunno what was the state of this tests before > rel-0-9 > > On Fri, 2002-06-07 at 10:30, Jakob Braeuchi wrote: > > hi leandro, > > > > with the current state of the test objects i prefer to comment this line. > > afaik it was no problem before your changes, but i do not know the reason it > > fails now. > > > > jakob > > > > ----- Original Message ----- > > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > > To: "Jakob Braeuchi" <jbr...@ho...> > > Cc: <obj...@li...> > > Sent: Thursday, June 06, 2002 11:10 PM > > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > > > > Hi. I believe I was the last one to change this file. > > > When I commited this changes the ant target junit was failing due to > > > SQLExceptions. I can comment this line if you want. > > > > > > My opinion is that every testcase should be ok at all times ! > > > Can we work on that ? > > > > > > On Thu, 2002-06-06 at 17:51, Jakob Braeuchi wrote: > > > > hi , > > > > > > > > i just loaded the newest version of PersistentFieldDefaultImpl and now i > > get > > > > NPE caused by the statement > > > > > > > > logger.debug("Setting field:"+f.getName()+" in obj:"+obj+" > > value:"+value); > > > > > > > > in method set(obj, value). the npe is mainly caused by the toString() > > > > implementation of obj. > > > > ie. obj is a ProductGroupWithCollectionProxy and toString() fails bcause > > > > allArticlesInGroup() is null. > > > > the point is that we just try to set allArticlesInGroup for > > > > ProductGroupWithCollectionProxy in PersistenFieldDefaultImpl . > > > > > > > > the simplest fix is to comment the logger call. but it may be cleaner to > > fix > > > > the various toString() in the test objects. > > > > > > > > jakob > > > > > > > > _______________________________________________________________ > > > > > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > > > > > _______________________________________________ > > > > Objectbridge-developers mailing list > > > > Obj...@li... > > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > -- > > > Leandro Rodrigo Saad Cruz > > > IT - Inter Business Tecnologia e Servicos (IB) > > > http://www.ibnetwork.com.br > > > > > > > _______________________________________________________________ > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > _______________________________________________ > > Objectbridge-developers mailing list > > Obj...@li... > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > -- > Leandro Rodrigo Saad Cruz > IT - Inter Business Tecnologia e Servicos (IB) > http://www.ibnetwork.com.br > > |
From: Jakob B. <jbr...@ho...> - 2002-06-07 13:48:24
|
hi georg, i commited your fix for ClassDescriptor. if you have larger fixes or fixes for multiple classes, please send me the complete files. thanks und servus jakob (mit k) ----- Original Message ----- From: "Georg Schneider" <ge...@me...> To: <obj...@li...> Cc: <ja...@sc...>; "Mahler Thomas" <tho...@it...> Sent: Friday, June 07, 2002 1:54 PM Subject: [OJB-developers] bug in ClassDescriptor.getDynamicProxyClass > Hi Thomas and Jacob, > > First of all sorry for always bugging you two to put patches in, but I > simply don't know who is responsible for what part. Is there a list of who > maintains what, if not it would be a good idea to make one :-). > > The bug: getDynamicProxyClass creates a proxy class implementing all > interfaces of the original class. In order to do this it first calls > getInterfaces() on the class to be proxied and then iterates over all the > superclasses to do the same. > This works fine if the original class is a real class, which is almost > always the case. > Unfortunately when using a reference-proxy the item class can be an > interface itself and when getInterfaces() is called on an interface it > returns only the extending interfaces, not the interface itself. > > Fix: Put the following lines in the method getDynamicProxyClass() in > ClassDescriptor > > Class[] interfaces = clazz.getInterfaces(); > ==>add from here on > if (clazz.isInterface()) > { > Class[] tempInterfaces = new Class[interfaces.length + 1]; > tempInterfaces[0] = clazz; > > System.arraycopy(interfaces,0,tempInterfaces,1,interfaces.length); > interfaces = tempInterfaces; > } > > > Cheers > > Georg > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |
From: Leandro R. S. C. <le...@ib...> - 2002-06-07 13:48:15
|
I checked rel-0-9 and run the tests ! They are failing too ! I dunno what was the state of this tests before rel-0-9 On Fri, 2002-06-07 at 10:30, Jakob Braeuchi wrote: > hi leandro, > > with the current state of the test objects i prefer to comment this line. > afaik it was no problem before your changes, but i do not know the reason it > fails now. > > jakob > > ----- Original Message ----- > From: "Leandro Rodrigo Saad Cruz" <le...@ib...> > To: "Jakob Braeuchi" <jbr...@ho...> > Cc: <obj...@li...> > Sent: Thursday, June 06, 2002 11:10 PM > Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > > > > Hi. I believe I was the last one to change this file. > > When I commited this changes the ant target junit was failing due to > > SQLExceptions. I can comment this line if you want. > > > > My opinion is that every testcase should be ok at all times ! > > Can we work on that ? > > > > On Thu, 2002-06-06 at 17:51, Jakob Braeuchi wrote: > > > hi , > > > > > > i just loaded the newest version of PersistentFieldDefaultImpl and now i > get > > > NPE caused by the statement > > > > > > logger.debug("Setting field:"+f.getName()+" in obj:"+obj+" > value:"+value); > > > > > > in method set(obj, value). the npe is mainly caused by the toString() > > > implementation of obj. > > > ie. obj is a ProductGroupWithCollectionProxy and toString() fails bcause > > > allArticlesInGroup() is null. > > > the point is that we just try to set allArticlesInGroup for > > > ProductGroupWithCollectionProxy in PersistenFieldDefaultImpl . > > > > > > the simplest fix is to comment the logger call. but it may be cleaner to > fix > > > the various toString() in the test objects. > > > > > > jakob > > > > > > _______________________________________________________________ > > > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > > > _______________________________________________ > > > Objectbridge-developers mailing list > > > Obj...@li... > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > -- > > Leandro Rodrigo Saad Cruz > > IT - Inter Business Tecnologia e Servicos (IB) > > http://www.ibnetwork.com.br > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servicos (IB) http://www.ibnetwork.com.br |
From: Jakob B. <jbr...@ho...> - 2002-06-07 13:30:10
|
hi leandro, with the current state of the test objects i prefer to comment this line. afaik it was no problem before your changes, but i do not know the reason it fails now. jakob ----- Original Message ----- From: "Leandro Rodrigo Saad Cruz" <le...@ib...> To: "Jakob Braeuchi" <jbr...@ho...> Cc: <obj...@li...> Sent: Thursday, June 06, 2002 11:10 PM Subject: Re: [OJB-developers] PersistentFieldDefaultImpl NPE > Hi. I believe I was the last one to change this file. > When I commited this changes the ant target junit was failing due to > SQLExceptions. I can comment this line if you want. > > My opinion is that every testcase should be ok at all times ! > Can we work on that ? > > On Thu, 2002-06-06 at 17:51, Jakob Braeuchi wrote: > > hi , > > > > i just loaded the newest version of PersistentFieldDefaultImpl and now i get > > NPE caused by the statement > > > > logger.debug("Setting field:"+f.getName()+" in obj:"+obj+" value:"+value); > > > > in method set(obj, value). the npe is mainly caused by the toString() > > implementation of obj. > > ie. obj is a ProductGroupWithCollectionProxy and toString() fails bcause > > allArticlesInGroup() is null. > > the point is that we just try to set allArticlesInGroup for > > ProductGroupWithCollectionProxy in PersistenFieldDefaultImpl . > > > > the simplest fix is to comment the logger call. but it may be cleaner to fix > > the various toString() in the test objects. > > > > jakob > > > > _______________________________________________________________ > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > _______________________________________________ > > Objectbridge-developers mailing list > > Obj...@li... > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > -- > Leandro Rodrigo Saad Cruz > IT - Inter Business Tecnologia e Servicos (IB) > http://www.ibnetwork.com.br > |
From: Georg S. <ge...@me...> - 2002-06-07 11:54:32
|
Hi Thomas and Jacob, First of all sorry for always bugging you two to put patches in, but I simply don't know who is responsible for what part. Is there a list of who maintains what, if not it would be a good idea to make one :-). The bug: getDynamicProxyClass creates a proxy class implementing all interfaces of the original class. In order to do this it first calls getInterfaces() on the class to be proxied and then iterates over all the superclasses to do the same. This works fine if the original class is a real class, which is almost always the case. Unfortunately when using a reference-proxy the item class can be an interface itself and when getInterfaces() is called on an interface it returns only the extending interfaces, not the interface itself. Fix: Put the following lines in the method getDynamicProxyClass() in ClassDescriptor Class[] interfaces = clazz.getInterfaces(); ==>add from here on if (clazz.isInterface()) { Class[] tempInterfaces = new Class[interfaces.length + 1]; tempInterfaces[0] = clazz; System.arraycopy(interfaces,0,tempInterfaces,1,interfaces.length); interfaces = tempInterfaces; } Cheers Georg |
From: Georg S. <ge...@me...> - 2002-06-07 10:13:40
|
Hi Thomas and Jacob, I forgot one part of the fix: So now there is 2c) 2 c) You have to add if (v != null) around the following block ==>added if (v!= null) ==>added { Iterator iter = v.iterator(); while (iter.hasNext()) { Integer index = (Integer) iter.next(); ret.add(mif.getFieldDescriptorByIndex(index.intValue())); } ==>added } Otherwise the fix won't work, sorry for forgetting that. Has anyone looked at that issue yet? Jacob, I'll have a look at your M:N-stuff as soon as possible (thanks) Cheers Georg On Thu, 6 Jun 2002, Georg Schneider wrote: > Hi Thomas and Jacob (and all others :-) ), > > I think the following two issues are extremely important and should be > fixed as soon as possible. Since it might take some time to explain them > in detail I will first give a short introduction to both issues: > > 1.) Collections of Interfaces are not working: Currently there is no > testcase which checks this. If you look at the mapping for > test.ojb.broker.ProductGroup it contains a collection-descriptor with an > element-class-ref="test.ojb.broker.Article" which is wrong because if > you look at the ProductGroup class, it takes objects of interface > InterfaceArticle so the line should actually be > > element-class-ref="test.ojb.broker.InterfaceArticle" > > Ones you do that the whole junit testsuite blows up. I'll explain the > details and a possible fix further down. > > 2.) M:N relationships aren't working as they should. IMHO an M:N > relationship means that an object can be part of various "different" > collections. This was possible up to release 0.9 but has now been > changed. Let me be more specific. Let's say we have a class Article, a > Class ShoppingCart which contains a collection of Articles and another > class Inventory which also contains a collection of Articles. I'll > provide a TestCase for this + an explanation in my next mail. > > > > ad 1.) > Please contact me if anything I write seems to be confusing or doesn't > seem clear (my thoughts might get carried away :-) ) > > > The basic problem somewhat converges on one function in > ObjectReferenceDescriptor > > public FieldDescriptor[] getForeignKeyFieldDescriptors(ClassDescriptor > mif) > > this function is called on various occassions to obtain an array of > FieldDescriptors that contain the fields pointing to the 1 part of a 1:n > relationship. > > The first problem is that, when the collection items are of an > "Interface" type (i.e. mif describes an interface) there are no > FieldDescriptors and a NullPointerException is thrown further down when > calling > > ..mif.getFieldDescriptorByIndex(... > > so what we need is a concrete class which does have the fields. The > easiest way is to put the following code at the beginning of the > function: > > if (mif.isInterface()) { > Vector extentClasses = mif.getExtentClasses(); > Class itemClass = (Class) extentClasses.get(0); > mif = mif.getRepository().getDescriptorFor(itemClass); > } > > This simply takes the first concrete class and uses their fields. > > Unfortunately this is not the end of the story. The problem is that with > interfaces (as opposed to base classes) the "Fields" of one concrete > class can not be used to set the foreign-key "Fields" of another class > implementing the same Interface. > > This is a rather subtle problem and it becomes easier to understand when > you look at the set(..) method in PersistentFieldDefaultImpl. There it > says: > > try > { > f.set(obj, value); > } > catch (IllegalArgumentException ex) > > f would be the the field obtained via the getForeignKeyFieldDescriptors > method mentioned above, obj is the concrete object for which the field > is set (the fk-field of the n-side) , and value is the value it is set > to (the primary key value of the 1-side). > > As long as the item-class of the collection is a concrete class or a > base-class, but not an interface everything is fine. Java lets you use > the "Field"-objects of a base class, when setting them on a derived > class. > The same doesn't hold true if we are talking of different classes > implementing a common interface. The same "Field"-object obtained for > one class can not be used to set the field in another class also > implementing the interface. The consequence is an > IllegalArgumentException being thrown. > > Going back to ObjectReferenceDescriptor the consequence is, that a new > array of FieldDescriptors has to be computed and returned for each > concrete classdescriptor (mif). This means the following if statements > has to be taken out (just the if, not the block itself) > > if (foreignKeyFieldDescriptors == null) > { > ...... > } > > because it computes the array only the first time and returns it > directly on subsequent calls (for performance reasons I suppose). For > performance reasons one could use a Hashtable to store already computed > FieldDescriptor arrays for concrete ClassDescriptors. > > Now that we have a function that always returns the right array of > FieldDescriptors we have to make sure that it is also called with the > right class-descriptors. > > The one place where that has to be changed is in TransactionImpl > > In the method lockCollections(.... > the following lines > > ClassDescriptor itemCld = > this.getBroker().getClassDescriptor(cds.getItemClass()); > FieldDescriptor[] itemFkFields = cds.getForeignKeyFieldDescriptors(itemCld); > > are being called before the while (colIterator.hasNext()) loop > > They have to be moved into the loop to work correctly: > > while (colIterator.hasNext()) > { > Object item = colIterator.next(); > ClassDescriptor itemCld = > this.getBroker().getClassDescriptor(item.getClass()); > FieldDescriptor[] itemFkFields = > cds.getForeignKeyFieldDescriptors(itemCld); > ....... > > > So to come to a conclusion, in order to see the problem and its possible > fix you have to do the following: > > 1.) change the collection-descriptor in the mapping for ProductGroup to > element-class-ref="test.ojb.broker.InterfaceArticle" > > this will make you see the problem when running the unit-tests > > 2.) > > In ObjectReferenceDescriptor > in the method getForeignKeyFieldDescriptors(... > > a) take out the if > b) put > if (mif.isInterface()) { > Vector extentClasses = mif.getExtentClasses(); > Class itemClass = (Class) extentClasses.get(0); > mif = mif.getRepository().getDescriptorFor(itemClass); > } > at the beginning > > 3.) in TransactionImpl move the 2 lines into the loop as explained > above. > > Cheers > > Georg > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |
From: Leandro R. S. C. <le...@ib...> - 2002-06-06 21:10:28
|
Hi. I believe I was the last one to change this file. When I commited this changes the ant target junit was failing due to SQLExceptions. I can comment this line if you want. My opinion is that every testcase should be ok at all times ! Can we work on that ? On Thu, 2002-06-06 at 17:51, Jakob Braeuchi wrote: > hi , > > i just loaded the newest version of PersistentFieldDefaultImpl and now i get > NPE caused by the statement > > logger.debug("Setting field:"+f.getName()+" in obj:"+obj+" value:"+value); > > in method set(obj, value). the npe is mainly caused by the toString() > implementation of obj. > ie. obj is a ProductGroupWithCollectionProxy and toString() fails bcause > allArticlesInGroup() is null. > the point is that we just try to set allArticlesInGroup for > ProductGroupWithCollectionProxy in PersistenFieldDefaultImpl . > > the simplest fix is to comment the logger call. but it may be cleaner to fix > the various toString() in the test objects. > > jakob > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servicos (IB) http://www.ibnetwork.com.br |
From: Jakob B. <jbr...@fr...> - 2002-06-06 21:09:53
|
hi oleg, hi georg, i reactivated the old QueryByMToNCriteria to solve unidirectional m:n relationships. please have a look at it. jakob ps: you may already have received this mail. i cannot receive mails for about 5 hours, maybe you've already another solution |
From: Jakob B. <jbr...@ho...> - 2002-06-06 21:08:56
|
hi oleg, hi georg, i reactivated the old QueryByMToNCriteria to solve unidirectional m:n relationships. please have a look at it. jakob ps: i cannot receive mails for about 5 hours, maybe you've already another solution |
From: Jason v. Z. <jv...@ze...> - 2002-06-06 21:02:47
|
Hi Guys, Almost everything is setup now but Brian Behlendorf steps in to create the accounts on the Apache machine and when he saw my request he asked a few more questions about the project. He was concerned about the code being LGPL'd and the number of developers so he's asked, for the sake of clarity and protection for the ASF, that each of you sign the standard ASF contributors agreement and fax it in. The following must do so before you will get commit access to the repository: armin_w (armin waibel) arobinson (Andrew Robinson) baserose (Leandro Rodrigo Saad Cruz) brj (Jakob Braeuchi) ceperez (Carlos E. Perez) cgreenlee (Chris Greenlee) dariusschier (Darius Schier) florianbruckner (Florian Bruckner) gcole (George Cole) mattbaird (Matthew Baird) mpoeschl (Martin Poeschl) neoflux (Matthew Porter) olegnitz (Oleg Nitz) pinkcoder (Angela Robertson) prophecyslides (Travis Reeder) saua (Joachim Sauer) thma (Thomas Mahler) You can find the agreement here: http://apache.org/~jvanzyl/ASF_Contributor_License_1.txt I know this is bit of a hassle but this is the final step and we can move the code over. -- jvz. Jason van Zyl jv...@ap... http://tambora.zenplex.org |
From: Jakob B. <jbr...@ho...> - 2002-06-06 20:45:56
|
hi , i just loaded the newest version of PersistentFieldDefaultImpl and now i get NPE caused by the statement logger.debug("Setting field:"+f.getName()+" in obj:"+obj+" value:"+value); in method set(obj, value). the npe is mainly caused by the toString() implementation of obj. ie. obj is a ProductGroupWithCollectionProxy and toString() fails bcause allArticlesInGroup() is null. the point is that we just try to set allArticlesInGroup for ProductGroupWithCollectionProxy in PersistenFieldDefaultImpl . the simplest fix is to comment the logger call. but it may be cleaner to fix the various toString() in the test objects. jakob |
From: Jakob B. <jbr...@ho...> - 2002-06-06 20:20:34
|
hi, i'm currently working on a solution using the old m:n queries (unidirectional). i've sent some fixes to georg to test them. jakob ----- Original Message ----- From: "Georg Schneider" <ge...@me...> To: "Mahler Thomas" <tho...@it...> Cc: <jbr...@ho...>; <obj...@li...> Sent: Thursday, June 06, 2002 1:50 PM Subject: [OJB-developers] MtoN-followup > Hi Jacob and Thomas > > This is the follow-up to my previous mail talking about the > M:N-Relationship issue: > > OK, the basic issue is, that an object should be able to form part of > different collections. The basic example I give is that you could have > an Inventory object which contains a list of Articles, and ShoppingCart > objects which also contain a list of Articles. > I don't think that this is a minor feature, but it is simply the way > objects can be used in Java. > > Up to the last release this was possible, but now the entire MtoN-code > has been changed. Now an object A can have a collection of objects B, > but at the same time object B has to have a collection of objects A, > effectively linking A and B tightly together. If you want to have object > A to be part of a collection in an object C, you have to provide a > collection in object B pointing to objects C ..... > > Object B shouldn't have to know that it is part of a collection in an > M:N scenario. > > The only testcase for that MtoN-issue is testMNLoading() in MtoNMapping > which uses the Person-Project relationship, where Person has a > collection of Projects and Project has a collection of Persons. > > I have assembled a testcase which should check the form of > MtoN-relationships where the N-Class doesn't have a collection of > M-Objects. Of course it fails right away, but it would be a starting > point to analyze how to fix things. > > I have attached the following things: > > 1.) a method testMultipleMtoNRelations() which should go into the > MtoNMapping.java file > > 2.) the files Inventory.java and ShoppingCart.java which go into the same > directory > > 3.) the mapping for both classes which has to be added to > repository_junit.xml > > 4.) the create statement for the tables and indirection tables which has > to go into db-setup.sql > > Cheers > > Georg > |
From: Leandro R. S. C. <le...@ib...> - 2002-06-06 18:35:16
|
hi guys ! why don't we use the irc channel at share.whichever.com ? -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servicos (IB) http://www.ibnetwork.com.br |
From: Oleg N. <on...@ib...> - 2002-06-06 15:08:07
|
Georg Schneider wrote: > hi Oleg, > if the CollectionDescriptor is added to the ClassDescriptor wouldn't that > lead to an error when the N-Object is materialized, because it would try > to set a non-existent Collection Field? Of course we should remember that the CollectionDescriptor was generated automatically and does not correspond to a field. Oleg > Cheers > Georg > On Thu, 6 Jun 2002, Oleg Nitz wrote: >> Georg Schneider wrote: >> > Hi Oleg, >> >> > You mean you would construct a CollectionDescriptor for the N-side and not >> > add it to the ClassDescriptor of the N-side? >> I mean that we wouldn't require CollectionDescriptor for the N-side in >> repository.xml, but we will generate it at runtime and add to >> ClassDescriptor in memory. >> >> Oleg >> >> >> > Cheers >> >> > Georg >> >> > On Thu, 6 Jun 2002, Oleg Nitz wrote: >> >> >> Hi Jacob and Georg, >> >> >> >> It is convenient to have bidirectional relationship for OJB internals >> >> (this makes things more uniform and simple), >> >> but it may be inconvenient for user. >> >> I propose the following trick: if there is no inverse relationship we >> >> generate it automatically. We may even allow user to use it in query >> >> conditions. For example "~rel" would mean inverse relation for "rel". >> >> What do you think? >> >> >> >> Oleg >> >> >> >> Georg Schneider wrote: >> >> > Hi jacob, >> >> >> >> > Could you give me the basic reason for that requirement or please point me >> >> > to your discussion with Oleg (I missed that one :-) ). >> >> > Nevertheless I think that this is quite a big intrusion into the java code >> >> > and since all of the information needed is already in the >> >> > CollectionDescriptor of the M-side, I don't see a reason for doing it. >> >> >> >> > Cheers >> >> >> >> > Georg >> >> >> >> >> >> >> >> > _______________________________________________________________ >> >> >> >> > Don't miss the 2002 Sprint PCS Application Developer's Conference >> >> > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >> >> >> >> > _______________________________________________ >> >> > Objectbridge-developers mailing list >> >> > Obj...@li... >> >> > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >> >> >> >> >> >> >> >> _______________________________________________________________ >> >> >> >> Don't miss the 2002 Sprint PCS Application Developer's Conference >> >> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >> >> >> >> _______________________________________________ >> >> Objectbridge-developers mailing list >> >> Obj...@li... >> >> https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >> >> >> >> >> > _______________________________________________________________ >> >> > Don't miss the 2002 Sprint PCS Application Developer's Conference >> > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >> >> > _______________________________________________ >> > Objectbridge-developers mailing list >> > Obj...@li... >> > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >> >> >> >> _______________________________________________________________ >> >> Don't miss the 2002 Sprint PCS Application Developer's Conference >> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >> >> _______________________________________________ >> Objectbridge-developers mailing list >> Obj...@li... >> https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >> > _______________________________________________________________ > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |
From: Georg S. <ge...@me...> - 2002-06-06 14:58:57
|
hi Oleg, if the CollectionDescriptor is added to the ClassDescriptor wouldn't that lead to an error when the N-Object is materialized, because it would try to set a non-existent Collection Field? Cheers Georg On Thu, 6 Jun 2002, Oleg Nitz wrote: > Georg Schneider wrote: > > Hi Oleg, > > > You mean you would construct a CollectionDescriptor for the N-side and not > > add it to the ClassDescriptor of the N-side? > I mean that we wouldn't require CollectionDescriptor for the N-side in > repository.xml, but we will generate it at runtime and add to > ClassDescriptor in memory. > > Oleg > > > > Cheers > > > Georg > > > On Thu, 6 Jun 2002, Oleg Nitz wrote: > > >> Hi Jacob and Georg, > >> > >> It is convenient to have bidirectional relationship for OJB internals > >> (this makes things more uniform and simple), > >> but it may be inconvenient for user. > >> I propose the following trick: if there is no inverse relationship we > >> generate it automatically. We may even allow user to use it in query > >> conditions. For example "~rel" would mean inverse relation for "rel". > >> What do you think? > >> > >> Oleg > >> > >> Georg Schneider wrote: > >> > Hi jacob, > >> > >> > Could you give me the basic reason for that requirement or please point me > >> > to your discussion with Oleg (I missed that one :-) ). > >> > Nevertheless I think that this is quite a big intrusion into the java code > >> > and since all of the information needed is already in the > >> > CollectionDescriptor of the M-side, I don't see a reason for doing it. > >> > >> > Cheers > >> > >> > Georg > >> > >> > >> > >> > _______________________________________________________________ > >> > >> > Don't miss the 2002 Sprint PCS Application Developer's Conference > >> > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > >> > >> > _______________________________________________ > >> > Objectbridge-developers mailing list > >> > Obj...@li... > >> > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > >> > >> > >> > >> _______________________________________________________________ > >> > >> Don't miss the 2002 Sprint PCS Application Developer's Conference > >> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > >> > >> _______________________________________________ > >> Objectbridge-developers mailing list > >> Obj...@li... > >> https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > >> > > > > _______________________________________________________________ > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > _______________________________________________ > > Objectbridge-developers mailing list > > Obj...@li... > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |