SQL Integrity Violations in fresh install of 4.7.1

Sorry to hear that you’re running into an issue. It has been reported before, as [OF-2437] - Ignite Realtime Jira

A workaround for this issue is to replace the pubsub persistence provider (which defaults to org.jivesoftware.openfire.pubsub.CachingPubsubPersistenceProvider in a non-clustered environment) with org.jivesoftware.openfire.pubsub.DefaultPubSubPersistenceProvider.

This can be done by configuring the property provider.pubsub-persistence.className with value org.jivesoftware.openfire.pubsub.DefaultPubSubPersistenceProvider