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

Exception while loading package-list from ExternalDocumentationLinkImpl #213

Closed
ChansEbm opened this issue Sep 1, 2017 · 34 comments
Closed

Comments

@ChansEbm
Copy link

ChansEbm commented Sep 1, 2017

Guice provision errors:

  1. Error injecting constructor, java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=https://developer.android.com/reference/, packageListUrl=https://developer.android.com/reference/package-list)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.(ExternalDocumentationLinkResolver.kt:25)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.class(ExternalDocumentationLinkResolver.kt:25)
    while locating org.jetbrains.dokka.ExternalDocumentationLinkResolver
    for parameter 4 at org.jetbrains.dokka.DeclarationLinkResolver.(DeclarationLinkResolver.kt:9)
    while locating org.jetbrains.dokka.DeclarationLinkResolver
    for parameter 0 at org.jetbrains.dokka.PackageDocs.(PackageDocs.kt:13)
    at org.jetbrains.dokka.PackageDocs.class(PackageDocs.kt:12)
    while locating org.jetbrains.dokka.PackageDocs

1 error

This issus shown when i use ./gradlew dokka
how can i fix this.

@semoro
Copy link
Contributor

semoro commented Sep 6, 2017

Try again, or maybe you are behind the corporate proxy? Then you should manually download https://developer.android.com/reference/package-list, place it somewhere and use packageListUrl parameter to configure its location.
Also please post full stack-trace including caused by

@allo86
Copy link

allo86 commented Jan 11, 2018

Hi. I am getting this error now with 0.9.15 version. This is the full stack-trace:

* What went wrong:
Execution failed for task ':ui:dokka'.
> Guice provision errors:
  
  1) Error injecting constructor, java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=http://docs.oracle.com/javase/6/docs/api/, packageListUrl=http://docs.oracle.com/javase/6/docs/api/package-list)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.<init>(ExternalDocumentationLinkResolver.kt:25)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.class(ExternalDocumentationLinkResolver.kt:25)
    while locating org.jetbrains.dokka.ExternalDocumentationLinkResolver
      for parameter 4 at org.jetbrains.dokka.DeclarationLinkResolver.<init>(DeclarationLinkResolver.kt:9)
    while locating org.jetbrains.dokka.DeclarationLinkResolver
      for parameter 0 at org.jetbrains.dokka.PackageDocs.<init>(PackageDocs.kt:13)
    at org.jetbrains.dokka.PackageDocs.class(PackageDocs.kt:12)
    while locating org.jetbrains.dokka.PackageDocs
  
  1 error

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

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':ui:dokka'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.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:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: com.google.inject.ProvisionException: Guice provision errors:

1) Error injecting constructor, java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=http://docs.oracle.com/javase/6/docs/api/, packageListUrl=http://docs.oracle.com/javase/6/docs/api/package-list)
  at org.jetbrains.dokka.ExternalDocumentationLinkResolver.<init>(ExternalDocumentationLinkResolver.kt:25)
  at org.jetbrains.dokka.ExternalDocumentationLinkResolver.class(ExternalDocumentationLinkResolver.kt:25)
  while locating org.jetbrains.dokka.ExternalDocumentationLinkResolver
    for parameter 4 at org.jetbrains.dokka.DeclarationLinkResolver.<init>(DeclarationLinkResolver.kt:9)
  while locating org.jetbrains.dokka.DeclarationLinkResolver
    for parameter 0 at org.jetbrains.dokka.PackageDocs.<init>(PackageDocs.kt:13)
  at org.jetbrains.dokka.PackageDocs.class(PackageDocs.kt:12)
  while locating org.jetbrains.dokka.PackageDocs

1 error
        at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
        at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
        at org.jetbrains.dokka.DokkaGeneratorKt.buildDocumentationModule(DokkaGenerator.kt:146)
        at org.jetbrains.dokka.DokkaGenerator.appendSourceModule(DokkaGenerator.kt:77)
        at org.jetbrains.dokka.DokkaGenerator.generate(DokkaGenerator.kt:40)
        at org.jetbrains.dokka.DokkaBootstrapImpl.generate(DokkaBootstrapImpl.kt:74)
        at org.jetbrains.dokka.DelegatedInvocationHandler.invoke(ProxyUtils.kt:41)
        at com.sun.proxy.$Proxy96.generate(Unknown Source)
        at org.jetbrains.dokka.gradle.DokkaTask.generate(main.kt:296)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:731)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:705)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
        ... 27 more
