Weblogic Errors

I’ve been plowing through Maven2 & Weblogic at work recently, in an attempt to get an EJB/MDB & EAR deployed for testing out JMS. I would often hit the following errors when deploying an App in Weblogic 9.2:

  • Unable to access the selected application.
  • Exception in AppMerge flows’ progression

Baffled, I almost gave up – the errors mean nothing.

Thankfully trial and error (and plenty of web searching) I have discovered that the errors are caused by invalid deployment descriptors or invalid WAR/EARs (an empty WAR or EAR will cause these errors immediately). So don’t fret, it’s not the end of the world!

First check your web.xml, application.xml and then ensure the contents of the WAR/EAR are as expected – APP-INF, META-INF only for the latter!

Hope that helps someone, it annoyed me for a while!

Battlefield Bad Company 2 (Xbox 360) first impressions

Some initial thoughts halfway through my most anticipated sequel this year…

The story’s poor. What am I doing really? You find this guy, now this guy, oh here’s something different: find this place! Whilst you’re doing that random people will pop up like something out of Time Crisis 2 and try and kill you. Oh and to do all that you go through a million different checkpoints. That’s what MW2 did and it f-cking sucks. It feels really scripted to me and I hate it for that. The ‘level’ interaction seems unfinished. For instance when you run into the castle-esque areas on the desert map (de targo or something?) you affectively initiate a mission or new sub-story sequence that ends in a boss (i.e. a f-cking great big Apache helicopter). Once you’re done, the screen fades to black, you see a random cinematic sequence where Haggard says something odd or funny, and suddenly you’re outside with your vehicle and squad (which, by the way, are popping into view from top to bottom like something out of a tech demo). Christ.

Oh, and that annoying bug with the loading screen: you’re reading the tip text then it fades to black. You think “great, the level’s starting” and suddenly the text’s back and you’re loading again. Huh?

The action is outstanding, second to none. The gadgets, guns and vehicles are much better than before; they feel more realistic and reactive. The destructive environment is also an improvement on the first (which wasn’t bad in the first place!). The textures look amazing and the game looks ever-so realistic. The Brazilian jungle was actually beautiful.

It’s a good, fun game, but the thing that made the first Bad Company instalment so good was its open-ended gameplay and well-polished storytelling, both of which have taken a back seat in #2 to do what seems like its competitor does: all looks and no substance. Grr!

That said, I’ve yet to play multiplayer which is where Bad Company 1 really got going.

Ant TODO Update

Quick update regarding Ant TODO: there’s now a JAR available for download, so you can get it running even quicker!

Ant Task for TODOs

I often felt the need to scratch an itch when it comes to source code and a little fragment called //TODO. It’s scattered everywhere; I’m sure you’ve seen it. Yet no matter what codebase you’re looking at, there’s never any real exposure to them.

I therefore decided to implement an Ant Task for parsing TODOs in source code. You can read more about it over on the Google Code project. Please feel free to review code, suggest features or try it out and report a bug.

Happy new year to all; many happy returns.

See you in 2010!

Sky Songs and Linux

If you want to use the Sky Songs download client in Linux (say Ubuntu or Debian), just paste the following into a file called skysongs in $HOME/bin and then chmod a+x it:
cd $SKY_SONGS_DIR; /usr/bin/java -cp . -jar downloader.jar $*

Note, $SKY_SONGS_DIR should be changed to your installation directory. If you used wine to install Sky Songs, have a look under /home/YOURUSERNAME/.wine/drive_c/windows/profiles/YOURUSERNAME/Local Settings/Application Data/Sky  Songs/.

Sky Songs works by giving you “SKS” files that describe to its client (“Sky Songs MP3 Downloader“) what and how to download; i.e. your songs. Once you’ve downloaded one (say Renegades.sks; the “Renegades” album by Rage Against the Machine), just execute the skysongs script as follows:
alex@prometheus:~/Music$ skysongs Renegades.sks

Thankfully the Sky Songs download client is written in Java so it’s not only cross-platform but its structure is obvious.

Please note that these instructions are absolutely not intended for circumventing Sky’s download procedure, nor are they to be used to break the Terms of Service you’re most likely bound to by law. This information is purely for educational purposes and to assist those who are new to Linux get to grips with their everyday software in a new environment.

Google Wave Extensions Python API – Annotation Documentation

Quick post documenting the much-sought-after structure of the Python API’s Annotation name/value pairing. If you want to annotate a blip’s content, you’ll need to utilise the values below:

  • conv/title
  • lang = en
  • style/fontWeight = bold
  • style/fontStyle = italic
  • style/textDecoration = underline
  • style/textDecoration = line-through
  • style/fontSize = 2em
  • style/color =r gb(229, 51, 51)
  • style/backgroundColor = rgb(51, 127, 229)
  • link/manual = http://example.com/

A Python example of using the above:


msg = "This is a message for you"
doc = wavelet.GetDocument()
doc.SetText(msg)
doc.SetAnnotation(Range(msg[-4:], len(msg) - 1), "style/fontStyle", "italic")

The above should italicise the word “you” in the variable “msg”.

According to Google employee ‘Pamela’, this isn’t set in stone “as we aren’t confident in their stability”. Thanks to Dave of the same Google Group thread for documenting and posting the styling annotation name and value pairs.

Hope that helps someone ;)

Google Wave Python API and Annotations

I spent a considerable amount of time this weekend hacking away at my Google Wave robot, Wave Toolkit. It’s a lot of fun and I’ve managed to write something that allows for quick implementation of ‘commands’ from initial idea to ‘live’.

One of the frustrating things about developing Google Wave extensions is the poor documentation. It starts out great: lovely overview documentation and tutorial, with plenty of insight and step-by-step instructions; and then nothing. It stops there. Apart from reading the API documentation which can be cumbersome, you’re left alone in the dark, weeping like a sad puppy after meeting its new owners.

An example of this is using Annotations within Google Wave; formatting text for bold or italics,  providing nicely worded hyperlinks or embedding images is governed by inserting annotations that ‘explain’ how the text should look. If you try to find out how to use these objects within the Python API you’ll see it’s nearly impossible. I got my answer only from guessing and scouring the Google Group and reading and example in Java, then posting when that didn’t work and finally getting some helpful advice. Please Google, document this protocol more!

So, to save an further frustration, here’s how to use Annotations in the Google Wave python API for robots:
doc = wavelet.CreateBlip().GetDocument()
doc.SetText("THIS IS ANNOTATED TEXT")
doc.SetAnnotation(Range(2, 12), "link/manual", "http://www.google.com")

I hope to hell that helps someone and saves the pain I underwent to work it out! Buggered if I know how to bold text though…Happy hacking!