Skip to content

One Year’s Uptime

I just noticed that I’ve tipped one year’s worth of uptime on omicron.

Woo yeah!

Tagged

Essential Eclipse Plugins

With the release of Eclipse 3.4 “Ganymede” I’ve had to reinstall all of the plugins I use. So, I decided to share with the world the suite of plugins that I use. I use the Eclipse JEE bundle since this already includes much of what I want - if you use a different bundle YMMV.

On with the plugins (links to installation instructions):

For me these are essential, for you they may not be. Anyone care to suggest any other useful Eclipse plugins?

Tagged ,

Spring WS, Tomcat 6, Java 6 - Problems & A Simple Solution

I’ve been working on a project using Spring WS recently. During development I run/test webapps using the Maven Jetty plugin. All was well, everythings works as expected, and I was at a stage where I needed to deploy on a Tomcat 6 server for some larger scale testing. In the past I have had no issues moving from Jetty to Tomcat so, possibly foolishly, I was not expecting any this time…

After deploying to Tomcat the web frontend worked fine, but the web services did not. A quick look at the logs revealed lots of exceptions relating to SAAJ. The top of the stacktraces were:

org.springframework.ws.soap.saaj.SaajSoapMessageException: Could not write message to OutputStream: Error during saving a multipart message; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
at org.springframework.ws.soap.saaj.SaajSoapMessage.writeTo(SaajSoapMessage.java:122)
...
Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:1126)
at org.springframework.ws.soap.saaj.Saaj13Implementation.writeTo(Saaj13Implementation.java:264)
at org.springframework.ws.soap.saaj.SaajSoapMessage.writeTo(SaajSoapMessage.java:118)
...
Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to get header stream in saveChanges:
at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:1103)
...
Caused by: java.io.IOException
at com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl.output(EnvelopeImpl.java:298)

I’m running on Java 6, which contains it’s own SAAJ implementation, so I was fairly sure it wasn’t a problem with the libraries in the application itself. So, I hit google for a couple of hours in hope of finding a solution. I didn’t find anything which mentioned this issue specifically, but the gist I was getting pointed towards a problem with the XML parser.

In desperation I tried including various bits of Xerces in the application’s WAR (I know Java 6 has a built in parser, but I figured it was worth a try). This didn’t work, and in fact caused even more errors. This problem was really starting to annoy me…

It occurred to me that it could be something about the configuration of the server which runs Tomcat. If it all works fine on my workstation it must be the server, right? So I put pulled down a copy of the project onto the server and ran it using the Maven Jetty plugin. Lo and behold, it worked flawlessly. Maybe it’s a Tomcat issue then? To verify this I installed Tomcat on my workstation and ran the app there. Same problem - it muct be Tomcat then. OK, time to hit google again.

…many frustrating hours pass…

Eventually I found a page which mentioned errors simmilar to mine, so I tried it’s solution… and … thank the Lord - it works! What was this magical solution? Putting a copy of Xerces and Xalan in the Tomcat’s ‘endorsed’ lib directory. Annoyingly simple. Why does this work? I’m not certain, but apparently the versions of Xerces and Xalan which Tomcat ships with don’t play well with the SAAJ implementation in Java 6 (this might well be wrong…). The important thing is it fixed the problem.

For reference (in case this problem appears for anyone else) I am using: Java 1.6.0_06, Tomcat 6.0.16, Spring 2.5.4 and Spring WS 1.5.2. The jars I put in %TomcatHome%/common/endorsed to fix the problem were xalan-2.7.0 and xercesImpl-2.8.1.

I am now back to development nirvana - balance has been restored.

Tagged , ,

200+ Days Uptime

I just noticed that my server has been up for over 200 days. I’m pretty sure that’s the longest it’s ever been up continuously. Most of the reboots have been for upgrades (or a hosting move) but there have been some problems along the way.

The box is now handling around 10GB of traffic every month, with the occasional large spike, so I think 200 days uptime validates the configuration tweaks I’ve made to improve stability. The only minor worry is I haven’t had to deal with a real world high load test of any of the Java applications (Tomcat hosted sites). I’m pretty sure I’ve reigned in the JVMs allowed memory, but until it gets a proper real world test I’ll always have a doubt in the back of my mind.

Fingers crossed for 1 years uptime…

Tagged

Broadband Frustrations