Caused by: java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=http://docs.oracle.com/javase/6/docs/api/, packageListUrl=http://docs.oracle.com/javase/6/docs/api/package-list)
        at org.jetbrains.dokka.ExternalDocumentationLinkResolver.<init>(ExternalDocumentationLinkResolver.kt:115)
        at org.jetbrains.dokka.ExternalDocumentationLinkResolver$$FastClassByGuice$$34356095.newInstance(<generated>)
        at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
        at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
        at com.google.inject.Scopes$1$1.get(Scopes.java:65)
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
        at com.google.inject.Scopes$1$1.get(Scopes.java:65)
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
        at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
        at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
        ... 48 more
Caused by: java.io.IOException: Server returned HTTP response code: 407 for URL: http://docs.oracle.com/javase/6/docs/api/package-list
        at org.jetbrains.dokka.ExternalDocumentationLinkResolver.loadPackageList(ExternalDocumentationLinkResolver.kt:78)
        at org.jetbrains.dokka.ExternalDocumentationLinkResolver.<init>(ExternalDocumentationLinkResolver.kt:113)
        ... 74 more

The 407 error is because I am behind a corporate proxy. I already have those properties defined in the gradle.properties file (systemProp.http.proxyPort, systemProp.http.proxyUser, etc.). Is it possible that dokka could use those values?

@fralbo
Copy link

fralbo commented Mar 27, 2018

same problem for me :-(

Could you please provide an example of your workaround? I tried the following:

dokka {
    outputFormat = 'html'
    outputDirectory = "$buildDir/javadoc"

    externalDocumentationLink {
        // Root URL of the generated documentation to link with. The trailing slash is required!
        url = new URL("http://github.com/me/myrepo")

        // If package-list file located in non-standard location
        packageListUrl = new URL("file:///D:/package-list")
    }
}

But got the same problem:

Error:Execution failed for task ':app:dokka'.
> Guice provision errors:
  1) Error injecting constructor, java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=http://docs.oracle.com/javase/6/docs/api/, packageListUrl=http://docs.oracle.com/javase/6/docs/api/package-list)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.<init>(ExternalDocumentationLinkResolver.kt:27)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.class(ExternalDocumentationLinkResolver.kt:27)
    while locating org.jetbrains.dokka.ExternalDocumentationLinkResolver
      for parameter 4 at org.jetbrains.dokka.DeclarationLinkResolver.<init>(DeclarationLinkResolver.kt:13)
    while locating org.jetbrains.dokka.DeclarationLinkResolver
      for parameter 0 at org.jetbrains.dokka.PackageDocs.<init>(PackageDocs.kt:13)
    at org.jetbrains.dokka.PackageDocs.class(PackageDocs.kt:12)
    while locating org.jetbrains.dokka.PackageDocs
  1 error

Caused by: com.google.inject.ProvisionException: Guice provision errors:

1) Error injecting constructor, java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=http://docs.oracle.com/javase/6/docs/api/, packageListUrl=http://docs.oracle.com/javase/6/docs/api/package-list)
  at org.jetbrains.dokka.ExternalDocumentationLinkResolver.<init>(ExternalDocumentationLinkResolver.kt:27)
  at org.jetbrains.dokka.ExternalDocumentationLinkResolver.class(ExternalDocumentationLinkResolver.kt:27)
  while locating org.jetbrains.dokka.ExternalDocumentationLinkResolver
    for parameter 4 at org.jetbrains.dokka.DeclarationLinkResolver.<init>(DeclarationLinkResolver.kt:13)
  while locating org.jetbrains.dokka.DeclarationLinkResolver
    for parameter 0 at org.jetbrains.dokka.PackageDocs.<init>(PackageDocs.kt:13)
  at org.jetbrains.dokka.PackageDocs.class(PackageDocs.kt:12)
  while locating org.jetbrains.dokka.PackageDocs

