java.lang.Character cannot be cast to java.lang.Integer when using -X flag on docker:build
See original GitHub issueDescription
I had some problem with a docker:build hanging, so I tried to use -X flag: mvn -X docker:build
And I got the following exception (and maven terminated):
Caused by: java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Integer
at org.fusesource.jansi.AnsiOutputStream.optionInt(AnsiOutputStream.java:502)
at org.fusesource.jansi.AnsiOutputStream.processEscapeCommand(AnsiOutputStream.java:258)
at org.fusesource.jansi.AnsiOutputStream.write(AnsiOutputStream.java:112)
at java.io.FilterOutputStream.write(FilterOutputStream.java:125)
at java.io.PrintStream.write(PrintStream.java:480)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104)
at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185)
at java.io.PrintStream.write(PrintStream.java:527)
at java.io.PrintStream.print(PrintStream.java:669)
at java.io.PrintStream.println(PrintStream.java:806)
at org.slf4j.impl.SimpleLogger.write(SimpleLogger.java:373)
at org.slf4j.impl.SimpleLogger.log(SimpleLogger.java:368)
at org.slf4j.impl.SimpleLogger.debug(SimpleLogger.java:487)
at org.apache.maven.cli.logging.Slf4jLogger.debug(Slf4jLogger.java:44)
at org.apache.maven.monitor.logging.DefaultLog.debug(DefaultLog.java:41)
at io.fabric8.maven.docker.util.AnsiLogger.debug(AnsiLogger.java:70)`
Then I shortened my Dockerfile until docker:build executed successfully (without -X flag). Adding however again the -X flag caused the same error.
- d-m-p version : 0.2.2.1
- Maven version (
mvn -v
) : Apache Maven 3.5.0
my configuration
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.22.1</version>
<configuration>
<images>
<image>
<name>wildfly10.1.0-oracle-jdk8</name>
<build>
<dockerFileDir>${basedir}/docker-build</dockerFileDir>
<tags>
<tag>latest</tag>
</tags>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
- Docker version : Version 17.09.0-ce-win32 (13529)
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
cannot be cast to java.lang.Integer - Stack Overflow
I wanted to create a compareTo method but it gives me an error. Can anyone help me with this ...
Read more >Character cannot be cast to java.lang.Integer Exception - GATK
Hi, I'm using the picard SamtoFastq method in Terra and am getting the error pasted below on some bam files. Please see below...
Read more >Multi-stage builds - Docker Documentation
Keeping your images small with multi-stage builds.
Read more >Use kaniko to build Docker images - GitLab Docs
kaniko is a tool to build container images from a Dockerfile, inside a container or Kubernetes cluster. kaniko solves two problems with using...
Read more >Apache Karaf Container 4.x - Documentation
It also supports the "run anywhere" concept (on any machine with Java, cloud, docker images, ... Error executing command: [C cannot be cast...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed with #1039
@rhuss I have raised a PR with a workaround. See if it helps. https://github.com/fabric8io/docker-maven-plugin/pull/1039