Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

with grade 2.5: shadowJar task fails, Caused by: java.lang.NoClassDefFoundError #147

Closed
Nelyus opened this issue Jul 8, 2015 · 6 comments · Fixed by #148
Closed

with grade 2.5: shadowJar task fails, Caused by: java.lang.NoClassDefFoundError #147

Nelyus opened this issue Jul 8, 2015 · 6 comments · Fixed by #148
Milestone

Comments

@Nelyus
Copy link

Nelyus commented Jul 8, 2015

Caused by: java.lang.NoClassDefFoundError: org.gradle.mvn3.org.codehaus.plexus.util.IOUtil
    at com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer$ServiceStream.class$(ServiceFileTransformer.groovy)
    at com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer$ServiceStream.$get$$class$org$gradle$mvn3$org$codehaus$plexus$util$IOUtil(ServiceFileTransformer.groovy)
    at com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer$ServiceStream.append(ServiceFileTransformer.groovy:98)
    at com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer$ServiceStream$append.call(Unknown Source)
    at com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer.transform(ServiceFileTransformer.groovy:70)
    at com.github.jengelman.gradle.plugins.shadow.transformers.Transformer$transform$0.call(Unknown Source)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction.transform(ShadowCopyAction.groovy:323)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction.this$2$transform(ShadowCopyAction.groovy)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction$this$2$transform$9.callCurrent(Unknown Source)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction.transform(ShadowCopyAction.groovy:314)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction.this$2$transform(ShadowCopyAction.groovy)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction$this$2$transform$8.callCurrent(Unknown Source)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction.visitArchiveFile(ShadowCopyAction.groovy:229)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction.this$2$visitArchiveFile(ShadowCopyAction.groovy)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$_StreamAction_processArchive_closure3.doCall(ShadowCopyAction.groovy:204)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction.processArchive(ShadowCopyAction.groovy:202)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction.this$2$processArchive(ShadowCopyAction.groovy)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction$this$2$processArchive$4.callCurrent(Unknown Source)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction.visitFile(ShadowCopyAction.groovy:188)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction.this$2$visitFile(ShadowCopyAction.groovy)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction$this$2$visitFile$1.callCurrent(Unknown Source)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$StreamAction.processFile(ShadowCopyAction.groovy:151)
    at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1$1.processFile(NormalizingCopyActionDecorator.java:65)
    at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator$1$1.processFile(DuplicateHandlingCopyActionDecorator.java:60)
    at org.gradle.api.internal.file.copy.CopyFileVisitorImpl.processFile(CopyFileVisitorImpl.java:60)
    at org.gradle.api.internal.file.copy.CopyFileVisitorImpl.visitFile(CopyFileVisitorImpl.java:44)
    at org.gradle.api.internal.file.AbstractFileTree$FilteredFileTree$1.visitFile(AbstractFileTree.java:146)
    at org.gradle.api.internal.file.collections.SingletonFileTree.visit(SingletonFileTree.java:44)
    at org.gradle.api.internal.file.collections.FileTreeAdapter.visit(FileTreeAdapter.java:108)
    at org.gradle.api.internal.file.AbstractFileTree$FilteredFileTree.visit(AbstractFileTree.java:137)
    at org.gradle.api.internal.file.CompositeFileTree.visit(CompositeFileTree.java:55)
    at org.gradle.api.internal.file.copy.CopySpecActionImpl.execute(CopySpecActionImpl.java:37)
    at org.gradle.api.internal.file.copy.CopySpecActionImpl.execute(CopySpecActionImpl.java:24)
    at org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:498)
    at org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:500)
    at org.gradle.api.internal.file.copy.DefaultCopySpec.walk(DefaultCopySpec.java:322)
    at org.gradle.api.internal.file.copy.CopySpecBackedCopyActionProcessingStream.process(CopySpecBackedCopyActionProcessingStream.java:36)
    at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator$1.process(DuplicateHandlingCopyActionDecorator.java:44)
    at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1.process(NormalizingCopyActionDecorator.java:56)
    at org.gradle.api.internal.file.copy.CopyActionProcessingStream$process.call(Unknown Source)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$1.execute(ShadowCopyAction.groovy:78)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction$1$execute.call(Unknown Source)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction.withResource(ShadowCopyAction.groovy:109)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction.execute(ShadowCopyAction.groovy:75)
    at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator.execute(NormalizingCopyActionDecorator.java:52)
    at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator.execute(DuplicateHandlingCopyActionDecorator.java:42)
    at org.gradle.api.internal.file.copy.CopyActionExecuter.execute(CopyActionExecuter.java:38)
    at org.gradle.api.tasks.AbstractCopyTask.copy(AbstractCopyTask.java:83)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar.copy(ShadowJar.java:64)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
@johnrengelman
Copy link
Collaborator

Thanks. I'll get a patch in for this soon.

@Bakrog
Copy link

Bakrog commented Jul 9, 2015

Is there a workaround?

@johnrengelman
Copy link
Collaborator

Haven't looked into it yet. The workaround is probably to run Gradle 2.4.

@Nelyus
Copy link
Author

Nelyus commented Jul 9, 2015

my work around is to use Gradle 2.4 (through gradlew)

@thiagogcm
Copy link

@johnrengelman I haven't tested it yet but I think you can fix it by changing the imports org.gradle.mvn3.org.codehaus.plexus.util.IOUtil to org.apache.commons.io.IOUtils

johnrengelman added a commit that referenced this issue Jul 17, 2015
Fix compatibility with Gradle 2.5. Fixes #147
@Nelyus
Copy link
Author

Nelyus commented Jul 20, 2015

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants