Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error starting plugin at sonar 6.1:alpine #4

Closed
ghost opened this issue Oct 13, 2016 · 2 comments
Closed

error starting plugin at sonar 6.1:alpine #4

ghost opened this issue Oct 13, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 13, 2016

plugin does not start

stacktrace is

java.lang.UnsupportedOperationException: Sessions are disabled so that web server is stateless
sonarqube_1  |  at org.sonar.server.platform.web.RootFilter$ServletRequestWrapper.notSupported(RootFilter.java:159) ~[sonar-server-6.1.jar:na]
sonarqube_1  |  at org.sonar.server.platform.web.RootFilter$ServletRequestWrapper.getSession(RootFilter.java:150) ~[sonar-server-6.1.jar:na]
sonarqube_1  |  at net.bull.javamelody.MonitoringFilter.putUserInfoInSession(MonitoringFilter.java:300) ~[na:na]
sonarqube_1  |  at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:232) ~[na:na]
sonarqube_1  |  at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:178) ~[na:na]

step to reproduce is simple

  • start the official sonar docker image
sonarqube:                
  image: sonarqube:alpine 
  ports:                  
    - "9000:9000"           
    - "9092:9092"         
  • mount the plugin dir from docker containers
 volumes:
      - /srv/sonar/extensions:/opt/sonarqube/extensions

image

evernat added a commit to evernat/sonarqube that referenced this issue Oct 15, 2016
…n(false) is called

When httpRequest.getSession(false) is called, the callers does not ask to create a http session. (javadoc of HttpServletRequest: "If create is false and the request has no valid HttpSession, this method returns null.")

So throwing UnsupportedOperationException is not needed in this case and returning null is enough.

This will fix a [blocking issue](javamelody/sonar-javamelody#4) in the [Sonar JavaMelody plugin](https://github.com/javamelody/javamelody/wiki/UserGuide#sonar-plugin).
@evernat
Copy link
Member

evernat commented Oct 15, 2016

I have created Sonar PR 1305 to fix this issue.

julienlancelot pushed a commit to SonarSource/sonarqube that referenced this issue Oct 19, 2016
…n(false) is called

When httpRequest.getSession(false) is called, the callers does not ask to create a http session. (javadoc of HttpServletRequest: "If create is false and the request has no valid HttpSession, this method returns null.")

So throwing UnsupportedOperationException is not needed in this case and returning null is enough.

This will fix a [blocking issue](javamelody/sonar-javamelody#4) in the [Sonar JavaMelody plugin](https://github.com/javamelody/javamelody/wiki/UserGuide#sonar-plugin).
@evernat
Copy link
Member

evernat commented Aug 26, 2017

Sonar PR 1305 is merged a long time ago and released in Sonar v6.2.

@evernat evernat closed this as completed Aug 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant