# Kotlin AllOpen Plugin doesn't work with STS

**URL:** <https://discuss.kotlinlang.org/t/kotlin-allopen-plugin-doesnt-work-with-sts/13277>\
**Category:** Eclipse\
**Created:** [June 30, 2019, 9:39pm UTC](https://discuss.kotlinlang.org/t/kotlin-allopen-plugin-doesnt-work-with-sts/13277 "2019-06-30T21:39:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![joserodrigo](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/joserodrigo/32/6048_2.png) [@joserodrigo](https://discuss.kotlinlang.org/u/joserodrigo)\
**Post date:** [June 30, 2019, 9:39pm UTC](https://discuss.kotlinlang.org/t/kotlin-allopen-plugin-doesnt-work-with-sts/13277/1 "2019-06-30T21:39:37Z")

</div>

Hello, I configured everything to use JDK 1.8, but still my application fail to start.  
Editor Error: Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper ‘-jvm-target’ option  
Execution Error: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @Configuration class ‘DemoApplication’ may not be final. Remove the final modifier to continue.

My POM:

```
<?xml version="1.0" encoding="UTF-8"?>

```

4.0.0  
  
org.springframework.boot  
spring-boot-starter-parent  
2.1.6.RELEASE  
  
  
tech.kaomidev  
spring-boot-hello-world-demo  
0.0.1-SNAPSHOT  
demo  
Demo Hello World project for Spring Boot

```
<properties>
	<java.version>1.8</java.version>
	<kotlin.version>1.2.71</kotlin.version>
	
	<maven.compiler.target>1.8</maven.compiler.target>
	<maven.compiler.source>1.8</maven.compiler.source>
</properties>

<dependencies>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-web</artifactId>
	</dependency>
	<dependency>
		<groupId>com.fasterxml.jackson.module</groupId>
		<artifactId>jackson-module-kotlin</artifactId>
	</dependency>
	<dependency>
		<groupId>org.jetbrains.kotlin</groupId>
		<artifactId>kotlin-reflect</artifactId>
	</dependency>
	<dependency>
		<groupId>org.jetbrains.kotlin</groupId>
		<artifactId>kotlin-stdlib-jdk8</artifactId>
	</dependency>

	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-devtools</artifactId>
		<scope>runtime</scope>
		<optional>true</optional>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-test</artifactId>
		<scope>test</scope>
	</dependency>
</dependencies>

<build>
	<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
	<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
	<plugins>
		<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
		</plugin>
		<plugin>
			<groupId>org.jetbrains.kotlin</groupId>
			<artifactId>kotlin-maven-plugin</artifactId>
			<configuration>
				<args>
					<arg>-Xjsr305=strict</arg>
				</args>
				<compilerPlugins>
					<plugin>spring</plugin>
				</compilerPlugins>
			</configuration>
			<dependencies>
				<dependency>
					<groupId>org.jetbrains.kotlin</groupId>
					<artifactId>kotlin-maven-allopen</artifactId>
					<version>${kotlin.version}</version>
				</dependency>
			</dependencies>
		</plugin>
	</plugins>
</build>

```

---

<div class="post-metadata">

**Author:** ![medium](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/medium/32/10404_2.png) [@medium](https://discuss.kotlinlang.org/u/medium)\
**Post date:** [July 6, 2019, 9:10pm UTC](https://discuss.kotlinlang.org/t/kotlin-allopen-plugin-doesnt-work-with-sts/13277/2 "2019-07-06T21:10:35Z")

</div>

I know that my answer will not be very satisfying, but I strongly recommend to use IntelliJ IDEA with Kotlin! Last time I tried Eclipse with Kotlin it was very disappointing, practically unusable.

---

<div class="post-metadata">

**Author:** ![joserodrigo](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/joserodrigo/32/6048_2.png) [@joserodrigo](https://discuss.kotlinlang.org/u/joserodrigo)\
**Post date:** [July 6, 2019, 9:41pm UTC](https://discuss.kotlinlang.org/t/kotlin-allopen-plugin-doesnt-work-with-sts/13277/3 "2019-07-06T21:41:06Z")

</div>

The eclipse plugin evolved a lot last 6 months. And I need to work with Spring Boot on some open source projects, but I can’t afford a license.

---

<div class="post-metadata">

**Author:** ![pawel.marks](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/pawel.marks/32/6547_2.png) [@pawel.marks](https://discuss.kotlinlang.org/u/pawel.marks)\
**Post date:** [July 8, 2019, 10:16am UTC](https://discuss.kotlinlang.org/t/kotlin-allopen-plugin-doesnt-work-with-sts/13277/4 "2019-07-08T10:16:48Z")

</div>

@joserodrigo: May I ask you what do you see in `Kotlin Compiler` tab in `Properties` window of your project?

---

<div class="post-metadata">

**Author:** ![joserodrigo](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/joserodrigo/32/6048_2.png) [@joserodrigo](https://discuss.kotlinlang.org/u/joserodrigo)\
**Post date:** [July 8, 2019, 11:31am UTC](https://discuss.kotlinlang.org/t/kotlin-allopen-plugin-doesnt-work-with-sts/13277/5 "2019-07-08T11:31:05Z")

</div>

It already has Java 1.8. The error `Editor Error: Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper ‘-jvm-target’ option` seens to be only a IDE error because Maven Install/Build works.

---

<div class="post-metadata">

**Author:** ![pawel.marks](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/pawel.marks/32/6547_2.png) [@pawel.marks](https://discuss.kotlinlang.org/u/pawel.marks)\
**Post date:** [July 8, 2019, 2:28pm UTC](https://discuss.kotlinlang.org/t/kotlin-allopen-plugin-doesnt-work-with-sts/13277/6 "2019-07-08T14:28:44Z")

</div>

Oh I see now. It is definitely a symptom of bug known to us and we are currently working on resolving it. We will update you as soon as we have it resolved.

---

<div class="post-metadata">

**Author:** ![pawel.marks](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/pawel.marks/32/6547_2.png) [@pawel.marks](https://discuss.kotlinlang.org/u/pawel.marks)\
**Post date:** [July 8, 2019, 4:47pm UTC](https://discuss.kotlinlang.org/t/kotlin-allopen-plugin-doesnt-work-with-sts/13277/7 "2019-07-08T16:47:51Z")

</div>

The bug should be fixed for both gradle and maven in version 0.8.16.4. You can get it right now form our nightly update site: [https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin\_EclipsePlugin/.lastSuccessful/](https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_EclipsePlugin/.lastSuccessful/)  
Let me know if it helped.

---

<div class="post-metadata">

**Author:** ![joserodrigo](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/joserodrigo/32/6048_2.png) [@joserodrigo](https://discuss.kotlinlang.org/u/joserodrigo)\
**Post date:** [July 13, 2019, 2:37pm UTC](https://discuss.kotlinlang.org/t/kotlin-allopen-plugin-doesnt-work-with-sts/13277/8 "2019-07-13T14:37:34Z")

</div>

Thanks.  
After doing that, the error about Java 1.8 disappeared. But the application still fail to run.

Stacktrace:

```
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @Configuration class 'DemoApplication' may not be final. Remove the final modifier to continue.
Offending resource: tech.kaomidev.springboot.helloworld.DemoApplication
e[2m2019-07-13 11:34:12.247e[0;39m e[32m INFOe[0;39m e[35m4324e[0;39m e[2m---e[0;39m e[2m[restartedMain]e[0;39m e[36mConditionEvaluationReportLoggingListenere[0;39m e[2m:e[0;39m 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
e[2m2019-07-13 11:34:12.254e[0;39m e[31mERRORe[0;39m e[35m4324e[0;39m e[2m---e[0;39m e[2m[restartedMain]e[0;39m e[36mo.s.boot.SpringApplication e[0;39m e[2m:e[0;39m Application run failed

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @Configuration class 'DemoApplication' may not be final. Remove the final modifier to continue.
Offending resource: tech.kaomidev.springboot.helloworld.DemoApplication
    at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:72) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE]
    at org.springframework.context.annotation.ConfigurationClass.validate(ConfigurationClass.java:217) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassParser.validate(ConfigurationClassParser.java:208) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:316) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:705) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:742) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:389) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:311) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
    at tech.kaomidev.springboot.helloworld.DemoApplicationKt.main(DemoApplication.kt:13) [classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_222]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_222]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_222]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_222]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.1.6.RELEASE.jar:2.1.6.RELEASE]

```

---

<div class="post-metadata">

**Author:** ![pawel.marks](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/pawel.marks/32/6547_2.png) [@pawel.marks](https://discuss.kotlinlang.org/u/pawel.marks)\
**Post date:** [July 15, 2019, 10:21am UTC](https://discuss.kotlinlang.org/t/kotlin-allopen-plugin-doesnt-work-with-sts/13277/9 "2019-07-15T10:21:23Z")

</div>

Does `spring` or `all-open` plugins are enabled in project properties?

---

<div class="post-metadata">

**Author:** ![joserodrigo](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/joserodrigo/32/6048_2.png) [@joserodrigo](https://discuss.kotlinlang.org/u/joserodrigo)\
**Post date:** [July 21, 2019, 12:28am UTC](https://discuss.kotlinlang.org/t/kotlin-allopen-plugin-doesnt-work-with-sts/13277/10 "2019-07-21T00:28:13Z")

</div>

Thanks. Explicitly activating them on Window \> Preferences \> Kotlin \> Compiler solved that.

I thought that it was not necessary since there is a “(Inherited)” right there.

 ![kt-spbt-wzrd-5-1](https://us1.discourse-cdn.com/flex019/uploads/kotlinlang/original/2X/0/01168480739a2ea2cc685ba38bc994dfb33d871f.png)
