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 500 when starting the interface #1

Open
spierluigi opened this issue Jan 23, 2012 · 4 comments
Open

error 500 when starting the interface #1

spierluigi opened this issue Jan 23, 2012 · 4 comments

Comments

@spierluigi
Copy link

redmine 1.2.1

after having installed the plugin and enabled the REST interface, calling it with the very basic call (.../json_rpc_call.json?key=xxxx) it the system gives this error:

Processing JsonRpcCallController#handle_rpc_request to json (for 10.17.39.157 at 2012-01-23 11:30:39) [GET]
  Parameters: {"format"=>"json", "action"=>"handle_rpc_request", "controller"=>"json_rpc_call", "key"=>"491285dbf0aaec46be7186401d40c27d4fcc827d"}

ActionView::MissingTemplate (Missing template json_rpc_call/handle_rpc_request.erb in view path vendor/plugins/redmine_tags/app/views:vendor/plugins/extended_profile/app/views:vendor/plugins/redmine_appmenuadds/app/views:vendor/plugins/redmine_better_gantt_chart/app/views:vendor/plugins/redmine_blocks/app/views:vendor/plugins/redmine_boards_watchers/app/views:vendor/plugins/redmine_closed_issue/app/views:vendor/plugins/redmine_dmsf/app/views:vendor/plugins/redmine_json_rpc/app/views:vendor/plugins/redmine_last_messages/app/views:vendor/plugins/redmine_local_avatars-0.1.1/app/views:vendor/plugins/redmine_logs/app/views:vendor/plugins/redmine_wiki_extensions/app/views:vendor/plugins/reklama/app/views:app/views):
  app/controllers/application_controller.rb:509:in `default_template'
  /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/phusion_passenger/passenger-spawn-server:61


Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)

It looks like some template is missing somewhere inside the ther installed plugins

@maxprokopiev
Copy link
Member

Sorry, but your request is wrong. Plugin accepts only(!) POST requests.
But you are right - I have to add some explanational error message for this case.

@spierluigi
Copy link
Author

So, please, could you add to the read-me doc some example of syntax ? Thanks

@maxprokopiev
Copy link
Member

You can find examples in README file. For example, very basic call looks like this:
URL: http://your_redmine_server/json_rpc_call.json?key=you_api_key
POST data: {"class": "Project", "method" : "find", "params" : ["project_id"]}

just replace server, key and project_id params with your own.

For sending POST requests I suggest using curl.

@spierluigi
Copy link
Author

Good, but unfortunately I am quit enew to this matter.

From the Ubuntu prompt I entered this command line:

curl -F "class=project;method=find;params=" http://XX.XX.XX.XX/redmine/json_rpc_call.json?key=5b9cc482aec02b53991b2e9a6a43caf044cfb9e9

I get this error message: "{"error":"uninitialized constant JsonRpcCallController::JSON"}"

Then I entered the command as

curl -F "key=5b9cc482aec02b53991b2e9a6a43caf044cfb9e9;class=project;method=find;params=" http://XX.XX.XX.XX/redmine/json_rpc_call.json

No error, just the prompt. If there is an answer, where is ti ?

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

2 participants