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

Unable to create a Checker #15

Open
chrisjenx opened this issue Oct 12, 2015 · 11 comments
Open

Unable to create a Checker #15

chrisjenx opened this issue Oct 12, 2015 · 11 comments

Comments

@chrisjenx
Copy link

This has started appearing recently:

: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':core:androidCheckstyle'.
> Unable to create a Checker: configLocation {file:/Users/chris/Git/OwlrAndroid/core/build/tmp/android-check/checkstyle.xml}, classpath {null}.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

The only thing I can think of is maybe Gradle 2.7?
I'm still using build-tools 1.3.1

@igelgrun
Copy link
Member

igelgrun commented Nov 2, 2015

Sorry for late answer, I was in vacation.

Could you use --stacktrace and send me the exception?

@chrisjenx
Copy link
Author

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':controller:androidCheckstyle'.
> Unable to create a Checker: configLocation {file:/Users/chris/Git/OwlrAndroid/controller/build/tmp/android-check/checkstyle.xml}, classpath {null}.

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':controller:androidCheckstyle'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:62)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: Unable to create a Checker: configLocation {file:/Users/chris/Git/OwlrAndroid/controller/build/tmp/android-check/checkstyle.xml}, classpath {null}.
    at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.createChecker(CheckstyleAntTask.java:405)
    at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.realExecute(CheckstyleAntTask.java:309)
    at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.execute(CheckstyleAntTask.java:292)
    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.Task$perform.call(Unknown Source)
    at com.noveogroup.android.check.checkstyle.CheckstyleCheck.performCheck(CheckstyleCheck.groovy:60)
    at com.noveogroup.android.check.common.CommonCheck$_apply_closure2.doCall(CommonCheck.groovy:83)
    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:554)
    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:535)
    at org.gradle.api.internal.tasks.TaskMutator$1.execute(TaskMutator.java:77)
    at org.gradle.api.internal.tasks.TaskMutator$1.execute(TaskMutator.java:73)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 14 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - Unable to instantiate RedundantThrows
    at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:168)
    at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:137)
    at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.createChecker(CheckstyleAntTask.java:402)
    ... 27 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate RedundantThrows
    at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:153)
    at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:176)
    at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:137)
    at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:163)
    ... 29 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate RedundantThrowsCheck
    at com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:109)
    at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:150)
    ... 32 more

@chrisjenx
Copy link
Author

Worth noting my config is as such:

check {
  abortOnError true
  checkstyle {
    abortOnError true
    config rootProject.file("checkstyle.xml")
  }
  // configuration of PMD checker
  pmd {
    skip true
  }
}

@eyedol
Copy link

eyedol commented Dec 1, 2015

I had this same error because I was using version 6.13 of checkstyle. I used the config below to upgrade the checkstyle plugin. After removing that and upgraded gradle to v2.9 everything worked well. BTW I'm not using this plugin. I stumbled on this issue whiles searching for a solution. Hopefully it will give a hint on possible fix.

checkstyle {
    toolVersion = "6.13"
}

@Shusshu
Copy link

Shusshu commented Jan 6, 2016

Same issue...
@chrisjenx found a solution?

@chrisjenx
Copy link
Author

Oh I upgraded gradle I think

@Shusshu
Copy link

Shusshu commented Jan 6, 2016

I'm using the 2.10 and the android gradle 1.5.0

@Shusshu
Copy link

Shusshu commented Jan 6, 2016

Ok I commented the module CatchParameterName and it worked

<module name="CatchParameterName">

@ldimitroff
Copy link

Hi, I'm having the same issues:

Gradle 2.10
Android Gradle Build Tools 2.1.2

Any ideas?

@fifa0329
Copy link

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':kepler:androidCheckstyle'.

Unable to create a Checker: configLocation {file:/Users/wlx/kepler4android/kepler/build/tmp/android-check/checkstyle.xml}, classpath {null}.

  • Try:
    Run with --info or --debug option to get more log output.

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':kepler:androidCheckstyle'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    Caused by: Unable to create a Checker: configLocation {file:/Users/wlx/kepler4android/kepler/build/tmp/android-check/checkstyle.xml}, classpath {null}.
    at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.createChecker(CheckstyleAntTask.java:405)
    at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.realExecute(CheckstyleAntTask.java:309)
    at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.execute(CheckstyleAntTask.java:292)
    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.Task$perform.call(Unknown Source)
    at com.noveogroup.android.check.checkstyle.CheckstyleCheck.performCheck(CheckstyleCheck.groovy:60)
    at com.noveogroup.android.check.common.CommonCheck$_apply_closure2.doCall(CommonCheck.groovy:83)
    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:590)
    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:571)
    at org.gradle.api.internal.tasks.TaskMutator$1.execute(TaskMutator.java:77)
    at org.gradle.api.internal.tasks.TaskMutator$1.execute(TaskMutator.java:73)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 14 more
    Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - Unable to instantiate CatchParameterName
    at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:168)
    at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:137)
    at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.createChecker(CheckstyleAntTask.java:402)
    ... 27 more
    Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate CatchParameterName
    at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:153)
    at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:176)
    at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:137)
    at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:163)
    ... 29 more
    Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate CatchParameterNameCheck
    at com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:109)
    at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:150)
    ... 32 more

BUILD FAILED

@ajibadeseun
Copy link

Hi everyone, please check the following link to resolve the issue:
https://github.com/noveogroup/android-check

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

No branches or pull requests

7 participants