It seems it doesn't care about packageListUrl

@sdeleuze
Copy link

sdeleuze commented Apr 4, 2018

FYI it seems there is a difference of behavior between Dokka 0.9.15 and 0.9.16, see https://jira.spring.io/browse/SPR-16687 for more details.

@fralbo On my side packageListUrl seems to works as expected.

@nithdi
Copy link

nithdi commented May 30, 2018

Same problem here. The packageListUrl workaround doesn't work for me either. Is it possible to address this issue for 0.9.18?

@semoro
Copy link
Contributor

semoro commented May 30, 2018

It could be partially fixed, by providing the ability to disable external links to java stdlib, and overriding it manually

@nithdi
Copy link

nithdi commented May 31, 2018

What about the ability to read the gradle proxy settings?

@semoro
Copy link
Contributor

semoro commented May 31, 2018

@nithdi
Just checked, and it appears to work

I've started proxy on localhost and added a few lines to my gradle.properties

systemProp.http.proxyHost=localhost
systemProp.http.proxyPort=8080

systemProp.https.proxyHost=localhost
systemProp.https.proxyPort=8080

And it makes requests to proxy correctly

@nithdi
Copy link

nithdi commented May 31, 2018

@semoro
Sorry I wasn't clear enough about the issue. Dokka is able to connect through a normal proxy, but it doesn't work if the proxy requires authentication. I get HTTP 407 error if I run dokka behind my companies proxy.

You can set authentication in gradle.properties with
systemProp.http.proxyUser
systemProp.http.proxyPassword
but dokka seems to ignore those settings.

@semoro
Copy link
Contributor

semoro commented May 31, 2018

@nithdi
Please, provide full stack-trace, to do so, run Gradle with option --stacktrace

Just checked for myself, if proxy-auth enabled, it will use provided

systemProp.http.proxyUser
systemProp.http.proxyPassword

@semoro
Copy link
Contributor

semoro commented May 31, 2018

@nithdi
Maybe problem is that you also need to specify proxyUser / proxyPassword parameters for https

@nithdi
Copy link

nithdi commented May 31, 2018

Good hint, but unfortunately it is still not working.

Stacktrace:

  1. Error injecting constructor, java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=https://kotlinlang.org/api/latest/jvm/stdlib/, packageListUrl=https
    ://kotlinlang.org/api/latest/jvm/stdlib/package-list)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.(ExternalDocumentationLinkResolver.kt:27)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.class(ExternalDocumentationLinkResolver.kt:27)
    while locating org.jetbrains.dokka.ExternalDocumentationLinkResolver
    for parameter 4 at org.jetbrains.dokka.DeclarationLinkResolver.(DeclarationLinkResolver.kt:13)
    while locating org.jetbrains.dokka.DeclarationLinkResolver
    for parameter 0 at org.jetbrains.dokka.PackageDocs.(PackageDocs.kt:13)
    at org.jetbrains.dokka.PackageDocs.class(PackageDocs.kt:12)
    while locating org.jetbrains.dokka.PackageDocs

1 error
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
at org.jetbrains.dokka.DokkaGeneratorKt.buildDocumentationModule(DokkaGenerator.kt:148)
at org.jetbrains.dokka.DokkaGenerator.appendSourceModule(DokkaGenerator.kt:77)
at org.jetbrains.dokka.DokkaGenerator.generate(DokkaGenerator.kt:40)
at org.jetbrains.dokka.DokkaBootstrapImpl.generate(DokkaBootstrapImpl.kt:77)
at org.jetbrains.dokka.DelegatedInvocationHandler.invoke(ProxyUtils.kt:41)
at com.sun.proxy.$Proxy111.generate(Unknown Source)
at org.jetbrains.dokka.gradle.DokkaTask.generate(main.kt:319)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:780)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:747)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
... 103 more
Caused by: java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=https://kotlinlang.org/api/latest/jvm/stdlib/, packageListUrl=https://kotlinlang.org/api
/latest/jvm/stdlib/package-list)
at org.jetbrains.dokka.ExternalDocumentationLinkResolver.(ExternalDocumentationLinkResolver.kt:149)
at org.jetbrains.dokka.ExternalDocumentationLinkResolver$$FastClassByGuice$$34356095.newInstance()
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
... 124 more
Caused by: java.lang.RuntimeException: Unhandled http code: 407
at org.jetbrains.dokka.ExternalDocumentationLinkResolver.doOpenConnectionToReadContent(ExternalDocumentationLinkResolver.kt:65)
at org.jetbrains.dokka.ExternalDocumentationLinkResolver.doOpenConnectionToReadContent$default(ExternalDocumentationLinkResolver.kt:43)
at org.jetbrains.dokka.ExternalDocumentationLinkResolver.loadPackageList(ExternalDocumentationLinkResolver.kt:112)
at org.jetbrains.dokka.ExternalDocumentationLinkResolver.(ExternalDocumentationLinkResolver.kt:147)
... 150 more

@jacombo
Copy link

jacombo commented May 31, 2018

proxy support would be added by #314
it support with basic authentication has been added using system properties below

-Dhttp.proxyHost=host.domain.com
-Dhttp.proxyPort=8080
-Dhttps.proxyHost=host.domain.com
-Dhttps.proxyPort=8080
-DproxySet=true
-DproxyUser=user
-DproxyPassword=password

if proxySet is true and proxyUser with proxyPassword is set then basic proxy authentication is added

@semoro
Copy link
Contributor

semoro commented Jun 1, 2018

@nithdi Is your proxy requires basic authentication or client-side certificate?

@semoro
Copy link
Contributor

semoro commented Jun 1, 2018

@nithdi Looks like I succeed with reproduction, for me same problem reproduces when
HTTP and HTTPS proxies were on different ports/hosts, or have different passwords.
Is it true for you?

@semoro
Copy link
Contributor

semoro commented Jun 1, 2018

@nithdi
systemProp.jdk.http.auth.tunneling.disabledSchemes=

http://www.oracle.com/technetwork/java/javase/8u111-relnotes-3124969.html

core-libs/java.net
Disable Basic authentication for HTTPS tunneling
In some environments, certain authentication schemes may be undesirable when proxying HTTPS. Accordingly, the Basic authentication scheme has been deactivated, by default, in the Oracle Java Runtime, by adding Basic to the jdk.http.auth.tunneling.disabledSchemes networking property. Now, proxies requiring Basic authentication when setting up a tunnel for HTTPS will no longer succeed by default. If required, this authentication scheme can be reactivated by removing Basic from the jdk.http.auth.tunneling.disabledSchemes networking property, or by setting a system property of the same name to "" ( empty ) on the command line.

Additionally, the jdk.http.auth.tunneling.disabledSchemes and jdk.http.auth.proxying.disabledSchemes networking properties, and system properties of the same name, can be used to disable other authentication schemes that may be active when setting up a tunnel for HTTPS, or proxying plain HTTP, respectively.
JDK-8160838 (not public)

See RFC 2617

Because Basic authentication involves the cleartext transmission of
passwords it SHOULD NOT be used (without enhancements) to protect
sensitive or valuable information.

@jacombo
Copy link

jacombo commented Jun 1, 2018

I will try use "systemProp.jdk.http.auth.tunneling.disabledSchemes" with maven + proxy + basic authentication and let you know

@semoro
Copy link
Contributor

semoro commented Jun 1, 2018

@jacombo Checked, looks like it doesn't work in Maven, but should be fixed by using Maven Download API instead of plain URLConnection in Maven, let's track this issue in #216, #314

jAwAno added a commit to jAwAno/dokka that referenced this issue Jun 6, 2018
@jAwAno
Copy link

jAwAno commented Jun 6, 2018

ah bit late. but just for your information.
I was also faced this problem and I wrote a simple workaround .
it will obtain proxy settings from JVM arguments. and set it .
almost Gradle user (me also )who behind proxy will already wrote a proxy settings at gradle.properties or some place, than this will work without any settings . and at least this works at my environment

jAwAno added a commit to jAwAno/dokka that referenced this issue Jun 6, 2018
jAwAno added a commit to jAwAno/dokka that referenced this issue Jun 6, 2018
@sl33kr
Copy link

sl33kr commented Jun 15, 2018

Ran into this same problem because we are behind a corporate proxy that uses MITM certificates. Tried the suggestion from this ticket and downloaded the file and added

    externalDocumentationLink {
        url = new URL("http://company.com.au/some/site/")

        // Need this otherwise it attempts to download this from
        // http://docs.oracle.com/javase/6/docs/api/package-list
        packageListUrl = new URL("file:///${projectDir}\\package-list")
    }

However dokka would still attempt to go and download the file. It didn't appear to be respecting this configuration. Managed to stop it by following the suggestion from #188 and created a dokka-cache folder in our repository, downloaded and created the two listed files and added cacheRoot = "${projectDir}\\dokka-cache".

@zhuxiangqing
Copy link

Now is 0.9.17 ,will 0.9.18 fix it?

@phinehasz
Copy link

i tried to add nostdlibLink=true,and build successfully.may help you.

@personal-mkkm
Copy link

When I try to use the dokka maven plugin I got an error - Exception while loading package-list from ExternalDocumentationLinkImpl(url=http://docs.oracle.com/javase/6/docs/api/, packageListUrl=http://docs.oracle.com/javase/6/docs/api/package-list). To fix it, I downloaded the package list and added it to the packageListUrl tag, but ended up getting a malformed URL exception. Not really sure what's wrong. Any help is highly appreciated.

These are my versions:

<spring-auto-restdocs-dokka-json.version>2.0.1</spring-auto-restdocs-dokka-json.version>
<dokka.version>0.9.16</dokka.version>

dokka maven plugin:

<plugin>
    <groupId>org.jetbrains.dokka</groupId>
    <artifactId>dokka-maven-plugin</artifactId>
    <version>${dokka.version}</version>
    <executions>
        <execution>
            <phase>compile</phase>
            <goals>
<goal>dokka</goal>
<goal>javadoc</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>capital.scalable</groupId>
            <artifactId>spring-auto-restdocs-dokka-json</artifactId>
            <version>${spring-auto-restdocs-dokka-json.version}</version>
        </dependency>
    </dependencies>
    <configuration>
        <outputFormat>auto-restdocs-json</outputFormat>
        <outputDir>${project.build.directory}\target\generated-javadoc-json</outputDir>
        <sourceDirectories>
            <dir>src/main/kotlin</dir>
        </sourceDirectories>
        <noStdlibLink>true</noStdlibLink>
        <!--<cacheRoot>${project.basedir}\dokka-cache</cacheRoot>-->
        <externalDocumentationLinks>
            <link>
<packageListUrl>new URL("file:///C:/project/dokka/2114a4473a8231ed72f4678ae4c050e37d7d6b1867aea87b956f30badcd4df09")</packageListUrl>
<packageListUrl>new URL("file:///C:/project/dokka/b0399cd2fcad6fbbe6e9418561d0bdeb49e9a9087f4b551eec9bd0bc2aab047")</packageListUrl>
            </link>
        </externalDocumentationLinks>
    </configuration>
</plugin>

Stacktrace:

Caused by: java.net.MalformedURLException: no protocol: new URL("file:///C:/project/dokka/2114a4473a8231ed72f4678ae4c050e37d7d6b1867aea87b956f30badcd4df09")           
    at java.net.URL.<init> (URL.java:593)                                                                                                                                                                                       
    at java.net.URL.<init> (URL.java:490)                                                                                                                                                                                       
    at java.net.URL.<init> (URL.java:439)                                                                                                                                                                                       
    at org.codehaus.plexus.component.configurator.converters.basic.UrlConverter.fromString (UrlConverter.java:34)                                                                                                               
    at org.codehaus.plexus.component.configurator.converters.basic.AbstractBasicConverter.fromConfiguration (AbstractBasicConverter.java:43)                                                                                    
    at org.eclipse.sisu.plexus.CompositeBeanHelper.convertProperty (CompositeBeanHelper.java:273)                                                                                                                               
    at org.eclipse.sisu.plexus.CompositeBeanHelper.setProperty (CompositeBeanHelper.java:174)                                                                                                                                   
    at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration (ObjectWithFieldsConverter.java:101)                                                                      
    at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.fromConfiguration (ObjectWithFieldsConverter.java:57)                                                                          
    at org.codehaus.plexus.component.configurator.converters.composite.AbstractCollectionConverter.fromChildren (AbstractCollectionConverter.java:54)                                                                           
    at org.codehaus.plexus.component.configurator.converters.composite.CollectionConverter.fromConfiguration (CollectionConverter.java:68)                                                                                      
    at org.eclipse.sisu.plexus.CompositeBeanHelper.convertProperty (CompositeBeanHelper.java:268)                                                                                                                               
    at org.eclipse.sisu.plexus.CompositeBeanHelper.setProperty (CompositeBeanHelper.java:174)                                                                                                                                   
    at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration (ObjectWithFieldsConverter.java:101)                                                                      
    at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent (BasicComponentConfigurator.java:34)                                                                                            
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields (DefaultMavenPluginManager.java:634)                                                                                                     
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:596)                                                                                                        
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)                                                                                                                       
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)                                                                                                                                         
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)                                                                                                                                         
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)                                                                                                                                         
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)                                                                                                                
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)                                                                                                                 
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)                                                                                                   
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)                                                                                                                                 
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)                                                                                                                                                          
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)                                                                                                                                                          
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)                                                                                                                                                            
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)                                                                                                                                                                
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)                                                                                                                                                                 
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)                                                                                                                                                                   
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)                                                                                                                                                             
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)                                                                                                                                           
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)                                                                                                                                   
    at java.lang.reflect.Method.invoke (Method.java:498)                                                                                                                                                                        
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)                                                                                                                                     
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)                                                                                                                                             
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)                                                                                                                                   
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)   

@AqrLei
Copy link

AqrLei commented Sep 5, 2018

@allo86 @fralbo

for android

create a new dokka task and specified type

  • not use this
dokka{
    outputFormat = 'javadoc'
    outputDirectory = "$buildDir/documentation"
}
  • add this
task dokkaJavadoc(type:org.jetbrains.dokka.gradle.DokkaTask) {
    outputFormat = 'javadoc'
    outputDirectory = "$buildDir/documentation"
}

@athkalia
Copy link

@semoro Any updates on when 0.9.18 is coming out that allows one to disable fetching the external URLs?

@li469791221
Copy link

i tried to add nostdlibLink=true,and build successfully.may help you.

Which file should I add this in?

@Frontrider
Copy link

Frontrider commented Nov 13, 2018

I have the proper proxy settings set up in my global gradle properties file. This is the only plugin that ignores them so far.
noStdlibLink = true does nothing, neither changing the externalDocumentationLink.

@Frontrider
Copy link

Add an option to disable this linking entirely, especially since it doesn't seem to work at all.

@hbwhypw
Copy link

hbwhypw commented Jun 28, 2019

Same!
Execution failed for task ':dokka'.

Guice provision errors:

  1. Error injecting constructor, java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=https://kotlinlang.org/api/latest/jvm/stdlib/, packageListUrl=https://kotlinlang.org/api/latest/jvm/stdlib/package-list)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.(ExternalDocumentationLinkResolver.kt:32)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.class(ExternalDocumentationLinkResolver.kt:32)
    while locating org.jetbrains.dokka.ExternalDocumentationLinkResolver
    for parameter 4 at org.jetbrains.dokka.DeclarationLinkResolver.(DeclarationLinkResolver.kt:10)
    while locating org.jetbrains.dokka.DeclarationLinkResolver
    for parameter 0 at org.jetbrains.dokka.PackageDocs.(PackageDocs.kt:20)
    at org.jetbrains.dokka.PackageDocs.class(PackageDocs.kt:19)
    while locating org.jetbrains.dokka.PackageDocs

@Tyeeee
Copy link

