We have now tested with 9.0.0-m14 and the issue with com.atlassian.plugins:atlassian-plugins-osgi-javaconfig is resolved for us.
Thanks a lot for fixing this, @kmacleod! ![]()
We have now tested with 9.0.0-m14 and the issue with com.atlassian.plugins:atlassian-plugins-osgi-javaconfig is resolved for us.
Thanks a lot for fixing this, @kmacleod! ![]()
Thank you @matthiasbertsch for sharing!
I still cannot get it to work with 8.8.1 and I have still some Class / Classpath issues with methods returning Dates. While the latter is only annoying, I cannot get past the dependency issues with 8.8.1 in DEV mode (which as I understand is a step to resolve issues with Confluence version 9).
So still, this is what I have in may configuration to start Confluence via atlas-debug.
<atlassian.dev.mode>true</atlassian.dev.mode>
<upm.plugin.upload.enabled>true</upm.plugin.upload.enabled>
<confluence.osgi.treatDeprecatedPackagesAsPublic>true</confluence.osgi.treatDeprecatedPackagesAsPublic>
On one product, the dependency to org.jspecify is missing. I can fix this by adding it to my dependencies with scope compile, but I cannot see that I am using any of the annotations of this library directly.
Unable to resolve ... [304](R 304.0): missing requirement [... [304](R 304.0)] osgi.wiring.package; (osgi.wiring.package=org.jspecify.annotations) Unresolved requirements: [[... [304](R 304.0)] osgi.wiring.package; (osgi.wiring.package=org.jspecify.annotations)]
But at least this one is starting now. So the latest version of 8.8 fixed the issue. Thank you for making this fix happen, @kmacleod!
I thought I understood that confluence.osgi.treatDeprecatedPackagesAsPublic=true would help me to have access to deprecated packages. But on another product, when I start the server / deploy the package, I get this:
Unable to resolve .... [303](R 303.0): missing requirement [... [303](R 303.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.confluence.importexport) Unresolved requirements: [[... [303](R 303.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.confluence.importexport)]
I am using com.atlassian.confluence.event.events.admin.ImportFinishedEvent which has an accessor method that returns an instance of com.atlassian.confluence.importexport.ImportContext, which is deprecated. The classes are in the confluence jar. How should I fix this? Do I miss any platform dependencies? This is what I use:
<properties>
<!-- <enforcer.skip>true</enforcer.skip> -->
<confluence.version>8.8.1</confluence.version>
<platform.version>6.5.5</platform.version>
<jdk.version>11</jdk.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.atlassian.platform.dependencies</groupId>
<artifactId>platform-public-api</artifactId>
<version>${platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.atlassian.platform.dependencies</groupId>
<artifactId>platform-deprecated-public-api</artifactId>
<version>${platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.atlassian.platform.dependencies</groupId>
<artifactId>platform-spring-bundle</artifactId>
<version>${platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Cheers
Hi everyone! Hi Atlassianers! Have you said somewhere whether Confluence 9.0 is an LTS version?
The dev mode in Confluence 8.8 is defined as:
public static final String CONFLUENCE_DEV_MODE = "confluence.devmode";
public static final String ATLASSIAN_DEV_MODE = "atlassian.dev.mode";
isDevMode = Boolean.getBoolean(CONFLUENCE_DEV_MODE) || Boolean.getBoolean(ATLASSIAN_DEV_MODE);
So both have to be false if anybody is struggling.
This is the way I start my Confluence 8.8.1 with custom parameters:
mvn com.atlassian.maven.plugins:amps-maven-plugin:8.13.1-SNAPSHOT:run-standalone -Dproduct='confluence' -Dproduct.version='8.8.1' -Dconfluence.osgi.treatDeprecatedPackagesAsPublic=true -Dconfluence.devmode=false -Datlassian.dev.mode=false -Dupm.plugin.upload.enabled=true -Djvmargs='-Xmx5g -Xms3g -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5006'
Where amps-maven-plugin:8.13.1-SNAPSHOT is a custom build of AMPS that allows for banned dependencies and some other small tweaks.
Also enables debugger on port 5006 and uploads of jars via rest.
Thank you for sharing! I did not know about the second parameter.
My issue is still starting the server in DEV mode successfully.
I retested the REST V2 stuff with 9.0.0-m14 and my app starts, no errors, but I get 404 on all endpoints. The logs show:
2024-03-12 10:16:16,439 WARN [http-nio-8090-exec-10] [jersey.internal.inject.Providers] checkProviderRuntime
A provider io.codeclou.app.confluence.common.rest.IndexingEndpoint registered in SERVER runtime
does not implement any provider interfaces applicable in the SERVER runtime.
Due to constraint configuration problems the provider
io.codeclou.app.confluence.common.rest.IndexingEndpoint will be ignored.
-- url: /rest/codeclou-app-confluence-common/1.0/users/admin | userName: admin ...
@mkemp I saw the bitbucket example apps and have a very simple app that uses standard REST Endpoints but it won’t work. Is Confluence m14 fully ready for REST V2?
Hi Community.
There is deprecation com.atlassian.core.user.preferences.UserPreferences in platform 7 release notes (Confluence 9 is in Platform 7) . This class will be removed in Confluence 9.
Users should use:
UserSettingsServiceorPluginSettingsFactoryfrom SAL or migrate to using AO completely
But UserSettingsService doesn’t return desirable settings (I show old constants):
There is only ConfluenceUserSettings.isWatchingOwnContent() .
Does anybody know how to get these all settings via new API? Which AO tables we should use to see these settings?
Any help is appreciated.
Kind regards
Hi @aragot I can confirm that Confluence DC 9.0 will not be an LTS release. We’ll be announcing timelines for our 9.x LTS version and delivery timeline soon on Atlassian Community so keep an eye out for it over the coming week or so. Cheers.
Hi @clouless, could you please check if the annotation dependency you’re using aligns with the REST v2 Implementation present in the system bundle?
The dependency should use provided scope, otherwise, it will be a different copy of REST v2 is using.
For example, jakarta.ws.rs-api and jackson-annotations are some of the most common dependencies that are often overlooked in the provided scope.
Hi @ShaoWenWu
Thanks for the tips. I had problems with Jackson and currently do not have dependencies present.
Here is my full pom.xml:
Could you tell me what is wrong, thank you.
I am using Spring Java Config and have the migration entry in my Atlassian-plugin.xml
Cheers,
Bernhard
Try to change these two to the provided scope.
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>2.1.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugins.rest</groupId>
<artifactId>atlassian-rest-v2-api</artifactId>
<!--<version>7.2.0</version>-->
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
If you have access to UPM-OSGI tab, you can also go to the UPM-OSGI tab (http://{baseurl}/plugins/servlet/upm/osgi) and search for System Bundle.
You should see that your plugin is using the same package as that of the REST v2 Implementation.
Hi ShaoWenWu,
Thank you, but the app will not activate. Do you have a confluence REST v2 sample app?
I do not See the rest v2 in OSGI for my app, but maybe because it does not enable.
cheers,
Bernhard
Hi,
There is a blocker that is impacting multiple partners that was signaled as a supported ticket here : https://jira.atlassian.com/browse/CONFSERVER-94488
Can someone from Atlassian suggest a solution or a workaround?
Thanks
Hello Fabio,
Same issue persists for 9.0.0-m16. Do you still have the same problem or have you already solved it ?
Gorka.
Hi, I checked with the Confluence team and they confirmed that Confluence 9.0.0-m14 does support REST V2.
It’d be nice if you could share the error message/log details/exception traces when the app is not activated.
And here is an example, not originally built for Confluence, but it can still be referenced
Ok - good to know. I just tested on dockerized m16 and even with provided dependencies it does not enable. I get this error:
(osgi.wiring.package=org.codehaus.jackson) Unresolved requirements:
-- url: /rest/plugins/1.0/ | userName: admin | traceId: 6b95900872bb9381
2024-03-20 09:10:14,245 WARN [UpmAsynchronousTaskManager:thread-1] [osgi.hook.dmz.DmzResolverHook] filterMatches Package org.codehaus.jackson is deprecated and is not available for export to plugin codeclou-app-confluence-common
-- url: /rest/plugins/1.0/ | userName: admin | traceId: 6b95900872bb9381
2024-03-20 09:10:14,253 WARN [UpmAsynchronousTaskManager:thread-1] [osgi.hook.dmz.DmzResolverHook] filterMatches Package org.codehaus.jackson is deprecated and is not available for export to plugin codeclou-app-confluence-common
-- url: /rest/plugins/1.0/ | userName: admin | traceId: 6b95900872bb9381
2024-03-20 09:10:14,254 ERROR [UpmAsynchronousTaskManager:thread-1] [plugin.osgi.factory.OsgiPlugin] enableInternal Detected an error (BundleException) enabling the plugin 'codeclou-app-confluence-common' : Unable to resolve io.codeclou.app-confluence-common [291](R 291.0): missing requirement [io.codeclou.app-confluence-common [291](R 291.0)] osgi.wiring.package; (osgi.wiring.package=org.codehaus.jackson) Unresolved requirements: [[io.codeclou.app-confluence-common [291](R 291.0)] osgi.wiring.package; (osgi.wiring.package=org.codehaus.jackson)]. This error usually occurs when your plugin imports a package from another bundle with a specific version constraint and either the bundle providing that package doesn't meet those version constraints, or there is no bundle available that provides the specified package. For more details on how to fix this, see https://developer.atlassian.com/x/mQAN
in the pom.xml I have:
<!-- CONFLUENCE 9 REST START -->
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>2.1.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugins.rest</groupId>
<artifactId>atlassian-rest-v2-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- CONFLUENCE 9 REST END -->
I am not using any org.codehaus.jackson classes in my app.
The manifest.mf shows these imports:
org.codehaus.jackson,org.codehaus.jackson.annotate,org.codeh
aus.jackson.map,org.codehaus.jackson.map.annotate,org.codehaus.jackson.
map.module,org.codehaus.jackson.map.ser.std,org.codehaus.jackson.type
man dependency:tree does not show Jackson other than from the REST API packages. Maybe some other library needs Jackson … I will need to check if this is transitive of something else.
UPDATE: It works now with optional import:
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>confluence-maven-plugin</artifactId>
<configuration>
...
<instructions>
...
<Import-Package>
com.atlassian.sal.*,
....
org.codehaus.jackson.*;resolution:=optional,<!-- app does not start otherwise -->
*
</Import-Package>
thanks
Could Atlassian Please release 9.0.0-m16 as docker image, thanks.
As of today the last published image is 9.0.0-m09-jdk17
Thanks.
@clouless Atlassian renamed the Docker repos, seemingly without telling anyone. You’ll have better luck with atlassian/confluence:9.0.0-m16. Same change for the old jira-server, bitbucket-server and so on.
@scott.dudley thanks a lot! ![]()
I could really start a list of these things. Jira 15 EAP also has no community Post. forage/react 10. a.s.o a.s.o
![]()
But the repo is still named the old way, hooray: Bitbucket
I would also wish they would simply also build for arm64v8 so that I do not have to do it myself ![]()
I got a new
error when trying to import a space.xml which worked just fine for the last 10 years.
The com.atlassian.confluence.backuprestore.BackupRestoreManager is not available …
service matching filter=[(objectClass=com.atlassian.confluence.backuprestore.BackupRestoreManager)] unavailable
I am using JavaConfig
@Bean
public BackupRestoreManager importBackupRestoreManager() {
return importOsgiService(BackupRestoreManager.class);
}
This almost quietly fails during runtime, no startup errors. This is really annoying, since my app has some migration tasks, async logic that might fail silently because the dependency injection is not working as expected … very bad ![]()
Confluence 9.0.0-m16
loader constraint violation: when resolving method 'void com.atlassian.confluence.backuprestore.BackupRestoreSettings$Builder.<init>(com.atlassian.confluence.api.model.backuprestore.JobOperation, com.atlassian.confluence.api.model.backuprestore.JobScope)'
the class loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @7de04e0c of the current class, io/codeclou/app/confluence/common/rest/SpaceImportEndpoint,
and the class loader org.apache.catalina.loader.ParallelWebappClassLoader @669efadc for the method's defining class, com/atlassian/confluence/backuprestore/BackupRestoreSettings$Builder,
have different Class objects for the type com/atlassian/confluence/api/model/backuprestore/JobOperation used
in the signature (io.codeclou.app.confluence.common.rest.SpaceImportEndpoint is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @7de04e0c,
parent loader org.apache.catalina.loader.ParallelWebappClassLoader @669efadc; com.atlassian.confluence.backuprestore.BackupRestoreSettings$Builder is in unnamed module of
loader org.apache.catalina.loader.ParallelWebappClassLoader @669efadc, parent loader java.net.URLClassLoader @7eda2dbb)
update: same thing for
com.atlassian.confluence.security.SpacePermissionCoordinator)] unavailable
Which service can I use to set/revoke Space Permissions? Most methods of most classes are deprecated. And I cannot use the “internal” space manager … What is the idea behind that?