All entries for May 2005
May 31, 2005
So I created some galleries for various things including my recent visit to Scotland.
If anybody wants any more pictures of Scotland, there are 139 of them ;)
So I went to see SWIII (Revenge of the Sith) last week in bonny Scotland. Wasn't particularly impressed by it. It was very pretty to watch, and the story was quite good, but it just didn't "get me".
I thought Ewan McGregor (Obi-Wan) was pretty weak, and not very believable, but Hayden Christensen (Anakin) was excellent.
I also missed the millienium falcon which was supposed to appear?
I should state that I am not a huge fan of the Star Wars series, merely a "normal" movie goer, so I am only rating this as a single film. It may well wrap up lots of different threads and explain a whole lot of things, but if you just want to see a film for the film's sake, it was OK, but not brilliant.
Maybe 3/5, or even 4/5 on a good day :)
Just helped out a colleague who was wondering why Hibernate was not persisting the child when saving the parent.
Everything was set up correctly (parent->child was non-inverse, cascade included save etc.), however the identifier of the child was java.lang.*L*ong, but the object model property was java.lang.*l*ong.
The app deployed, and hibernate didn't complain about everything, but when it persisted the parent with the new child it executed an update, instead of an insert!
I would have expected hibernate to throw an exception because of the mismatch between declaration and object model, but otherwise it actually makes sense; the unsaved value for Objects is null, the default value of a primitive (long) is 0, so when hibernate determined whether the object was new or not, it would have checked the identifier to see if it was null, which of course, a primitive can never be ;)
Lesson; check your mapping files ;)
So I deployed a war on jboss and kept getting a ClassNotFoundException during springs deployment.
After scratching my head for far too long, I realised I was compiling using jdk1.5, but deploying on jdk1.4 :(
I would have expected an InvalidClass or some such exception, not just a class not found.
Of course it shouldn't work, but a more helpful exception would have been nice ;)
Excellent satire on America and their "we rule the world" attitude.
Not at all politically correct, but very very funny. Worth watching, so long as you are not easily offended.
If you do watch this, which you should, then listen carefully to the music/lyrics.
Just returned from my week long holiday in Scotland. Lovely. Absolutely fantastic.
Weather wasn't that good (except for one glorious day), but it didn't make that much difference. Walks/views were amazing, and the dogs absolutely loved it!
Photos to follow….
May 20, 2005
May 18, 2005
So I have ClassA which has a List of Addresses. Addresses are definately a dependent object, but when modelled in hibernate as a list of composite-elements there is always a null object in the list. The List is also populated with the records from the DB as you would expect, but the first element is always null :(
So I had a problem with sessions being closed even though OpenSessionInViewFilter was working successfully.
I think it was because my applicationContext had an "import -servlet.xml" statement in it and that was effectively causing the HibernateSessionFactory to be instantiated twice, or at least, to create 2 hibernate sessions.
I resolved this by moving all the DAO stuff into the applicationContext and not importing the servlet context. I didn't realise that servlet.xml can reference beans defined in the applicationContext.xml. Doh!
Writing about web page http://www.ajaxpatterns.org/index.php?title=Main_Page
Excellent ajax resource.
In particular, I really like http://www.walterzorn.com/dragdrop/dragdrop_e.htm ;)
Will be very interesting to see how well this takes off.