第一个Hibernate应用程序给我一个错误

时间:2014-07-06 13:46:07

标签: java hibernate postgresql

当我尝试运行我的第一个Hibernate应用程序时,我收到以下错误。我知道它为什么会发生,但我该如何解决这个问题?

线程中的异常" main" java.lang.UnsupportedClassVersionError:org / postgresql / Driver:不支持的major.minor版本51.0     at java.lang.ClassLoader.defineClass1(Native Method)     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)     at java.lang.ClassLoader.defineClass(ClassLoader.java:621)     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)     at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)     at java.net.URLClassLoader.access $ 000(URLClassLoader.java:58)     在java.net.URLClassLoader $ 1.run(URLClassLoader.java:197)     at java.security.AccessController.doPrivileged(Native Method)     在java.net.URLClassLoader.findClass(URLClassLoader.java:190)     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)     在sun.misc.Launcher $ AppClassLoader.loadClass(Launcher.java:301)     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)     at java.lang.Class.forName0(Native Method)     在java.lang.Class.forName(Class.java:171)     在org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:80)     在org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:143)     在org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:84)     在org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:459)     在org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:90)     在org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)     在org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)     在org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)     在org.vandanpatel.UserDetailsTest.main(UserDetailsTest.java:17)

0 个答案:

没有答案