cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring postgres with alfresco 3.1

kirit
Champ on-the-rise
Champ on-the-rise
I am trying to configure postgres database with the alfresco 3.1
I was using my same configuration which was working for the Alfresco 2.1 (e.g driver settings, property files settings, jar (postgres8.2))

Following is the exact Exception which i am getting.

Error creating bean with name 'DatabaseInformationResource' defined in file [D:\Work\alfresco3.1\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\enterprise\repository-jmx-context.xml]: Cannot create inner bean 'org.alfresco.enterprise.repo.management.Database#1e4eb5b' of type [org.alfresco.enterprise.repo.management.Database] while setting bean property 'resource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.alfresco.enterprise.repo.management.Database#1e4eb5b' defined in file [D:\Work\alfresco3.1\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\enterprise\repository-jmx-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.enterprise.repo.management.Database]: Constructor threw exception; nested exception is java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.getDatabaseMajorVersion()I
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.alfresco.enterprise.repo.management.Database#1e4eb5b' defined in file [D:\Work\alfresco3.1\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\enterprise\repository-jmx-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.enterprise.repo.management.Database]: Constructor threw exception; nested exception is java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.getDatabaseMajorVersion()I
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.enterprise.repo.management.Database]: Constructor threw exception; nested exception is java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.getDatabaseMajorVersion()I
Caused by: java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.getDatabaseMajorVersion()I
        at org.alfresco.enterprise.repo.management.Database.<init>(Database.java:111)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

Any idea? what should we do for this?
5 REPLIES 5

dward
Champ on-the-rise
Champ on-the-rise
It looks like Alfresco is attempting to call JDBC methods that are not supported by your JDBC driver.

Which JDBC driver are you using?

kirit
Champ on-the-rise
Champ on-the-rise
We are using Postgresql as database and for that we have used postgresql-8.2-506.jdbc2ee.jar, and in class path we are using jdk1.5

dward
Champ on-the-rise
Champ on-the-rise
Please try using the JDBC 4 jar.

kirit
Champ on-the-rise
Champ on-the-rise
I have tried using the JDBC 4 jar (postgresql-8.2-510.jdbc4.jar)

Now, Exception changed to this:
Cannot load JDBC driver class 'org.postgresql.Driver'
java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

kirit
Champ on-the-rise
Champ on-the-rise
Oh finally i got the jar which is supported by Alfresco 3.1 that is JDBC 3 jar (postgresql-8.2-510.jdbc3.jar)
one can get this from link : (http://jdbc.postgresql.org/download.html)

My tomcat started now with normal processing and it has created the default tables in PostGre database

Thanks.