Preparing for Confluence 9.0 - EAP out now

Hi,

I’m experiencing the same error @aorlov and @sax experience when installing our app in Confluence 9.0.0-m11, but for the now removed from confluence dependency com.google.guava:guava, which i’m including in the pom with the compile scope (default maven scope), as per Atlassian’s instructions regarding the gray API removal (https://developer.atlassian.com/server/confluence/get-your-apps-ready-for-gray-api-removal):

<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>32.1.3-jre</version>
</dependency>

The generated packaged jar does, in fact, include the aforementioned dependency under the META-INF/lib directory and it is also declared on the manifest file, under Bundle-ClassPath:

Bundle-ClassPath: 
...
META-INF/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar,
... 
META-INF/lib/guava-32.1.3-jre.jar

However, when installing on a standalone Confluence 9.0.0-m11 instance (in dev mode or not, it doesn’t matter) I get the same familiar exception:

Caused by: org.osgi.framework.BundleException: Unable to resolve com.valiantys.software.spreadsheets.server-app [300](R 300.0): missing requirement [com.valiantys.software.spreadsheets.server-app [300](R 300.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=32.1.3.jre)(version<=32.1.3.jre)) Unresolved requirements: [[com.valiantys.software.spreadsheets.server-app [300](R 300.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=32.1.3.jre)(version<=32.1.3.jre))]
	at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)
	at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:1006)
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:992)
	at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:404)

I tried @scott.dudley’s hack here Preparing for Confluence 9.0 - EAP coming soon - #10 by scott.dudley of including the relevant package in a negated pattern under the Import-Package tag, but with no success:

<Import-Package>
    ...
    !com.google.common.base,
</Import-Package>

Some guidance from Atlassian on how to resolve this would be greatly appreciated.

4 Likes