Gradle fails with internal error: UnknownServiceException Could not find meta-data resource


(andrew.oberstar) #1

One of my teammates just tried to get started with Gradle, and every command he enters fails with this error. This error happens before it even gets to the build, so it seems like an issue with something on his device (Gradle or JDK?). He has tried both the wrapper and a regular Gradle install with the same result. Any ideas what could be wrong?

FAILURE: Build aborted because of an internal error.
  * What went wrong:
Build aborted because of an unexpected internal error. Please file an issue at: http://www.gradle.org.
  * Try:
Run with --debug option to get additional debug info.
  * Exception is:
org.gradle.api.internal.project.UnknownServiceException: Could not find meta-data resource 'META-INF/services/javax.xml.datatype.DatatypeFactory' for service 'javax.xml.datatype.DatatypeFactory'.
        at org.gradle.util.ServiceLocator.getFactory(ServiceLocator.java:57)
        at org.gradle.util.DefaultClassLoaderFactory.makeServiceVisible(DefaultClassLoaderFactory.java:68)
        at org.gradle.util.DefaultClassLoaderFactory.createFilteringClassLoader(DefaultClassLoaderFactory.java:62)
        at org.gradle.initialization.DefaultClassLoaderRegistry.<init>(DefaultClassLoaderRegistry.java:52)
        at org.gradle.api.internal.project.GlobalServicesRegistry.createClassLoaderRegistry(GlobalServicesRegistry.java:73)
        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:597)
        at org.gradle.api.internal.project.DefaultServiceRegistry.invoke(DefaultServiceRegistry.java:167)
        at org.gradle.api.internal.project.DefaultServiceRegistry.access$100(DefaultServiceRegistry.java:51)
        at org.gradle.api.internal.project.DefaultServiceRegistry$FactoryMethodService.create(DefaultServiceRegistry.java:286)
        at org.gradle.api.internal.project.DefaultServiceRegistry$ManagedObjectProvider.getInstance(DefaultServiceRegistry.java:186)
        at org.gradle.api.internal.project.DefaultServiceRegistry$SingletonService.getService(DefaultServiceRegistry.java:232)
        at org.gradle.api.internal.project.DefaultServiceRegistry.get(DefaultServiceRegistry.java:133)
        at org.gradle.api.internal.project.DefaultServiceRegistry$ParentServices.getService(DefaultServiceRegistry.java:391)
        at org.gradle.api.internal.project.DefaultServiceRegistry.get(DefaultServiceRegistry.java:133)
        at org.gradle.api.internal.project.TopLevelBuildServiceRegistry.createRootClassLoader(TopLevelBuildServiceRegistry.java:164)
        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:597)
        at org.gradle.api.internal.project.DefaultServiceRegistry.invoke(DefaultServiceRegistry.java:167)
        at org.gradle.api.internal.project.DefaultServiceRegistry.access$100(DefaultServiceRegistry.java:51)
        at org.gradle.api.internal.project.DefaultServiceRegistry$FactoryMethodService.create(DefaultServiceRegistry.java:286)
        at org.gradle.api.internal.project.DefaultServiceRegistry$ManagedObjectProvider.getInstance(DefaultServiceRegistry.java:186)
        at org.gradle.api.internal.project.DefaultServiceRegistry$SingletonService.getService(DefaultServiceRegistry.java:232)
        at org.gradle.api.internal.project.DefaultServiceRegistry.get(DefaultServiceRegistry.java:133)
        at org.gradle.api.internal.project.DefaultServiceRegistry$ParentServices.getService(DefaultServiceRegistry.java:391)
        at org.gradle.api.internal.project.DefaultServiceRegistry.get(DefaultServiceRegistry.java:133)
        at org.gradle.api.internal.project.DefaultServiceRegistry$NestedServices.getService(DefaultServiceRegistry.java:363)
        at org.gradle.api.internal.project.DefaultServiceRegistry.get(DefaultServiceRegistry.java:133)
        at org.gradle.invocation.DefaultGradle.<init>(DefaultGradle.java:63)
        at org.gradle.invocation.DefaultGradle_Decorated.<init>(Unknown Source)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.gradle.api.internal.DirectInstantiator.newInstance(DirectInstantiator.java:41)
        at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:28)
        at org.gradle.initialization.DefaultGradleLauncherFactory.doNewInstance(DefaultGradleLauncherFactory.java:125)
        at org.gradle.initialization.DefaultGradleLauncherFactory.newInstance(DefaultGradleLauncherFactory.java:98)
        at org.gradle.initialization.DefaultGradleLauncherFactory.newInstance(DefaultGradleLauncherFactory.java:45)
        at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:41)
        at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:28)
        at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:32)
        at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:21)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:238)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:222)
        at org.gradle.launcher.Main.doAction(Main.java:48)
        at org.gradle.launcher.exec.EntryPoint$1.execute(EntryPoint.java:53)
        at org.gradle.launcher.exec.EntryPoint$1.execute(EntryPoint.java:51)
        at org.gradle.launcher.exec.Execution.execute(Execution.java:28)
        at org.gradle.launcher.exec.EntryPoint.run(EntryPoint.java:39)
        at org.gradle.launcher.Main.main(Main.java:39)
        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:597)
        at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:51)
        at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:33)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
        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:597)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
        at org.gradle.wrapper.Wrapper.execute(Wrapper.java:124)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:37)

His version information:

------------------------------------------------------------
Gradle 1.0-milestone-7
------------------------------------------------------------
  Gradle build time: Thursday, January 5, 2012 10:24:43 AM UTC
Groovy: 1.8.4
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.6.0_22 (Sun Microsystems Inc. 17.1-b03)
OS: Windows XP 5.1 x86

(andrew.oberstar) #2

Turns out there was an additional set of JAXP JARs in his JDK’s lib/endorsed folder. Disregard.