Tyeeee commented Jul 1, 2019

I was used VPN in Chinese.Use Webpage browses the page of “google”、“android” has OK ,but terminal has not OK.

I was tried
noStdlibLink = true
and
dokka {
outputFormat = 'html'
outputDirectory = "$buildDir/javadoc"
noStdlibLink = true
externalDocumentationLink {
url = new URL("https://developer.android.com/reference/")
packageListUrl = new URL("https://developer.android.com/reference/android/support/package-list")
}
},but not working at all.please help me.

Here is the exception detail:

Task :Multilingual:dokka FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':Multilingual:dokka'.

Guice provision errors:

  1. Error injecting constructor, java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=https://developer.android.com/reference/, packageListUrl=https://developer.android.com/reference/package-list)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.(ExternalDocumentationLinkResolver.kt:32)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.class(ExternalDocumentationLinkResolver.kt:32)
    while locating org.jetbrains.dokka.ExternalDocumentationLinkResolver
    for parameter 4 at org.jetbrains.dokka.DeclarationLinkResolver.(DeclarationLinkResolver.kt:10)
    while locating org.jetbrains.dokka.DeclarationLinkResolver
    for parameter 0 at org.jetbrains.dokka.PackageDocs.(PackageDocs.kt:20)
    at org.jetbrains.dokka.PackageDocs.class(PackageDocs.kt:19)
    while locating org.jetbrains.dokka.PackageDocs

1 error

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

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':Multilingual:dokka'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:95)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:91)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:119)
    at org.gradle.api.internal.tasks.execution.ResolvePreviousStateExecuter.execute(ResolvePreviousStateExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:93)
    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:45)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:94)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:56)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:55)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:67)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:49)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:315)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:305)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:101)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:49)
    at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    Caused by: com.google.inject.ProvisionException: Guice provision errors:

  1. Error injecting constructor, java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=https://developer.android.com/reference/, packageListUrl=https://developer.android.com/reference/package-list)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.(ExternalDocumentationLinkResolver.kt:32)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.class(ExternalDocumentationLinkResolver.kt:32)
    while locating org.jetbrains.dokka.ExternalDocumentationLinkResolver
    for parameter 4 at org.jetbrains.dokka.DeclarationLinkResolver.(DeclarationLinkResolver.kt:10)
    while locating org.jetbrains.dokka.DeclarationLinkResolver
    for parameter 0 at org.jetbrains.dokka.PackageDocs.(PackageDocs.kt:20)
    at org.jetbrains.dokka.PackageDocs.class(PackageDocs.kt:19)
    while locating org.jetbrains.dokka.PackageDocs

