question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

M12.1 fails with "URISyntaxException: Illegal character in authority at index 7" under windows

See original GitHub issue

I’m running detekt with maven on windows. Here is my config

<phase>validate</phase>
<configuration>
    <target name="detekt">
        <java taskname="detekt"
              dir="${project.basedir}"
              fork="true"
              failonerror="true"
              classname="io.gitlab.arturbosch.detekt.cli.Main"
              classpathref="maven.plugin.classpath">
            <arg value="--project"/>
            <arg value="${project.basedir}"/>
            <arg value="--config"/>
            <arg value="${project.basedir}/build/src/main/resources/omc-detekt.yml"/>
            <arg value="--filters"/>
            <arg value=".*test.*"/>
            <arg value="--output"/>
            <arg value="${project.build.directory}/detekt-report/detekt.xml"/>
        </java>
    </target>
</configuration>

Failure log:

[Acceptance tests] [INFO] Executing tasks
[Acceptance tests] 
[Acceptance tests] detekt:
[Acceptance tests]    [detekt] Exception in thread "main" java.lang.IllegalArgumentException: Illegal character in authority at index 7: file://C:\Jenkins\workspace\hes_enhancement_bump_detekt-ZXXJCVCLV6URFQ7ERNCH6PULFPARMMDBNRIPX4SZJF6HGEGM3TTA
[Acceptance tests]    [detekt] 	at java.net.URI.create(URI.java:852)
[Acceptance tests]    [detekt] 	at io.gitlab.arturbosch.detekt.cli.ExistingPathConverter.convert(PathConverters.kt:16)
[Acceptance tests]    [detekt] 	at io.gitlab.arturbosch.detekt.cli.ExistingPathConverter.convert(PathConverters.kt:14)
[Acceptance tests]    [detekt] 	at com.beust.jcommander.JCommander.convertValue(JCommander.java:1472)
[Acceptance tests]    [detekt] 	at com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:238)
[Acceptance tests]    [detekt] 	at com.beust.jcommander.JCommander.processFixedArity(JCommander.java:895)
[Acceptance tests]    [detekt] 	at com.beust.jcommander.JCommander.processFixedArity(JCommander.java:870)
[Acceptance tests]    [detekt] 	at com.beust.jcommander.JCommander.parseValues(JCommander.java:721)
[Acceptance tests]    [detekt] 	at com.beust.jcommander.JCommander.parse(JCommander.java:340)
[Acceptance tests]    [detekt] 	at com.beust.jcommander.JCommander.parse(JCommander.java:319)
[Acceptance tests]    [detekt] 	at io.gitlab.arturbosch.detekt.cli.JCommanderKt.parseArguments(JCommander.kt:14)
[Acceptance tests]    [detekt] 	at io.gitlab.arturbosch.detekt.cli.Main$Companion.parseArgumentsCheckingReportDirectory(Main.kt:87)
[Acceptance tests]    [detekt] 	at io.gitlab.arturbosch.detekt.cli.Main$Companion.main(Main.kt:78)
[Acceptance tests]    [detekt] 	at io.gitlab.arturbosch.detekt.cli.Main.main(Main.kt)
[Acceptance tests]    [detekt] Caused by: java.net.URISyntaxException: Illegal character in authority at index 7: file://C:\Jenkins\workspace\hes_enhancement_bump_detekt-ZXXJCVCLV6URFQ7ERNCH6PULFPARMMDBNRIPX4SZJF6HGEGM3TTA
[Acceptance tests]    [detekt] 	at java.net.URI$Parser.fail(URI.java:2848)
[Acceptance tests]    [detekt] 	at java.net.URI$Parser.parseAuthority(URI.java:3186)
[Acceptance tests]    [detekt] 	at java.net.URI$Parser.parseHierarchical(URI.java:3097)
[Acceptance tests]    [detekt] 	at java.net.URI$Parser.parse(URI.java:3053)
[Acceptance tests]    [detekt] 	at java.net.URI.<init>(URI.java:588)
[Acceptance tests]    [detekt] 	at java.net.URI.create(URI.java:850)
[Acceptance tests]    [detekt] 	... 13 more

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
arturboschcommented, Jun 27, 2017

Thats kind of you, thx! Will point you to the PR to test it then 😃

0reactions
lock[bot]commented, Jun 20, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics.

Read more comments on GitHub >

github_iconTop Results From Across the Web

URI SyntaxException: Illegal character in authority at index 7
One of my students claims it fails on windows, and I have no way of testing this as I don't have access to...
Read more >
java.net.URISyntaxException: Illegal ... - Google Groups
Could someone tell me why do I get the "java.net.URISyntaxException: Illegal character in authority at index 7:" error? My env detail: 1. Windows...
Read more >
Illegal character in authority at index 7 while making https ...
You have a space at index 7 of your string LOGIN_URL and it is causing the exception. It should be like this.
Read more >
Illegal character in authority at index 7: http://training4 ...
I have double checked that no hidden character exist and removed an entered the text a couple of times but the error doesn't...
Read more >
Java.net.URISyntaxException: Illegal character in authority at ...
ERROR : "Java.net.URISyntaxException: Illegal character in authority at index 2: //<-DomainName|-dn> domain_name] :6006" while logging into DVO using the DVO ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found