0
我是新的日食。我正在嘗試使用Hibernate。 Java ee IDE版本Juno和Hibernate Tools版本3.5.1。 在IDE的數據庫開發中,我創建了一個數據源,並測試了連接,並且它工作正常。 然後我創建了一個Hibernate配置文件hibernate.cfg.xml 然後我創建了一個Hibernate控制檯配置 當我嘗試刷新控制檯配置或者當我嘗試創建反向工程文件時,出現錯誤「An internal error期間發生:TestHiber01的抓取孩子插件org.eclipse.core.jobs 所有的錯誤日誌:Eclipse:連接和配置休眠
eclipse.buildId=M20120914-1800
java.version=1.6.0_25
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=it_IT
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product
Error
Fri Oct 05 16:03:24 CEST 2012
An internal error occurred during: "Fetching children of TestHiber01".
java.lang.NoSuchMethodError: org.eclipse.jpt.jpa.core.JptJpaCorePlugin.getJpaProjectManager()Lorg/eclipse/jpt/jpa/core/JpaProjectManager;
at org.jboss.tools.hibernate.jpt.core.internal.HibernateJptPlugin$1.revalidateProjects(HibernateJptPlugin.java:108)
at org.jboss.tools.hibernate.jpt.core.internal.HibernateJptPlugin$1.configurationBuilt(HibernateJptPlugin.java:127)
at org.hibernate.console.KnownConfigurations$1$3.notify(KnownConfigurations.java:94)
at org.hibernate.console.KnownConfigurations$Notification.run(KnownConfigurations.java:123)
at org.hibernate.console.KnownConfigurations.fireNotification(KnownConfigurations.java:259)
at org.hibernate.console.KnownConfigurations.access$0(KnownConfigurations.java:253)
at org.hibernate.console.KnownConfigurations$1.configurationBuilt(KnownConfigurations.java:92)
at org.hibernate.console.ConsoleConfiguration.fireConfigurationBuilt(ConsoleConfiguration.java:320)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:190)
at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleCon
figurationWorkbenchAdapter.java:42) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
的hibernate.cfg文件是:
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">XXXXX</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/mydb</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
</session-factory>
是什麼意思?爲什麼無法連接到數據基礎?
這正是正確的答案。謝謝! –