You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(41) |
May
(353) |
Jun
(133) |
Jul
(534) |
Aug
(401) |
Sep
(219) |
Oct
(86) |
Nov
(144) |
Dec
(61) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(200) |
Feb
(130) |
Mar
(345) |
Apr
(153) |
May
(247) |
Jun
(338) |
Jul
(222) |
Aug
(70) |
Sep
(39) |
Oct
(27) |
Nov
(76) |
Dec
(30) |
2007 |
Jan
(81) |
Feb
(44) |
Mar
(9) |
Apr
|
May
(3) |
Jun
(2) |
Jul
(34) |
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
(6) |
2008 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(7) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Andrew B. <a.g...@le...> - 2006-05-25 09:44:52
|
Would anyone be interested in another option for the setup servlet - 'copy data from existing Bodington'? It could be useful for those upgrading or changing database product. It occurred to me that it would be useful when I'm setting up SQL Server 2005, to be able to just replicate my existing PostgreSQL database and the uploaded files. Aggie |
From: Andrew B. <a.g...@le...> - 2006-05-25 09:37:58
|
The changes to Installer.java and SetupServlet.java for SQL Server 2005 are now on HEAD. Aggie |
From: Colin T. <col...@ou...> - 2006-05-25 09:26:44
|
Antony Corfield wrote: > Can someone remind me if Oxford have a resource for this and if it is > (or could be) on HEAD? I committed the code earlier this week (in one of the windows when SourceForge CVS was available -- it's been OK since). It also involved committing some utility XML/DOM classes (creation, transformation and serialisation) in org.bod.xml and XSL stylesheets in org.bod.xsl. There is some overlap and repetition of DOM processing and XSL stylesheets elsewhere, so we should probably consolidate it all at some point... -- ____________________________________ Colin Tatham VLE Team Oxford University Computing Services http://www.oucs.ox.ac.uk/ltg/vle/ http://bodington.org |
From: Peter C. <Pet...@me...> - 2006-05-24 20:29:53
|
PiBGcm9tOiBKb24gTWFiZXIgDQo+IEhpc3RvcmljYWxseSB0aGUgVENQL0lQIHByb3RvY29sIGlu IFNRTCBTZXJ2ZXIgaGFzIGJlZW4gdnVsbmVyYWJsZSB0byANCj4gaGFja3MgYnV0IFsuLi5dDQog DQpBbGwgZ29vZCBhZHZpY2UuICBTb3JyeSAtIG15IGNvbW1lbnQgYWJvdXQgc2VjdXJpdHkgd2Fz IHRlcnNlLiAgTGV0IG1lIHVucGFjayBpdCBpbnRvOg0KIA0KLSBTUUwgU2VydmVyIDIwMDUgaGFz IGEgZGlmZmVyZW50IHdheSBvZiBkZWFsaW5nIHdpdGggZGF0YWJhc2UgYW5kIHNjaGVtYSBuYW1p bmcgd2hpY2ggaXMgaW5jb21wYXRpYmxlIHdpdGggMjAwMCBhbmQgYmFjayBpbiBhIG51bWJlciBv ZiB3YXlzOw0KLSBNaXhlZCBtb2RlIGF1dGhlbnRpY2F0aW9uIGluIFNRTCBTZXJ2ZXIgMjAwNSBt YXkgYmUgZGlmZmVyZW50IGFzIHdlbGwsIEkndmUgbm90IGNoZWNrZWQuDQogDQotIFBldGVyDQo= |
From: Peter C. <Pet...@me...> - 2006-05-24 20:26:48
|
PiBGcm9tOiBBbmRyZXcgQm9vdGggDQo+IEJhZCBlbm91Z2ggdGhhdCB0aGUgd2ViIHNlcnZlcidz IElJUyA2LjAuDQpSYXRoZXIgdGhhbiAoc2F5KSB0aHR0cGQsIG9yIHJhdGhlciB0aGFuIHNvbWV0 aGluZyAqcmVhbGx5KiBpbnNlY3VyZSBsaWtlIElJUzU/DQogDQotIFBldGVyDQo= |
From: Andrew B. <a.g...@le...> - 2006-05-24 17:19:59
|
Yup. It's only accepting connections on localhost. Bad enough that the web server's IIS 6.0. Don Akrigg's having kittens. (For those outside Leeds, Don's our IT support chap). Aggie -----Original Message----- From: bod...@li... [mailto:bod...@li...] On Behalf Of Jon Maber Sent: 24 May 2006 17:58 To: bod...@li... Subject: Re: [Bodington-developers] Bodington and SQL Server 2005 Peter Crowther wrote: >> From: Andrew Booth >> In which case you probably need to put 2005 into 2000-compatible mode. >> > > Apparently not. In order to *connect*, merely ensure the TCP/IP > protocol is enabled on the server (from computer management ==> > services and applciation ==> sql server 2005 configuration ==> network > configuration) and live on port 1433. God only knows about security. I > might have a hack at it here in a few days, when I have a SQL Server > 2005 live on our network. > Historically the TCP/IP protocol in SQL Server has been vulnerable to hacks but even if this vulnerability has been closed its a good idea to block access from all network devices but localhost. If you have some reason to connect to the database via that protocol using another computer then some kind of software or hardware firewall setup would be essential. Jon ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ Bodington-developers mailing list Bod...@li... https://lists.sourceforge.net/lists/listinfo/bodington-developers |
From: Jon M. <jo...@te...> - 2006-05-24 16:57:49
|
Peter Crowther wrote: >> From: Andrew Booth >> In which case you probably need to put 2005 into 2000-compatible mode. >> > > Apparently not. In order to *connect*, merely ensure the TCP/IP > protocol is enabled on the server (from computer management ==> > services and applciation ==> sql server 2005 configuration ==> network > configuration) and live on port 1433. God only knows about security. I > might have a hack at it here in a few days, when I have a SQL Server > 2005 live on our network. > Historically the TCP/IP protocol in SQL Server has been vulnerable to hacks but even if this vulnerability has been closed its a good idea to block access from all network devices but localhost. If you have some reason to connect to the database via that protocol using another computer then some kind of software or hardware firewall setup would be essential. Jon |
From: Andrew B. <a.g...@le...> - 2006-05-24 12:39:40
|
The problem seems to be that they use a commercial product for their drop-down menus etc. That's what's broken and I'm not wasting time trying to sort it. I'm now testing against the version 3 installation on one of the main university servers. Seems to work OK. I've shown the problem to Questionmark and they are working on it now. Aggie -----Original Message----- From: bod...@li... [mailto:bod...@li...] On Behalf Of Peter Crowther Sent: 24 May 2006 13:34 To: bod...@li... Subject: RE: [Bodington-developers] Bodington and SQL Server 2005 > From: Andrew Booth > The installation of SQL Server 2005 automatically installs > .NET 2.0 and all > sorts of things break - including the version 4.2 of Questionmark > Perception. Is Perception an ASP.Net app? If so, I'd expect to be able to go to the site properties and set what version of .Net it was using. If it uses back-end services as well / instead, you have a little more of a configuration job on your hands... - Peter ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=k&kid7521&bid$8729&dat1642 _______________________________________________ Bodington-developers mailing list Bod...@li... https://lists.sourceforge.net/lists/listinfo/bodington-developers |
From: Peter C. <Pet...@me...> - 2006-05-24 12:34:16
|
> From: Andrew Booth > The installation of SQL Server 2005 automatically installs=20 > .NET 2.0 and all > sorts of things break - including the version 4.2 of Questionmark > Perception. Is Perception an ASP.Net app? If so, I'd expect to be able to go to the site properties and set what version of .Net it was using. If it uses back-end services as well / instead, you have a little more of a configuration job on your hands... - Peter |
From: Andrew B. <a.g...@le...> - 2006-05-24 12:29:18
|
Yes, been there, done that, got the T-shirt. Took me a little while to work out how to set up the TCP/IP. At first glance it seems to be enabled, but when you start poking about in various tabs, you find that although TCP/IP may be enabled, no interface or port is listening. If you have any .NET stuff that you are fond of (seek treatment) be careful. The installation of SQL Server 2005 automatically installs .NET 2.0 and all sorts of things break - including the version 4.2 of Questionmark Perception. Aggie -----Original Message----- From: bod...@li... [mailto:bod...@li...] On Behalf Of Peter Crowther Sent: 24 May 2006 12:28 To: bod...@li... Subject: RE: [Bodington-developers] Bodington and SQL Server 2005 > From: Andrew Booth > In which case you probably need to put 2005 into 2000-compatible mode. Apparently not. In order to *connect*, merely ensure the TCP/IP protocol is enabled on the server (from computer management ==> services and applciation ==> sql server 2005 configuration ==> network configuration) and live on port 1433. God only knows about security. I might have a hack at it here in a few days, when I have a SQL Server 2005 live on our network. - Peter ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=k&kid7521&bid$8729&dat1642 _______________________________________________ Bodington-developers mailing list Bod...@li... https://lists.sourceforge.net/lists/listinfo/bodington-developers |
From: Peter C. <Pet...@me...> - 2006-05-24 11:28:33
|
> From: Andrew Booth > In which case you probably need to put 2005 into 2000-compatible mode. Apparently not. In order to *connect*, merely ensure the TCP/IP protocol is enabled on the server (from computer management =3D=3D> services and applciation =3D=3D> sql server 2005 configuration =3D=3D> = network configuration) and live on port 1433. God only knows about security. I might have a hack at it here in a few days, when I have a SQL Server 2005 live on our network. - Peter |
From: Andrew B. <a.g...@le...> - 2006-05-24 11:08:19
|
In which case you probably need to put 2005 into 2000-compatible mode. Aggie -----Original Message----- From: bod...@li... [mailto:bod...@li...] On Behalf Of Peter Crowther Sent: 24 May 2006 11:55 To: bod...@li... Subject: RE: [Bodington-developers] Bodington and SQL Server 2005 > From: Andrew Booth > Having obtained a copy of SQL Server 2005 via the SOCKET > project, I decided > to see if it worked with Bodington via the Microsoft JDBC > driver for SQL Server 2005. Guess what? > > Microsoft have changed both the JDBC driver name and the URL. I would assume you can connect to SQL Server 2005 via the older TDS driver as long as you have a suitable server netlib enabled, though it'll probably be slower. - Peter ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=k&kid7521&bid$8729&dat1642 _______________________________________________ Bodington-developers mailing list Bod...@li... https://lists.sourceforge.net/lists/listinfo/bodington-developers |
From: Andrew B. <a.g...@le...> - 2006-05-24 11:06:39
|
Yes, apparently the changes were made in order to allow SQL Server 2000 and 2005 to co-exist. The fix copes with both versions. Aggie -----Original Message----- From: bod...@li... [mailto:bod...@li...] On Behalf Of Colin Tatham Sent: 24 May 2006 11:50 To: bod...@li... Subject: Re: [Bodington-developers] Bodington and SQL Server 2005 Andrew Booth wrote: > Microsoft have changed both the JDBC driver name and the URL. Does that mean you use the old name and URL if you're running a pre-2005 version and old jdbc driver, and the new ones if using the new versions? > I've fixed the SetupServlet - OK to commit to head? Does the fix need to cope with both versions of names and URLs? Colin -- ____________________________________ Colin Tatham VLE Team Oxford University Computing Services http://www.oucs.ox.ac.uk/ltg/vle/ http://bodington.org ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ Bodington-developers mailing list Bod...@li... https://lists.sourceforge.net/lists/listinfo/bodington-developers |
From: Andrew B. <a.g...@le...> - 2006-05-24 11:05:00
|
Yes. Aggie -----Original Message----- From: bod...@li... [mailto:bod...@li...] On Behalf Of Matthew Buckett Sent: 24 May 2006 11:49 To: bod...@li... Subject: Re: [Bodington-developers] Bodington and SQL Server 2005 Andrew Booth wrote: > Having obtained a copy of SQL Server 2005 via the SOCKET project, I decided > to see if it worked with Bodington via the Microsoft JDBC driver for SQL > Server 2005. Guess what? > > Microsoft have changed both the JDBC driver name and the URL. > > The driver name has changed from: > > com.microsoft.jdbc.sqlserver.SQLServerDriver > > to > > com.microsoft.sqlserver.jdbc.SQLServerDriver > > and the URL from: > > jdbc:microsoft:sqlserver:// > > to > > jdbc:sqlserver:// > > I've fixed the SetupServlet - OK to commit to head? > If there no objections by the end of today, I'll commit the changes > tomorrow. Does the fix allow both versions to work? -- -- Matthew Buckett, VLE Developer -- Learning Technologies Group, Oxford University Computing Services -- Tel: +44 (0)1865 283660 http://www.oucs.ox.ac.uk/ltg/ ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ Bodington-developers mailing list Bod...@li... https://lists.sourceforge.net/lists/listinfo/bodington-developers |
From: Peter C. <Pet...@me...> - 2006-05-24 10:54:59
|
> From: Andrew Booth > Having obtained a copy of SQL Server 2005 via the SOCKET=20 > project, I decided > to see if it worked with Bodington via the Microsoft JDBC=20 > driver for SQL Server 2005. Guess what? >=20 > Microsoft have changed both the JDBC driver name and the URL. I would assume you can connect to SQL Server 2005 via the older TDS driver as long as you have a suitable server netlib enabled, though it'll probably be slower. - Peter |
From: Colin T. <col...@ou...> - 2006-05-24 10:50:35
|
Andrew Booth wrote: > Microsoft have changed both the JDBC driver name and the URL. Does that mean you use the old name and URL if you're running a pre-2005 version and old jdbc driver, and the new ones if using the new versions? > I've fixed the SetupServlet - OK to commit to head? Does the fix need to cope with both versions of names and URLs? Colin -- ____________________________________ Colin Tatham VLE Team Oxford University Computing Services http://www.oucs.ox.ac.uk/ltg/vle/ http://bodington.org |
From: Matthew B. <mat...@ou...> - 2006-05-24 10:48:50
|
Andrew Booth wrote: > Having obtained a copy of SQL Server 2005 via the SOCKET project, I decided > to see if it worked with Bodington via the Microsoft JDBC driver for SQL > Server 2005. Guess what? > > Microsoft have changed both the JDBC driver name and the URL. > > The driver name has changed from: > > com.microsoft.jdbc.sqlserver.SQLServerDriver > > to > > com.microsoft.sqlserver.jdbc.SQLServerDriver > > and the URL from: > > jdbc:microsoft:sqlserver:// > > to > > jdbc:sqlserver:// > > I've fixed the SetupServlet - OK to commit to head? > If there no objections by the end of today, I'll commit the changes > tomorrow. Does the fix allow both versions to work? -- -- Matthew Buckett, VLE Developer -- Learning Technologies Group, Oxford University Computing Services -- Tel: +44 (0)1865 283660 http://www.oucs.ox.ac.uk/ltg/ |
From: Andrew B. <a.g...@le...> - 2006-05-24 10:42:21
|
Having obtained a copy of SQL Server 2005 via the SOCKET project, I decided to see if it worked with Bodington via the Microsoft JDBC driver for SQL Server 2005. Guess what? Microsoft have changed both the JDBC driver name and the URL. The driver name has changed from: com.microsoft.jdbc.sqlserver.SQLServerDriver to com.microsoft.sqlserver.jdbc.SQLServerDriver and the URL from: jdbc:microsoft:sqlserver:// to jdbc:sqlserver:// I've fixed the SetupServlet - OK to commit to head? If there no objections by the end of today, I'll commit the changes tomorrow. Aggie |
From: Jon M. <jo...@ci...> - 2006-05-23 20:00:38
|
Andrew Booth wrote: > See you a week on Thursday then. > Large Masters Teaching Room. 10.130, Garstang Building. > I sincerely hope so but this trial is estimated to end on Wednesday next week and I could be on another case starting Thursday. If I don't get on another case I still have to be there for roll call at 10:30am every day until the end of next week but may be sent home by 11:00am. If I'm really unlucky I'll get onto a new case at the end of next week and it could run into the following week. On the other hand someone might threaten to nobble the jury and we will all get to stay in a nice hotel for a couple of weeks.... Obviously I can't tell you anything about the case but I think that 12 people might need a good long holiday after this. Jon |
From: Andrew B. <a.g...@le...> - 2006-05-23 17:49:34
|
See you a week on Thursday then. Large Masters Teaching Room. 10.130, Garstang Building. Aggie >Jon > >P.S. I was let out of court early today, hence this Email. |
From: Peter C. <Pet...@me...> - 2006-05-23 15:08:29
|
> From: Jon Maber > A secondary key is a field that refers to a record in=20 > a different table More commonly known as a foreign key. Quick, deport it immediately! - Peter |
From: Jon M. <jo...@te...> - 2006-05-23 14:54:53
|
You're getting confused about primary and secondary keys. A primary key is the field in the table that uniquely identifies each record in that table. A secondary key is a field that refers to a record in a different table, i.e. to that other table's primary key. The Java type PrimaryKey is used to embody the key for any table in Bodington. Since the data type for secondary keys must be identical to the data type for primary keys the same Java class is used for both. (In other words, a secondary key is a copy of a primary key from another table and so it's data type is also 'PrimaryKey' although it is being used as a secondary key.) [By the way, I haven't made all this up - it's pretty standard database terminology] The standard finder method for any PersistentObject looks for an object based on the primary key database field. Since you provided the primary key for a User object, then a User object is what you got. A User object is not a UserDetail object so obviously you got a casting error. If you want to find a UserDetail object by its primary key then you need to pass the primary key of the UserDetail object - i.e. a PrimaryKey instance that refers to the value in the field user_detail_id. However, what you wanted to do was a *secondary* key lookup on the table user_details using a primary key from the table users. There are two options - use the finder method that takes an SQL WHERE clause or add a new finder method findUserDetailByUserId( PrimaryKey user_id ); The latter protects you from accidentally producing silly WHERE clauses which throw exceptions at run time and would contain a single line of code which I provide below. public static UserDetail findUserDetailByUserId( PrimaryKey user_id ) throws BuildingServerException { return (UserDetail)findPersistentObject( "user_id IS " + user_id, "org.bodington.server.realm.UserDetail" ); } In most databases a single integer value for a primary key could be used in all the tables. I.e. the full unique identifier for a record must use a combination of the table name and the primary key. So you can't expect the database to work out which field to match the key you provided against. The SQL database can't know that the key you provided should be matched against a secondary key if it failed to find a match against the primary key. It's the old adage: computers don't do what you want them to do, only what you tell them to do. Jon P.S. I was let out of court early today, hence this Email. Alistair Young wrote: > That's really weird. So the only way you can get a UserDetail from a > PrimaryKey is if you have the PrimaryKey of the UserDetail which you > got from the UserDetail? and PrimaryKey can mean anything! It's a > VARIANT in COM speak. Roll on Tetra! > > Alistair > > > On 22 May 2006, at 21:22, Matthew Buckett wrote: > >> Alistair Young wrote: >>> Before I dive off into bodguts, has anyone seen this before, or any >>> suggestions as to why it happens? >>> UserDetail bodUserDetail = >>> UserDetail.findUserDetail(user.getPrimaryKey()) >>> where user = org.bodington.server.realm.User >> >> Yep this is because UserDetail has it's own primary key and the >> primary key of the refering User. Your asking for the UserDetail >> object with the primary key of the User which doesn't exist. >> >>> always gives a ClassCastException. Is a User.PrimaryKey different >>> from a UserDetail.PrimaryKey? >> >> You get this because the database layer is trying to case a User >> object found by its primary key into a UserDetail object. >> >>> Always have to use sql to get UserDetail from a User. >> >> Yep. UserDetail.findUserDetail("user_id = ?"); Or make a >> findUserDetailByUser which does the SQL behind the scenes. You may >> also want to make user_id an indexkey if performance becomes a problem. >> >> -- -- Matthew Buckett, VLE Developer >> -- Learning Technologies Group, Oxford University Computing Services >> -- Tel: +44 (0)1865 283660 http://www.oucs.ox.ac.uk/ltg/ >> >> >> ------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, >> security? >> Get stuff done quickly with pre-integrated technology to make your >> job easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache >> Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> _______________________________________________ >> Bodington-developers mailing list >> Bod...@li... >> https://lists.sourceforge.net/lists/listinfo/bodington-developers > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Brian P. C. <bm...@bm...> - 2006-05-23 13:33:28
|
> That's really weird. So the only way you can get a UserDetail from a > PrimaryKey is if you have the PrimaryKey of the UserDetail which you > got from the UserDetail? and PrimaryKey can mean anything! It's a > VARIANT in COM speak. Roll on Tetra! <*>This is an automated response, please do not reply.<*> This program searches for the term "Tetra" and issues the reply: Go Tetra....<DAOSystemException: no statement begin/> bus .<DAOSystemException: no statement middle/> JBI. <*>End of automatic response.<*> <*>End of automatic response.<*> <*>End of automatic res com.sun.appserv.server.ServerLifecycleException: java.rmi.server.ExportException: Listen failed on port: 0; nested exception is: java.net.SocketException: Cannot assign requested address at com.sun.enterprise.admin.server.core.channel.Admin Channel.createRMIChannel(AdminChannel.java:79) at com.sun.enterprise.admin.server.core.AdminChannelL ifecycle.onInitialization(AdminChannelLifecycle.ja va:43) at com.sun.enterprise.server.ss.ASLazyKernel.initiali zeAdminService(ASLazyKernel.java:131) at com.sun.enterprise.server.ss.ASLazyKernel.startASS ocketServices(ASLazyKernel.java:51) at com.sun.enterprise.server.PEMain.run(PEMain.java:2 74) at com.sun.enterprise.server.PEMain.main(PEMain.java: 220) Caused by: java.rmi.server.ExportException: Listen failed on port: 0; nested exception is: java.net.SocketException: Cannot assign requested address at sun.rmi.transport.tcp.TCPTransport.listen(TCPTrans port.java:245) ... 731 more > > Alistair > > > On 22 May 2006, at 21:22, Matthew Buckett wrote: > > > Alistair Young wrote: > >> Before I dive off into bodguts, has anyone seen this before, or > >> any suggestions as to why it happens? > >> UserDetail bodUserDetail = UserDetail.findUserDetail > >> (user.getPrimaryKey()) > >> where user = org.bodington.server.realm.User > > > > Yep this is because UserDetail has it's own primary key and the > > primary key of the refering User. Your asking for the UserDetail > > object with the primary key of the User which doesn't exist. > > > >> always gives a ClassCastException. Is a User.PrimaryKey different > >> from a UserDetail.PrimaryKey? > > > > You get this because the database layer is trying to case a User > > object found by its primary key into a UserDetail object. > > > >> Always have to use sql to get UserDetail from a User. > > > > Yep. UserDetail.findUserDetail("user_id = ?"); Or make a > > findUserDetailByUser which does the SQL behind the scenes. You may > > also want to make user_id an indexkey if performance becomes a > > problem. > > > > -- > > -- Matthew Buckett, VLE Developer > > -- Learning Technologies Group, Oxford University Computing Services > > -- Tel: +44 (0)1865 283660 http://www.oucs.ox.ac.uk/ltg/ > > > > > > ------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > > security? > > Get stuff done quickly with pre-integrated technology to make your > > job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > http://sel.as-us.falkag.net/sel? > > cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Bodington-developers mailing list > > Bod...@li... > > https://lists.sourceforge.net/lists/listinfo/bodington-developers > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Matthew B. <mat...@ou...> - 2006-05-23 12:19:14
|
Alistair Young wrote: > That's really weird. So the only way you can get a UserDetail from a > PrimaryKey is if you have the PrimaryKey of the UserDetail which you got > from the UserDetail? It's because the "standard" way to subclass PersistentObject is to have a findObject(PrimaryKey) which loads the object by its primary key. Classes that have been used allow have the nicer methods but allot of the other classes don't. > and PrimaryKey can mean anything! Should we subclass PrimaryKey for each type so we get argument checking by the compiler? Probably not worth the effort. > It's a VARIANT in > COM speak. Roll on Tetra! I'd just like to replace the PersistentObject/SqlDatabase/SoftCache classes with something else like Hibernate, but that ain't going to happen by tomorrow. If all the database stuff was done from the session layer this would be easier but we have masses of code in Facility (and subclasses) that goes direct :-( -- -- Matthew Buckett, VLE Developer -- Learning Technologies Group, Oxford University Computing Services -- Tel: +44 (0)1865 283660 http://www.oucs.ox.ac.uk/ltg/ |
From: Alistair Y. <ali...@sm...> - 2006-05-23 11:52:43
|
That's really weird. So the only way you can get a UserDetail from a PrimaryKey is if you have the PrimaryKey of the UserDetail which you got from the UserDetail? and PrimaryKey can mean anything! It's a VARIANT in COM speak. Roll on Tetra! Alistair On 22 May 2006, at 21:22, Matthew Buckett wrote: > Alistair Young wrote: >> Before I dive off into bodguts, has anyone seen this before, or >> any suggestions as to why it happens? >> UserDetail bodUserDetail = UserDetail.findUserDetail >> (user.getPrimaryKey()) >> where user = org.bodington.server.realm.User > > Yep this is because UserDetail has it's own primary key and the > primary key of the refering User. Your asking for the UserDetail > object with the primary key of the User which doesn't exist. > >> always gives a ClassCastException. Is a User.PrimaryKey different >> from a UserDetail.PrimaryKey? > > You get this because the database layer is trying to case a User > object found by its primary key into a UserDetail object. > >> Always have to use sql to get UserDetail from a User. > > Yep. UserDetail.findUserDetail("user_id = ?"); Or make a > findUserDetailByUser which does the SQL behind the scenes. You may > also want to make user_id an indexkey if performance becomes a > problem. > > -- > -- Matthew Buckett, VLE Developer > -- Learning Technologies Group, Oxford University Computing Services > -- Tel: +44 (0)1865 283660 http://www.oucs.ox.ac.uk/ltg/ > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers |