java.lang.NoClassDefFoundError: org/h2/tools/Server Error while upgrading my macro to 8.5.0 from 7.x
Asked by divakar:

Hello Guys,

I have a confluence macro that is not working fine in Confluence version 7.x   

Now I am going to upgrade my macro to support confluence 8.x (*8.5.0*), I am facing a few issues while upgrading it.

After updating all the plugins to the latest version, when I run **atlas-run**I get the following error

```
[INFO] [talledLocalContainer] io.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NoClassDefFoundError: org/h2/tools/Server
[INFO] [talledLocalContainer] at io.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:156)
[INFO] [talledLocalContainer] at io.atlassian.util.concurrent.LazyReference.get(LazyReference.java:116)
[INFO] [talledLocalContainer] at com.atlassian.h2.ServerLifecycle$1$1.isRunning(ServerLifecycle.java:27)
[INFO] [talledLocalContainer] at com.atlassian.confluence.impl.hibernate.H2DatabaseManager.ensureDatabaseStarted(H2DatabaseManager.java:48)
[INFO] [talledLocalContainer] at com.atlassian.confluence.impl.hibernate.ConfluenceHibernateConfig.getHibernateProperties(ConfluenceHibernateConfig.java:75)
[INFO] [talledLocalContainer] at com.atlassian.confluence.impl.setup.DefaultBootstrapDatabaseAccessor.getBootstrapData(DefaultBootstrapDatabaseAccessor.java:45)
[INFO] [talledLocalContainer] at com.atlassian.confluence.setup.DefaultBootstrapManager.afterConfigurationLoaded(DefaultBootstrapManager.java:881)
[INFO] [talledLocalContainer] at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:69)
[INFO] [talledLocalContainer] at com.atlassian.confluence.setup.DefaultBootstrapManager.init(DefaultBootstrapManager.java:235)
[INFO] [talledLocalContainer] at com.atlassian.config.util.BootstrapUtils.init(BootstrapUtils.java:34)
[INFO] [talledLocalContainer] at com.atlassian.confluence.setup.ConfluenceConfigurationListener.initialiseBootstrapContext(ConfluenceConfigurationListener.java:151)
[INFO] [talledLocalContainer] at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:72)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4641)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5109)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)
[INFO] [talledLocalContainer] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[INFO] [talledLocalContainer] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[INFO] [talledLocalContainer] at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
[INFO] [talledLocalContainer] at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:772)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:426)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
[INFO] [talledLocalContainer] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[INFO] [talledLocalContainer] at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
[INFO] [talledLocalContainer] at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
[INFO] [talledLocalContainer] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] [talledLocalContainer] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] [talledLocalContainer] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] [talledLocalContainer] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
[INFO] [talledLocalContainer] Caused by: java.lang.NoClassDefFoundError: org/h2/tools/Server
[INFO] [talledLocalContainer] at com.atlassian.h2.AbstractServerConfig.get(AbstractServerConfig.java:42)
[INFO] [talledLocalContainer] at com.atlassian.h2.AbstractServerConfig.get(AbstractServerConfig.java:19)
[INFO] [talledLocalContainer] at com.atlassian.h2.ServerLifecycle$2.create(ServerLifecycle.java:52)
[INFO] [talledLocalContainer] at com.atlassian.h2.ServerLifecycle$2.create(ServerLifecycle.java:49)
[INFO] [talledLocalContainer] at io.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:332)
[INFO] [talledLocalContainer] at io.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:150)
```

![Capture1.PNG](/t5/image/serverpage/image-id/278998iC468B8F5D48ACC4C/image-size/large?v=v2&px=999 "Capture1.PNG")

![Capture.PNG](/t5/image/serverpage/image-id/278997i440D055538AA17AB/image-size/large?v=v2&px=999 "Capture.PNG")

I am using Atlassian SDK - 8.2.7.

![Capture2.PNG](/t5/image/serverpage/image-id/278999i61622F1FAF9AB069/image-size/large?v=v2&px=999 "Capture2.PNG")

My Java version is 11  
![Capture3.PNG](/t5/image/serverpage/image-id/279000i2FEC74DB08FDE22C/image-size/large?v=v2&px=999 "Capture3.PNG")

You can find the **pom.xml** file below.
>
> ```
> <dependencyManagement>
> <dependencies>
> <dependency>
> <groupId>com.atlassian.confluence</groupId>
> <artifactId>confluence-plugins-platform-pom</artifactId>
> <version>${confluence.version}</version>
> <type>pom</type>
> <scope>import</scope>
> </dependency>
> </dependencies>
> </dependencyManagement>
> <dependencies>
>
> <dependency>
> <groupId>javax.xml.bind</groupId>
> <artifactId>jaxb-api</artifactId>
> <version>2.3.1</version>
> </dependency>
> <dependency>
> <groupId>com.atlassian.sal</groupId>
> <artifactId>sal-api</artifactId>
> <version>5.0.1</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>com.atlassian.templaterenderer</groupId>
> <artifactId>atlassian-template-renderer-api</artifactId>
> <version>4.2.0</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>4.13.2</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>com.atlassian.confluence</groupId>
> <artifactId>confluence</artifactId>
> <version>${confluence.version}</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>com.atlassian.plugin</groupId>
> <artifactId>atlassian-spring-scanner-annotation</artifactId>
> <version>${atlassian.spring.scanner.version}</version>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <groupId>com.atlassian.plugin</groupId>
> <artifactId>atlassian-spring-scanner-runtime</artifactId>
> <version>${atlassian.spring.scanner.version}</version>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>javax.inject</groupId>
> <artifactId>javax.inject</artifactId>
> <version>1</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>javax.servlet</groupId>
> <artifactId>javax.servlet-api</artifactId>
> <version>4.0.1</version>
> <scope>provided</scope>
> </dependency>
> <!-- WIRED TEST RUNNER DEPENDENCIES -->
> <dependency>
> <groupId>com.atlassian.plugins</groupId>
> <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
> <version>${plugin.testrunner.version}</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>javax.ws.rs</groupId>
> <artifactId>jsr311-api</artifactId>
> <version>1.1.1</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>com.google.code.gson</groupId>
> <artifactId>gson</artifactId>
> <version>2.10.1</version>
> </dependency>
> <dependency>
> <groupId>com.atlassian.plugins.rest</groupId>
> <artifactId>atlassian-rest-common</artifactId>
> <version>7.0.12</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>com.auth0</groupId>
> <artifactId>java-jwt</artifactId>
> <version>4.0.0</version>
> </dependency>
> <dependency>
> <groupId>com.fasterxml.jackson.core</groupId>
> <artifactId>jackson-core</artifactId>
> <version>2.14.2</version>
> </dependency>
> <dependency>
> <groupId>com.fasterxml.jackson.core</groupId>
> <artifactId>jackson-databind</artifactId>
> <version>2.14.2</version>
> </dependency>
> <dependency>
> <groupId>com.fasterxml.jackson.core</groupId>
> <artifactId>jackson-annotations</artifactId>
> <version>2.14.2</version>
> </dependency>
> <dependency>
> <groupId>log4j</groupId>
> <artifactId>log4j</artifactId>
> <version>1.2.8</version>
> </dependency>
>
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <groupId>com.atlassian.maven.plugins</groupId>
> <artifactId>confluence-maven-plugin</artifactId>
> <version>${amps.version}</version>
> <extensions>true</extensions>
> <configuration>
> <productVersion>${confluence.version}</productVersion>
> <productDataVersion>${confluence.data.version}</productDataVersion>
> <enableQuickReload>true</enableQuickReload>
> <enableFastdev>false</enableFastdev>
> <compressJs>false</compressJs>
> <compressResources>false</compressResources>
> <!-- See here for an explanation of default instructions: -->
> <!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins -->
> <instructions>
> <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
> <!-- Add package to export here -->
> <Export-Package>
> com.prolaborate.macros.api,
> </Export-Package>
> <!-- Add package import here -->
> <Import-Package>
> org.springframework.osgi.*;resolution:="optional",
> org.eclipse.gemini.blueprint.*;resolution:="optional",
> *
> </Import-Package>
> <!-- Ensure plugin is spring powered -->
> <Spring-Context>*</Spring-Context>
> </instructions>
> <containerId>${containerId}</containerId>
> <jvmArgs>${jvm.args}</jvmArgs>
> <systemPropertyVariables>
> <webdriver.browser>${webdriver.browser}</webdriver.browser>
> <atlassian.dev.mode>${atlassian.dev.mode}</atlassian.dev.mode>
> </systemPropertyVariables>
> </configuration>
> </plugin>
> <plugin>
> <groupId>com.atlassian.plugin</groupId>
> <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
> <version>${atlassian.spring.scanner.version}</version>
> <executions>
> <execution>
> <goals>
> <goal>atlassian-spring-scanner</goal>
> </goals>
> <phase>process-classes</phase>
> </execution>
> </executions>
> <configuration>
> <scannedDependencies>
> <dependency>
> <groupId>com.atlassian.plugin</groupId>
> <artifactId>atlassian-spring-scanner-external-jar</artifactId>
> </dependency>
> </scannedDependencies>
> <verbose>false</verbose>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <properties>
> <confluence.version>8.5.0</confluence.version>
> <confluence.data.version>8.5.0</confluence.data.version>
> <amps.version>8.1.2</amps.version>
> <plugin.testrunner.version>2.0.1</plugin.testrunner.version>
> <atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version>
> <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
> <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <maven.compiler.source>11</maven.compiler.source>
> <maven.compiler.target>11</maven.compiler.target>
> <jvm.args.custom/>
> <!-- Allows to specify custom arguments in build scripts -->
> <jvm.args.xmx>1024m</jvm.args.xmx>
> <jvm.args>-Xmx${jvm.args.xmx} ${jvm.args.custom}</jvm.args>
> <containerId>tomcat9x</containerId>
> <webdriver.browser>chrome</webdriver.browser>
> <atlassian.dev.mode>false</atlassian.dev.mode>
> </properties>
> ```

I'm not sure what I'm missing, so if anyone can help, that would be great.

Please let me know if you require any additional details from my end.

Any support you can give would be greatly appreciated.


Answers:
author: Vasily Pozlevich
body: AMPS 8.6.0, Maven 3.6.3 and Atlassian SDK 8.2.7 don't help me. My solution:

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/318866i632E2FEBCF13D3D7/image-size/large?v=v2&px=999 "Capture.PNG")

It work fine with amps 8.1.2 and default maven version (3.5.4) of SDK.


author: Marcus Hansson
body: This solved it for me on windows with powershell:  

```
# Swich maven version
$env:ATLAS_MVN="C:\Program Files\apache-maven-3.6.3\bin\mvn"

# check maven version, should display the maven version used
atlas-version

# Run manually instead of atlas-run to specify the AMPS version
# Notify the "com.atlassian.maven.plugins:amps-dispatcher-maven-plugin:8.9.1:run"
mvn com.atlassian.maven.plugins:amps-dispatcher-maven-plugin:8.9.1:run -gs C:\Applications\Atlassian\atlassian-plugin-sdk-8.2.7\apache-maven-3.5.4/conf/settings.xml

# Run the other commands as usual when needed
atlas-package
```


author: Robert Reiner _smartics_
body: With Version 8 the H2 Support has been removed.

See [Confluence 8.0 Upgrade Notes](https://confluence.atlassian.com/doc/confluence-8-0-upgrade-notes-1127254403.html)

You would need AMPS 8.6.0 (or newer - see [AMPS versions](https://developer.atlassian.com/server/framework/atlassian-sdk/amps-sdk-release-notes/)) and might want to add the dependency for your tests. For instance:  

```
<dependency>
  <groupId>hsqldb</groupId>
  <artifactId>hsqldb</artifactId>
  <version>1.8.0.10</version>
  <scope>test</scope>
</dependency>
```

Hope this helps to get started.

comments: author: divakar
body: Hello [@Robert Reiner _smartics_](/t5/user/viewprofilepage/user-id/853340)

Thank you for your prompt reply.

As you mentioned, I have updated AMPS to version 8.6.0, and in order to update AMPS, I have also updated Maven.

I've now updated the AMPS version after referring to a few documents.

Reference

[Maven update](https://ecosystem.atlassian.net/browse/ATLASSDK-227)

[Update environment variable](https://developer.atlassian.com/server/framework/atlassian-sdk/changing-the-default-maven-version/)

After updating the AMPS version now i am facing another issue.

```
[INFO] Artifact com.atlassian.maven.plugins:confluence-maven-plugin:pom:8.6.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)]
[INFO] Artifact com.atlassian.maven.plugins:confluence-maven-plugin:pom:8.6.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)]
[WARNING] The POM for com.atlassian.maven.plugins:confluence-maven-plugin:jar:8.6.0 is missing, no dependency information available
[INFO] Artifact com.atlassian.maven.plugins:confluence-maven-plugin:jar:8.6.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)]
[INFO] Artifact com.atlassian.maven.plugins:confluence-maven-plugin:jar:8.6.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)]
[INFO] Artifact com.atlassian.confluence:confluence-plugins-platform-pom:pom:8.5.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)]
[INFO] Artifact com.atlassian.confluence:confluence-plugins-platform-pom:pom:8.5.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)]
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin com.atlassian.maven.plugins:confluence-maven-plugin:8.6.0 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.atlassian.maven.plugins:confluence-maven-plugin:jar:8.6.0 (present, but unavailable): com.atlassian.maven.plugins:confluence-maven-plugin:jar:8.6.0 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced @
[ERROR] Unknown packaging: atlassian-plugin @ line 16, column 14
[ERROR] Non-resolvable import POM: The following artifacts could not be resolved: com.atlassian.confluence:confluence-plugins-platform-pom:pom:8.5.0 (present, but unavailable): com.atlassian.confluence:confluence-plugins-platform-pom:pom:8.5.0 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced @ line 19, column 19
```

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/279290i6A77979B4ACAC9EC/image-size/large?v=v2&px=999 "Capture.PNG")

I already have the missing.jar file in my local repository.

![Capture1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/279291iA8D9C612C3C33D6E/image-size/large?v=v2&px=999 "Capture1.PNG")

You can find my updated pox.xml file below.

![Capture2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/279293iCF1BF8473B3E3227/image-size/large?v=v2&px=999 "Capture2.PNG")  
Update maven version

![Capture3.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/279294i2E20BB43EF76DDF7/image-size/large?v=v2&px=999 "Capture3.PNG")

Please let me know if you require any additional details from my end.

I appreciate you taking my request into account.


author: Robert Reiner _smartics_
body: You may want to consider to update to the latest AMPS. In the back of my head I think to remember, that one of the later 8er updates require a later version.

It seems that there is an issue in your Maven "infrastructure":

```
Artifact com.atlassian.maven.plugins:confluence-maven-plugin:pom:8.6.0 
is present in the local repository, but cached from a remote repository ID 
that is unavailable in current build context, verifying that is 
downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)]
```

Could you please check if this plugin artifact is also available?

I have never had (at least I cannot remember) that error message from Maven. It seems to tell that locally everything is okay, but not remote. Maybe a build running offline would work? Seems to me there is a "hiccup" in your Maven infrastructure. You may need to force update or purge some artifacts ...

Hope this helps ...


author: divakar
body: Hello [@Robert Reiner _smartics_](/t5/user/viewprofilepage/user-id/853340)

First of all, I apologize for the delayed response.

The above comment was quite helpful to me.

I have tried updating the AMPS and Maven with various combinations and none of them worked for me.

Currently, my AMPS version is **8.9.1** and my Maven version is **3.6.3**.

As you mentioned I've tried running the build offline but I still have the same issue.

```
com.atlassian.maven.plugins:confluence-maven-plugin:pom:8.6.0
```

As checked plugin artifact is not available.

This is the issue I'm having at the moment.

![imgpsh_fullsize_anim.png](https://community.atlassian.com/t5/image/serverpage/image-id/279955i00CBB8AA1A5FF1ED/image-size/large?v=v2&px=999 "imgpsh_fullsize_anim.png")

I don't know how to move on from where I am right now; I'm completely stuck.

Please let me know if you require any additional details from my end.

I appreciate you considering my request.


author: Robert Reiner _smartics_
body: Hi [@divakar](/t5/user/viewprofilepage/user-id/4855754)

this still sounds like a Maven issue to me.

Have you configured access to the Atlassian Maven repo as described in <https://developer.atlassian.com/server/framework/atlassian-sdk/working-with-maven/>? I assume that in your local directory for the plugin artifact is a file noting that the artifact cannot be resolved and will not be tried again (for a specified amount of time)?

You may want to use the -U switch with Maven (which will force an update for a snapshot version or a release version which has never been downloaded into your local Maven repo). But since you encounter the issue with version 8.6.0 and now with 8.9.1 I assume that your Maven configuration still not has access to the Maven artifacts. So you would need to make sure that there is at least one remote repository (corporate or that from Atlassian as described via the URL above) can provide the artifact.

Just for the record: Maven 3.8.6 and AMPS version 8.10.1 works fine with me. But certainly, your mileage may vary.

Hope this helps ...  
Robert

**EDIT:** Maybe you have configured mvnrepository.com as your remote repo (instead of the one provided by Atlassian) and run into the problem mentioned on <https://community.developer.atlassian.com/t/struts-6-3-upgrade-in-confluence-8-6/72512/9> by Kusal today? This could explain why the artifacts are not found on the remote server, but have been found before.


author: divakar
body: Hi [@Robert Reiner _smartics_](/t5/user/viewprofilepage/user-id/853340)

Thanks for the valuable input.

I want to sincerely apologize for the delay in my response

As you mentioned, we have tried a number of different strategies, but unfortunately, the problem persists.

We attempted to run the Maven locally and even tried with the Maven proxy  
![image_2023_09_26T10_27_00_480Z.png](https://community.atlassian.com/t5/image/serverpage/image-id/282932i4CE33C6205E19FC7/image-size/large?v=v2&px=999 "image_2023_09_26T10_27_00_480Z.png")  
I believe we are almost in the finishing stage, I have attached the error below that we are currently experiencing.  
![image_2023_09_26T10_11_14_650Z.png](https://community.atlassian.com/t5/image/serverpage/image-id/282931i788F450FD97F2AB1/image-size/large?v=v2&px=999 "image_2023_09_26T10_11_14_650Z.png")  
We are waiting for your response.

Please let me know if you require any additional details from my end.

I appreciate you considering my request.


author: Robert Reiner _smartics_
body: Hi [@divakar](/t5/user/viewprofilepage/user-id/4855754)

The messages seems to imply that you need to set your plugin repository. The main artifacts and the plugin repository may be different, but often are not.

I assume you could simply set the same repository you use for your artifacts as plugin repository for your plugins. Please refer to <https://maven.apache.org/pom.html#Plugin_Repositories> for details.

**Edit** : Please refer to <https://stackoverflow.com/questions/51633369/repositories-vs-pluginrepositories-in-maven-settings-xml> for an example regarding the settings (my above link provides some explanation, but the syntax you need is for your settings.xml, not the pom.xml). The official settings.xml documentation is here: [https://maven.apache.org/settings.html:](https://maven.apache.org/settings.html)

      <profiles>    <profile>      ...      <repositories>        <repository>          <id>codehausSnapshots</id>          <name>Codehaus Snapshots</name>          <releases>            <enabled>false</enabled>            <updatePolicy>always</updatePolicy>            <checksumPolicy>warn</checksumPolicy>          </releases>          <snapshots>            <enabled>true</enabled>            <updatePolicy>never</updatePolicy>            <checksumPolicy>fail</checksumPolicy>          </snapshots>          <url>http://snapshots.maven.codehaus.org/maven2</url>          <layout>default</layout>        </repository>      </repositories>      <pluginRepositories>        <pluginRepository>          <id>myPluginRepo</id>          <name>My Plugins repo</name>          <releases>            <enabled>true</enabled>          </releases>          <snapshots>            <enabled>false</enabled>          </snapshots>          <url>https://maven-central-eu....com/maven2/</url>        </pluginRepository>      </pluginRepositories>      ...    </profile>  </profiles>


author: divakar
body: Hi [@Robert Reiner _smartics_](/t5/user/viewprofilepage/user-id/853340)

I appreciate your helpful suggestions. We benefited from it, and the problem is almost resolved. Our confluence is running fine

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/284436i9793005DBBB0A5C6/image-size/large?v=v2&px=999 "Capture.PNG")

We currently have a problem with our macro, We can't see our macro on the Manage Apps page.

when I run atlas-run command Confluence seemed to be working properly and my build was successful, but I experienced a few errors, I think this could be the reason for this issue. I have attached the error below![image_2023_10_04T12_09_41_184Z.png](https://community.atlassian.com/t5/image/serverpage/image-id/284439i2656F819F871D026/image-size/large?v=v2&px=999 "image_2023_10_04T12_09_41_184Z.png")

It would be great if you could assist with this.


author: Robert Reiner _smartics_
body: I do not see the root cause of the issue in the log. Are your classes part of the shown stack trace?

You may want to try to start the Confluence server without your app and then watch the log while deploying it. This may help you to pinpoint the relevant information in the log which otherwise may be overseen in the long output when the server starts.

Often there is an issue with Spring injection that prevents the app from showing up ... so maybe the stacktrace is not related to the root cause of the problem ...


Tags: confluence-server

server