[前][次][番号順一覧][スレッド一覧]

rails:2320

From: Kyoko Sato <k.sato@a...>
Date: Tue, 07 Aug 2007 13:36:54 +0900
Subject: [rails:2320] RAILS上でYAJB

お世話になっております。佐藤です。

RAILS上でYAJBを使ってExcelファイルを生成したいのですが、
つまづいてしまって悩んでいます。

■Yet Another Java Bridge0.8.1をインストールして、railsのcontrollerで
  require 'excelWrapper'
  def excel_report
    @eRep = ExcelWrapper.new()
    @eRep.selectNumWorkSheet(0)
    @eRep.setCellStringPoss("aaa","a1")
    @eRep.close()
  end
とし、

■excelWrapper.rb
require 'yajb/jbridge'
include JavaBridge

JBRIDGE_OPTIONS = {
  :classpath => "$CLASSPATH:./jxl.jar:.", # for windows (classpath separator ";")
}
--

jimport "java.io.*"
jimport "java.awt.image.BufferedImage"
jimport "jxl.*"
jimport "jxl.read.*"
jimport "jxl.write.*"
jimport "Excel"
....
....
として、実行すると、
▲▲下記のコンソールのエラーメッセージが出力されてしまい
どう解決していいかわかりません。
どなたか教えていただけないでしょうか。
宜しくお願い致します。

ReportController: missing default helper path report_helper

Processing ApplicationController#csv_list (for 43.253.252.180 at 2007-08-07 13:27:42) [GET]
  Session ID: 89ab87ecd3b901611556b39b68aac62e
  Parameters: {"action"=>"csv_list", "controller"=>"report", "vhost"=>"accelia"}

NoMethodError (You have a nil object when you didn't expect it!
The error occurred while evaluating nil.send_message):
    /usr/local/lib/ruby/site_ruby/1.8/yajb/comm_bstream.rb:59:in `send_message_to_java'
    /usr/local/lib/ruby/site_ruby/1.8/yajb/jbridge.rb:506:in `__send_message_to_java'
    /usr/local/lib/ruby/site_ruby/1.8/yajb/jbridge.rb:606:in `jimport'
    .//app/controllers/excelWrapper.rb:12
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:in `require'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:342:in `new_constants_in'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:in `require'
    .//app/controllers/report_controller.rb:6
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:203:in `load_file'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:342:in `new_constants_in'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:202:in `load_file'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:94:in `require_or_load'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:248:in `load_missing_constant'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:452:in `const_missing'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:464:in `const_missing'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/inflector.rb:250:in `constantize'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/core_ext/string/inflections.rb:148:in `constantize'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_controller/routing.rb:1284:in `recognize'
    /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/dispatcher.rb:40:in `dispatch'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run'
    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:488:in `load'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:488:in `load'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:342:in `new_constants_in'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:488:in `load'
    /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/commands/servers/mongrel.rb:60
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:in `require'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:342:in `new_constants_in'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:in `require'
    /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/commands/server.rb:39
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    script/server:3





--
ML: rails@r...
使い方: http://QuickML.com/

[前][次][番号順一覧][スレッド一覧]

      2308 2007-08-03 06:52 [3arrows@g...        ] RailsのXMLパースによるDos脆弱性対策としてのDTD無効化について
      2319 2007-08-06 08:54 ┗[3arrows@g...        ]                                       
->    2320 2007-08-07 06:36  ┗[k.sato@a...         ] RAILS上でYAJB