1 error
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
at org.jetbrains.dokka.DokkaGeneratorKt.buildDocumentationModule(DokkaGenerator.kt:148)
at org.jetbrains.dokka.DokkaGenerator.appendSourceModule(DokkaGenerator.kt:77)
at org.jetbrains.dokka.DokkaGenerator.generate(DokkaGenerator.kt:40)
at org.jetbrains.dokka.DokkaBootstrapImpl.generate(DokkaBootstrapImpl.kt:79)
at org.jetbrains.dokka.DelegatedInvocationHandler.invoke(ProxyUtils.kt:41)
at com.sun.proxy.$Proxy109.generate(Unknown Source)
at org.jetbrains.dokka.gradle.DokkaTask.generate(main.kt:368)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:48)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:41)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:704)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:671)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.run(ExecuteActionsTaskExecuter.java:284)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:273)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:258)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$200(ExecuteActionsTaskExecuter.java:67)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:145)
at org.gradle.internal.execution.impl.steps.ExecuteStep.execute(ExecuteStep.java:49)
at org.gradle.internal.execution.impl.steps.CancelExecutionStep.execute(CancelExecutionStep.java:34)
at org.gradle.internal.execution.impl.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:69)
at org.gradle.internal.execution.impl.steps.TimeoutStep.execute(TimeoutStep.java:49)
at org.gradle.internal.execution.impl.steps.CatchExceptionStep.execute(CatchExceptionStep.java:33)
at org.gradle.internal.execution.impl.steps.CreateOutputsStep.execute(CreateOutputsStep.java:50)
at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:43)
at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:29)
at org.gradle.internal.execution.impl.steps.CacheStep.executeWithoutCache(CacheStep.java:134)
at org.gradle.internal.execution.impl.steps.CacheStep.lambda$execute$3(CacheStep.java:83)
at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:82)
at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:36)
at org.gradle.internal.execution.impl.steps.PrepareCachingStep.execute(PrepareCachingStep.java:33)
at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:38)
at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:23)
at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96)
at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:89)
at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52)
at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:34)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:91)
... 32 more
Caused by: java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=https://developer.android.com/reference/, packageListUrl=https://developer.android.com/reference/package-list)
at org.jetbrains.dokka.ExternalDocumentationLinkResolver.(ExternalDocumentationLinkResolver.kt:164)
at org.jetbrains.dokka.ExternalDocumentationLinkResolver$$FastClassByGuice$$34356095.newInstance()
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
... 77 more
Caused by: java.net.SocketTimeoutException: connect timed out
at org.jetbrains.dokka.ExternalDocumentationLinkResolver.doOpenConnectionToReadContent(ExternalDocumentationLinkResolver.kt:56)
at org.jetbrains.dokka.ExternalDocumentationLinkResolver.doOpenConnectionToReadContent$default(ExternalDocumentationLinkResolver.kt:49)
at org.jetbrains.dokka.ExternalDocumentationLinkResolver.loadPackageList(ExternalDocumentationLinkResolver.kt:118)
at org.jetbrains.dokka.ExternalDocumentationLinkResolver.(ExternalDocumentationLinkResolver.kt:162)
... 103 more

@jasonpp
Copy link

jasonpp commented Jul 21, 2019

Most problems occured above was because of the proxy you use. Follow the steps below you will solve it .

  1. Checking your problems with command detail mode like: --info , --stacktrace, --debug then you got the detail information for gradle process.
  2. Giving your gradle.properties additional configuration code like below:
# Beneath configuration for dokka

systemProp.http.proxyHost=localhost
systemProp.http.proxyPort=your_porxy_port

systemProp.https.proxyHost=localhost
systemProp.https.proxyPort=your_porxy_port

then there you go !

@kennethshackleton
Copy link

kennethshackleton commented Sep 6, 2019

tasks.withType<DokkaTask> {
    noStdlibLink = true
    noJdkLink = true
    noAndroidSdkLink = true
}

denis-zhdanov added a commit to denis-zhdanov/kotlin-baker that referenced this issue Sep 16, 2019
denis-zhdanov added a commit to denis-zhdanov/kotlin-baker that referenced this issue Sep 16, 2019
@robotsquidward
Copy link

robotsquidward commented Jan 8, 2020

I got it to work using kennethshackleton's suggestion and the external documentation config

So I downloaded package list, added it to my root dir as package-list, and added this Dokka config:

dokka {
    // My config
    outputFormat = 'html'
    outputDirectory = "$buildDir/docs"
    // The fix
    externalDocumentationLink {
        url = new URL("any url you want, doesn't matter")
        packageListUrl = new URL("file:///${rootDir}/package-list")
    }
}

Then I added this task filter for Dokka

tasks.named("dokka"){
    noStdlibLink = true
    noJdkLink = true
    noAndroidSdkLink = true
}

At which point it actually used my externalDocumentationLink config and started working.

Update

In Dokka 0.10.0 the tasks filter no longer works and you'll need to remove it. Instead you add everything to your configuration:

dokka {
    outputFormat = 'html'
    outputDirectory = "$buildDir/docs"
    configuration {
        externalDocumentationLink {
            noJdkLink = true
            noStdlibLink = true
            noAndroidSdkLink = true

            url = new URL("https://whatever")
            packageListUrl = new URL("file:///${rootDir}/package-list")
        }
    }
}

@Kordyjan
Copy link
Contributor

Kordyjan commented Sep 1, 2020

This issue is about an external location provider from old dokka. External location provider from the new dokka is sharing no code with the old one so the issue is no longer relevant.

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