cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using postgresql with alfresco 1.4

lgr
Champ in-the-making
Champ in-the-making
Hi,

I'm using Alfresco v1.4 and postgresql.
I'm trying to implement content rules on template folders like add a category to some contents.

When creating a new folder from a template folder, i've got many errors like :
Caused by: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL [update alf_transaction set server_id=?, change_txn_id=? where id=?]; SQL state [null]; error code [0]; Batch entry 0 update alf_transaction set server_id=2, change_txn_id=1164741332220:d1207438-7f14-11db-87b8-1f40439417b1 where id=13451 was aborted.  Call getNextException to see the cause.; nested exception is java.sql.BatchUpdateException: Batch entry 0 update alf_transaction set server_id=2, change_txn_id=1164741332220:d1207438-7f14-11db-87b8-1f40439417b1 where id=13451 was aborted.  Call getNextException to see the cause.


When trying to open the content, i receive another error :
19:35:03,205 ERROR [[localhost].[/alfresco].[jsp]] Servlet.service() for servlet jsp threw exception
javax.faces.el.EvaluationException: Cannot get value for expression '#{DocumentDetailsBean.categoriesOverviewHTML}'

I think this is due to the initial error while creating tue folders and content rules.

I wonder what is happening about postgresql. I know postgresql must have quotes around values when executing queries.

Trying to execute the query above :
update alf_transaction set server_id=2, change_txn_id=1164741332220:d1207438-7f14-11db-87b8-1f40439417b1 where id=13451

with quotes :
update alf_transaction set server_id='2', change_txn_id='1164741332220:d1207438-7f14-11db-87b8-1f40439417b1' where id='13451'

It works well.

Does someone agree with me that modifying the way sql queries are sent to postgresql by adding quotes should fix this ?
Does anyone know how to do it ?

Laurent.
4 REPLIES 4

kevinr
Star Contributor
Star Contributor
I assume you've changed the hibernate dialect to the appropriate one for postgresql. If so, did this work before with Alfresco 1.3 or is this your first test? We haven't tried postgresql but we'd hope that it would work as it is apparently supported by Hibernate.

Anyone else out there used postgresql successfully with Alfresco?

Thanks,

Kevin

lgr
Champ in-the-making
Champ in-the-making
Yes, i've changed the hibernate dialect. And the database was populated correctly at bootstrap.

And yes, this is my first test, i was using mysql before.

Laurent.

derek
Star Contributor
Star Contributor
Hi,

In custom-hibernate-dialect.properties add the following:
hibernate.show_sql=true
Is there more stack trace associated with this error?

Regards

lgr
Champ in-the-making
Champ in-the-making
Hi Derek,

You'll have to wait a few days before i reinstall Alfresco.
But i'll make the test in the next installation.

Followups will be posted there.

Laurent.