Java SSL connection problem

If you are suffering from the dreaded message

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

and you have installed the necessary certificates in your keystore.

Try passing

-Djavax.net.debug=ssl

to your java runtime. You will now get *a lot* of details about the keystore which is used, the certificates which are available and the SSL negotiation.

This should help to figure out what exactly is going wrong (like a hostname match problem or problem caused by SNI or something else).

Database upgrate problem with Activiti moving from version 5.14 to 5.16

We are using PostgreSQL as our database and we wanted to upgrade Activiti from version 5.14 to 5.16 to be able to use the event system. Unfortunately this failed with the following problem.

org.postgresql.util.PSQLException: ERROR: constraint "act_ru_execution_proc_def_id__business_key__key" of relation "act_ru_execution" does not exist

I don’t really know what causes this. Maybe because we were still using PostgreSQL 8 until recently. Anyway, after some digging, it seems that executing the following SQL script before the update assures that the automatic database upgrade works for use.

ALTER TABLE ACT_RU_EXECUTION ADD CONSTRAINT ACT_UNIQ_RU_BUS_KEY UNIQUE(id_);
ALTER TABLE act_ru_execution ADD CONSTRAINT act_ru_execution_proc_def_id__business_key__key UNIQUE(id_);
ALTER TABLE act_hi_procinst ADD CONSTRAINT act_hi_procinst_proc_def_id__business_key__key UNIQUE(id_);