Preparing for Confluence 8.0 - EAP coming soon

Hi @IrinaTiapchenko

thank you for full clarification :slightly_smiling_face:, I will be watching the release notes when this export is officially available.

Cheers
Adam

2 Likes

Hey @jens,

My apologies for the delay in getting back to you on this one, I’ll make sure that doesn’t happen again.

Seems this is deprecated in Confluence 7.5 sources, but not in 7.18 anymore. :face_with_raised_eyebrow:
We’re also defining custom lucene-search-filter-mapper and lucene-boosting-strategy modules.

I’ll follow up with the team that’s working on this on Monday. Unfortunately they’ll be out tomorrow.

Thanks for your patience in the meantime.

Regards,
James Ponting
Engineering Manager - Confluence Data Center

2 Likes

Hey, would someone be able to coordinate with the relevant team to upgrade the latest Plugin SDK so that it supports Java 11?

One cannot compile against the 8.0.0-struts-m020 milestone using JDK8 as noted previously:

bad class file: /.../.m2/repository/com/atlassian/confluence/confluence/8.0.0-struts-m020/confluence-8.0.0-struts-m020.jar(com/atlassian/confluence/pages/AbstractPage.class)
 class file has wrong version 55.0, should be 52.0

The latest plugin SDK 8.2.17 does not support JDK11 and trying to use it produces the following error:

$ atlas-mvn package
Executing: /.../atlassian-plugin-sdk-8.2.7/apache-maven-3.5.4/bin/mvn  -gs /.../atlassian-plugin-sdk-8.2.7/apache-maven-3.5.4/conf/settings.xml package
Exception in thread "main" java.lang.NullPointerException
	at java.base/java.io.Reader.<init>(Reader.java:167)
	at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:72)
	at org.twdata.maven.trap.Dispatcher.getInterceptorsResourceBufferedReader(Dispatcher.java:67)
	at org.twdata.maven.trap.Dispatcher.getMavenInterceptors(Dispatcher.java:45)
	at org.twdata.maven.trap.Dispatcher.main(Dispatcher.java:21)
	at org.twdata.maven.trap.App.main(App.java:18)

I can build with Conf 8.0 and JDK11 by falling back to a much older version of the plugin SDK (8.0.7), which works for whatever reason. This seems…suboptimal? And the corresponding AMPS-1541 issue to upgrade the plugin SDK is “Won’t Fix”?!

Hi @scott.dudley

please check my posts - Preparing for Confluence 8.0 - EAP coming soon - #2 by adam.labus and Preparing for Confluence 8.0 - EAP coming soon - #4 by adam.labus

I think you are still using Java 8, not Java 11.

Check your configuration in the console using atlas-version, because I have no problem compiling 8.0.0-struts-m020 version on SDK 8.2.7 and Java 11

r2d2@tython restapi-extender_8 % atlas-version

ATLAS Version:    8.2.7
ATLAS Home:       /Applications/Atlassian/atlassian-plugin-sdk
ATLAS Scripts:    /Applications/Atlassian/atlassian-plugin-sdk/bin
ATLAS Maven Home: /Applications/Atlassian/atlassian-plugin-sdk/apache-maven
AMPS Version:     8.1.2
--------
Executing: /Applications/Atlassian/atlassian-plugin-sdk/apache-maven/bin/mvn --version -gs /Applications/Atlassian/atlassian-plugin-sdk/apache-maven/conf/settings.xml
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /Applications/Atlassian/atlassian-plugin-sdk/apache-maven
Java version: 11.0.15, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
Default locale: en_PL, platform encoding: UTF-8
OS name: "mac os x", version: "12.5.1", arch: "aarch64", family: "mac"

Cheers
Adam

Hey @adam.labus

Nope, I’m using Java 11. Even atlas-version crashes. Did you patch the version of Maven in the SDK? (Maybe to get ARM64 support?) Plugin SDK 8.2.7 ships with Maven 3.5.4, but it looks like you are using 3.8.6.

$ java -version
openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment Temurin-11.0.16+8 (build 11.0.16+8)
OpenJDK 64-Bit Server VM Temurin-11.0.16+8 (build 11.0.16+8, mixed mode)

$ atlas-version
ATLAS Version:    8.2.7
ATLAS Home:       /.../atlassian-plugin-sdk-8.2.7
ATLAS Scripts:    /.../atlassian-plugin-sdk-8.2.7/bin
ATLAS Maven Home: /.../atlassian-plugin-sdk-8.2.7/apache-maven-3.5.4
AMPS Version:     8.1.2
--------
Executing: /.../atlassian-plugin-sdk-8.2.7/apache-maven-3.5.4/bin/mvn --version -gs /.../atlassian-plugin-sdk-8.2.7/apache-maven-3.5.4/conf/settings.xml
Exception in thread "main" java.lang.NullPointerException
	at java.base/java.io.Reader.<init>(Reader.java:167)
	at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:72)
	at org.twdata.maven.trap.Dispatcher.getInterceptorsResourceBufferedReader(Dispatcher.java:67)
	at org.twdata.maven.trap.Dispatcher.getMavenInterceptors(Dispatcher.java:45)
	at org.twdata.maven.trap.Dispatcher.main(Dispatcher.java:21)
	at org.twdata.maven.trap.App.main(App.java:18)

Hi @scott.dudley

in fact, after downgrading Maven to 3.5.4 build fails.

My configuration which allows me to compile the app for 8.0.0-struts-m020:

  • Maven - 3.8.6
  • SDK - 8.2.7
  • AMPS - 8.6.0 - pom.xml = <amps.version>8.6.0</amps.version> - i don’t know why atlas-version shows 8.1.2
  • Java - 11

Cheers
Adam

@adam.labus Yeah, thanks, I got it working with Java 11 after upgrading Maven manually. It’s unfortunate though that one can’t even build against the latest Confluence release using the stock plugin SDK, without jumping through these undocumented hoops.

See also:

1 Like

Hey @jens,

Thanks for your patience on this one.

Some of our apps define lucene-query-mapper modules. Am I understanding the announcements correctly, that this will no longer be possible (because the mapper implementations create Lucene objects)?

Seems this is deprecated in Confluence 7.5 sources, but not in 7.18 anymore. :face_with_raised_eyebrow:

The mapper in question is no longer marked as deprecated as we’re using it in Search V2’s implementation. That said, this mapper and the classes within org.apache.lucene will be sealed off in Confluence 8.0. So functionally the same thing.

With no direct access to the Lucene API, custom mappers can no longer be used. Instead a custom SearchQuery can be used in place, however you’ll need to override the expand() method that decomposes itself into multiple primitive SearchQuery classes such as BooleanQuery, TermQuery etc.

We’re also defining custom lucene-search-filter-mapper and lucene-boosting-strategy modules.

Will there be any replacement APIs for 3rd party apps? This would result in a major refactoring of our apps and most probably a loss of features otherwise.

We removed lucene-search-filter-mapper module mainly as org.apache.lucene.search.Filter has been replaced with a Query class in Lucene 6 (see Apache Lucene Migration Guide). In this case, you’ll need to replace SearchFilter you’re using with a new SearchQuery and, again, will need to override the provided expand() method.

The lucene-boosting-strategy module was deprecated in Confluence 7.0, so you’ll need to replace its usage with the new FunctionScoreQuery, in addition to any score functions defined under com.atlassian.confluence.search.v2.score.

Hopefully this gives you what you need :slight_smile:

Thanks,
James Ponting
Engineering Manager - Confluence Data Center

2 Likes

What are the plans for app developers who want to keep their apps compatible for both Confluence 7.x and 8.x in parallel? For example, according to the Struts2 upgrade, packages from com.opensymphony.xwork.* should be changed to
com.opensymphony.xwork2.*. It would be extremely costly to have to publish the same apps for Confluence 7.x and 8.x differently.

1 Like

Hi @MatthiasClasen

please check this answer → PSA - Confluence moves to Struts in 8.0 - EAP - #6 by ggautam

Cheers
Adam

3 Likes

Dear @Wendy and all,

based on what I read here in the linked documents I did not expect any changes to the v2.ContentSearch. However we are now seeing the following exception:

java.lang.NoSuchMethodError: ‘void com.atlassian.confluence.search.v2.ContentSearch.(com.atlassian.confluence.search.v2.SearchQuery, com.atlassian.confluence.search.v2.SearchSort, com.atlassian.confluence.search.v2.SearchFilter, int, int)’

Do you have any additional information on that?

Thank you and best regards

Andreas

Update 2022-09-21: I assume the problem comes from the removed SearchFilter classes; they will be deprecated in 7.20 and removed in 8.0; the new ContentSearch is here

1 Like

Hi @andreas1,
That constructor method (and any method signature that has com.atlassian.confluence.search.v2.SearchFilter) is deprecated in 7.20 and will be removed from 8.0 as mentioned in the javadoc (that you have already linked to).