Category Archives: Uncategorized

Point of View

Taverna can display results based on their MIME type eg. Text/Html. That means that T2 will have to do the same. Most of the renderers could be ported across from their T1 equivalents but a few had to be redeveloped due to changes in the data management structure fot T2. Results are now passed by reference and can be “de-referenced” into whatever type you request as long as the Data Manager will allow it. The results can then be viewed by the MIME types associated with them. To allow easy extensibility (or “extension points”) Taverna 1 & 2 use Java Interfaces a lot. These extensions are implemented using the Service Provider Interface (SPI) pattern. This is not a common one and there is not a great deal of info on the web about it. In the Renderers case, anything that wants to be a Renderer must implement the Renderer interface. To find the renderers they must also be registered by writing their full class name (including package) in a file stored in renderers-impl/src/main/resources/META-INF/services/net.sf.taverna.t2.renderers (as you might have guessed, net.sf.taverna.t2.renderers is the package name). The SPI lookup is performed by having a RendererRegistry which does something along the lines of getClass().getClassLoader.getResourceAsStream(“/services/net.sf.taverna.t2.renderers”). The individual class names can then be found from this stream and additional checks (defined in the Renderer interface) can be made on them to see if they support the Mime types you want.

The Installation blues

Two of our users had some problems with R (the stats package) and the server component Rserve. So, figured I should install it on the Mac. Downloaded the binary package from http://cran.r-project.org/bin/macosx/ .All was going well until the package tried to install tcl/tk at which point it failed with a strange message about “could not install some files to /”. Not very helpful. R was OK though but all attempts to get Rserve failed since it needed the tcl/tk stuff (ps. OSX Leopard has X11 be default now) maybe a source install was the best idea. Downloaded the tcl/tk source from http://www.tcl.tk/ and followed the instructions on http://www.tcl.tk/doc/howto/compile.html#unix .Some of the tests failed though and I had no enthusiasm for trying to figure out why (although sunning as sudo helped solve fCmd-9.4 file rename: comprehensive: dir to new name FAILED). The other one was more obscure

==== unixFile-1.7 Tcl_FindExecutable FAILED
==== Contents of test case:

set env(PATH) “:/dummy”
testfindexecutable junk

—- Result was:
/Users/Ian/Downloads/tcl8.5.1/unix/junk
—- Result should have been (exact matching):
/Users/Ian/downloads/tcl8.5.1/unix/junk
==== unixFile-1.7 FAILED

Why it should be changing “d” to “D” I have no idea. Anyway, I moved the whole package to my root but still got a failure with

==== exec-9.7 commands returning errors FAILED
==== Contents of test case:

list [catch {exec [interpreter] “$path(sh)” -c “\”$path(echo)\” error msg 1>&2″ | [interpreter] “$path(sh)” -c “\”$path(echo)\” error msg 1>&2″} msg] $msg

—- Result was:
1 {error msg}
—- Result should have been (exact matching):
1 {error msg
error msg}
==== exec-9.7 FAILED

Lost enthusiasm completely by this point and googling didn’t help too much but it gave me the idea (from http://ircarc.com/freenode-tcl/302.html) that perhaps the tcl8.5.1 source wasn’t the way to go. Downloaded 8.4.18 and everyone went well until I got cp: /usr/local/lib/#inst.17465#: Too many levels of symbolic links

For whatever reason /us/local/lib was symlinked to itself. So, I removed that and everthing went well (except for a few tk test errors but I suppose that is to be expected – kind of cool watching all the X11 windows appear and flying around on their own!!).

So, now to install Rserve. The only way I could get it to work was to download Rserve_0.5-0.tar.gz and type sudo R CMD INSTALL Rserve_0.5-0.tar.gz

Sweet, everything sorted. Now, go into R. Type library(Rserve) then Rserve() and there it is running on port 6311.

Nice. I need a rest now (and I haven’t even looked at the bug yet!!)

Update – The Rserve version I installed was too new and uses a different protocol from the Rserve clients in Taverna. Oh well, time to give up I think!

Big cat attack

Hello, I am a developer on the Taverna Workbench project for Computer Science at Manchester University in the UK. This is a workflow engine for consuming and running ‘everything’ (web services etc. etc.). It is primarily used by Bio-Informaticians but is also used by Geologists, Chemists, Musicians(!) and more. It is written in Java and developed using Eclipse and Maven and as you might guess this has it’s fair share of problems, solutions and exciting revelations. The problem is that we all forget how we solved last weeks problems so it’s probably a good idea we shared them with everyone else.

Anyway, it’s been about 6 weeks with Leopard on my iMac. So far, so good. No major issues. Eclipse clashed with spaces key settings which meant a change to the eclipse keys. The 3d dock is fairly pointless and ditto for the see through toolbars. PHP was easy to set up once I figured out that Apache now lives in /etc/apache2. I even got wordpress working by using 127.0.0.1 instead of localhost for mysql.

However, been having a few Maven/Eclipse issues, things like it will build on the command line but not in Eclipse etc. Probably nothing to do with OSX so I figured it was time for a re-install of Eclipse.

Rule 1 – remember the Java Build Path/Libraries trick for Maven ie. enable dependency management then double click on the Maven libraries in the build path and select ‘Include dependencies and and source folders from modules’. ‘Update Source Folders’ should then work.

Rule 2 – give the eclipse JVM enough RAM to avoid the ‘run out of heap space’ problem. Ctrl/click on the Eclipse App icon, show folder contents and modify the Contents/MacOS/eclipse.ini file. Change -Xmx256m to -Xmx512m and -XX:MaxPermSize=256m to -XX:MaxPermSize=512m (or whatever size you need,I’ve only got a paltry 1GB, should upgrade to 2GB some time).

Oh, another thing. I always forget the settings to run Taverna and new plugins within Eclipse. So, just for the record:

Rule 3 – Remember your ‘Run As’ settings, try something like

-Draven.eclipse=true
-Dtaverna.dotlocation=/Applications/Taverna.app/Contents/MacOS/dot
-Dtaverna.startup=/Users/you/workspace/taverna1.0/src/main/resources/workbench
-Dtaverna.home=/Users/you/.taverna-snapshot -Xmx512m
-Draven.repository.0=file:///Users/you/.m2/repository/

But there is one big complaint about OSX10.5 Leopard – where is Java 6 ?! By the time Apple release it for the Mac everyone else will be using 7. This is becoming a bit of an issue for us. I don’t think Apple can claim that they are big supporters of Java anymore until they sort out their act and get 6 out the door. Beta versions don’t count (and fairly screwed up my install of Tiger). Do people really care about Aqua bindings for Ruby and Python? Come on Apple, give us Java 6 for OSX NOW!!