편집 : 아래의 답변과 같이 이것은 버그이며 누군가 다른 사람이 reported입니다.Hibernate Tools 5.1.0을 사용하는 InvocationTargetException 최종. 최종
내 프로젝트에서 DTO (this is a question I opened yesterday about that task)를 생성하기 위해 최대 절전 모드 도구를 사용하려고했습니다. 현재 Eclipse Neon 인스턴스에서 Hibernate Tools를 설치했고 아래에서 자세히 설명한 문제를 만났습니다.
그런 다음, 전체 JBoss Developer Studio 설치 프로그램을 다운로드하고 설치하여 Eclipse 인스턴스에 문제가 있는지 여부를 확인했습니다. 아무 소용이 없다.
(참고 : 이클립스 인스턴스는 EclipseLink를 사용하여, 나는 그림에서 엔티티와 엔티티에서 테이블을 생성 할 수 있음)으로도
내가 가진 문제는 오류 로그보기에서이 예외를 (그리고 대화 상자) 하이버 네이트 구성을 만들 때, 즉 더 아래 대화 상자 창에서 확인 버튼을 클릭하면 다음과 같습니다
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.hibernate.tool.util.MetadataHelper.getMetadataFromMethod(MetadataHelper.java:78)
at org.hibernate.tool.util.MetadataHelper.getMetadata(MetadataHelper.java:16)
at org.jboss.tools.hibernate.runtime.v_5_1.internal.ConfigurationFacadeImpl.getMetadata(ConfigurationFacadeImpl.java:168)
at org.jboss.tools.hibernate.runtime.v_5_1.internal.ConfigurationFacadeImpl.buildMappings(ConfigurationFacadeImpl.java:106)
at org.hibernate.console.ConsoleConfiguration$4.execute(ConsoleConfiguration.java:272)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:108)
at org.hibernate.console.ConsoleConfiguration.buildMappings(ConsoleConfiguration.java:270)
at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:44)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:98)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:104)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:231)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hibernate.tool.util.MetadataHelper.getMetadataFromMethod(MetadataHelper.java:72)
... 12 more
Caused by: java.lang.NullPointerException
at org.jboss.tools.hibernate.runtime.v_5_1.internal.JPAConfiguration.getMetadata(JPAConfiguration.java:36)
... 17 more
탭
Options
에
MySQL (InnoDB)
로 설정되는 데이터베이스 대화 이외의 구성의 화면 캡처 (이다 , 나는 다른 옵션을 건드리지 않았다).
여기 내 hibernate.properties 파일의 내용입니다 :
hibernate.bytecode.use_reflection_optimizer=false
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.password=verbus
hibernate.connection.url=jdbc:mysql://localhost:3306/verbus
hibernate.connection.username=verbus
hibernate.ddl-auto=none
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.format_sql=true
hibernate.search.autoregister_listeners=true
hibernate.show_sql=true
hibernate.validator.apply_to_ddl=false
hibernate.default_entity_mode=pojo
hibernate.order_inserts=true
hibernate.order_updates=true
지속성 단위가 존재 달리의 JPA 다이어그램 편집기 구성 요소를 사용하여 생성 및 업데이트되었습니다.
데이터베이스가 비어 있거나 테이블이 이미 EclipseLink에 의해 생성되었는지 여부는 변경되지 않습니다.
이것은 잘못된 설정의 결과이지만 표준 예외 이외의 오류 메시지에 대한 힌트가 없기 때문에 나는 무력감을 느끼게됩니다.
이 오류의 정확한 원인을 확인할 수 있습니까?