Getting ZipException Error when Installing a New Plugin Due to Postgres 9 Configuration

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

Using Postgres 9.0+, the following exception is shown in the logs when installing a new plugin:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2010-10-05 07:14:37,325 ERROR [http-8080-14] [atlassian.plugin.loaders.ScanningPluginLoader] deployPluginFromUnit Unable to deploy plugin 'null', file Unit: C:\confluence\data\plugin-cache\xxxxxxxx.jar (1286277277321)  -- url: /admin/uploadplugin.action | userName: someuser | referer: http://<confluence server base url>:8080/admin/viewplugins.action | action: uploadplugin com.atlassian.plugin.PluginParseException: Cannot open JAR file for reading: C:\confluence\data\plugin-cache\1286277277033taskdock-1.2.jar     at com.atlassian.plugin.JarPluginArtifact.getResourceAsStream(JarPluginArtifact.java:53)     at com.atlassian.plugin.factories.LegacyDynamicPluginFactory.canCreate(LegacyDynamicPluginFactory.java:137)     at com.atlassian.plugin.loaders.ScanningPluginLoader.deployPluginFromUnit(ScanningPluginLoader.java:113)     at com.atlassian.plugin.loaders.ScanningPluginLoader.addFoundPlugins(ScanningPluginLoader.java:176)     at com.atlassian.confluence.plugin.DatabaseClassLoadingPluginLoader.addFoundPlugins(DatabaseClassLoadingPluginLoader.java:53)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)     at java.lang.reflect.Method.invoke(Method.java:597)     at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)     at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) ... Caused by: java.util.zip.ZipException: error in opening zip file     at java.util.zip.ZipFile.open(Native Method)     at java.util.zip.ZipFile.<init>(ZipFile.java:114)     at java.util.jar.JarFile.<init>(JarFile.java:135)     at java.util.jar.JarFile.<init>(JarFile.java:99)     at com.atlassian.plugin.JarPluginArtifact.getResourceAsStream(JarPluginArtifact.java:49)     ... 220 more

Cause

The PostgreSQL 8.x JDBC drivers that ship with Confluence are not compatible with PostgreSQL 9.x. The underlying cause is a change to PostgreSQL which has modified the bytea_output data type.

This change affects Confluence's ability to store plugin binaries in the plugindata table in the database when installing a new plugin.

Resolution

Confluence 4.0 and later contains the updated PostgreSQL 9.x JDBC drivers which fixes this problem.

If you are running an earlier version of Confluence, you can upgrade to the latest PostgreSQL JDBC drivers by replacing the existing driver JAR file in Confluence's WEB-INF/lib/ directory. The driver version 9.0-801.jdbc3 does not suffer from this problem.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.