Domanda

We have a cross platform application that is written in Java and built with an ant script. This code has not been built on the Mac since January of 2010. Recently I checked out the January 2010 version that built just fine to a fresh working copy and tried to build it and now I get this error:

BUILD FAILED
/Users/Mike/working copies/ASJTestBuild/trunk/build.xml:857: java.lang.NoClassDefFoundError: org/apache/xml/serialize/OutputFormat
    at net.sourceforge.jarbundler.PropertyListWriter.writeFile(Unknown Source)
    at net.sourceforge.jarbundler.JarBundler.writeInfoPlist(Unknown Source)
    at net.sourceforge.jarbundler.JarBundler.execute(Unknown Source)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.apache.tools.ant.Main.runBuild(Main.java:809)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.ClassNotFoundException: org.apache.xml.serialize.OutputFormat
    at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1361)
    at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
    at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 19 more

Since this same code and same script built just fine 2 years ago and I know OSX handles their own version of Java I am wondering is it possible that some newer OSX version of Java removed this library that we are reliant upon?

È stato utile?

Soluzione

Not ANT itself, but the JarBundler ANT task appears to have been broken by a relatively recent OS X Java release. Updating JarBundler should fix this.

(found here)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top