Doesn't work atlas-run
Asked by aas:

1) When I try to execute atlas-run command to start confluence with my plugin there is such error

\[INFO\] \[talledLocalContainer\] # A fatal error has been detected by the Java Runtime Environment:  
\[INFO\] \[talledLocalContainer\] #  
\[INFO\] \[talledLocalContainer\] # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6c3f3722, pid=82152, tid=81700  
\[INFO\] \[talledLocalContainer\] #  
\[INFO\] \[talledLocalContainer\] # JRE version: Java(TM) SE Runtime Environment (8.0_51-b16) (build 1.8.0_51-b16)  
\[INFO\] \[talledLocalContainer\] # Java VM: Java HotSpot(TM) Client VM (25.51-b03 mixed mode windows-x86 )  
\[INFO\] \[talledLocalContainer\] # Problematic frame:  
\[INFO\] \[talledLocalContainer\] # V \[jvm.dll+0x93722\]  
\[INFO\] \[talledLocalContainer\] #  
\[INFO\] \[talledLocalContainer\] # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

but it works with jira.

2) I have a code in IntellijIdea and because of atlas-run doesn't work I can't test my plugin. So I want to add a plugin into working instance of confluence on server but I don't know how.


Answers:
author: DPKJ
body: Have tried to run it after 'atlas-clean'?

comments: author: aas
body: Yes, I've just tried and no luck


author: DPKJ
body: Please also validate output of 'atlas-update' to check if your SDK is up to date.


author: aas
body: I can't execute atlas-update

\[INFO\] --------------\< com.confluence.plugin:myConfluencePlugin \>--------------  
\[INFO\] Building myConfluencePlugin 1.0.0-SNAPSHOT  
\[INFO\] --------------------------\[ atlassian-plugin \]--------------------------  
\[INFO\]  
\[INFO\] --- amps-maven-plugin:8.0.0:update (default-cli) @ myConfluencePlugin ---  
\[INFO\] Fail to connect to host marketplace.atlassian.com  
\[INFO\] Downloading SDK version from marketplace.atlassian.com...  
\[INFO\] Fail to connect to host marketplace.atlassian.com  
\[INFO\] ------------------------------------------------------------------------  
\[INFO\] BUILD FAILURE  
\[INFO\] ------------------------------------------------------------------------  
\[INFO\] Total time: 5.312 s  

\[INFO\] ------------------------------------------------------------------------  
\[ERROR\] Failed to execute goal com.atlassian.maven.plugins:amps-maven-plugin:8.0.0:update (default-cli) on project myConfluencePlugin: Execution default-cli of goal com.atlassian.maven.plugins:amps-maven-plugin:8.0.0:update failed.: NullPointerException

But here is info atlas-version

ATLAS Version: 8.0.7  
ATLAS Home: C:\\Applications\\Atlassian\\atlassian-plugin-sdk-8.0.7  
ATLAS Scripts: C:\\Applications\\Atlassian\\atlassian-plugin-sdk-8.0.7\\bin  
ATLAS Maven Home: C:\\Applications\\Atlassian\\atlassian-plugin-sdk-8.0.7\\apache-maven-3.5.4  
AMPS Version: 8.0.0


author: DPKJ
body: [@aas](/t5/user/viewprofilepage/user-id/3441288)Can you try to uninstall your sdk and reinstall it. I think the problem is with SDK version you are using.


author: aas
body: I've installed the latest version of atlassian sdk 8.0.16 and no changes(


author: DPKJ
body: [@aas](/t5/user/viewprofilepage/user-id/3441288)two more things before you take this to Atlassian,

1. Have you tested plugin code base on another machine?
2. Have you tried to update and reinstall JDK on your system?


author: aas
body: 1. JDK was reinstalled

2. there is no way to check on another machine(


author: aas
body: And is it possible to make jar file in IntellijIdea and add it to a confluence home directory on the server?


author: DPKJ
body: [@aas](/t5/user/viewprofilepage/user-id/3441288)if not other machine how about VM, may be a linux VM?


author: DPKJ
body: To make plugin jar you need to run \`atlas-package\` command. And yes you can put that in confluence home directory, but you will need to restart confluence to pick that plugin.

To install plugin on your remote confluence instance you can look at, [atlas-install-plugin](https://developer.atlassian.com/server/framework/atlassian-sdk/atlas-install-plugin/) command, it takes host, admin username and password to install plugin from development environment.

Most command in Atlassian SDK are wrapper around commands provided by Maven. Atlassian SDK ships with its own Maven Version, and some changes in settings.xml file of Maven.


author: aas
body: 1. I thought that I can add OSGi plugin without restarting confluence, isn't it?

2. After atlas-package command there are appears 2 jar files, 1 obr file and obr folder. Which one i have to put into home directory?


author: DPKJ
body: 1. No, you will need to restart. Confluence create entry in database etc which doesn't happen when we just put plugin in directory.

2. Usually there are one jar, and one obr file,

* Have you deleted 'target' directory before packaging or 'atlas-clean'?
* You need to put only JAR file in `<confluence_home>/plugins/installed-plugins/`.


author: aas
body: I've deleted target folder and after that execute atlas-package. And then I've got the same target directory with myConfluencePlugin-1.0.0-SNAPSHOT.jar and myConfluencePlugin-1.0.0-SNAPSHOT-tests.jar and many other directories in it, so I can't understand what exactly I need to add to the server


author: DPKJ
body: Use *myConfluencePlugin-1.0.0-SNAPSHOT.jar*


author: aas
body: Thanks a lot


author: Dominic Lagger
body: Hi

because of the not working atlas-mvn clean or package, there are issues with the version 8.0.16 and below.

Watch this issue here: <https://ecosystem.atlassian.net/browse/ATLASSDK-93>

And also watch this community post: <https://community.atlassian.com/t5/Jira-questions/Unknown-lifecycle-phase-error/qaq-p/1006922#M335142>

This helped me for the atlas-mvn statements. But I have encountered other problems :)

Hope this helps for you

Regards, Dominic