I'm trying to run ./gradlew checkstyleMain on my project, and I keep getting this error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':checkstyleMain'.
> Unable to create Root Module
when I run it with --stacktrace, I get
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module SuppressionFilter - Unable to find: .checks/checkstyle_suppressions.xml
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:477)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:198)
at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.createRootModule(CheckstyleAntTask.java:412)
... 140 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to find: .checks/checkstyle_suppressions.xml
at com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader.getSuppressionLoader(SuppressionsLoader.java:279)
at com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader.loadSuppressions(SuppressionsLoader.java:233)
at com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader.loadSuppressions(SuppressionsLoader.java:220)
at com.puppycrawl.tools.checkstyle.filters.SuppressionFilter.finishLocalSetup(SuppressionFilter.java:81)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:194)
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:472)
... 142 more
Caused by: java.io.FileNotFoundException: /Users/Matthew.Hall/.gradle/daemon/7.4.2/.checks/checkstyle_suppressions.xml (No such file or directory)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:653)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:150)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:861)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:825)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:637)
at com.puppycrawl.tools.checkstyle.XmlLoader.parseInputSource(XmlLoader.java:84)
at com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader.getSuppressionLoader(SuppressionsLoader.java:275)
... 147 more
I've checked, and the file is in the my in my .checks folder in my project, however that last "caused by" makes it look like its checking a folder it shouldn't be.
I'm able to work around it by copying my .checks folder from the project into /Users/Matthew.Hall/.gradle/daemon/7.4.2/ but I shouldn't have to do that.
How can I fix this? (Can't figure out how to get it to check in my project folder instead of .gradle/daemon/7.4.2).
I have set the Zookeeper properties of "delete.topic.enable" to true. But I still cannot delete the topic. When I do mvn install or mvn test, I got following problems:
WARN Error processing kafka.log:type=LogManager,name=LogDirectoryOffline,logDirectory=C:\Users\extznq\AppData\Local\Temp\EH4Test7267133751803693562 (com.yammer.metrics.reporting.JmxReporter:397)
javax.management.MalformedObjectNameException: Invalid character ':' in value part of property
ERROR Error while deleting healthchecktopic1516638375589-0 in dir C:\Users\extznq\AppData\Local\Temp\EH4Test9083449671042580730. (kafka.server.LogDirFailureChannel:107)
java.io.IOException: Failed to rename log directory from C:\Users\{My-topic-path} to C:\Users\{My-topic-path}-0.0a40ae7410c2401aba0816891789c334-delete
at kafka.log.LogManager.asyncDelete(LogManager.scala:671)
at kafka.cluster.Partition$$anonfun$delete$1.apply(Partition.scala:178)
at kafka.cluster.Partition$$anonfun$delete$1.apply(Partition.scala:173)
at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:217)
at kafka.utils.CoreUtils$.inWriteLock(CoreUtils.scala:225)
at kafka.cluster.Partition.delete(Partition.scala:173)
at kafka.server.ReplicaManager.stopReplica(ReplicaManager.scala:341)
at kafka.server.ReplicaManager$$anonfun$stopReplicas$2.apply(ReplicaManager.scala:373)
at kafka.server.ReplicaManager$$anonfun$stopReplicas$2.apply(ReplicaManager.scala:371)
at scala.collection.Iterator$class.foreach(Iterator.scala:891)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at kafka.server.ReplicaManager.stopReplicas(ReplicaManager.scala:371)
at kafka.server.KafkaApis.handleStopReplicaRequest(KafkaApis.scala:190)
at kafka.server.KafkaApis.handle(KafkaApis.scala:104)
at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:65)
at java.lang.Thread.run(Thread.java:745)
ERROR [Broker id=0] Ignoring stop replica (delete=true) for partition healthchecktopic1516728986980-0 due to storage exception (state.change.logger:107)
org.apache.kafka.common.errors.KafkaStorageException: Error while deleting healthchecktopic1516728986980-0 in dir C:\Users\AppData\Local\Temp\EH4Test7267133751803693562.
Caused by: java.io.IOException: Failed to rename log directory from C:\Users\AppData\Local\Temp\EH4Test7267133751803693562\healthchecktopic1516728986980-0 to C:\Users\AppData\Local\Temp\EH4Test7267133751803693562\healthchecktopic1516728986980-0.65fc6c32c44940e58c1a45bd2972523a-delete
at kafka.log.LogManager.asyncDelete(LogManager.scala:671)
I think the Warning is all right. But I do not know why I would get errors, although I run the Eclipse as administrator. Especially, the KafkaStorageException, I still have 50GB in my computer.
Environment:
Windows 10
Zookeeper 3.5.3-beta
Kafka 1.0.0
looks like you have an invalid character in the properties: Invalid character ':' in value part of property; also in the line below it seems that the placeholder you are using it is not replaced properly: C:\Users\{My-topic-path}
Furthermore there is an open issues related to file operation such as moving/delete in windows environment, I got the same problem upgrading from 0.10.2.1 to 1.1.0
This is the link to the issue: KAFKA-1194
I have a gradle build file with the following task which need to run sphinx-build, I'm running it on Mac OS X with the gradle information bellow.
task makeDocs(type:Exec) {
workingDir 'sphinx'
commandLine 'sphinx-build'
args = ["-b", "html", "-d", "build/doctrees", "-t", "$platformDir", "build/ppsource", "build/html"]
}
When I run this task I get the following exception:
Caused by: net.rubygrapefruit.platform.NativeException: Could not start 'sphinx-build'
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:27)
at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(WrapperProcessLauncher.java:36)
at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:65)
... 1 more
Caused by: java.io.IOException: Cannot run program "sphinx-build" (in directory "/Users/idoran/Documents/Seebo/dev/SDK/seebosdk_docs/sphinx"): error=2, No such file or directory
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
... 3 more
Caused by: java.io.IOException: error=2, No such file or directory
When I run sphinx-build from the same terminal everything works fine.
$ gradle --version
------------------------------------------------------------
Gradle 2.2.1
------------------------------------------------------------
Build time: 2014-11-24 09:45:35 UTC
Build number: none
Revision: 6fcb59c06f43a4e6b1bcb401f7686a8601a1fb4a
Groovy: 2.3.6
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_65 (Oracle Corporation 25.65-b01)
OS: Mac OS X 10.10.5 x86_64
Try stopping the gradle daemon with ./gradlew --stop
I had the same problem with something as simple as:
commandLine = [ "node", "--version"]
It came down to the gradle daemon having a cached location of node which no longer existed (I had updated node sometime before).
You shouldn't use commandLine + args together in a Gradle Exec task. Either use commandLine with executable and all arguments as the value, or executable + args which is the better alternative usually.
I had similar issue.. With Vampire's solution, I was able to step up.. However the issue seems to be the sh file not able to point to the exact file location.
Meaning, even with workingDir (wherein actual sh file resides) set properly, still was getting the following exception.
Caused by: java.io.IOException: error=2, No such file or directory
Finally, this post resolved the issue..
Though the original issue of this post's question is already resolved, thought of sharing this solution of adding the absolute file path to actual sh file would resolve the "No such file or directory" issue to someone in the future..
I ran into similar issue and got it resolved with absolute path reference to sh file.
Mine was,
workingDir = "path_to_the_actual_sh_file_to_be_executed"
executable = new File(workingDir, 'actual.sh')
args = ['configure', 'manageRepo', '-tenant', 'etc...']
This error can occur for a couple different reasons. Unfortunately it is not always clear from the error message which one is the problem.
workingDir does not exist. Make sure the specified directory exists before your task runs, or create it in a doFirst block like this:
task makeDocs(type: Exec) {
workingDir 'sphinx'
executable 'sphinx-build'
args = ["-b", "html", /* other args... */]
doFirst {
workingDir.mkdirs()
}
}
The specified executable does not exist or is not on the path. As other answers mention, make sure you are either specifying only commandLine, or both executable and args. So either:
commandLine "sphinx-build", "-b", "html"
or equivalently,
executable = "sphinx-build"
args = ["-b", "html"]
My gradle file contained a snippet to get the aws auth token and I was getting the same failure - Caused by: java.io.IOException: error=2, No such file or directory
In my case, the issue was not caused due to caching.
It was due to gradle not being able to find the aws binary.
What worked for me - Use the which aws command to find the absolute path to aws binary and use it for the binary as shown below. Hope this helps someone with similar issue.
Caused by: org.codehaus.mojo.gwt.shell.JavaCommandException: Failed to
execute command line : Caused by:
org.codehaus.plexus.util.cli.CommandLineException: Error while
executing process. Caused by: java.io.IOException: Cannot run program
"D:\Java\jdk1.8.0_60\jre\bin\java": CreateProcess error=206,
文件名或扩展名太长。
The error message says 文件名或扩展名太长。 which translates to "The filename or extension is too long". Check the stack trace. It shows a long command line trying to be executed, but I can't see the whole line. So the problem may be exactly as stated in the error message and you will have to find a way to reduce the length of the command line, perhaps by reducing the length of the classpath parameter.
I am trying to create a build job for my cucumber test in mac. However its throwing error. Not sure what i am doing wrong. I can run my tests using this in Terminal:
bundle exec cucumber -t #tests
in Jenkins "Execute Batch commands" section i have added below:
bundle install
bundle exec cucumber -t #tests
I am getting this below errors in my Jenkins Console Output:
Started by user anonymous
Building in workspace /Users/MacPro/.jenkins/workspace/build_job_name
[tests_build] $ cmd /c call /var/folders/fx/m8ltp5dx17lbmqpgpwlc9ps00000gn/T/hudson6634803463309653425.bat
FATAL: command execution failed
java.io.IOException: Cannot run program "cmd" (in directory "/Users/MacPro/.jenkins/workspace/tests_build"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:815)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:95)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:64)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:184)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 15 more
Build step 'Execute Windows batch command' marked build as failure
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE
Need help to resolve this.