carter-ya / idea-plugin-jpa-support

Generate entity/repositroy for JPA/Lombok/Spring Data JPA.
Apache License 2.0
166 stars 57 forks source link

[BUG] Unable to create connection to Oracle Database #117

Closed harikesh409 closed 3 years ago

harikesh409 commented 3 years ago

Describe the bug (描述这个Bug) As soon as I click on next in database connection creation the IntelliJ is getting hanged.

Expected behavior (期望的行为) Connection Should be created and moved to the next step.

Screenshots (截图,如果有的话) image

idea version (idea的版本号): IntelliJ IDEA 2021.1.2 (Community Edition)

idea plugin jpa support version (idea plugin jpa support的版本号): 2.0.7

threadDump-20210623-212156.txt

carter-ya commented 3 years ago

Please fill in this URL format? https://github.com/carter-ya/idea-plugin-jpa-support/issues/109#issuecomment-855976396

harikesh409 commented 3 years ago

Please fill in this URL format? #109 (comment)

That's the same format we are using. Here is the screenshot will full details. image

carter-ya commented 3 years ago

Is there an error message when you click the'Next' button?

If there is no error message, you need to wait for a while, it may be because you have a large number of tables.

harikesh409 commented 3 years ago

Is there an error message when you click the'Next' button?

If there is no error message, you need to wait for a while, it may be because you have a large number of tables.

There is no error message on click of the Next button just the application gets hanged, I have waited for 10mins and if I check the IDE logs I am seeing freeze errors. Attached the threadDump in the issue itself.

carter-ya commented 3 years ago

Is there an error message when you click the'Next' button? If there is no error message, you need to wait for a while, it may be because you have a large number of tables.

There is no error message on click of the Next button just the application gets hanged, I have waited for 10mins and if I check the IDE logs I am seeing freeze errors. Attached the threadDump in the issue itself.

Does the earlier version of the plugin work properly, eg: 2.0.6?

carter-ya commented 3 years ago

The plugin is trying to load the driver:

"AWT-EventQueue-0" prio=0 tid=0x0 nid=0x0 runnable
     java.lang.Thread.State: RUNNABLE

    at java.base@11.0.11/java.lang.ClassLoader.findBootstrapClass(Native Method)
    at java.base@11.0.11/java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1258)
    at java.base@11.0.11/java.lang.System$2.findBootstrapClassOrNull(System.java:2134)
    at java.base@11.0.11/jdk.internal.loader.ClassLoaders$BootClassLoader.loadClassOrNull(ClassLoaders.java:118)
    at java.base@11.0.11/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:616)
    at java.base@11.0.11/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
    at java.base@11.0.11/java.lang.ClassLoader.loadClass(ClassLoader.java:576)
    at java.base@11.0.11/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    at java.base@11.0.11/java.lang.Class.forName0(Native Method)
    at java.base@11.0.11/java.lang.Class.forName(Class.java:398)
    at org.mybatis.generator.internal.ObjectFactory.internalClassForName(ObjectFactory.java:144)
    at org.mybatis.generator.internal.ObjectFactory.createInternalObject(ObjectFactory.java:180)
    at org.mybatis.generator.internal.ObjectFactory.createIntrospectedColumn(ObjectFactory.java:360)
    at org.mybatis.generator.internal.db.DatabaseIntrospector.getColumns(DatabaseIntrospector.java:522)
    at org.mybatis.generator.internal.db.DatabaseIntrospector.introspectTables(DatabaseIntrospector.java:176)
    at com.ifengxue.plugin.gui.DatabaseSettingsDialog.findDatabaseSchemas(DatabaseSettingsDialog.java:266)
    at com.ifengxue.plugin.gui.DatabaseSettingsDialog.lambda$doOKAction$7(DatabaseSettingsDialog.java:221)
    at com.ifengxue.plugin.gui.DatabaseSettingsDialog$$Lambda$4545/0x0000000102856840.run(Unknown Source)

Can you change a driver version?

harikesh409 commented 3 years ago

The plugin is trying to load the driver:

"AWT-EventQueue-0" prio=0 tid=0x0 nid=0x0 runnable
     java.lang.Thread.State: RUNNABLE

  at java.base@11.0.11/java.lang.ClassLoader.findBootstrapClass(Native Method)
  at java.base@11.0.11/java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1258)
  at java.base@11.0.11/java.lang.System$2.findBootstrapClassOrNull(System.java:2134)
  at java.base@11.0.11/jdk.internal.loader.ClassLoaders$BootClassLoader.loadClassOrNull(ClassLoaders.java:118)
  at java.base@11.0.11/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:616)
  at java.base@11.0.11/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
  at java.base@11.0.11/java.lang.ClassLoader.loadClass(ClassLoader.java:576)
  at java.base@11.0.11/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
  at java.base@11.0.11/java.lang.Class.forName0(Native Method)
  at java.base@11.0.11/java.lang.Class.forName(Class.java:398)
  at org.mybatis.generator.internal.ObjectFactory.internalClassForName(ObjectFactory.java:144)
  at org.mybatis.generator.internal.ObjectFactory.createInternalObject(ObjectFactory.java:180)
  at org.mybatis.generator.internal.ObjectFactory.createIntrospectedColumn(ObjectFactory.java:360)
  at org.mybatis.generator.internal.db.DatabaseIntrospector.getColumns(DatabaseIntrospector.java:522)
  at org.mybatis.generator.internal.db.DatabaseIntrospector.introspectTables(DatabaseIntrospector.java:176)
  at com.ifengxue.plugin.gui.DatabaseSettingsDialog.findDatabaseSchemas(DatabaseSettingsDialog.java:266)
  at com.ifengxue.plugin.gui.DatabaseSettingsDialog.lambda$doOKAction$7(DatabaseSettingsDialog.java:221)
  at com.ifengxue.plugin.gui.DatabaseSettingsDialog$$Lambda$4545/0x0000000102856840.run(Unknown Source)

Can you change a driver version? I have tried with 19, 20, and 21versions can you suggest some other version to try? Also, can you tell me how much time to wait should I wait more than 5minutes?

carter-ya commented 3 years ago

I don’t think this is a plugin problem, maybe you can try to upgrade the version of IDEA.

You also can try search in Google: java.lang.ClassLoader.findBootstrapClass blocked

harikesh409 commented 3 years ago

I don’t think this is a plugin problem, maybe you can try to upgrade the version of IDEA.

You also can try search in Google: java.lang.ClassLoader.findBootstrapClass blocked

Using the latest version of IDEA only, maybe the plugin is unable to handle huge data. Is there any kind of pagination or lazy loading implemented while pulling the database metadata?

carter-ya commented 3 years ago

I don’t think this is a plugin problem, maybe you can try to upgrade the version of IDEA. You also can try search in Google: java.lang.ClassLoader.findBootstrapClass blocked

Using the latest version of IDEA only, maybe the plugin is unable to handle huge data. Is there any kind of pagination or lazy loading implemented while pulling the database metadata?

This is not a small workload, it may take a long time to develop... you can try to use IDEA Ultimate, the plugin supports to generate code through the Database Tool

harikesh409 commented 3 years ago

Okay, I will try with the Ultimate edition.