Kotlin Eclipse Plugin exception with @PropertySource Spring annotation

I have installed the KotLin Eclipse plugin and when I add the @PropertySource Spring annotation to my configuration class, a problem popup appears: An internal error occured during: “Kotlin Analysis”.

When I look to the Eclipse logs, I see this stacktrace:

!MESSAGE An internal error occurred during: "Kotlin Analysis".
!STACK 0
java.lang.IllegalArgumentException: Wrong annotation argument: public @interface org.springframework.context.annotation.PropertySources
extends java.lang.Object
implements : java.lang.annotation.Annotation
/*   methods   */
[unresolved] public abstract org.springframework.context.annotation.PropertySource[] value() 



at org.jetbrains.kotlin.core.resolve.lang.java.structure.EclipseJavaAnnotationArgument$Companion.create(EclipseJavaAnnotationArgument.kt:40)
at org.jetbrains.kotlin.core.resolve.lang.java.structure.EclipseJavaAnnotation.getArguments(EclipseJavaAnnotation.java:48)
at org.jetbrains.kotlin.load.java.components.JavaAnnotationDescriptor.<init>(JavaAnnotationMapper.kt:107)
at org.jetbrains.kotlin.load.java.components.JavaAnnotationMapper.mapOrResolveJavaAnnotation(JavaAnnotationMapper.kt:59)
at org.jetbrains.kotlin.load.java.lazy.LazyJavaAnnotations$annotationDescriptors$1.invoke(LazyJavaAnnotations.kt:32)
at org.jetbrains.kotlin.load.java.lazy.LazyJavaAnnotations$annotationDescriptors$1.invoke(LazyJavaAnnotations.kt:27)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:408)
at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:149)
at kotlin.sequences.FlatteningSequence$iterator$1.next(Sequences.kt:237)
at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:109)
at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:133)
at org.jetbrains.kotlin.load.java.lazy.ContextKt.computeNewDefaultTypeQualifiers(context.kt:223)
at org.jetbrains.kotlin.load.java.lazy.ContextKt$childForClassOrPackage$1.invoke(context.kt:201)
at org.jetbrains.kotlin.load.java.lazy.ContextKt$childForClassOrPackage$1.invoke(context.kt)
at kotlin.UnsafeLazyImpl.getValue(Lazy.kt:154)
at org.jetbrains.kotlin.load.java.lazy.LazyJavaResolverContext.getDefaultTypeQualifiers(context.kt)
at org.jetbrains.kotlin.load.java.typeEnhancement.SignatureEnhancement$SignatureParts$toIndexed$1.invoke(signatureEnhancement.kt:323)
at org.jetbrains.kotlin.load.java.typeEnhancement.SignatureEnhancement$SignatureParts.toIndexed(signatureEnhancement.kt:337)
at org.jetbrains.kotlin.load.java.typeEnhancement.SignatureEnhancement$SignatureParts.computeIndexedQualifiersForOverride(signatureEnhancement.kt:288)
at org.jetbrains.kotlin.load.java.typeEnhancement.SignatureEnhancement$SignatureParts.enhance(signatureEnhancement.kt:202)
at org.jetbrains.kotlin.load.java.typeEnhancement.SignatureEnhancement.enhanceSignature(signatureEnhancement.kt:147)
at org.jetbrains.kotlin.load.java.typeEnhancement.SignatureEnhancement.enhanceSignatures(signatureEnhancement.kt:99)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaClassMemberScope$constructors$1.invoke(LazyJavaClassMemberScope.kt:85)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaClassMemberScope$constructors$1.invoke(LazyJavaClassMemberScope.kt:61)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:323)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:370)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaClassDescriptor.getConstructors(LazyJavaClassDescriptor.kt:114)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaClassDescriptor.getConstructors(LazyJavaClassDescriptor.kt:41)
at org.jetbrains.kotlin.resolve.calls.CallResolver.resolveCallForConstructor(CallResolver.java:398)
at org.jetbrains.kotlin.resolve.calls.CallResolver.resolveFunctionCall(CallResolver.java:336)
at org.jetbrains.kotlin.resolve.calls.CallResolver.resolveFunctionCall(CallResolver.java:307)
at org.jetbrains.kotlin.resolve.AnnotationResolverImpl.resolveAnnotationCall(AnnotationResolverImpl.java:155)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyAnnotationDescriptor$allValueArguments$2.invoke(LazyAnnotations.kt:112)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyAnnotationDescriptor$allValueArguments$2.invoke(LazyAnnotations.kt:90)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:323)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:370)
at org.jetbrains.kotlin.storage.StorageKt.getValue(storage.kt:39)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyAnnotationDescriptor.getAllValueArguments(LazyAnnotations.kt)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyAnnotationDescriptor.forceResolveAllContents(LazyAnnotations.kt:127)
at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.doForceResolveAllContents(ForceResolveUtil.java:75)
at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.forceResolveAllContents(ForceResolveUtil.java:68)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.resolveMemberHeaders(LazyClassDescriptor.java:555)
at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.resolveAllHeadersInClasses(LazyTopDownAnalyzer.kt:239)
at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations(LazyTopDownAnalyzer.kt:212)
at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations$default(LazyTopDownAnalyzer.kt:60)
at org.jetbrains.kotlin.core.resolve.EclipseAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(EclipseAnalyzerFacadeForJVM.kt:169)
at org.jetbrains.kotlin.core.model.KotlinAnalysisProjectCache.getAnalysisResult(KotlinAnalysisProjectCache.kt:44)
at org.jetbrains.kotlin.ui.builder.KotlinAnalysisJob.run(KotlinAnalysisJob.kt:57)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

What is the problem and how to resolve that?

1 Like

I am having the same issue with my project except I am getting the error on @ComponentScan. Were you able to solve it?

I have just removed the annotation and find another solution to avoid this error.
Maybe the new version of the plugin solved this issue.