objectbridge-developers Mailing List for ObJectRelationalBridge (Page 19)
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: <Joa...@tp...> - 2002-05-08 08:49:13
|
Hy, you all probably know about the problem with different SQL dialects for different Databases. The Query part is actually quite ok, but DDLs just won't work on more than one Database, when any advanced feature is used (and sometimes "advanced features" are things like text that is longer than 255 characters). Most of this differences are just different names for a data type (example from db-setup.sql: LONGVARBINARY, BLOB, BLOB(32k), LONGBLOB, IMAGE). What I think would be great is a tool that takes ANSI SQL DDL and executes it on different database, after modifing the data types to fit the DB vendors idea of the name. While converting it could output warnings about changed behaviour (for example MySQL not handling spaces at the end of CLOBs correctly). I think writing such a tool once is less work than modfing db-setup.sql for each change and it would be easier to maintain ("Super-DB v36 does support the new HYPER_GROOVY_BLOB instead of the old PLAIN_BLOB"). Additionally it would be a great for us, as our product should run on quite some different databases ;-) I would be willing to write such a tool, but I almost can't believe that there is no such thing out there ('though I didn't find it). Does anybody know if there are simillar tools somewhere? And if not does anyone know if there is a nice overview about the DDL of some databases? Especially the ANSI SQL Datatypes? regards Joachim Sauer |
From: Oleg N. <on...@uk...> - 2002-05-08 08:02:28
|
Hi Jakob, On Wednesday 08 May 2002 09:59, Jakob Braeuchi wrote: > i fixed the SqlGenerator to support m:n path expression (it took me only 90 > minutes, i couldn't resists), and i also added new testcases for this kind > of path-expressions. > but i think the SqlGenerator and the JoinInfos are getting more and more > ugly, and the definitely need a redesign. > how is the design of the new SqlGenerator you're working on ? I am copying/moving some code from SqlGenerator to SqlStatement - a new class that will be responsible for generating one SELECT statement for given criteria and handle joins, aliases and UNIONs. Yes, UNIONs - I know cases where they are necessary. I can expand on this if anyone is interested. How long this work would take - I can't say, probably I'll commit something until the end of the week. Oleg |
From: Jakob B. <jbr...@ho...> - 2002-05-08 06:59:20
|
hi oleg, i fixed the SqlGenerator to support m:n path expression (it took me only 90 minutes, i couldn't resists), and i also added new testcases for this kind of path-expressions. but i think the SqlGenerator and the JoinInfos are getting more and more ugly, and the definitely need a redesign. how is the design of the new SqlGenerator you're working on ? jakob ----- Original Message ----- From: "Oleg Nitz" <on...@uk...> To: <obj...@li...> Sent: Tuesday, May 07, 2002 9:19 PM Subject: Re: [OJB-developers] path expressions and m:n-relationship > On Tuesday 07 May 2002 09:37, Jakob Braeuchi wrote: > > hi oleg, > > > > there seems to be a problem when using a path expression over an > > m:n-relationship (ie "projects.title" for Person.class). > > when i use "roles.project.title" it works. could you pleas have a look at > > this ? > Okay. > > Oleg > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |
From: Leandro R. S. C. <le...@ib...> - 2002-05-07 22:18:57
|
Hi all. I'm having some problems when I try to pull some objects from the DB wich have their Primary key values set to 0 ( zero ). this happens at ClassDescriptor.getAutoIncrementValue(), line 766 where the actual value of my pk field is compared to NULL or ZERO. Why is that ? Can I have INT PK fields with value == ZERO ?? or not ? -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servicos (IB) http://www.ibnetwork.com.br |
From: Oleg N. <on...@uk...> - 2002-05-07 19:15:47
|
On Tuesday 07 May 2002 09:37, Jakob Braeuchi wrote: > hi oleg, > > there seems to be a problem when using a path expression over an > m:n-relationship (ie "projects.title" for Person.class). > when i use "roles.project.title" it works. could you pleas have a look at > this ? Okay. Oleg |
From: Matthew B. <ma...@so...> - 2002-05-07 16:06:35
|
I can confirm this bug, we have Class A, B, C: A references B, B references C, and C references A. Same result of endless loop and overflow :( A test case would be great. I'm going to look at the cause when I get a few moments. -----Original Message----- From: Joa...@tp... To: obj...@li... Sent: 5/7/02 8:10 AM Subject: [OJB-developers] recursive dependency with ODMG Hy, We're having a problem with recursive Dependencies with ODMG. We got a Class A and a Class B, Class A has a reference to a object of Class B and vice versa. when two objects a (of type A) and b (of type B) reference each other ODMG gets caught in an endless loop and finally throws a StackOverFlow-Error... the first few lines of the stack-trace follow: java.lang.StackOverflowError at java.util.Properties.getProperty(Properties.java:480) at java.lang.System.getProperty(System.java:574) at sun.security.action.GetPropertyAction.run(GetPropertyAction.java:66) at java.security.AccessController.doPrivileged(Native Method) at sun.io.Converters.getDefaultEncodingName(Converters.java:66) at java.lang.StringCoding.decode(StringCoding.java:224) at java.lang.String.<init>(String.java:380) at org.gjt.mm.mysql.Buffer.readLenString(Unknown Source) at org.gjt.mm.mysql.MysqlIO.getResultSet(Unknown Source) at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source) at org.gjt.mm.mysql.Connection.execSQL(Unknown Source) at org.gjt.mm.mysql.PreparedStatement.executeQuery(Unknown Source) at ojb.broker.accesslayer.JdbcAccess.materializeObject(JdbcAccess.java:327) at ojb.broker.singlevm.PersistenceBrokerImpl.getDBObject(Unknown Source) at ojb.broker.singlevm.PersistenceBrokerImpl.getObjectByIdentity(Unknown Source) at ojb.odmg.ObjectEnvelope.setInitialModificationState(Unknown Source) at ojb.odmg.ObjectEnvelope.<init>(Unknown Source) at ojb.odmg.TransactionImpl.register(Unknown Source) at ojb.odmg.TransactionImpl.lock(Unknown Source) at ojb.odmg.TransactionImpl.lockReferences(Unknown Source) at ojb.odmg.TransactionImpl.register(Unknown Source) at ojb.odmg.TransactionImpl.lock(Unknown Source) (Don't know yet why ojb.odmg is "Unknown Source", I'll have to find out). I don't know if I'm trying to do something that's not possible with ODMG (in which case I think we should throw the correct Exception) or if it's a simple bug. I will probably be able to provide a small test case by tomorrow, if needed. regards Joachim Sauer _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: ban...@so... _______________________________________________ Objectbridge-developers mailing list Obj...@li... https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |
From: Matthew B. <ma...@so...> - 2002-05-07 16:04:31
|
I'm in the middle of some big changes for OJB in a managed environment, but when I'm done with those, I want to help implement these suggestions. I know about all the exception handling problems we have and it shouldn't take me that long to fix a lot of them. Probably will need to be done in a couple passes, however. -----Original Message----- From: Joa...@tp... To: obj...@li... Cc: John Freeborg Sent: 5/7/02 4:29 AM Subject: [OJB-developers] Exceptions Hy, once again I got some issues with Exception handling. There are many places in the code where Throwable is caught. I think this is quite bad, because most of the times it is just re-thrown as a different exception (often resulting in lost information). The problem is increased when the re-thrown Exception is a ODMG-Exception, as in this case we can't use the cause-exception system that I added to PersistenceBrokerException. To enhance the situation I've got two suggestions. One of them has been suggested by John Freeborg on 17. 4. 2002 (mail to be found at http://sourceforge.net/mailarchive/forum.php?thread_id=645206&forum_id=4 880) but unfortunately noone anwsered and he hasn't posted since. - stop excessive use of "catch (Throwable foo)" in favour of more specific catch-clauses (see Mail-Archive-Link for details). - throw a custom subclass of ODMGException/LockNotGrantedException/... instead of the original to make use of the same mechanism that I added to PersistenceBrokerException, at least with JDK 1.4 this greatly enhances the possibilities for debugging. Unfortunately I don't know wether this is in conformance with the ODMG specification. Johns second item shouldn't be forgotten as well. regards Joachim Sauer _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: ban...@so... _______________________________________________ Objectbridge-developers mailing list Obj...@li... https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |
From: John F. <jfr...@so...> - 2002-05-07 15:46:10
|
I'm all ears, but I've just been very busy lately. Regarding my second item, after thinking about it some I would prefer to change the PB interface and start using RsIterator that can throw PBEs as necessary. Down the road there will probably be other features where it would be handy not to be constrained by java.util.Iterator all the time. I've got a bunch of patches to submit for private PB tx consistent caches, a shared read-only cache, etc. I just need to find the time to prepare the files and mail them into somebody. Cheers, - John > -----Original Message----- > From: Joa...@tp... [mailto:Joa...@tp...] > Sent: Tuesday, May 07, 2002 6:29 AM > To: obj...@li... > Cc: John Freeborg > Subject: Exceptions >=20 >=20 > Hy, >=20 > once again I got some issues with Exception handling. There are many=20 > places in the code where Throwable is caught. I think this is=20 > quite bad,=20 > because most of the times it is just re-thrown as a different=20 > exception=20 > (often resulting in lost information). The problem is=20 > increased when the=20 > re-thrown Exception is a ODMG-Exception, as in this case we=20 > can't use the=20 > cause-exception system that I added to PersistenceBrokerException. To=20 > enhance the situation I've got two suggestions. One of them has been=20 > suggested by John Freeborg on 17. 4. 2002 (mail to be found at=20 > http://sourceforge.net/mailarchive/forum.php?thread_id=3D645206& forum_id=3D4880)=20 but unfortunately noone anwsered and he hasn't posted since. - stop excessive use of "catch (Throwable foo)" in favour of more specific=20 catch-clauses (see Mail-Archive-Link for details). - throw a custom subclass of ODMGException/LockNotGrantedException/...=20 instead of the original to make use of the same mechanism that I added to=20 PersistenceBrokerException, at least with JDK 1.4 this greatly enhances=20 the possibilities for debugging. Unfortunately I don't know wether this is=20 in conformance with the ODMG specification. Johns second item shouldn't be forgotten as well. regards Joachim Sauer |
From: <Joa...@tp...> - 2002-05-07 15:10:49
|
Hy, We're having a problem with recursive Dependencies with ODMG. We got a Class A and a Class B, Class A has a reference to a object of Class B and vice versa. when two objects a (of type A) and b (of type B) reference each other ODMG gets caught in an endless loop and finally throws a StackOverFlow-Error... the first few lines of the stack-trace follow: java.lang.StackOverflowError at java.util.Properties.getProperty(Properties.java:480) at java.lang.System.getProperty(System.java:574) at sun.security.action.GetPropertyAction.run(GetPropertyAction.java:66) at java.security.AccessController.doPrivileged(Native Method) at sun.io.Converters.getDefaultEncodingName(Converters.java:66) at java.lang.StringCoding.decode(StringCoding.java:224) at java.lang.String.<init>(String.java:380) at org.gjt.mm.mysql.Buffer.readLenString(Unknown Source) at org.gjt.mm.mysql.MysqlIO.getResultSet(Unknown Source) at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source) at org.gjt.mm.mysql.Connection.execSQL(Unknown Source) at org.gjt.mm.mysql.PreparedStatement.executeQuery(Unknown Source) at ojb.broker.accesslayer.JdbcAccess.materializeObject(JdbcAccess.java:327) at ojb.broker.singlevm.PersistenceBrokerImpl.getDBObject(Unknown Source) at ojb.broker.singlevm.PersistenceBrokerImpl.getObjectByIdentity(Unknown Source) at ojb.odmg.ObjectEnvelope.setInitialModificationState(Unknown Source) at ojb.odmg.ObjectEnvelope.<init>(Unknown Source) at ojb.odmg.TransactionImpl.register(Unknown Source) at ojb.odmg.TransactionImpl.lock(Unknown Source) at ojb.odmg.TransactionImpl.lockReferences(Unknown Source) at ojb.odmg.TransactionImpl.register(Unknown Source) at ojb.odmg.TransactionImpl.lock(Unknown Source) (Don't know yet why ojb.odmg is "Unknown Source", I'll have to find out). I don't know if I'm trying to do something that's not possible with ODMG (in which case I think we should throw the correct Exception) or if it's a simple bug. I will probably be able to provide a small test case by tomorrow, if needed. regards Joachim Sauer |
From: Domagoj J. <do...@la...> - 2002-05-07 12:05:50
|
<html> <br> Maybe you could use this example of code, it is code from enhydra 3.1 aplication server .<br> it helped me very much because I always see the root cause of exception.<br><br> But if you would use this , every exception in OJB should inherit from ChainedException.<br><br> And then when rethrowing you should write : <br><br> . . . . . .<br><br> } catch(BusinessException ex) {<br> throw new PresentationException("Error saving bussines object ! ", ex );<br> }<br> . . . . . . <br><br> <br> *************************************************CODE*****************************************************************************<br> //interface : <b> ChainedThrowable<br><br> </b>import java.io.PrintStream;<br> import java.io.PrintWriter;<br><br> public interface ChainedThrowable<br> {<br><br> public abstract Throwable getCause();<br><br> public abstract String getMessage();<br><br> public abstract void printStackTrace();<br><br> public abstract void printStackTrace(PrintStream printstream);<br><br> public abstract void printStackTrace(PrintWriter printwriter);<br> }<br><br> <br><br> <br> //class : <b> ChainedException<br><br> </b>import java.io.PrintStream;<br> import java.io.PrintWriter;<br><br> // Referenced classes of package com.lutris.util:<br> // ChainedThrowable, ChainedThrowableUtil<br><br> public class ChainedException extends Exception<br> implements ChainedThrowable<br> {<br><br> public ChainedException(String msg)<br> {<br> super(msg);<br> cause = null;<br> }<br><br> public ChainedException(String msg, Throwable cause)<br> {<br> super(msg);<br> this.cause = cause;<br> }<br><br> public ChainedException(Throwable cause)<br> {<br> super(ChainedThrowableUtil.makeMessage(cause));<br> this.cause = cause;<br> }<br><br> public Throwable getCause()<br> {<br> return cause;<br> }<br><br> public String getMessage()<br> {<br> return ChainedThrowableUtil.getMessage(this, super.getMessage());<br> }<br><br> public void printStackTrace()<br> {<br> super.printStackTrace();<br> ChainedThrowableUtil.printCauseTrace(this);<br> }<br><br> public void printStackTrace(PrintStream s)<br> {<br> super.printStackTrace(s);<br> ChainedThrowableUtil.printCauseTrace(this, s);<br> }<br><br> public void printStackTrace(PrintWriter s)<br> {<br> super.printStackTrace(s);<br> ChainedThrowableUtil.printCauseTrace(this, s);<br> }<br><br> private Throwable cause;<br> }<br><br> <br><br> //interface : <b> ChainedThrowableUtil<br><br> </b>import java.awt.print.PrinterIOException;<br> import java.io.*;<br> import java.lang.reflect.InvocationTargetException;<br> import java.rmi.RemoteException;<br> import java.rmi.activation.ActivationException;<br> import java.rmi.server.ServerCloneException;<br> import java.security.PrivilegedActionException;<br> import java.sql.SQLException;<br> import org.xml.sax.SAXException;<br><br> <br> class ChainedThrowableUtil<br> {<br><br> private ChainedThrowableUtil()<br> {<br> }<br><br> protected static String getMessage(ChainedThrowable except, String superMsg)<br> {<br> Throwable cause = except.getCause();<br> if(cause == null)<br> return superMsg;<br> String causeMsg = cause.getMessage();<br> if(causeMsg == null || causeMsg.length() == 0)<br> causeMsg = cause.getClass().getName();<br> return superMsg + ": " + causeMsg;<br> }<br><br> protected static String makeMessage(Throwable cause)<br> {<br> String causeMsg = cause.getMessage();<br> if(causeMsg == null)<br> return cause.getClass().getName();<br> else<br> return causeMsg;<br> }<br><br> protected static void printCauseTrace(ChainedThrowable except)<br> {<br> PrintWriter pw = new PrintWriter(System.err);<br> printChainedCauses(except.getCause(), pw);<br> pw.flush();<br> }<br><br> protected static void printCauseTrace(ChainedThrowable except, PrintStream s)<br> {<br> PrintWriter pw = new PrintWriter(s);<br> printChainedCauses(except.getCause(), pw);<br> pw.flush();<br> }<br><br> public static void printCauseTrace(ChainedThrowable except, PrintWriter out)<br> {<br> printChainedCauses(except.getCause(), out);<br> out.flush();<br> }<br><br> private static void printChainedCauses(Throwable cause, PrintWriter out)<br> {<br> if(cause != null)<br> {<br> out.println("*** Caused by:");<br> cause.printStackTrace(out);<br> if(!(cause instanceof ChainedThrowable))<br> if(cause instanceof PrinterIOException)<br> printChainedCauses(((Throwable) (((PrinterIOException)cause).getIOException())), out);<br> else<br> if(cause instanceof WriteAbortedException)<br> printChainedCauses(((Throwable) (((WriteAbortedException)cause).detail)), out);<br> else<br> if(cause instanceof ClassNotFoundException)<br> printChainedCauses(((ClassNotFoundException)cause).getException(), out);<br> else<br> if(cause instanceof ExceptionInInitializerError)<br> printChainedCauses(((ExceptionInInitializerError)cause).getException(), out);<br> else<br> if(cause instanceof InvocationTargetException)<br> printChainedCauses(((InvocationTargetException)cause).getTargetException(), out);<br> else<br> if(cause instanceof RemoteException)<br> printChainedCauses(((RemoteException)cause).detail, out);<br> else<br> if(cause instanceof ActivationException)<br> printChainedCauses(((ActivationException)cause).detail, out);<br> else<br> if(cause instanceof ServerCloneException)<br> printChainedCauses(((Throwable) (((ServerCloneException)cause).detail)), out);<br> else<br> if(cause instanceof PrivilegedActionException)<br> printChainedCauses(((Throwable) (((PrivilegedActionException)cause).getException())), out);<br> else<br> if(cause instanceof SQLException)<br> printChainedCauses(((Throwable) (((SQLException)cause).getNextException())), out);<br> else<br> if(cause instanceof SAXException)<br> printChainedCauses(((Throwable) (((SAXException)cause).getException())), out);<br> }<br> }<br> }<br><br> ******************************************************************************************************************************************************************</html> |
From: <Joa...@tp...> - 2002-05-07 11:29:35
|
Hy, once again I got some issues with Exception handling. There are many places in the code where Throwable is caught. I think this is quite bad, because most of the times it is just re-thrown as a different exception (often resulting in lost information). The problem is increased when the re-thrown Exception is a ODMG-Exception, as in this case we can't use the cause-exception system that I added to PersistenceBrokerException. To enhance the situation I've got two suggestions. One of them has been suggested by John Freeborg on 17. 4. 2002 (mail to be found at http://sourceforge.net/mailarchive/forum.php?thread_id=645206&forum_id=4880) but unfortunately noone anwsered and he hasn't posted since. - stop excessive use of "catch (Throwable foo)" in favour of more specific catch-clauses (see Mail-Archive-Link for details). - throw a custom subclass of ODMGException/LockNotGrantedException/... instead of the original to make use of the same mechanism that I added to PersistenceBrokerException, at least with JDK 1.4 this greatly enhances the possibilities for debugging. Unfortunately I don't know wether this is in conformance with the ODMG specification. Johns second item shouldn't be forgotten as well. regards Joachim Sauer |
From: Jesper L. <je...@da...> - 2002-05-07 10:11:08
|
Execution an ODMG query against an interface/extent that returns an empty result set, and you get this error: [junit] [BOOT] INFO: loading XML took 1752 msecs [junit] [ODMG] ERROR: null [junit] java.lang.NullPointerException [junit] at ojb.odmg.oql.OQLQueryImpl.execute(OQLQueryImpl.java:241) [junit] at dk.pine.mosaic.meta.CreateRepositoryTest.testCreate(CreateRep ositoryTest.java:88) [junit] at java.lang.reflect.Method.invoke(Native Method) .. ***** Fix/hack: Index: PersistenceBrokerImpl.java =================================================================== RCS file: /cvsroot/objectbridge/ojb-1- 0/src/java/ojb/broker/singlevm/PersistenceBrokerImpl.java,v retrieving revision 1.10 diff -r1.10 PersistenceBrokerImpl.java 1005c1005,1006 < if (tmpMap.size() > 0) --- > > if (result == null) 1007c1008,1012 < if (result == null) --- > try > { > result = (ManageableCollection) collectionClass.newInstance(); > } > catch (Throwable t) 1009,1016c1014 < try < { < result = (ManageableCollection) collectionClass.newInstance(); < } < catch (Throwable t) < { < throw new PersistenceBrokerException(t); < } --- > throw new PersistenceBrokerException(t); 1017a1016,1019 > } > > if (tmpMap.size() > 0) > { At least the above solved my problem, but with no warranties whatsoever. So, please, PersistenceBrokerImpl guru, check that above fix it correct before checking in. Thanks! Jesper |
From: Jakob B. <jbr...@ho...> - 2002-05-07 06:37:55
|
hi oleg, there seems to be a problem when using a path expression over an m:n-relationship (ie "projects.title" for Person.class). when i use "roles.project.title" it works. could you pleas have a look at this ? thanks jakob |
From: Jakob B. <jbr...@ho...> - 2002-05-06 15:35:26
|
my thank go to JUnit ;-) jakob ----- Original Message ----- From: "Chris Greenlee" <CGr...@de...> To: <obj...@li...> Sent: Monday, May 06, 2002 5:04 PM Subject: RE: [OJB-developers] Failing unit tests Thanks to Jakob, I've put in a fix for the bug I introduced. :) I'd ommitted a line in storeCollections() that called storeCollectionObject() before calling storeMtoNImplementor(). Needless to say, if the collection object wasn't stored, the foreign key constraints wouldn't allow insertion into the indirection table. Thanks to Jakob for catching it! Cheers, Chris > -----Original Message----- > From: Jakob Braeuchi [mailto:jbr...@ho...] > Sent: Monday, May 06, 2002 1:50 AM > To: Jakob Braeuchi; Oleg Nitz; > obj...@li... > Subject: Re: [OJB-developers] Failing unit tests > > > hi chris, > > afaik the method storeMtoNImplementor of PersitenceBrokerImpl > only stores > data in the relation table but not in the project table, > so the new project is not inserted. didn't you make changes > in this area ? > > jakob > > ----- Original Message ----- > From: "Jakob Braeuchi" <jbr...@ho...> > To: "Oleg Nitz" <on...@uk...>; > <obj...@li...> > Sent: Monday, May 06, 2002 8:34 AM > Subject: Re: [OJB-developers] Failing unit tests > > > > hi oleg, chris, > > > > i only see the one failure > > > testInsertion(test.ojb.broker.MtoNMapping)junit.framework.Asse > rtionFailedErr > > or: expected:<3> but was:<2> > > > > jakob > > > > > > ----- Original Message ----- > > From: "Oleg Nitz" <on...@uk...> > > To: <obj...@li...> > > Sent: Sunday, May 05, 2002 9:12 PM > > Subject: Re: [OJB-developers] Failing unit tests > > > > > > > On Sunday 05 May 2002 21:25, Chris Greenlee wrote: > > > > Using a fresh checkout of OJB from before the commits > I've done in the > > last > > > > 24 hours, I get 4 failures when running "ant junit". > They're all in > > > > MtoNMapping.java. Is anyone else seeing this, or > should I monkey > around > > > > with my local SQL Server? > > > I see 1 failure: > > > [junit] 1) > > > > > > testInsertion(test.ojb.broker.MtoNMapping)junit.framework.Asse > rtionFailedErr > > or: > > > expected:<3> but was:<2> > > > [junit] at > > > test.ojb.broker.MtoNMapping.testInsertion(MtoNMapping.java:165) > > > > > > Oleg > > > > > > _______________________________________________________________ > > > > > > Have big pipes? SourceForge.net is looking for download > mirrors. We > supply > > > the hardware. You get the recognition. Email Us: > ban...@so... > > > _______________________________________________ > > > Objectbridge-developers mailing list > > > Obj...@li... > > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: ban...@so... _______________________________________________ Objectbridge-developers mailing list Obj...@li... https://lists.sourceforge.net/lists/listinfo/objectbridge-developers _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: ban...@so... _______________________________________________ Objectbridge-developers mailing list Obj...@li... https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |
From: Chris G. <CGr...@de...> - 2002-05-06 15:05:01
|
Thanks to Jakob, I've put in a fix for the bug I introduced. :) I'd ommitted a line in storeCollections() that called storeCollectionObject() before calling storeMtoNImplementor(). Needless to say, if the collection object wasn't stored, the foreign key constraints wouldn't allow insertion into the indirection table. Thanks to Jakob for catching it! Cheers, Chris > -----Original Message----- > From: Jakob Braeuchi [mailto:jbr...@ho...] > Sent: Monday, May 06, 2002 1:50 AM > To: Jakob Braeuchi; Oleg Nitz;=20 > obj...@li... > Subject: Re: [OJB-developers] Failing unit tests >=20 >=20 > hi chris, >=20 > afaik the method storeMtoNImplementor of PersitenceBrokerImpl=20 > only stores > data in the relation table but not in the project table, > so the new project is not inserted. didn't you make changes=20 > in this area ? >=20 > jakob >=20 > ----- Original Message ----- > From: "Jakob Braeuchi" <jbr...@ho...> > To: "Oleg Nitz" <on...@uk...>; > <obj...@li...> > Sent: Monday, May 06, 2002 8:34 AM > Subject: Re: [OJB-developers] Failing unit tests >=20 >=20 > > hi oleg, chris, > > > > i only see the one failure > > > testInsertion(test.ojb.broker.MtoNMapping)junit.framework.Asse > rtionFailedErr > > or: expected:<3> but was:<2> > > > > jakob > > > > > > ----- Original Message ----- > > From: "Oleg Nitz" <on...@uk...> > > To: <obj...@li...> > > Sent: Sunday, May 05, 2002 9:12 PM > > Subject: Re: [OJB-developers] Failing unit tests > > > > > > > On Sunday 05 May 2002 21:25, Chris Greenlee wrote: > > > > Using a fresh checkout of OJB from before the commits=20 > I've done in the > > last > > > > 24 hours, I get 4 failures when running "ant junit". =20 > They're all in > > > > MtoNMapping.java. Is anyone else seeing this, or=20 > should I monkey > around > > > > with my local SQL Server? > > > I see 1 failure: > > > [junit] 1) > > > > > > testInsertion(test.ojb.broker.MtoNMapping)junit.framework.Asse > rtionFailedErr > > or: > > > expected:<3> but was:<2> > > > [junit] at > > > test.ojb.broker.MtoNMapping.testInsertion(MtoNMapping.java:165) > > > > > > Oleg > > > > > > _______________________________________________________________ > > > > > > Have big pipes? SourceForge.net is looking for download=20 > mirrors. We > supply > > > the hardware. You get the recognition. Email Us: > ban...@so... > > > _______________________________________________ > > > Objectbridge-developers mailing list > > > Obj...@li... > > >=20 https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: ban...@so... _______________________________________________ Objectbridge-developers mailing list Obj...@li... https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |
From: Matt G. <ma...@po...> - 2002-05-06 13:08:05
|
What the database vendors should do is come up with a standard ... oh, there is one. Still, it's only 10 years old now ;-). The good news is that Oracle 9i *does* (finally!) support the SQL92 join syntax. Cheers, Matt On Mon, 2002-05-06 at 12:50, Oleg Nitz wrote: > Hi James, > > On Monday 06 May 2002 14:16, you wrote: > > Just wanted to point out that oracle 8(i) supports neither INNER JOIN > > nor OUTER JOIN syntax. Just the ( foo = bar ) and ( foo = bar(+) ) > > forms. > I am aware of that, as well as of Sybase syntax, thanks. > > Oleg > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers -- Matt Goodall, Technical Director Pollenation Internet Ltd, http://www.pollenation.net e: ma...@po... t: 0113 2252500 m: 07811 278951 |
From: Oleg N. <on...@uk...> - 2002-05-06 11:46:00
|
Hi James, On Monday 06 May 2002 14:16, you wrote: > Just wanted to point out that oracle 8(i) supports neither INNER JOIN > nor OUTER JOIN syntax. Just the ( foo = bar ) and ( foo = bar(+) ) > forms. I am aware of that, as well as of Sybase syntax, thanks. Oleg |
From: James T. <jt...@4l...> - 2002-05-06 11:19:41
|
Just wanted to point out that oracle 8(i) supports neither INNER JOIN nor OUTER JOIN syntax. Just the ( foo = bar ) and ( foo = bar(+) ) forms. My apologies if that is not relevant to the current discussion of SQL generation, I'm jumping onto the list mid-thread. -- jt On Mon, 2002-05-06 at 04:16, Jakob Braeuchi wrote: > hi, > > mysql also optimises joins > http://www.mysql.com/doc/L/E/LEFT_JOIN_optimisation.html > so i think we should stick to the JOIN-syntax wherever possible. > > jakob > |
From: Oleg N. <on...@uk...> - 2002-05-06 10:50:08
|
Thanks to everybody who posted comments! Okay, I'll keep the "inner join" syntax wherever possible. Oleg On Monday 06 May 2002 03:39, you wrote: > Hi, > > Just a couple of comments that might help ... > > PostgreSQL can produce more efficient access plans when the "inner join" > syntax is used. I don't know whether that's true of other RDBMS. See > http://www.postgresql.org/idocs/index.php?explicit-joins.html. > > Outer join syntax is completely different for different RDMBS. I thought > these sorts of differences were already contained in RDBMS-specific > classes. Can't they be used/extended to supply the correct inner join > syntax too? > > Cheers, Matt. > > p.s. One day, i hope to stop lurking on this list. I'm just waiting for > a project to use OJB with. ;-) > > On Sun, 2002-05-05 at 23:58, Oleg Nitz wrote: > > Hi All, > > > > I propose to use equatilies in WHERE clause for INNER JOINs. > > I mean that instead of > > 1) SELECT ... FROM (A INNER JOIN B ON A.FK=B.ID) INNER JOIN C ON > > B.FK=C.ID we can generate > > 2) SELECT ... FROM A, B, C WHERE A.FK=B.ID AND B.FK=C.ID > > I don't know any RDBMS that doesn't support the 2nd syntax. > > Does anybody knows one? > > But I know the RDBMS that doesn't support the 1st syntax: HSQL. > > To be more precise, HSQL does not support nested joins such as above. > > Maybe it supports some other flavor of 1st syntax, but let's don't > > increase complexity if we can use 2nd syntax in all cases. > > And the 2nd syntax seems shorter and simpler. > > > > Regards, > > Oleg > > > > _______________________________________________________________ > > > > Have big pipes? SourceForge.net is looking for download mirrors. We > > supply the hardware. You get the recognition. Email Us: > > ban...@so... _______________________________________________ > > Objectbridge-developers mailing list > > Obj...@li... > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |
From: Jakob B. <jbr...@ho...> - 2002-05-06 08:16:46
|
hi, mysql also optimises joins http://www.mysql.com/doc/L/E/LEFT_JOIN_optimisation.html so i think we should stick to the JOIN-syntax wherever possible. jakob ----- Original Message ----- From: "Matt Goodall" <ma...@po...> To: <obj...@li...> Sent: Monday, May 06, 2002 2:39 AM Subject: Re: [OJB-developers] INNER JOIN syntax > Hi, > > Just a couple of comments that might help ... > > PostgreSQL can produce more efficient access plans when the "inner join" > syntax is used. I don't know whether that's true of other RDBMS. See > http://www.postgresql.org/idocs/index.php?explicit-joins.html. > > Outer join syntax is completely different for different RDMBS. I thought > these sorts of differences were already contained in RDBMS-specific > classes. Can't they be used/extended to supply the correct inner join > syntax too? > > Cheers, Matt. > > p.s. One day, i hope to stop lurking on this list. I'm just waiting for > a project to use OJB with. ;-) > > On Sun, 2002-05-05 at 23:58, Oleg Nitz wrote: > > Hi All, > > > > I propose to use equatilies in WHERE clause for INNER JOINs. > > I mean that instead of > > 1) SELECT ... FROM (A INNER JOIN B ON A.FK=B.ID) INNER JOIN C ON B.FK=C.ID > > we can generate > > 2) SELECT ... FROM A, B, C WHERE A.FK=B.ID AND B.FK=C.ID > > I don't know any RDBMS that doesn't support the 2nd syntax. > > Does anybody knows one? > > But I know the RDBMS that doesn't support the 1st syntax: HSQL. > > To be more precise, HSQL does not support nested joins such as above. > > Maybe it supports some other flavor of 1st syntax, but let's don't increase > > complexity if we can use 2nd syntax in all cases. > > And the 2nd syntax seems shorter and simpler. > > > > Regards, > > Oleg > > > > _______________________________________________________________ > > > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > > the hardware. You get the recognition. Email Us: ban...@so... > > _______________________________________________ > > Objectbridge-developers mailing list > > Obj...@li... > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > -- > Matt Goodall, Technical Director > Pollenation Internet Ltd, http://www.pollenation.net > e: ma...@po... > t: 0113 2252500 > m: 07811 278951 > > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |
From: Jakob B. <jbr...@ho...> - 2002-05-06 06:49:45
|
hi chris, afaik the method storeMtoNImplementor of PersitenceBrokerImpl only stores data in the relation table but not in the project table, so the new project is not inserted. didn't you make changes in this area ? jakob ----- Original Message ----- From: "Jakob Braeuchi" <jbr...@ho...> To: "Oleg Nitz" <on...@uk...>; <obj...@li...> Sent: Monday, May 06, 2002 8:34 AM Subject: Re: [OJB-developers] Failing unit tests > hi oleg, chris, > > i only see the one failure > testInsertion(test.ojb.broker.MtoNMapping)junit.framework.AssertionFailedErr > or: expected:<3> but was:<2> > > jakob > > > ----- Original Message ----- > From: "Oleg Nitz" <on...@uk...> > To: <obj...@li...> > Sent: Sunday, May 05, 2002 9:12 PM > Subject: Re: [OJB-developers] Failing unit tests > > > > On Sunday 05 May 2002 21:25, Chris Greenlee wrote: > > > Using a fresh checkout of OJB from before the commits I've done in the > last > > > 24 hours, I get 4 failures when running "ant junit". They're all in > > > MtoNMapping.java. Is anyone else seeing this, or should I monkey around > > > with my local SQL Server? > > I see 1 failure: > > [junit] 1) > > > testInsertion(test.ojb.broker.MtoNMapping)junit.framework.AssertionFailedErr > or: > > expected:<3> but was:<2> > > [junit] at > > test.ojb.broker.MtoNMapping.testInsertion(MtoNMapping.java:165) > > > > Oleg > > > > _______________________________________________________________ > > > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > > the hardware. You get the recognition. Email Us: ban...@so... > > _______________________________________________ > > Objectbridge-developers mailing list > > Obj...@li... > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |
From: Jakob B. <jbr...@ho...> - 2002-05-06 06:34:26
|
hi oleg, chris, i only see the one failure testInsertion(test.ojb.broker.MtoNMapping)junit.framework.AssertionFailedErr or: expected:<3> but was:<2> jakob ----- Original Message ----- From: "Oleg Nitz" <on...@uk...> To: <obj...@li...> Sent: Sunday, May 05, 2002 9:12 PM Subject: Re: [OJB-developers] Failing unit tests > On Sunday 05 May 2002 21:25, Chris Greenlee wrote: > > Using a fresh checkout of OJB from before the commits I've done in the last > > 24 hours, I get 4 failures when running "ant junit". They're all in > > MtoNMapping.java. Is anyone else seeing this, or should I monkey around > > with my local SQL Server? > I see 1 failure: > [junit] 1) > testInsertion(test.ojb.broker.MtoNMapping)junit.framework.AssertionFailedErr or: > expected:<3> but was:<2> > [junit] at > test.ojb.broker.MtoNMapping.testInsertion(MtoNMapping.java:165) > > Oleg > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |
From: Matthew B. <ma...@so...> - 2002-05-06 05:34:38
|
At risk of sounding like the boy who cried wolf, by not making sure it actually was a bug ;) Here I go again. - InMemoryLockMapImpl's setWriter is called with an Object obj - while creating a new LockEntry, LockStrategyFactory.getIsolationLevel(obj.getClass()) is called - inside getIsolationLevel, the first thing we do is Class c = obj.getClass(); - later on inside getIsolationLevel we call getClassDescriptor(c) this series of steps is functionally equivalent to: Object fooObj = new SomeObjectFoo(); Object obj = fooObj.getClass(); Class c = obj.getClass(); at this point, we've lost what type of class it is, and we only have java.lang.Class as c since java.lang.Class isn't mapped in the repository (this doesn't make sense anyway) we run into problems. I saw these problems this weekend while upgrading to 0.8.400 There are a couple other places this happens, I can provide a list if someone can confirm this is a bug. cheers, Matthew public boolean setWriter(TransactionImpl tx, Object obj) { removeTimedOutLocks(AbstractLockStrategy.DEFAULT_LOCK_TIMEOUT); Identity oid = new Identity(obj); LockEntry writer = new LockEntry(oid.toString(), tx.getGUID(), System.currentTimeMillis(), LockStrategyFactory.getIsolationLevel(obj.getClass()), LockEntry.LOCK_WRITE); ObjectLocks objectLocks = (ObjectLocks) locktable.get(oid.toString()); if (objectLocks == null) { objectLocks = new ObjectLocks(); locktable.put(oid.toString(), objectLocks); } objectLocks.setWriter(writer); return true; } public static int getIsolationLevel(Object obj) { Class c = obj.getClass(); int isolationLevel = IsolationLevels.IL_READ_UNCOMMITTED; // for proxies use the class of the real subject if (Proxy.isProxyClass(c)) { IndirectionHandler handler = (IndirectionHandler) Proxy.getInvocationHandler(obj); c = handler.getIdentity().getObjectsClass(); } if (obj instanceof VirtualProxy) { IndirectionHandler handler = VirtualProxy.getIndirectionHandler((VirtualProxy) obj); c = handler.getIdentity().getObjectsClass(); } try { ClassDescriptor cld = ((TransactionImpl) OJB.getInstance().currentTransaction()).getBroker().getClassDescriptor(c); isolationLevel = cld.getIsolationLevel(); } catch (Exception e) { e.printStackTrace(); } return isolationLevel; } |
From: Chris G. <CGr...@de...> - 2002-05-06 01:35:59
|
AFAIK, MS SQL Server also performs generates optimized execution plans when you use the "inner join" and "outer join" syntax. It would be nice if we could come up with a good strategy for delegating to DBMS specific SQLGenerators for these sorts of things, and implement them as time allows. For the generic case, I think the "select * from A, B, C where A.id = B.id and B.id = C.id" syntax is probably best. Cheers, Chris Greenlee > Hi, > > Just a couple of comments that might help ... > > PostgreSQL can produce more efficient access plans when the "inner > join" syntax is used. I don't know whether that's true of other RDBMS. > See http://www.postgresql.org/idocs/index.php?explicit-joins.html. > > Outer join syntax is completely different for different RDMBS. I > thought these sorts of differences were already contained in > RDBMS-specific classes. Can't they be used/extended to supply the > correct inner join syntax too? > > Cheers, Matt. > > p.s. One day, i hope to stop lurking on this list. I'm just waiting for > a project to use OJB with. ;-) |
From: Matt G. <ma...@po...> - 2002-05-06 00:41:23
|
Hi, Just a couple of comments that might help ... PostgreSQL can produce more efficient access plans when the "inner join" syntax is used. I don't know whether that's true of other RDBMS. See http://www.postgresql.org/idocs/index.php?explicit-joins.html. Outer join syntax is completely different for different RDMBS. I thought these sorts of differences were already contained in RDBMS-specific classes. Can't they be used/extended to supply the correct inner join syntax too? Cheers, Matt. p.s. One day, i hope to stop lurking on this list. I'm just waiting for a project to use OJB with. ;-) On Sun, 2002-05-05 at 23:58, Oleg Nitz wrote: > Hi All, > > I propose to use equatilies in WHERE clause for INNER JOINs. > I mean that instead of > 1) SELECT ... FROM (A INNER JOIN B ON A.FK=B.ID) INNER JOIN C ON B.FK=C.ID > we can generate > 2) SELECT ... FROM A, B, C WHERE A.FK=B.ID AND B.FK=C.ID > I don't know any RDBMS that doesn't support the 2nd syntax. > Does anybody knows one? > But I know the RDBMS that doesn't support the 1st syntax: HSQL. > To be more precise, HSQL does not support nested joins such as above. > Maybe it supports some other flavor of 1st syntax, but let's don't increase > complexity if we can use 2nd syntax in all cases. > And the 2nd syntax seems shorter and simpler. > > Regards, > Oleg > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers -- Matt Goodall, Technical Director Pollenation Internet Ltd, http://www.pollenation.net e: ma...@po... t: 0113 2252500 m: 07811 278951 |