Wednesday, January 16. 2008
Sun aquires mysql! Read more here: Jonathan Schwartz's blog
Wednesday, September 19. 2007
Heard a great quote today when attending a TOI today on brandZ.
The talk covered the new Solaris branded zone functionality that allows you to run userland binaries from different operating systems within solaris. It was an lx zone allowing the execution of linux binaries and as a demo the easy comparison of the /proc filesystem between the lx zone and the solaris native OS was shown.
Quote was as follows
"As you can see, Solaris /proc contains only processes, as God and Roger Faulkner intended".
Excellent!
Monday, July 23. 2007
At work many of us communicate via instant message mechanisms such as jabber. Imagine the shock when our Sun Ray Server was upgraded and our favourite IM tool gaim was replaced by pidgin. Great!! Except the bundled version comes with no Jabber support!
Well, for those of you currently cursing, here are the simple compile options to build Pidgin with jabber support on Sparc/X86 Solaris.
Simply : ./configure --disable-perl --disable-tcl --prefix=/path/to/where/you/want/it
Unfortunately one has to disable perl and Tcl support as they cause the compile to fail. But the above line will successfully make Pidgin with jabber support and with the purple-remote (aka gaim-remote) so that all of our utaction scripts will work again.
Bonza!
Thursday, February 22. 2007
I was asked to produce a little gui application in Java for one of my colleagues here in Solaris Sustaining.
However, making something that works in all instances on multiple versions of both the Solaris OS and the JavaVM seemed to prompt an error when serialising and deserialising objects to/from disk.
If you write an object to disk using version X of the Java VM, and then run the application with version Y, you will notice an interesting error message:
Couldnt write to /home/usernameremoved/.escs.data
javax.swing.AbstractListModel; local class incompatible: stream classdesc serial
VersionUID = 6318899794864351705, local class serialVersionUID = -7413386323730897788
This would prevent pre-serialised objects written with version X from being read when using version Y.
Well, its actually something very simple to fix. The serialVersionUID for any given class is VM dependent. Unless you do the following:
serialVersionUID is an overloadable variable (of course) so in the class for the object being written to disk, add the following line
static final long serialVersionUID = -7413386323730897788L
Where -7413386323730897788 is the serialVersionUID from the error message. Remember to declare it as static and final to ensure that only one instance of this exists and cannot be overwritten. Dont forget to use the 'L' at the end of the declaration otherwise javac will throw its toys out of the pram and complain that the number exceeds its boundaries for an int
Now, recompile your classes and serialise your object using JavaVM version X, then quit the application, start it using JavaVM Y and load the object.
If you are using a default Java Class, such as DefaultListModel etc, then you will need to extend the class and create your own version that includes the above final long declaration. Simplest way to do this (using DefaultListModel as an example)
import javax.swing.DefaultListModel;
public class FixedDefaultListModel extends DefaultListModel {
//Fixes serialVersionUID message - not e the 'L'
//which prevents the "integer too long" message
static final long serialVersionUID = -7413386323730897788L;
public FixedDefaultListModel() {
super();
}
}
Hurrah! No error message any more, and the object is now loadable in all versions of the JVM.
Sunday, July 9. 2006
I'm to start my new job on monday as part of the Solaris Sustaining team responsible for providing bugfixes to the well known UNIX operating system.
One of the perks of the new position is a spanky new AMD64 Laptop. In a truely sad style I decided to post a screenshot here.
Thanks to Casper Dik and Darren Moffat for porting the battery monitor applet!
Thursday, March 2. 2006
Nice blog entry on logging commands using ksh here
Useful if you have some general interest and want to learn a thing or two! Thanks Chris!
Friday, January 27. 2006
So, it ended up at that time again, when the request was made for yet another application to be made web-start-able.. Java has a lovely framework in place for this and I set about the task with the view that it would only take a couple of minutes...
Well...it would have if the application didn't need custom configuration files to start...
Basically the application took a "-p " argument.... This was causing me problems..
The answer of course is to stop using the absolute path and having multiple copies of the config file (one on each machine that it runs on) and to include the config file in the main jar itself.
So.. Fine I thought... no problem.. I'll use "getResource" (infact "getResourceAsStream"), I had done this before with Images and so knew it was possible... if only I could find my previous source...
Except for that, you first need a handle to the calling class.. so one needs to call getClass()..
The problem here is that the loading of the configuration file happens in the static void main() method...and yep.. you guessed it.. you get the old
"cannot reference non-static method from static context"
Unfortunately, you cant simply call :
MyClass.getClass().getClassLoader().getResourceAsStream("filename");
and so it seems that the only solution is to create a new class.. its only small and looks something like this:
import java.io.InputStream;
class ResourceLoader{
InputStream input;
public ResourceLoader(String fileName){
InputStream in = getClass().getClassLoader().getResourceAsStream(fileName);
input = in;
}
public InputStream getInputStream(){
return input;
}
}
And then from your main method where you were calling
Properties.getProps(MyFileInputStream)
to initialise your properties file, you can now simply call :
Properties.getProps(new ResourceLoader("pathToMyFile")).getInputStream()
et Voila! Problem sorted.. Now its here I'll know where to look next time!
Tuesday, January 24. 2006
I'd been meaning for a while to blog about Suns recent marketing campaign.. Seeing as I particularly dislike dell I thought id put a quick note on here showing you all the new posters!
Saturday, June 18. 2005
Just to update you on the progress made by my 'S.A.' friend... he told me today that he now had the mouse working on the thin client..
"Really? I said"
"No" he replied... "Only using X to X"
Lets hope his interviewer doesn't read this blog!
Well, hes going for a contract job as an Sys Admin...
Anddd.....
He just spent 3 hours trying to get a mouse of any kind!!! YES !!! Thats Serial, PS/2 or USB, working..... To no avail!!!
He tried on two different machines, with all three types of mouse and failed.... BWAHAHAHAHA
I hope he doesnt get asked to do that in his interview!! ROFL
Having just finished my Software Engineering degree, I am eager to start work. I'd pretty much resigned myself to having to start work at Tesco after several unsuccessful job applications. However, no sooner had I sat my last exam when Sun Microsystems (with whom I did my Industrial Experiance) call me asking if I would be interested in an position in Paris (Well, just outside). Of course I was interested! To cut a boring (not for me, but for you; the reader) story short, a fews days later (3 days after finishing University) I was contacted and informed that the job was mine!So, I'm starting at the Camberley - Guillemont Park site middle of July, with the possibility of being in Paris by August... Oh my... Scarey... It's gonna be a new experiance, and probably one of the most exciting prospects is the chance to be truly bi-lingual (i can speak pigeon german, but not fluent), that must improve my karma ... so many of us brits love to be uni-lingual... Anyhow, thought id let the few readers I have know that soon I'll be posting from accross the briney! I'll keep you posted.. Hey who knows, maybe I can get a Sun Blog!
Thursday, March 17. 2005
-- -- Now using a modified version of the serendipity weather plugin -- I have a new addition to my blog (you may have noticed) showing my local weather details. Hopefully I'll get around to packaging and releasing it...hmmmm Statistics are collected every hour from the UK Met office. This is included in the blog simply with the smarty tag {weatherblog}.. cool eh!
Sunday, March 6. 2005
--
---This post is now null and void after switching to serendipity..
--
After looking further into photobBlog I have found the current release of bBlogs photobBlog plugin farely 'raw' in its design approach. I have found the ability to have only one image per post very restricting. This restriction is in the first place due to the naming convention imposed by photobBlog when uploading the image the first time.
Currently the release renames the image being uploaded to match the postid, for instance, the image uploaded along with this post would be renamed to 25.jpg and thumb_25.jpg (see post 24 for example).
This would seem to be a slight oversight, as when I upload a new picture to my directory, the old image I had inplace for that post will be overwritten and lost. So... I have changed the behaviour to keep the original filename when upload an image. This file gets added to the uploaded images directory and a thumbnail created.
This now means that in the database table, the full name gets stored, along with the post_id. This means I can now start to implement the multiple pictures by post, by creating a primary key from the post_id and the image name.
The images above are indeed stored with their original filename, allowing me to add more than one image per post.
--
--This post is now null and void after switching to serendipity
--
ok, so I have just installed the photobBlog plugin to allow me to post photos inline...
Here is the first try : Butterflies, these are a couple of images taken at the Amsterdam botanical gardens.
This plugin relies on gd to do all of the image manipulation, I have changed the behaviour to use the command line 'convert' utility.
Currently this is limited to one photo per post, but I am going to change this so that you can have multiple...but hey, that can wait for another day...
Get it from http://www.dobossy.com/photobBlog/photobblog.0.1.tar.gz .
Thursday, January 20. 2005
Ok, I've set a small how-to (it was part of some uni work I had to do - a module with a deceptive name - WebMastery) on chrooting Apache on Debian.
It only covers the basics, but hey, it works...
http://mumra.no-ip.com/webMastery
enjoy.
Wednesday, August 25. 2004
This Week I have been addressing my problem of insecure data storage of sensitive documents (not that I have any!). My first approach was secure NFS, this would be a robust solution for secure data transfer and access, but the underlying files would still be 'vanilla' and readable (by root|hacky-buggers). So...CryptoFS, I'd heard that term thrown about abit around my workplace, so I decided to investigate. Still in its infancy, CryptoFS ( http://reboot.animeirc.de/cryptofs/ ) has a nice concept behind it; Using luFS (Linux Userland FileSystem : http://lufs.sourceforge.net/lufs/intro.html), an already massively robust tool, boasting abilities to mount resources via ftpFS, sshFS (Be looking into this one later) and my chosen encrypted solution : CryptoFS. The next installment will cover the installation and implementation of CryptoFS, but right now, im going to bed.. :wq
|