Community
Participate
Working Groups
If I use the External Tools -> Ant preferences to point to a different Ant home, I get the following exception when I try and run an ant script. I'm guessing its because of classloader heirarchy issue - i.e. maybe AntProcessBuildLogger inherits from a BuildLogger from a different classloader. !MESSAGE org.eclipse.ui.externaltools.internal.ant.logger.AntProcessBuildLogger which was specified to perform logging is not an instance of org.apache.tools.ant.BuildLogger. !STACK 0 org.eclipse.ui.externaltools.internal.ant.logger.AntProcessBuildLogger which was specified to perform logging is not an instance of org.apache.tools.ant.BuildLogger. at org.eclipse.ant.internal.core.ant.InternalAntRunner.createLogger(InternalAntRunner.java:606) at org.eclipse.ant.internal.core.ant.InternalAntRunner.addBuildListeners(InternalAntRunner.java:183) at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:481) at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:331) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:312) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:380) at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:145) at java.lang.Thread.run(Thread.java:536) Caused by: java.lang.ClassCastException at org.eclipse.ant.internal.core.ant.InternalAntRunner.createLogger(InternalAntRunner.java:602) ... 11 more --- Nested Exception --- java.lang.ClassCastException at org.eclipse.ant.internal.core.ant.InternalAntRunner.createLogger(InternalAntRunner.java:602) at org.eclipse.ant.internal.core.ant.InternalAntRunner.addBuildListeners(InternalAntRunner.java:183) at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:481) at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:331) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:312) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:380) at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:145) at java.lang.Thread.run(Thread.java:536)
Does this happen in your target workspace or the runtime Eclipse IDE? If this is happenning in your target, you may just need to re-build the external tools jars. (i.e run the "buildExtraJAR" in the "scripts" folder of the external tools plug-in. This generates the jars you need at runtime from the development environment.
re-assigning as "new"
Chalk this one up to user error - it was happening in my runtime workbench because I hadn't added/built ant.core to the workbench. Strange thing was, even though I specifically told Window->Preferences->Plugin- >Platfom to use the built in externaltools plugin, it still used the one in my workspace until I renamed the plugin.xml. Is that desired behavior? It did pop up a dialog warning me that it would use the one from the workbench, which I assumed meant the built in one. If it really meant it would use the workspace one, then the dialog is confusing and should be re-worded.