DDL hibernate NoSuchMethodError

Answered

I've created classes using the intellij hibernate/jpa facility. I'm not trying to use the hibernate console to generate DDL files from the classes. I see the following error. Looks like it is trying to call a method which had been deprecated?

[2017-05-09 14:05:49] java.lang.NoSuchMethodError: org.hibernate.cfg.Configuration.generateSchemaCreationScript(Lorg/hibernate/dialect/Dialect;)[Ljava/lang/String;
[2017-05-09 14:05:49] at com.intellij.hibernate.remote.impl.RemoteConfigurationImpl.generateDDLInner(RemoteConfigurationImpl.java:195)
[2017-05-09 14:05:49] at com.intellij.hibernate.remote.impl.RemoteConfigurationImpl.generateSchemaCreationScript(RemoteConfigurationImpl.java:177)
[2017-05-09 14:05:49] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2017-05-09 14:05:49] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2017-05-09 14:05:49] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2017-05-09 14:05:49] at java.lang.reflect.Method.invoke(Method.java:498)
[2017-05-09 14:05:49] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324)
[2017-05-09 14:05:49] at sun.rmi.transport.Transport$1.run(Transport.java:200)
[2017-05-09 14:05:49] at sun.rmi.transport.Transport$1.run(Transport.java:197)
[2017-05-09 14:05:49] at java.security.AccessController.doPrivileged(Native Method)
[2017-05-09 14:05:49] at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
[2017-05-09 14:05:49] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
[2017-05-09 14:05:49] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
[2017-05-09 14:05:49] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
[2017-05-09 14:05:49] at java.security.AccessController.doPrivileged(Native Method)
[2017-05-09 14:05:49] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
[2017-05-09 14:05:49] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[2017-05-09 14:05:49] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[2017-05-09 14:05:49] at java.lang.Thread.run(Thread.java:745)

 

0
10 comments
Avatar
Permanently deleted user

which version of hibernate is supported? I don't recall installing the version that I see in lib. Did intellij do that? If so why install a version that the DDL tool doesn't support? It is clearly IntelliJ making the call

0

3.6 and higher should work fine. Which version do you see? Can you share a reproducible test case?

0
Avatar
Permanently deleted user

in lib I see annotations 5.0.1, core 5.2.9 and jpa 2.1

according to this page that method was removed for Hibernate 5

http://stackoverflow.com/questions/32178041/where-did-configuration-generateschemacreationscript-go-in-hibernate-5

I'm unsure how I could share a test case. DoI zip up the directory and send it to you? Since I don;t see one of my files being the problem I can't type something in here to reproduce

0

How did you create the project, is it Maven based or was it created using IntelliJ IDEA wizard?

> according to this page that method was removed for Hibernate 5

In this case it may be a bug in IntelliJ IDEA, a report with the steps to reproduce would be appreciated at https://youtrack.jetbrains.com/issues/IDEA.

0
Avatar
Permanently deleted user

I don't know maven. I must have created it using the wizard. This is one of those situations in which I don't know the steps to reproduce. Should I start a project from scratch and redo all of the classes I created using the persistence window? That seems like a pretty big time investment.

Do you have any ideas how I could reproduce this? Seems like someone doing a screen sharw would be easier

0

It may be easier if you zip and upload the project directory: https://intellij-support.jetbrains.com/hc/articles/206869619.

0
Avatar
Permanently deleted user

I just started creating a new hibernate project from the wizard and it says that it will download 10 jar files and use Hibernate 5.2.9 so I conclude this is how I did it before. Then I created a bunch of classes using the Persistence window. Then I set up a database conncetion using the Database window. Then I typed cntrl shift f10 to open the hql window (BTW clicking the button for that doesn;t work) and clicked DDL and got the error

 

I will try to zip and upload tomorrow if that may provide a solution

0
Avatar
Permanently deleted user

okay I zipped the directory abd created the following issue in the issue tracker

DDL hibernate NoSuchMethodError

 

 

0

Link: https://youtrack.jetbrains.com/issue/IDEA-172637.

Please continue there to avoid duplication.

0

Please sign in to leave a comment.