Hi All
I am trying to connect to PostgreSQL DB, and getting problem
Quote:
java.lang.UnsupportedClassVersionError: Bad version number in .class file
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(Unknown Source)
java.security.SecureClassLoader.defineClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:873)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1326)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)
java.lang.ClassLoader.loadClassInternal(Unknown Source)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Unknown Source)
org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:57)
org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:80)
org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:362)
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:60)
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
controller.MainServlet.doPost(MainServlet.java:30)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
My cfg file looks like below..Code:
<session-factory>
<property name="connection.username">postgres</property>
<property name="connection.url">jdbc:postgresql://localhost:5432/nikdb</property>
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<property name="connection.password">tiger</property>
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="show_sql">true</property>
<mapping resource="controller/all.hbm.xml" />
</session-factory>
I am using
Quote:
postgresql-8.4-701.jdbc4.jar
and DB version is 8.4