cancel
Showing results for 
Search instead for 
Did you mean: 

Solutions: Alfresco 3.2r - PostgreSQL and Ibatis errors

trialot
Champ in-the-making
Champ in-the-making
Alfresco owners who use PostgreSQL must be aware that some errors can occur due to maldefined SqlMaps.

NOTE: In most cases, a previous version of PostgreSQL will exhibit strange behavior in the sense that it is accepting the maldefined SqlMaps. That does not mean the problem is not there.
ADVISE: do use a PostgreSQL version higher than 8.3 and use patches for the maldefined SqlMaps. That also prevents future surprises.

A patch in the postgresql-3.2r.amp is not yet present, to my best knowledge.

In this thread, I am just giving some problems I encountered and their solutions.
12 REPLIES 12

mikeh
Star Contributor
Star Contributor
In the alfresco package, other typos are present in the SqlMaps.
If you know there are problems, please raise them in JIRA and we'll get them fixed! Not everyone finds these forums.

Thanks,
Mike

pim
Champ in-the-making
Champ in-the-making
It looks like for 3.2r2, the problem is just this section in avm-insert-SqlMap.xml:

    <insert id="insert_AVMStoreProperty" parameterMap="parameter_IdStorePropertyPatternMap">
      …
    </insert>

Try

    <insert id="insert_AVMStoreProperty" parameterClass="AVMStoreProperty">
        <selectKey resultClass="long" keyProperty="id">
            select nextVal('avm_store_properties_seq')      
        </selectKey>
        insert into avm_store_properties (id, avm_store_id, qname_id, actual_type_n, persisted_type_n, multi_valued, boolean_value, long_value, float_value, double_value, string_value, serializable_value)
        values (#id#, #avmStoreId#, #qnameId#, #actualType#, #persistedType#, #isMultiValued#, #booleanValue#, #longValue#, #floatValue#, #doubleValue#, #stringValue#, #serializableValue#)
    </insert>

jturmelle
Champ in-the-making
Champ in-the-making
It looks like for 3.2r2, the problem is just this section in avm-insert-SqlMap.xml:

<insert id="insert_AVMStoreProperty" parameterMap="parameter_IdStorePropertyPatternMap">

</insert>

Try

<insert id="insert_AVMStoreProperty" parameterClass="AVMStoreProperty">
<selectKey resultClass="long" keyProperty="id">
select nextVal('avm_store_properties_seq')
</selectKey>
insert into avm_store_properties (id, avm_store_id, qname_id, actual_type_n, persisted_type_n, multi_valued, boolean_value, long_value, float_value, double_value, string_value, serializable_value)
values (#id#, #avmStoreId#, #qnameId#, #actualType#, #persistedType#, #isMultiValued#, #booleanValue#, #longValue#, #floatValue#, #doubleValue#, #stringValue#, #serializableValue#)
</insert>

Do you mean replace part 1 with part 2, or simply add part 2?

Thanks,

Jeff