Error while trying to generate Javadoc with Intellij
I'm trying to generate the javadoc using :
tools>GenerateJavaDoc...
However I'm getting this error :
javadoc: warning - Multiple sources of package comments found for package "org.slf4j"
javadoc: warning - Multiple sources of package comments found for package "javax.transaction"
C:\Users\nicolas.petry\.m2\repository\org\springframework\spring-core\5.1.7.RELEASE\spring-core-5.1.7.RELEASE-sources.jar(org/springframework/core/MethodParameter.java):35: error: package kotlin.reflect does not exist
import kotlin.reflect.KFunction;
^
C:\Users\nicolas.petry\.m2\repository\org\springframework\spring-core\5.1.7.RELEASE\spring-core-5.1.7.RELEASE-sources.jar(org/springframework/core/MethodParameter.java):36: error: package kotlin.reflect does not exist
import kotlin.reflect.KParameter;
^
C:\Users\nicolas.petry\.m2\repository\org\springframework\spring-core\5.1.7.RELEASE\spring-core-5.1.7.RELEASE-sources.jar(org/springframework/core/MethodParameter.java):37: error: package kotlin.reflect.jvm does not exist
import kotlin.reflect.jvm.ReflectJvmMapping;
^
javadoc: warning - Multiple sources of package comments found for package "javax.annotation"
C:\Users\nicolas.petry\.m2\repository\org\springframework\spring-core\5.1.7.RELEASE\spring-core-5.1.7.RELEASE-sources.jar(org/springframework/lang/Nullable.java):24: error: cannot find symbol
import javax.annotation.Nonnull;
^
symbol: class Nonnull
location: package javax.annotation
C:\Users\nicolas.petry\.m2\repository\org\springframework\spring-core\5.1.7.RELEASE\spring-core-5.1.7.RELEASE-sources.jar(org/springframework/lang/Nullable.java):25: error: package javax.annotation.meta does not exist
import javax.annotation.meta.TypeQualifierNickname;
^
C:\Users\nicolas.petry\.m2\repository\org\springframework\spring-core\5.1.7.RELEASE\spring-core-5.1.7.RELEASE-sources.jar(org/springframework/lang/Nullable.java):26: error: package javax.annotation.meta does not exist
import javax.annotation.meta.When;
^
C:\Users\nicolas.petry\.m2\repository\org\springframework\spring-core\5.1.7.RELEASE\spring-core-5.1.7.RELEASE-sources.jar(org/springframework/lang/Nullable.java):51: error: cannot find symbol
@Nonnull(when = When.MAYBE)
^
symbol: class Nonnull
C:\Users\nicolas.petry\.m2\repository\org\springframework\spring-core\5.1.7.RELEASE\spring-core-5.1.7.RELEASE-sources.jar(org/springframework/lang/Nullable.java):52: error: cannot find symbol
@TypeQualifierNickname
^
symbol: class TypeQualifierNickname
C:\Users\nicolas.petry\.m2\repository\javax\transaction\javax.transaction-api\1.3\javax.transaction-api-1.3-sources.jar(javax/transaction/Transactional.java):42: error: package javax.enterprise.util does not exist
import javax.enterprise.util.Nonbinding;
^
C:\Users\nicolas.petry\.m2\repository\javax\transaction\javax.transaction-api\1.3\javax.transaction-api-1.3-sources.jar(javax/transaction/Transactional.java):43: error: package javax.interceptor does not exist
import javax.interceptor.InterceptorBinding;
^
C:\Users\nicolas.petry\.m2\repository\javax\transaction\javax.transaction-api\1.3\javax.transaction-api-1.3-sources.jar(javax/transaction/Transactional.java):81: error: cannot find symbol
@InterceptorBinding
^
symbol: class InterceptorBinding
C:\Users\nicolas.petry\.m2\repository\org\springframework\boot\spring-boot\2.1.5.RELEASE\spring-boot-2.1.5.RELEASE-sources.jar(org/springframework/boot/BeanDefinitionLoader.java):23: error: package groovy.lang does not exist
import groovy.lang.Closure;
^
C:\Users\nicolas.petry\.m2\repository\org\springframework\spring-beans\5.1.7.RELEASE\spring-beans-5.1.7.RELEASE-sources.jar(org/springframework/beans/factory/config/DependencyDescriptor.java):29: error: package kotlin.reflect does not exist
import kotlin.reflect.KProperty;
^
C:\Users\nicolas.petry\.m2\repository\org\springframework\spring-beans\5.1.7.RELEASE\spring-beans-5.1.7.RELEASE-sources.jar(org/springframework/beans/factory/config/DependencyDescriptor.java):30: error: package kotlin.reflect.jvm does not exist
import kotlin.reflect.jvm.ReflectJvmMapping;
^
C:\Users\nicolas.petry\.m2\repository\org\springframework\boot\spring-boot\2.1.5.RELEASE\spring-boot-2.1.5.RELEASE-sources.jar(org/springframework/boot/BeanDefinitionLoader.java):328: error: cannot find symbol
Closure<?> getBeans();
^
symbol: class Closure
location: interface GroovyBeanDefinitionSource
C:\Users\nicolas.petry\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.19\tomcat-embed-core-9.0.19-sources.jar(org/apache/catalina/core/ApplicationContext.java):78: error: cannot access RequestUtil
import org.apache.tomcat.util.http.RequestUtil;
^
bad source file: C:\Users\nicolas.petry\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.19\tomcat-embed-core-9.0.19-sources.jar(org/apache/tomcat/util/http/RequestUtil.java)
file does not contain class org.apache.tomcat.util.http.RequestUtil
Please remove or make sure it appears in the correct subdirectory of the sourcepath.
17 errors
3 warnings
C:\Users\nicolas.petry\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.19\tomcat-embed-core-9.0.19-sources.jar(org/apache/catalina/connector/Request.java):154: error: cannot access Request
protected org.apache.coyote.Request coyoteRequest;
^
bad source file: C:\Users\nicolas.petry\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.19\tomcat-embed-core-9.0.19-sources.jar(org/apache/coyote/Request.java)
file does not contain class org.apache.coyote.Request
Please remove or make sure it appears in the correct subdirectory of the sourcepath.
"javadoc" finished with exit code 1
I deleted my .m2 repository followed by a mvn clean package but that did not solve the issue.
Please sign in to leave a comment.
The option to include JDK and library sources has to be disabled: https://i.imgur.com/mJjCl03.png .
Thank you, this seems to have fix the issue.