[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.newcomer] ANT wont run in eclipse on Mac OS X
|
- From: steve@xxxxxxxxxxxxxxxx (Steve Sherwood)
- Date: Sat, 5 Jul 2008 15:53:10 +0000 (UTC)
- Newsgroups: eclipse.newcomer
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
I'm new to eclipse and I'm trying to setup my environment on a Mac Pro
running Mac OS X 10.5.3.
I have the environment set up on my work PC running Windows XP and
everything works fine. When I try to setup the same environment on my Mac
I can't get the ANT build script to run. At work on the Windows PC I have
configured the External Tools JRE tab to "RUN in Separate JRE." This works
fine. When I try to do this on the Mac, I get the following error:
BUILD FAILED
XML parser factory has not been configured correctly: Provider
org.apache.xerces.jaxp.SAXParserFactoryImpl not found
even though in the External Tools Classpath tab there is an entry for "Ant
Home(Default)," which when expanded contains the xercesImpl.jar. This jar
contains org/apache/xerces/jaxp/SAXParserFactoryImpl.class, so I don't
understand why I'm getting this error.
If I configure the External Tools JRE tab to "Run in the same JRE as the
workspace," I get past the above error, but I run into other class files
not being found even though THEY HAVE BEEN ADDED to the classpath in the
External Tools Dialog. Here is a slimmed down version of the ANT script
I'm trying to run with the section that is failing:
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="doIt" name="estreetDev">
<property file="build.ant.properties"/>
<!-- JiBX binding compiler task definition -->
<taskdef classname="org.jibx.binding.ant.CompileTask" name="bind">
<classpath>
<pathelement location="lib/bcel.jar"/>
<pathelement location="lib/jibx-run.jar"/>
<pathelement location="lib/xpp3.jar"/>
<pathelement location="lib/jibx-bind.jar"/>
</classpath>
</taskdef>
<target name="doIt">
<!-- Run JiBX binding compiler -->
<echo> ${basedir} </echo>
<bind load="true" verbose="true">
<bindingfileset includes="binding.xml" dir="config/jibx"/>
<classpathset dir="lib/"/>
<!-- classpathset dir="lib/jibx-run.jar" / -->
</bind>
</target>
</project>
The 4 jars that are called out in the <taskdef> tag are in the basedir/lib
directory. I have addded these jars via the External Tools Classpath tab.
jibx-run.jar contains the Utility.class. As you can see from the console
output below, the ANT script is complaining that it can't find
org.jibx.runtime.Utility.class on any classpath. As I said, I added it to
the classpath, so I can't figure out what is going on.
Apache Ant version 1.7.0 compiled on February 29 2008
Buildfile: /Volumes/Data/JavaProjectsWork/estreetDev/testBuild.xml
parsing buildfile /Volumes/Data/JavaProjectsWork/estreetDev/testBuild.xml
with URI = file:/Volumes/Data/JavaProjectsWork/estreetDev/testBuild.xml
Project base dir set to: /Volumes/Data/JavaProjectsWork/estreetDev
[antlib:org.apache.tools.ant] Could not load definitions from resource
org/apache/tools/ant/antlib.xml. It could not be found.
[property] Loading
/Volumes/Data/JavaProjectsWork/estreetDev/build.ant.properties
[property] Unable to find property file:
/Volumes/Data/JavaProjectsWork/estreetDev/build.ant.properties
Arguments: -verbose -Dbasedir=/Volumes/Data/JavaProjectsWork/estreetDev
-Dorg.eclipse.ant.core.ANT_PROCESS_ID=1215272841104
Build sequence for target(s) `doIt' is [doIt]
Complete build sequence is [doIt, ]
doIt:
[echo] /Volumes/Data/JavaProjectsWork/estreetDev
[bind] Using the following paths:
[bind] /Volumes/Data/JavaProjectsWork/estreetDev/lib
[bind] Using the following binding paths:
[bind]
/Volumes/Data/JavaProjectsWork/estreetDev/config/jibx/binding.xml
BUILD FAILED
/Volumes/Data/JavaProjectsWork/estreetDev/testBuild.xml:17:
java.lang.ExceptionInInitializerError
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at
org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:623)
at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:456)
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:585)
at org.eclipse.ant.core.AntRunner.run(AntRunner.java:377)
at
org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:230)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.ExceptionInInitializerError
at org.jibx.binding.Compile.compile(Compile.java:270)
at org.jibx.binding.ant.CompileTask.execute(CompileTask.java:238)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
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:585)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
... 17 more
Caused by: java.lang.IllegalArgumentException: Class
org.jibx.runtime.Utility not found in any classpath
at org.jibx.binding.def.StringConversion.<init>(StringConversion.java:153)
at
org.jibx.binding.def.PrimitiveStringConversion.<init>(PrimitiveStringConversion.java:152)
at
org.jibx.binding.def.BindingDefinition.<clinit>(BindingDefinition.java:66)
... 25 more
--- Nested Exception ---
java.lang.ExceptionInInitializerError
at org.jibx.binding.Compile.compile(Compile.java:270)
at org.jibx.binding.ant.CompileTask.execute(CompileTask.java:238)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
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:585)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at
org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:623)
at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:456)
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:585)
at org.eclipse.ant.core.AntRunner.run(AntRunner.java:377)
at
org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:230)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.IllegalArgumentException: Class
org.jibx.runtime.Utility not found in any classpath
at org.jibx.binding.def.StringConversion.<init>(StringConversion.java:153)
at
org.jibx.binding.def.PrimitiveStringConversion.<init>(PrimitiveStringConversion.java:152)
at
org.jibx.binding.def.BindingDefinition.<clinit>(BindingDefinition.java:66)
... 25 more
IS THERE A BUG IN ECLIPSE ON MAC OS X?