Unable to generate entity classes

Answered

An error occurs when I try to generate entity classes using Scripted extensions.

 

 

OS: Windows 10

IDE

------------

IntelliJ IDEA 2019.3.4 (Ultimate Edition)
Build #IU-193.6911.18, built on March 17, 2020

 

Log

-----------------------

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 3:
unable to resolve class com.intellij.database.util.DasUtil @ line 3, column 1.
import com.intellij.database.util.DasUtil ^ Script1.groovy: 1: unable to resolve class com.intellij.database.model.DasTable @ line 1, column 1. import com.intellij.database.model.DasTable ^ Script1.groovy: 2:
unable to resolve class com.intellij.database.util.Case @ line 2, column 1. import com.intellij.database.util.Case ^ 3 errors at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:309)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:981) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:626)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:575) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:323) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:293)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:279) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:236) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:335)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:157)
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) in IdeScriptEngineManagerImpl$EngineImpl.lambda$eval$0(IdeScriptEngineManagerImpl.java:220)

0
6 comments

Seems that you are using Kotlin extractor? Do you have Kotlin plugin enabled? If not - please enable it - does it help?

If the issue remains please attach idea.log (Help | Show Log in ... action) file after IDE restart and reproducing here: 

https://youtrack.jetbrains.com/issue/IDEA-237185

0

It is enabled.

 

 

What I really wanted was to be able to generate Java entity classes from the database tables. Is there a different way of doing this? I was only trying this approach because it was all I could find online.

 

I also can't attach anything but images here. See the error that occurs below, when I try to attach the log file. If you share your email, I can send it to you directly.

 

0

Please attach idea.log to the following bug request: 

https://youtrack.jetbrains.com/issue/IDEA-237185

0

By the way, can you try 201.7223 build? 

https://confluence.jetbrains.com/display/IDEADEV/IDEA+2020.1+latest+builds

Sorry for misleading you, but seems the issue is already fixed in the scope of https://youtrack.jetbrains.com/issue/DBE-10396

0

Hi.

 

I was using that build but my plugins were not compatible so I downgraded. Thanks for looking into this.

0

Please sign in to leave a comment.