Archive for December, 2007

java.net.MalformedURLException: unknown protocol: j

I know that that there better things to call a blog post than to use part of an error message that I got from Saxonica‘s Saxon while I was converting XML files into PHP equivalents for the visitor information section of my main website. I use the open source Saxon-B rather than the commercial Saxon-SA and it fulfils all of my needs and version 8 and later (it has now reached 9.0.0.2) handle the XSLT 2.0 features that I need to make the transformations really clever. Also, because Saxon is available as a jar file, it is cross platform so long as you have Java on board. There are, however, some slight differences in behaviour. I now run thte thing in Linux and any Windows-style file locations are not recognised. I had the file path in a DTD declaration starting with "J:\" and that was thought to be a protocol like file, http, https, ftp and so on because of the colon. There’s no j protocol so Java gets confused and, voilà!, you get the rather obscure error that titles this post. Otherwise, the migration of the Perl script that creates XSLT files and fires off the required XML to PHP transformations was a fairly straightforward exercise once file locations and shebang line were set right.

Succumbing to Temptation: Ubuntu Studio

The fancy artwork that comes with Ubuntu Studio does look appealing so I got lured into converting my vanilla Ubuntu 7.10 into something a bit more avant garde. The theme’s all very dark (you can have a peek here; file size is 1.1 MB) but it looks very smart, even if the merging of application title bar and top desktop panel due to their having the same colour and texture is a little disconcerting. My momentary lapse of discipline also got me adding a whole array of audio, graphics and movie applications that I may never use; it’s good to have them if I ever fancy a fiddle but removal is not off the agenda either. The other thing that came with the package was an alternate kernel that looks as if it might be of the real time variety, at least if the "rt" in its package name is to be believed. The main reason for mentioning that is that VMware has ceased working so I need to snag the correct kernel source code to get things going again. Let’s hope that it’s a successful venture…

Update: After a spot of poking, Synaptic offered up the required kernel header files and VMware was reinstated with only a modicum of effort. All’s well that ends well.

iPod, identified

Plug in an iPod to a PC running Ubuntu and it will recognise what it has got. That act mounts the player as a hard drive and fires up the Rhythmbox Music Player. The usual file transfer capabilities are available and it does something that was thwarted partially by iTunes when I last tried it: transferring files from your iPod to your PC. Only music bought from the iTunes store can copied from the player back to the PC. Unsurprisingly, you cannot update the iPod’s firmware or anything like that. To do such things, you need the iTunes player and that means having either Windows or OS X. While I do wonder if it can’t be that hard to port the OS X version to Linux since they both share UNIX roots, it’s over to the Windows VM for me on this one for now.

Connecting to Host USB Devices from VMware

However, while VMware on Windows will happily pick up USB devices as they are connected so long as the VM is in focus, the behaviour on Linux seems to be different. As shown above, you have to go to the VM menu and potter down the chain (Removable Devices > USB Devices) to make the device of interest accessible. Dialogue boxes asking you if you want to disconnect the device from the host operating system will appear and the process may be unsubtle as you progress with it. In fact, Ubuntu was delivering warning messages about how its iPod connection got lost; it would have been wise to unmount the thing in the first place. Accessing USB devices like this opens up other possibilities: using Windows for scanning and for printing digital images.

Returning to the iPod story, Windows will see it once it has been made available and iTunes can access it accordingly. Then, you are free to update the gadget’s firmware or manage the music stored on it, if you prefer.

It isn’t all iTunes in the UK

The iTunes store was a breath of fresh air following an experience of several OD2 offerings; broken downloads were a regular nuisance but that may have been down to my not having a broadband connection at the time. Its seamless mix of purchasing, downloading and playing impressed me so much that I used no other media player for my music in the days when I almost exclusively used Windows.

Now that i have jumped ship to Linux, having to fire up a Windows VM to hear my music is starting to feel a little over the top. The result is that I am keen to use DRM-free digital music when I can. Because I like to stay legal, it means that I would like to buy DRM-free files on the web. Here, iTunes leaves me down a little since most of what they offer is locked down and I have to burn a CD and extract from it to release music from its iTunes-only shackles.

So when I saw on an article on Tech.co.uk that made mention of 7Digital and that they purveyed unlocked music, my interest perked up. The file formats on offer are WMA, MP3 and AAC and there are high quality 320K variants of the latter two of these about too. Only the WMA files have any DRM associated with them. Previewing whole albums is a simple matter of clicking on a single button, a trick that iTunes would do well to learn. Payment using PayPal augments the usual credit card options and any purchases seem to be available for download more than once; pottering over to the My Locker part of your account gives you access to your purchases, another of its trump cards over iTunes. Downloading is on a file by file basis though and it is here that I notice an area usually addressed by a player like iTunes: the ability to download whole albums at once and background directory creation. Not having to have player has one advantage though: platform independence. Anyway, spot of shell scripting would resolve any file management gaps. Overall, there’s a lot to commend 7Digital and I wouldn’t be surprised if I were to return some time again. it might even usurp iTunes as my digital music store of choice…

A case of bad behaviour?

On my blogs, I use the Bad Behaviour plugin to keep spammers at bay. It usually works very well so imagine my surprise when it started kicking me out when I tried logging into the system. I started to wonder what happened to my IP address… It now turns out that the repository being used by the plugin got moved by its author and that was the cause of my predicament (and his: he locked himself out of his own blog too!). A new version was duly released to fix the issue and all is well again. It is a tale that emphasises the important of regression testing to check that you don’t change anything that you shouldn’t.

US, not us?

As of the time of writing, Amazon MP3 is only available to customers in the U.S. of A so any enthusiasm for its provision of DRM-free digital music offerings has to be tempered by that limitation on its availability. Apple’s iTunes store offers some but locked down tracks are its mainstay. Amazon’s restrictions aren’t the first in the digital audio world and they are unlikely to be the last too. Pandora have done it in the world of internet radio and I seem to remember that iTunes might have done it too in their time. There may be other reasons but it might be that licensing and royalties need to be negotiated country by country, slowing the rolling out of new products across the world. The iPhone faced an equivalent situation, though that involved mobile telephony providers. Commercial considerations pervade too and I suppose that a worldwide launch of the iPhone might have been too complex a feat for Apple to manage; they probably wanted to nurture a sense of anticipation among customers in any case. It seems that things are still following the pattern that at least used to be endemic in the motion picture industry: US gets to see a film first and then everywhere else thereafter. Being able to reuse the movie film reels used in American cinemas has been the studios’ advantage from the staggered releases. Because cinema releases have been staggered, video and DVD releases were staggered too so it’s both intriguing and frustrating to see American companies using a similar launching strategy in completely different market sectors. It’s amazing how old habits die hard…

  • As is commonly the case with places like these, all the views that you find expressed on here in postings and articles are mine alone and not those of any organisation with which I have any association, through work or otherwise. With regards to any comments left on the site, I reserve the right to reject any that are inappropriate. Otherwise, whatever is said is the sole responsibility of whoever is leaving the comment.