hello! i made an empty project using spring initi...
# intellij
h
hello! i made an empty project using spring initializer but it wont compile. here’s the error
Copy code
An exception occurred applying plugin request [id: 'org.hibernate.orm', version: '6.1.7.Final']
> Failed to apply plugin 'org.hibernate.orm'.
   > Could not create an instance of type org.hibernate.orm.tooling.gradle.HibernateOrmSpec.
      > Extension of type 'JavaPluginExtension' does not exist. Currently registered extension types: [ExtraPropertiesExtension, SpringBootExtension, StandardDependencyManagementExtension, SourceSetContainer]
Copy code
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
	id 'org.springframework.boot' version '3.0.6'
	id 'io.spring.dependency-management' version '1.1.0'
	id 'org.hibernate.orm' version '6.1.7.Final'
	id 'org.graalvm.buildtools.native' version '0.9.20'
	id 'org.jetbrains.kotlin.jvm' version '1.7.22'
	id 'org.jetbrains.kotlin.plugin.spring' version '1.7.22'
	id 'org.jetbrains.kotlin.plugin.jpa' version '1.7.22'
}

group = 'com.a'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

configurations {
	compileOnly {
		extendsFrom annotationProcessor
	}
}

repositories {
	mavenCentral()
}

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
	implementation 'org.springframework.boot:spring-boot-starter-validation'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
	implementation 'org.jetbrains.kotlin:kotlin-reflect'
	developmentOnly 'org.springframework.boot:spring-boot-devtools'
	annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.withType(KotlinCompile) {
	kotlinOptions {
		freeCompilerArgs = ['-Xjsr305=strict']
		jvmTarget = '17'
	}
}

tasks.named('test') {
	useJUnitPlatform()
}

hibernate {
	enhancement {
		lazyInitialization true
		dirtyTracking true
		associationManagement true
	}
}
here’s the gradle file
it also says,
Copy code
Cannot resolve symbol 'jetbrains'
in the first import line
a
Hello Hammad! What IDEA version do you use? Have you tried to test the issue in the latest IDEA version? Have you tried to create a project via https://start.spring.io/ ? Does it work in this case? In addition, please provide a screenshot of dependencies which you add to the project before its creation. Is the issue also reproduced if you create an empty Spring project? Thank you!