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

Fatal Error during add-on development

Stefan Kohler
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.
June 12, 2013

I'm trying to start my add-on (atlas-run) using the newest Stash version 2.5.0 but unfortunalty it starts with an fatal error:

The following problem occurred which prevents Atlassian Stash from starting correctly:

  • The Spring WebApplicationContext could not be started

I'm using plugin SDK 4.2.1 and Stash 2.5.0
If I create a new plugin skeleton (atlas-create-stash-plugin) and run it, I get the same error. Starting the add-on using version 2.4.2 works fine.

What changed between 2.4.2 and 2.5.0 that could be the cause of this error?

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
cofarrell
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.
June 12, 2013

Hi Stefan,

I don't know whether this is the problem of not but you've obviously got the following error:

2013-06-12 21:39:34,626 ERROR [localhost-startStop-1]  o.s.web.context.ContextLoader Context initialization failed
java.lang.IllegalArgumentException: The plugin key '${project.groupId}.${project.artifactId}-tests' must either match the OSGi bundle symbolic name (Bundle-SymbolicName) or be specified in the Atlassian-Plugin-Key manifest header

Someone else was seeing that and it turned out to be an extra atlassian-plugin.xml in the test folder.

https://answers.atlassian.com/questions/175345/error-in-logs-when-starting-stash

Does removing that fix the startup errors?

Charles

Stefan Kohler
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.
June 12, 2013

Some additional information from my log files:

[http-bio-7990-exec-4]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [requestAttributeFilter]; no Spring WebApplicationContext is available
[http-bio-7990-exec-5]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [requestAttributeFilter]; no Spring WebApplicationContext is available
[http-bio-7990-exec-5]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [pluginProvidedAuthenticationFilter]; no Spring WebApplicationContext is available
[http-bio-7990-exec-5]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [trustedApplicationsAuthenticationFilter]; no Spring WebApplicationContext is available
[http-bio-7990-exec-5]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [requestAttributeFilter]; no Spring WebApplicationContext is available
[http-bio-7990-exec-5]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [trustedApplicationsAuthenticationFilter]; no Spring WebApplicationContext is available
[http-bio-7990-exec-5]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [springSecurityFilterChain]; no Spring WebApplicationContext is available
[http-bio-7990-exec-5]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [authenticationAttributeFilter]; no Spring WebApplicationContext is available
[http-bio-7990-exec-5]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [standardResponseHeadersFilter]; no Spring WebApplicationContext is available
[http-bio-7990-exec-5]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [requestAttributeFilter]; no Spring WebApplicationContext is available
[http-bio-7990-exec-5]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [trustedApplicationsAuthenticationFilter]; no Spring WebApplicationContext is available
[http-bio-7990-exec-5]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [springSecurityFilterChain]; no Spring WebApplicationContext is available
...

Stefan Kohler
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.
June 12, 2013

The extra atlassian-plugin.xml in the test resources make sense, because that is required for Wired Tests: https://developer.atlassian.com/display/DOCS/Run+Wired+Tests+with+the+Plugin+Test+Console

Removing the XML doesn't make a difference though.
Have you tried, creating a new add-on and running it, aka are you able to reproduce my error :)

cofarrell
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.
June 24, 2013

Hi Stefan,

Apologies for the delay. I was on holidays and I didn't have time (and bandwidth) to test this. You're quite right that this breaks by simplying running 'atlas-run' on a new plugin. I don't quite know how or why this broke in 2.5 (my guess is related to us upgrading the plugin system), but I can confirm that removing the test atlassian-plugin.xml from the plugin fixes the issue. I ran atlas-clean between runs which may have helped.

I'll raise an issue with the team to ensure we get to the bottom of this and ensure it doesn't keep happening.

Cheers,

Charles

destan April 28, 2014

@Charleswhat about that internal issue you said you would raise? Because I am experiencing the same issue while creating a cross-product plugin. I have followed this tutorial and on `Start and view the RefApp` step atlas-run produces the same error. After removing atlassian-plugin.xml file from test however, it works.

0 votes
Stefan Kohler
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.
June 12, 2013

Hi Charles,

I couldn't make much from the atlassian-stash.log file, but hopefully i'm overlooking something.

http://pastebin.com/CgCD6Rut

Steps to reproduce
- create new add-on: atlas-create-stash-plugin using SDK 4.2.1
- cd into new add-on directory
- run: atlas-run
- then I get an error ;-)

Cheers,
Stefan

0 votes
cofarrell
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.
June 12, 2013

Hi Stefan,

Unfortunately that error masks all manner of problems. We need to see the full errors in $STASH_HOME/log/atlassian-stash.log. If you could either post them here or create a support request with the logs attached that would be more useful.

Charles

TAGS
AUG Leaders

Atlassian Community Events