Since I upgraded my living situation a few weeks ago (moved into a new house share with 2 friends) I’ve been without an internet connection. We ended up having to wait 2 weeks for BT to “install” our phone line (in quotes since it was physically already there), then around 10 days for the ISP to active the ADSL. Being without an internet connection at home feels really weird. Even more so since we don’t have TV either, which meant we were rather cut off from the world (hope I didn’t miss anything important).

Anyway, yesterday the ADSL started working (2 days early actually). Happy times… kind of.

We’re on an 8Mbit service, but I’m struggling to get more than around 70KB/sec for downloads. This is, as you can probably imagine, is a bit of the step back from the 700KB/sec or more that I’ve been accustomed to. Just now I needed to grab a copy of Spring-WS - 25MB - it took almost 7 minutes! Sigh…

I’m assuming the problem is the length of the line from the house to the exchange (very roughly about 3 miles) combined with less than amazing in-house wiring. Initially the router was connecting at only 800Kbps! You don’t expect to get all of the bandwidth they claim, but a tenth it just ridiculous.

Switching the rather crappy looking micro filter which was left by the previous occupants for the decent one I’ve used before got that up to 2200Kbps. However, the actual speed of connection didn’t change much. I’m putting this down the (according to what I can work out) horrendous attenuation and noise margin (59dB/6dB if you’re interested). I’ve yet to really dig into the things that can be done about this (hey, I’m busy), but I’m hoping I can improved the situation a bit.

Ah well, at least we’re online now :)

Tagged , ,

ThinkLighting The Way

I’m on my second ThinkPad now. Last year I replaced my failing T42 with a T60. Both had/have ThinkLights, but I’ve never seen the point in them before…

Right now though, sitting in the garden at night, I finally see the point (I can see my keyboard!!!). Mind you, it’s irrelevant how well lit my laptop is, it still doesn’t detract from the fact I should be in bed…

Also, loving the new admin interface in wordpress 2.5.

Tagged , ,

Lots Of Upgrades!

After putting off upgrades on omicron for ages (I was busy), this week I finally found the time. So, I’m now running:

  • Apache 2.2.8
  • Tomcat 6.0.16
  • MySQL 5.0.54
  • Subversion 1.4.6

Woo yeah for them all running smoothly! I was especially happy that converting my Tomcat 5.5 configuration to 6.0 was easy.

As a bonus upgrade, I’ve switched the theme on my blog. White on black was starting to annoy me, so this time it’s black on white. Mmmmm - minimalist.

Tagged , ,

MIDP Low-Level UI Pains

Over the last couple of week I’ve been doing some work with the MIDP low level UI API. I’ve used the API before, but not for anything that complex. This time however I am building a set of fairly complex rich UI screens, so it’s been a good opportunity to really get to grips with the API. It’s been so long that I’d forgotten how sparse it all is.

One thing that has been really annoying me over the last few days is the lack of a way to rotate the orientation of text. I want some of the labels in my UI to be written down the side of the screen (top to bottom). You can anchor text pretty easily, and alter it’s horizontal alignment, but there is no way rotate it so it reads top to bottom rather than left to right.

One suggested way to get around this is to draw the text to an off-screen in, memory image then rotate this image before drawing it on the display. But, of course, there is no way to rotate an image either!

…Now I remember why I don’t like using low level graphics.

For now I’m just not bothering with the rotated labels (it’s only a prototype at the moment), but ideally I’d like to find a solution. One possibility I’d thought of is to simply write my own way of rotating images - maybe an operation on the actual bytes in the image, or swapping pixels.

Tagged , ,

The Internet Turns 30

An article in my RSS reader caught my eye today. elharo writes:

The Internet is 30 today. Exactly 30 years ago today on November 22, 1977 the first three networks were connected to become the Internet

Think how far we’ve come…

Tagged

VM Upgrades

So, yesterday evening bytemark finally got around to upgrading the host machine for my VM server. The upgrade itself went smoothly, so I now have 300MB of memory and 20GB of disc space (at no extra cost). Woo for me :)

I did however have some problems getting the server to come back online again after the upgrade. It came up, then fell over again a couple of times before I worked out what the problem was. Actually, that’s a lie - I’m still not sure what the problem was, but it (seems to) work now, so I shall leave it alone while keeping an eye on it.

I have a feeling the problem was probably something to do with it being rebooted. Prior to the upgrade it had been up for over 150 days without a reboot, in which time I’d updated lots of core system packages, so I guess there could have been an issue somewhere I was not aware of.

Anyway - it’s working now (as you can read this page….) and as I write this it’s been up for just over an hour without any problems.

Fingers crossed…

Tagged ,