Quantcast

Plugin error on trying to create a new resource tab

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Plugin error on trying to create a new resource tab

luckylukein
Hi,

I was trying to create a new resource tab (similar to Hotspots, Components, Violations Drilldown etc). I am implementing the RubyRailsPage interface and trying to create a ruby on rails page.

On clicking the new link on the left menu, it leads me a error saying,

 ERROR o.s.s.ui.JRubyFacade  Fail to render: http://localhost:9000/plugins/resource/1?page=org.sonar.plugins.folderView.FolderViewPage
uninitialized constant Sonar::TreemapBuilder
        On line #1 of app/views/plugins/rails_page.erb

    1: <%= render :inline => @page.getTemplate() %>

    org/jruby/RubyModule.java:2526:in `const_missing'
    compiled-template:55:in `_run_inline_554481689'
    org/jruby/RubyKernel.java:2056:in `send'
    app/views/plugins/rails_page.erb:1
    org/jruby/RubyKernel.java:2056:in `send'
    app/controllers/plugins/resource_controller.rb:51:in `index'
    org/jruby/RubyKernel.java:2052:in `send'
    org/jruby/RubyKernel.java:2052:in `send'
    org/jruby/RubyProc.java:268:in `call'
    org/jruby/RubyProc.java:228:in `call'
    file:/lib/jruby-rack-1.0.0.1.jar!/vendor/rack-1.2.1/rack/head.rb:9:in `call'
    file:/lib/jruby-rack-1.0.0.1.jar!/vendor/rack-1.2.1/rack/methodoverride.rb:24:in `call'
    file:/lib/jruby-rack-1.0.0.1.jar!/jruby/rack/session_store.rb:42:in `call'
    file:/lib/jruby-rack-1.0.0.1.jar!/rack/adapter/rails.rb:36:in `serve_rails'
    file:/lib/jruby-rack-1.0.0.1.jar!/rack/adapter/rails.rb:41:in `call'
    file:/lib/jruby-rack-1.0.0.1.jar!/jruby/rack/rails.rb:185:in `call'
    file:/lib/jruby-rack-1.0.0.1.jar!/rack/handler/servlet.rb:19:in `call'


Recently I upgraded to Sonar 3.0 release. The same setup and the code works perfectly on Sonar 2.14..
Please can someone help me with this. I don't know how to debug this error.

Thanks.



- Lucky
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Plugin error on trying to create a new resource tab

Simon Brandhof
Hi Lucky

Indeed this class does not exist anymore in version 3.
The real problem is that the ruby API is quite limited. In theory any code that is not documented in our wiki or not explicitely maked as API should not be used by plugins. That means that this is our API :
https://github.com/SonarSource/sonar-examples/blob/master/plugins/sonar-reference-plugin/src/main/resources/example/example_widget.html.erb

Regards
Simon


On 13 June 2012 11:20, luckylukein <[hidden email]> wrote:
Hi,

I was trying to create a new resource tab (similar to Hotspots, Components,
Violations Drilldown etc). I am implementing the RubyRailsPage interface and
trying to create a ruby on rails page.

On clicking the new link on the left menu, it leads me a error saying,

 ERROR o.s.s.ui.JRubyFacade  Fail to render:
http://localhost:9000/plugins/resource/1?page=org.sonar.plugins.folderView.FolderViewPage
uninitialized constant Sonar::TreemapBuilder
       On line #1 of app/views/plugins/rails_page.erb

   1: <%= render :inline => @page.getTemplate() %>

   org/jruby/RubyModule.java:2526:in `const_missing'
   compiled-template:55:in `_run_inline_554481689'
   org/jruby/RubyKernel.java:2056:in `send'
   app/views/plugins/rails_page.erb:1
   org/jruby/RubyKernel.java:2056:in `send'
   app/controllers/plugins/resource_controller.rb:51:in `index'
   org/jruby/RubyKernel.java:2052:in `send'
   org/jruby/RubyKernel.java:2052:in `send'
   org/jruby/RubyProc.java:268:in `call'
   org/jruby/RubyProc.java:228:in `call'
   file:/lib/jruby-rack-1.0.0.1.jar!/vendor/rack-1.2.1/rack/head.rb:9:in
`call'

file:/lib/jruby-rack-1.0.0.1.jar!/vendor/rack-1.2.1/rack/methodoverride.rb:24:in
`call'
   file:/lib/jruby-rack-1.0.0.1.jar!/jruby/rack/session_store.rb:42:in
`call'
   file:/lib/jruby-rack-1.0.0.1.jar!/rack/adapter/rails.rb:36:in
`serve_rails'
   file:/lib/jruby-rack-1.0.0.1.jar!/rack/adapter/rails.rb:41:in `call'
   file:/lib/jruby-rack-1.0.0.1.jar!/jruby/rack/rails.rb:185:in `call'
   file:/lib/jruby-rack-1.0.0.1.jar!/rack/handler/servlet.rb:19:in `call'


Recently I upgraded to Sonar 3.0 release. The same setup and the code works
perfectly on Sonar 2.14..
Please can someone help me with this. I don't know how to debug this error.

Thanks.



- Lucky

--
View this message in context: http://sonar.15.n6.nabble.com/Plugin-error-on-trying-to-create-a-new-resource-tab-tp4999637.html
Sent from the Sonar dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Loading...