Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: No longer relevant
-
Affects Version/s: 2.4.1
-
Fix Version/s: Never
-
Component/s: Workbench - Plugin and update manager
-
Labels:
Description
Our default plugins.xml contains two entries with:
<repository>http://odftoolkit.org/svn/odfdom~maven2/release/</repository>
however - this repository now returns 302 Found to https://svn.odftoolkit.org/svn/odfdom~maven2/release/
Raven downloads the 302 HTML document and saves it as the 'pom file' in the user home directory's repository folder. If the ODF toolkit repository is examined before any additional repositories added by the user (which they would as we now add those in the bottom of the list) - then the HTML error would be downloaded from ODF instead of the real POM/JAR.
This causes the following stack trace:
ERROR 2011-09-05 16:10:20,079 (System.err:139) - [Fatal Error] :1:50: White spaces are required between publicId and systemId. WARN 2011-09-05 16:10:20,079 (net.sf.taverna.raven.repository.impl.ArtifactImpl:85) - XML SAX error for C:\Users\stain\AppData\Roaming\taverna-2.3.0\repository\com\example\example-activity\0.0.2-SNAPSHOT\example-activity-0.0.2-SNAPSHOT.pom org.xml.sax.SAXParseException: White spaces are required between publicId and systemId. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at javax.xml.parsers.DocumentBuilder.parse(Unknown Source) at net.sf.taverna.raven.repository.impl.ArtifactImpl.readAndParseXML(ArtifactImpl.java:575) at net.sf.taverna.raven.repository.impl.ArtifactImpl.readXML(ArtifactImpl.java:541) at net.sf.taverna.raven.repository.impl.ArtifactImpl.getPackageType(ArtifactImpl.java:280) at net.sf.taverna.raven.repository.impl.LocalRepository.act(LocalRepository.java:511) at net.sf.taverna.raven.repository.impl.LocalRepository.update(LocalRepository.java:491) at net.sf.taverna.raven.plugins.PluginManager.addPlugin(PluginManager.java:222) at net.sf.taverna.raven.plugins.ui.PluginSiteFrame$4.run(PluginSiteFrame.java:426)
(Note that the "HTTP response code: 403 for URL: http://repository.jboss.org/maven2/" warning preceding this is not related to this bug and should not cause any problems).
Raven does not seem to check the response code in fetch() of https://code.google.com/p/taverna/source/browse/taverna/engine/net.sf.taverna.t2.infrastructure/trunk/raven/src/main/java/net/sf/taverna/raven/repository/impl/LocalRepository.java - but the default value true of http://download.oracle.com/javase/6/docs/api/java/net/HttpURLConnection.html#getInstanceFollowRedirects() (confirmed using Beanshell script) should make it follow the redirect anyway.
A proper fix for 2.4.x would mean fixing LocalRepository.java to check that result code is 200 OK and update plugins.xml for the new repository.
It is uncertain if an HTTPS repository would work satisfactory on all installations as this requires root certificates to be installed by the credential manager.
The recommended short-term fix for current users is to delete the offending repository from the plugins.xml of their Taverna home directory: (Note - this appears twice in the 2.3.0 plugin.xml)
<repository>http://odftoolkit.org/svn/odfdom~maven2/release/</repository>
and for myGrid to release updated plugin definitions without this repository.
Update
See http://www.mygrid.org.uk/dev/wiki/display/taverna/T2-1989+plugin+install+fails
Updated http://www.mygrid.org.uk/taverna/updates/2.3.0/plugins/official/ to not include odftoolkit repository for activities and external tools.
Leaving bug open to remember to modify workbench-distro and commandlinetool-product - also would need to check if the https:// repository actually works on blank installations. Note that this should not be needed by external tools at all - as it's only used by the spreadsheet activity.
These repositories in plugins.xml are only used in the case that you delete the repository/ folder of Taverna and as a baseline for any plugins installed/upgraded.