Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324105 - [mediawiki-to-eclipse-help] ClassNotFoundException: org.apache.tools.ant.BuildException
Summary: [mediawiki-to-eclipse-help] ClassNotFoundException: org.apache.tools.ant.Buil...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: David Green CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 290993
Blocks:
  Show dependency tree
 
Reported: 2010-08-31 12:13 EDT by Nicolas Bros CLA
Modified: 2011-01-06 10:01 EST (History)
0 users

See Also:


Attachments
project to reproduce the error (1.44 KB, application/x-zip-compressed)
2010-08-31 12:15 EDT, Nicolas Bros CLA
no flags Details
stacktrace (4.37 KB, text/plain)
2010-08-31 12:16 EDT, Nicolas Bros CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bros CLA 2010-08-31 12:13:45 EDT
We are using the mediawiki-to-eclipse-help ant task.

When we launch ant in Eclipse as an external tool, with "Run in the same JRE as the workspace" set to true, we get the following error:

taskdef A class needed by class org.eclipse.mylyn.internal.wikitext.mediawiki.core.tasks.WikiToDocTask cannot be found: org/apache/tools/ant/BuildException

If on the other hand we set "Run in the same JRE as the workspace" to false, there is no such error.

But we need to use the mediawiki-to-eclipse-help task from Buckminster, to which we cannot tell to start ant in a different JVM.
Comment 1 Nicolas Bros CLA 2010-08-31 12:15:18 EDT
Created attachment 177857 [details]
project to reproduce the error

Here is a minimal project with which I can reproduce the error.
Comment 2 Nicolas Bros CLA 2010-08-31 12:16:48 EDT
Created attachment 177858 [details]
stacktrace
Comment 3 David Green CLA 2010-08-31 18:30:46 EDT
This is a shortcoming of Eclipse's Ant support, which doesn't set up classloaders correctly (that is, correctly for Ant).  In the past this has manifested itself as bug 290993, probably related to bug 278246.  

A workaround is to run Buckminster _without_ WikiText plug-ins installed, and have the Ant task define a classpath with WikiText in the standalone configuration.  
See the WikiText help, "Markup Conversion":http://help.eclipse.org/helios/topic/org.eclipse.mylyn.wikitext.help.ui/help/Markup-Conversion.html#ConversionusingAntbuildscripts for an example Ant script that sets up the classpath correctly.
The WikiText standalone package can be downloaded from http://www.eclipse.org/mylyn/downloads/

If the workaround works for you please let me know.
Comment 4 Nicolas Bros CLA 2010-09-01 04:45:12 EDT
It works! Thank you for your help and quick answer.
Comment 5 David Green CLA 2010-09-01 13:38:23 EDT
(In reply to comment #4)
> It works! Thank you for your help and quick answer.

Great to hear.  Have fun with Buckminster!