Grails运行应用程序失败,原因是依赖项xerces:xercesImpl:jar:2.9.1。

huangapple go评论81阅读模式
英文:

Grails run app failed because of dependencies xerces:xercesImpl:jar:2.9.1

问题

我正在尝试编译一个在Grails 2.5.0中的项目。当我运行grails run-app时,我遇到了以下错误:

| 错误 解析获取依赖错误:无法从 mavenCentral(https://repo1.maven.org/maven2/)传输 artifact xerces:xercesImpl:jar:2.9.1:Range Not Satisfiable (416)(使用 --stacktrace 查看完整跟踪)
| 错误 解析获取依赖错误:无法从 mavenCentral(https://repo1.maven.org/maven2/)传输 artifact xerces:xercesImpl:jar:2.9.1:Range Not Satisfiable (416)(使用 --stacktrace 查看完整跟踪)
| 错误 解析获取依赖错误:无法从 mavenCentral(https://repo1.maven.org/maven2/)传输 artifact xerces:xercesImpl:jar:2.9.1:Range Not Satisfiable (416)(使用 --stacktrace 查看完整跟踪)
| 错误 无法从 mavenCentral(https://repo1.maven.org/maven2/)传输 artifact xerces:xercesImpl:jar:2.9.1:Range Not Satisfiable (416)
| 运行 'grails dependency-report' 以获取更多信息。

使用 --stacktrace 运行:

| 错误 解析获取依赖错误:无法从 mavenCentral(https://repo1.maven.org/maven2/)传输 artifact xerces:xercesImpl:jar:2.9.1:Range Not Satisfiable (416)(注意:堆栈跟踪已被过滤。使用 --verbose 查看完整跟踪。)
org.eclipse.aether.resolution.DependencyResolutionException: 无法从 mavenCentral(https://repo1.maven.org/maven2/)传输 artifact xerces:xercesImpl:jar:2.9.1:Range Not Satisfiable (416)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
	at grails.util.BuildSettings.doResolve(BuildSettings.groovy:514)
	at grails.util.BuildSettings.doResolve(BuildSettings.groovy)
	at grails.util.BuildSettings$_getDefaultTestDependencies_closure16.doCall(BuildSettings.groovy:588)
	at grails.util.BuildSettings$_getDefaultTestDependencies_closure16.doCall(BuildSettings.groovy)
	at grails.util.BuildSettings.getDefaultTestDependencies(BuildSettings.groovy:582)
	at grails.util.BuildSettings.getTestDependencies(BuildSettings.groovy:563)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: 无法从 mavenCentral(https://repo1.maven.org/maven2/)传输 artifact xerces:xercesImpl:jar:2.9.1:Range Not Satisfiable (416)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
	... 6 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: 无法从 mavenCentral(https://repo1.maven.org/maven2/)传输 artifact xerces:xercesImpl:jar:2.9.1:Range Not Satisfiable (416)
	at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
	at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
	... 8 more
Caused by: org.apache.http.client.HttpResponseException: Range Not Satisfiable (416)
	at org.eclipse.aether.transport.http.HttpTransporter.handleStatus(HttpTransporter.java:466)
	at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:291)
	at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:243)
	at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:59)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
	... 13 more
英文:

I'm trying to compile a project in grails 2.5.0. When I run grails run-app I'm getting this following error:

| Error Resolve error obtaining dependencies: Could not transfer artifact xerces:xercesImpl:jar:2.9.1 from/to mavenCentral (https://repo1.maven.org/maven2/): Range Not Satisfiable (416) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: Could not transfer artifact xerces:xercesImpl:jar:2.9.1 from/to mavenCentral (https://repo1.maven.org/maven2/): Range Not Satisfiable (416) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: Could not transfer artifact xerces:xercesImpl:jar:2.9.1 from/to mavenCentral (https://repo1.maven.org/maven2/): Range Not Satisfiable (416) (Use --stacktrace to see the full trace)
| Error Could not transfer artifact xerces:xercesImpl:jar:2.9.1 from/to mavenCentral (https://repo1.maven.org/maven2/): Range Not Satisfiable (416)
| Run 'grails dependency-report' for further information.

Running with --stacktrace:

| Error Resolve error obtaining dependencies: Could not transfer artifact xerces:xercesImpl:jar:2.9.1 from/to mavenCentral (https://repo1.maven.org/maven2/): Range Not Satisfiable (416) (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.eclipse.aether.resolution.DependencyResolutionException: Could not transfer artifact xerces:xercesImpl:jar:2.9.1 from/to mavenCentral (https://repo1.maven.org/maven2/): Range Not Satisfiable (416)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
	at grails.util.BuildSettings.doResolve(BuildSettings.groovy:514)
	at grails.util.BuildSettings.doResolve(BuildSettings.groovy)
	at grails.util.BuildSettings$_getDefaultTestDependencies_closure16.doCall(BuildSettings.groovy:588)
	at grails.util.BuildSettings$_getDefaultTestDependencies_closure16.doCall(BuildSettings.groovy)
	at grails.util.BuildSettings.getDefaultTestDependencies(BuildSettings.groovy:582)
	at grails.util.BuildSettings.getTestDependencies(BuildSettings.groovy:563)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact xerces:xercesImpl:jar:2.9.1 from/to mavenCentral (https://repo1.maven.org/maven2/): Range Not Satisfiable (416)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
	... 6 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact xerces:xercesImpl:jar:2.9.1 from/to mavenCentral (https://repo1.maven.org/maven2/): Range Not Satisfiable (416)
	at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
	at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
	... 8 more
Caused by: org.apache.http.client.HttpResponseException: Range Not Satisfiable (416)
	at org.eclipse.aether.transport.http.HttpTransporter.handleStatus(HttpTransporter.java:466)
	at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:291)
	at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:243)
	at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:59)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
	... 13 more

答案1

得分: 0

问题已解决。只需删除缓存文件 ~/.m2/repositories,然后它就会正常运行。

英文:

Issue resolved. Just delete the cache files ~/.m2/repositories and it run properly.

huangapple
  • 本文由 发表于 2020年3月16日 09:57:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/60699468.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定