Archive for February, 2009

‘Revert’ does not mean ‘Reply’

I’ve seen three occurrences of this stupidity recently (all, as it happens, in communications to/from Irish solicitors), and it is really starting to vex me.  Particularly because the people involved should all know better.

Generally, the usage tends to be:

Please revert to me

which, while grammatically correct, only has meaning if the person you are writing to was, at some time in the past, you. Read the rest of this entry »


Java 1.6 on OS X

Today I was presented with the following error

java.lang.UnsupportedClassVersionError: Bad version number in .class file

My first instinct was of course that I must be using an older vm on the machine in question (an OS X 10.5.6 server), but no, java 1.6 was installed on this machine:

~$ ls -alF /System/Library/Frameworks/JavaVM.framework/Versions/
total 56
drwxr-xr-x  14 root  wheel  476 25 Sep 10:43 ./
drwxr-xr-x  12 root  wheel  408  1 Nov 18:28 ../
lrwxr-xr-x   1 root  wheel    5 25 Sep 10:43 1.3@ -> 1.3.1
drwxr-xr-x   3 root  wheel  102  2 Nov  2007 1.3.1/
lrwxr-xr-x   1 root  wheel    5 25 Sep 10:43 1.4@ -> 1.4.2
lrwxr-xr-x   1 root  wheel    3 16 Jun  2008 1.4.1@ -> 1.4
drwxr-xr-x   8 root  wheel  272 25 May  2007 1.4.2/
lrwxr-xr-x   1 root  wheel    5 25 Sep 10:43 1.5@ -> 1.5.0
drwxr-xr-x   8 root  wheel  272 25 May  2007 1.5.0/
lrwxr-xr-x   1 root  wheel    5 25 Sep 10:43 1.6@ -> 1.6.0
drwxr-xr-x   8 root  wheel  272 16 Jun  2008 1.6.0/
drwxr-xr-x   8 root  wheel  272 25 Sep 10:43 A/
lrwxr-xr-x   1 root  wheel    1 25 Sep 10:43 Current@ -> A
lrwxr-xr-x   1 root  wheel    3 25 Sep 10:43 CurrentJDK@ -> 1.5

A little further investigation revealed that, even though 1.6 is installed, 1.5 is still firmly the default:

~$ java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Server VM (build 1.5.0_16-133, mixed mode)

Thankfully, this can be changed by aliasing java to the 1.6 version:

~$ alias java=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
~$ java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)

Do this in your .profile to make it stick.

In fact the solution was simpler than the above for me, I just had to put

export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home

in my tomcat startup script (since I only needed the 1.6 jvm in tomcat).


No Comments

Calling SAP from PHP (on OS X)

You’d think it’d be easy eh?

  • My first google turned up SAPRFC, an extension module for php which allows direct ABAP calls from php.  ‘Perfect’, I thought, until I discovered that it is now essentially unmaintained, and it seems that no one ever tried it on OS X in the first place.
  • Very very happy was I then when I discovered its (very new) successor: sapnwrfc.  But no one has bothered to compile this yet on OS X either (and, like its predecessor, it requires the SAP RFC SDK, which I don’t have).  And besides, it really is very new, just a month or so old – not suitable for production then.
  • So I resigned myself to using another language to bridge the gap.  My first thought (my first hope really), was perl.  This turned up SAP::Rfc, written by the same guy who’s creating sapnwrfc.  But this also requires the SAP RFC SDK, and I couldn’t find anyone who’d ever compiled this on OS X.
  • So why not Java?  The SAP client my employer would have me use is pure Java, so surely I could use the same technologies?
    And this is where I stand at the moment: Use PHP/Java Bridge to call from php to Java, and SAP JCo to call from Java direct to SAP.

Yes, it’s cludgy, horrible, and sounds stupid.  And it probably is stupid.  But it’s how I plan to proceed for the present.  Tomcat will host the Java VM, and – if all the PHP/Java Bridge documentation is to be believed – there will be no need for Java ‘glue’ code, I should be able to use the JCo code directly in php.

If I live through the experience I’ll post more info about this soon.

Some pre-emptive defence: I know there are other technologies which would be preferable to my current solution – but I can make no changes whatsoever to SAP, this severely restricts my options.

, ,


“Magic Time” on Friday 13th



Friday 13th Feb, 2009 is significant, not just because because it’s unlucky and the world will end etc., but moreso because, at 11:31:30pm UTC on Friday, Feb 13, 2009, Unix Time will reach 1,234,567,890.

It seems this time is becoming known as the ‘Cool Epoch’.

No Comments

Tigre Delta

Armed with her new camera, we decided to take a trip to El Tigre Delta, a little upriver from Buenos Aires yesterday.  It’s a beautiful place, a long way from our daily lifestyles.  Hope was expressed that we could spend our summer holidays there this year.

DSC00379.jpgDSC00469.jpgThe Petrol Station

The google map thingy below shows where it is.

View Larger Map

, ,

No Comments