Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Plugin SDK: Unable to run local JIRA due to "JIRA is locked"

Nora Si September 14, 2011

Hi there,

I am trying to work with the plugin SDK for developing a JIRA plugin but to no avail. I am on a Win7 machine, plugin SDK 3.4, JDK 1.6.0_27.

I followed the instructions from https://developer.atlassian.com/display/DOCS/Developing+your+Plugin+using+the+Atlassian+Plugin+SDK

When it comes to step 2 (Start the Host Application with your Plugin Installed) I am running "atlas-run", the Tomcat is starting, but JIRA is not. The log states the following error message:

[atlassian.jira.upgrade.ConsistencyLauncher] A fatal error occured during initialisation. JIRA has been locked. com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NoClassDefFoundError: javax/transaction/UserTransaction

...

See http://pastie.org/2537273 for the whole atlas-debug output.

After this "atlas-debug" I ran "atlas-clean" and then "atlas-debug" again with this output: http://pastie.org/2537389

The same also happens when I run the command "atlas-run-standalone" so I guess that the problem is not the (empty) plugin itself.

I tried it several times in a row, with brand-new plugin skeletons, I reinstalled the plugin SDK and even the JDK but all leads to the same problem. It occurred to me, though, that the error messages differ from time to time: usually they are "NoClassDefFoundErrors" concerning different java classes and different sources.

Because I could not find any other thread with the same problem I'd guess there is something wrong with my Java installation. Is that possible? But I don't know what could be wrong with it, all the JAVA_HOME and PATH variables are set properly... unless there is any secret about Java installation I don't know of ;)

I discovered that every time I run "atlas-run", in the Windows task manager a new instance of Java is started. When I shut down the Tomcat with CTRL-C the java instance remains. So after several tries in a row there are several Java instances running. Doesn't seem right to me... But I don't know how to interpret that. I hope that anyone of you knows.

Any help would be very much appreciated!

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Nora Si September 18, 2011

Hey there!

Thanks to xrakan and Joseph for your fast replies. They helped me along the way. The solution, however, was to be found in a different direction.

I was able to resolve this issue. Apparently it had nothing to do with my Java installation. Instead the problem was that I am running a local Maven installation on my computer with a certain settings.xml in parallel to the Plugin SDK's embedded Maven.

I assumed that, wenn running the Maven wrapper commands like atlas-run, the Plugin SDK automatically uses the settings.xml that is shipped with it (in atlassian-plugin-sdk-x/apache-maven/conf), and does not interfere with my local Maven. But this was wrong.

Apparently, running atlas-run made Maven uses my local settings (residing in Users/me/.m2) unless I tell Maven to use Atlassian's settings.

Thus,

atlas-run -s C:/Program Files/Atlassian/atlassian-plugin-sdk-3.4/apache-maven/conf/settings.xml

does the trick in this case.

Furthermore, the error message stated above occurred because I had manually installed the wrong jta dependency. In the final solution I installed the one that resides in atlassian-plugin-sdk-3.5.2\repository\jta\jta\1.0.1.

sohail September 18, 2011

I wonder if there is a way to permanently set that for your dev environment. Otherwise I can imagine it being annoying having to type it out.

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 19, 2011

Nice work solving your own problem!

This sounds a bit strange... the atlassian SDK should be configured to use the version of maven/settings.xml that it comes pre-configured with. You can see in the "atlas-blah" scripts that are shipped with the SDK that it looks for maven in the "apache-maven" directory beneath the %ATLAS_HOME% envrionment variable.

1 vote
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 15, 2011

Unfortunately the Plugin SDK doesn't do a very good job of shutting down the tomcat process on Windows - you'll often end up with rogue processes lying around locking your target directory. You'll have to kill them manually using task manager or the kill command.

A handy tip is to use jps.exe after shutting down JIRA, which can report on any java processes that are still active.

The missing class definition errors are strange - the only thing I can think of causing this is that maybe it's picking up the wrong instance of java (it's trying to run using the JRE shipped with Windows in C:\Windows\System32 instead of your installed JDK)... maybe try debugging this by examining the java process in ProcessExplorer and making sure it's picked up the right JVM.

0 votes
Radek Kantor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2011
TAGS
AUG Leaders

Atlassian Community Events