JRuby1.1.4でstack level too deep (SystemStackError)

105 views
Skip to first unread message

taka_2

unread,
Sep 8, 2008, 12:26:20 AM9/8/08
to rubeus
重元です。

JRuby1.1.4にして、テストを動かしてみたら、
表題のエラーが発生しました。

再現コードとエラー内容は以下の通りです。

■再現コード
require 'rubygems'
require 'rubeus'

class Test
include Rubeus::Swing

def initialize
JFrame.new do |f|
JScrollPane.new do
jt = JTable.new
jt.model = ["first", "second"] # ここでエラー
end

f.visible = true
end
end
end

Test.new

■エラー内容
E:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/lib/rubeus/awt/
nestable.
rb:35:in `add_new_component_to': stack level too deep
(SystemStackError)
from E:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/
lib/rubeus/
extensions/javax/swing/j_scroll_pane.rb:5:in `add_new_component_to'
from E:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/
lib/rubeus/
awt/nestable.rb:71:in `process_block_for_new'
from E:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/
lib/rubeus/
awt/nestable.rb:53:in `new_with_nestable'
from test.rb:9:in `initialize'
from E:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/
lib/rubeus/
awt/nestable.rb:35:in `add_new_component_to'
from E:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/
lib/rubeus/
awt/nestable.rb:80:in `add_new_component_to'
from E:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/
lib/rubeus/
awt/nestable.rb:71:in `process_block_for_new'
from E:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/
lib/rubeus/
awt/nestable.rb:53:in `new_with_nestable'
from test.rb:8:in `initialize'
from test.rb:19

原因は追いきれていないのですが、
lib/rubeus/extensions/javax/swing/j_table.rbのset_model_with_rubeusメソッド

set_model_without_rubeus(@model = delegator)
の行で落ちているようです。

この部分を
delegator = DelegatableTableModel.new(model)
#set_model_without_rubeus(@model = delegator)
set_model_without_rubeus(model)
のように、delegatorではなく元のmodelを設定するよう修正することで、
readonlyのテスト以外はパスしました。

秋間武志

unread,
Sep 8, 2008, 6:59:00 PM9/8/08
to rub...@googlegroups.com
重元さん

ご報告ありがとうございます。秋間です。

Mac上の1.1.4で試そうとしているのですが、僕の場合また違った
stack level too deep が発生しています。
うーん、なんでしょうね?時間が取れたら夜にでも調べてみます。

/usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:34:in
`run': stack level too deep (SystemStackError)
from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
... 10 levels...
from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
from test_all.rb:2


2008/09/08 13:26 taka_2 <Takahiro....@gmail.com>:

akm2000

unread,
Oct 2, 2008, 11:14:33 AM10/2/08
to rubeus
秋間です。

長らくテストがパスできずに停止していましたが、
なんとかテストをパスできました。コミットしてあります。

ただ力及ばす原因がよく分かりません。泣。

解決策として、Rubeus::Extensions::Javax::Swing::JTable内で
宣言していたクラスをjavaのクラスとして実装して、それを
拡張して使用するように変更して対応しました。

これに伴いjarファイルもビルドしなければならなくなりまして、
mavenを導入しました。なので、ちゃんとしたビルドには
mavenが必要になりましたのでご注意ください。

ただ、普通にmavenを使ってもいいのですが、せっかくなので
rakeからmavenを呼び出せるようにしました。そのための
仕組みとして、rakeableというgemを作成しました。
これは既にリリースしてあります。
jruby -S gem install rakeable
でインストールできます。


それから テストで生成されるDBの名前ですが、testから
test_dbに変更しました。これはgemのルートディレクトリから
テストを実行したときにディレクトリ名がぶつからないように
するためです。


問題点1
せっかくrakeを使うように考えたので、rake testで
テストできるようにしたのですが、どういうわけかjarを
requireするときにロードできない例外がでちゃってます。
これは要調査っすね。


問題点2
rakeを導入したのはjarのビルドのためですが、できることなら
jarの生成からgemファイルの生成まで一発のコマンドでやり
たいと思っています。これができていないのは上記問題点1の
ためですが、これも今後のタスクとして考えていきたいです。

今日の修正で色々変更してしまったので、不明な点など
ありましたらご指摘ください。

問題なさそうならひとまず現在のコードで0.0.7をリリース
しようと思います。

以上、宜しくお願い致します。




P.S.
ちなみにrakeableはjrubyに依存しないので、普通にmavenの
プロジェクトにRakefileを作って、
require 'rubygems'
require 'rakeable'
require 'tasks/mvn'
を加えてあげれば、rake -Tでmavenのタスクの一覧とかを見ることもできます。


On 9月9日, 午前7:59, "秋間武志" <akm2...@gmail.com> wrote:
> 重元さん
>
> ご報告ありがとうございます。秋間です。
>
> Mac上の1.1.4で試そうとしているのですが、僕の場合また違った
> stack level too deep が発生しています。
> うーん、なんでしょうね?時間が取れたら夜にでも調べてみます。
>
> /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:34:in
> `run': stack level too deep (SystemStackError)
> from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
> from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
> from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
> from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
> from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
> from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
> from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
> from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
> ... 10 levels...
> from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
> from /usr/local/jruby-1.1.4/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
> from test_all.rb:2
>
> 2008/09/08 13:26 taka_2 <Takahiro.Shigem...@gmail.com>:

taka_2

unread,
Oct 14, 2008, 3:48:30 AM10/14/08
to rubeus
重元です。

遅レスですみません。

> 問題点1
> せっかくrakeを使うように考えたので、rake testで
> テストできるようにしたのですが、どういうわけかjarを
> requireするときにロードできない例外がでちゃってます。
> これは要調査っすね。

の件ですが、Windows環境で、
1) rmavenのインストール (jruby -S gem install rmaven)
2) テストの実行 (jruby -S rake test)
の手順でやってみました。

膨大なログが出ているのですが、
テストが正常終了したあと、またテストが実行されて、今度はエラーになっているように見えます。
これが上で言われている問題点なのかどうかは、よく分からないのですが。。

■ログ
----------------------------------------------------------------------------------------------------
C:\app\jruby-1.1.4\lib\ruby\gems\1.8\gems\rubeus-0.0.6-java>jruby -S
rake test
(in C:/app/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java)
C:/app/jruby-1.1.4/bin/jruby.bat -Ilib;lib "C:/app/jruby-1.1.4/lib/
ruby/gems/1.8
/gems/rake-0.8.1/lib/rake/rake_test_loader.rb" "test/test_all.rb"
"test/rubeus/t
est_extensions.rb" "test/rubeus/awt/test_attributes.rb" "test/rubeus/
awt/test_ev
ent.rb" "test/rubeus/awt/test_nestable.rb" "test/rubeus/awt/
test_setter.rb" "tes
t/rubeus/extensions/java/awt/test_dimension.rb" "test/rubeus/
extensions/java/sql
/test_connection.rb" "test/rubeus/extensions/java/sql/
test_driver_manager.rb" "t
est/rubeus/extensions/java/sql/test_result_set.rb" "test/rubeus/
extensions/java/
sql/test_result_set_meta_data.rb" "test/rubeus/extensions/java/sql/
test_statemen
t.rb" "test/rubeus/extensions/javax/swing/test_box_layout.rb" "test/
rubeus/exten
sions/javax/swing/test_j_component.rb" "test/rubeus/extensions/javax/
swing/test_
j_frame.rb" "test/rubeus/extensions/javax/swing/test_j_panel.rb" "test/
rubeus/ex
tensions/javax/swing/test_j_scroll_pane.rb" "test/rubeus/extensions/
javax/swing/
test_j_split_pane.rb" "test/rubeus/extensions/javax/swing/
test_j_tabbed_pane.rb"
"test/rubeus/extensions/javax/swing/test_j_table.rb" "test/rubeus/
extensions/ja
vax/swing/test_j_text_field.rb" "test/rubeus/extensions/javax/swing/
test_timer.r
b" "test/rubeus/extensions/javax/swing/table/
test_default_table_model.rb"
Loaded suite .
Started
................................................................................
.....
Finished in 8.79317 seconds.

85 tests, 343 assertions, 0 failures, 0 errors
Loaded suite [test/test_all.rb, test/rubeus/test_extensions.rb, test/
rubeus/awt/
test_attributes.rb, test/rubeus/awt/test_event.rb, test/rubeus/awt/
test_nestable
.rb, test/rubeus/awt/test_setter.rb, test/rubeus/extensions/java/awt/
test_dimens
ion.rb, test/rubeus/extensions/java/sql/test_connection.rb, test/
rubeus/extensio
ns/java/sql/test_driver_manager.rb, test/rubeus/extensions/java/sql/
test_result_
set.rb, test/rubeus/extensions/java/sql/test_result_set_meta_data.rb,
test/rubeu
s/extensions/java/sql/test_statement.rb, test/rubeus/extensions/javax/
swing/test
_box_layout.rb, test/rubeus/extensions/javax/swing/
test_j_component.rb, test/rub
eus/extensions/javax/swing/test_j_frame.rb, test/rubeus/extensions/
javax/swing/t
est_j_panel.rb, test/rubeus/extensions/javax/swing/
test_j_scroll_pane.rb, test/r
ubeus/extensions/javax/swing/test_j_split_pane.rb, test/rubeus/
extensions/javax/
swing/test_j_tabbed_pane.rb, test/rubeus/extensions/javax/swing/
test_j_table.rb,
test/rubeus/extensions/javax/swing/test_j_text_field.rb, test/rubeus/
extensions
/javax/swing/test_timer.rb, test/rubeus/extensions/javax/swing/table/
test_defaul
t_table_model.rb]
Started
..................................org.jruby.java.invokers.RubyToJavaInvoker:
35:i
n `findCallable': java.lang.ArrayIndexOutOfBoundsException: 3
from org.jruby.java.invokers.ConstructorInvoker:74:in `call'
from org.jruby.java.invokers.ConstructorInvoker:147:in `call'
from org.jruby.RubyClass:343:in `finvoke'
from org.jruby.javasupport.util.RuntimeHelpers:335:in `invoke'
from org.jruby.java.proxies.ConcreteJavaProxy$2:40:in `call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:301:in
`call'
from org.jruby.RubyClass$SpecificArityNew:533:in `call'
from org.jruby.internal.runtime.methods.DynamicMethod:135:in
`call'
from org.jruby.java.proxies.ConcreteJavaProxy
$ConcreteNewMethod:163:in `
call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:289:in
`call'
from
ruby.jit.ruby.C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.gems.$1_
dot_8.gems.rubeus_minus_0_dot_0_dot_6_minus_java.lib.rubeus.extensions.java.awt.
dimension.create3363995_17241377:19:in `__file__'
from org.jruby.internal.runtime.methods.DefaultMethod:181:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:289:in
`call'
from
ruby.jit.ruby.C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.gems.$1_
dot_8.gems.rubeus_minus_0_dot_0_dot_6_minus_java.lib.rubeus.extensions.java.awt.
dimension.create3363995_17241377:12:in `__file__'
from org.jruby.ast.executable.AbstractScript:28:in `__file__'
from org.jruby.internal.runtime.methods.DefaultMethod:244:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:156:in
`cacheAndCa
ll'
from org.jruby.runtime.CallSite$InlineCachingCallSite:394:in
`call'
from org.jruby.ast.CallOneArgNode:57:in `interpret'
from org.jruby.ast.DAsgnNode:107:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.runtime.InterpretedBlock:202:in `evalBlockBody'
from org.jruby.runtime.InterpretedBlock:190:in `yield'
from org.jruby.runtime.Block:110:in `yield'
from org.jruby.ast.YieldNode:95:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.ast.RescueNode:222:in `executeBody'
from org.jruby.ast.RescueNode:144:in
`interpretWithJavaExceptions'
from org.jruby.ast.RescueNode:107:in `interpret'
from org.jruby.ast.BeginNode:80:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.ast.BlockNode:67:in `interpret'
from org.jruby.runtime.InterpretedBlock:202:in `evalBlockBody'
from org.jruby.runtime.InterpretedBlock:190:in `yield'
from org.jruby.runtime.Block:110:in `yield'
from
ruby.jit.ruby.C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.$1_dot_8
.test.unit.assertions.assert_block26141422_17241377:47:in `block_0$RUBY
$__block_
_'
from
ruby.jit.ruby.C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.$1_dot_8
.test.unit.assertions.assert_block26141422_17241377BlockCallback
$block_0$RUBY$__
block__xx1:-1:in `call'
from org.jruby.runtime.CompiledBlock:120:in `yield'
from org.jruby.runtime.Block:110:in `yield'
from
ruby.jit.ruby.C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.$1_dot_8
.test.unit.assertions._wrap_assertion3198308_17241377:500:in
`__file__'
from org.jruby.internal.runtime.methods.DefaultMethod:223:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:371:in
`callIter'
from
ruby.jit.ruby.C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.$1_dot_8
.test.unit.assertions.assert_block26141422_17241377:46:in `__file__'
from org.jruby.ast.executable.AbstractScript:28:in `__file__'
from org.jruby.internal.runtime.methods.DefaultMethod:265:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:422:in
`callIter'
from org.jruby.ast.FCallOneArgBlockNode:33:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.ast.BlockNode:67:in `interpret'
from org.jruby.runtime.InterpretedBlock:202:in `evalBlockBody'
from org.jruby.runtime.InterpretedBlock:190:in `yield'
from org.jruby.runtime.Block:110:in `yield'
from
ruby.jit.ruby.C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.$1_dot_8
.test.unit.assertions._wrap_assertion3198308_17241377:495:in
`ensure_2$RUBY$__en
sure__'
from
ruby.jit.ruby.C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.$1_dot_8
.test.unit.assertions._wrap_assertion3198308_17241377:493:in
`__file__'
from org.jruby.internal.runtime.methods.DefaultMethod:223:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:371:in
`callIter'
from org.jruby.ast.FCallNoArgBlockNode:31:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.internal.runtime.methods.DefaultMethod:163:in
`interprete
dCall'
from org.jruby.internal.runtime.methods.DefaultMethod:140:in
`call'
from org.jruby.internal.runtime.methods.DefaultMethod:274:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:168:in
`cacheAndCa
ll'
from org.jruby.runtime.CallSite$InlineCachingCallSite:425:in
`callIter'
from org.jruby.ast.FCallOneArgBlockNode:33:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.internal.runtime.methods.DefaultMethod:163:in
`interprete
dCall'
from org.jruby.internal.runtime.methods.DefaultMethod:140:in
`call'
from org.jruby.internal.runtime.methods.DefaultMethod:232:in
`call'
from org.jruby.RubyClass:322:in `finvoke'
from org.jruby.RubyObject:2042:in `send'
from org.jruby.RubyObject$i_method_multi$RUBYINVOKER
$send:-1:in `call'
from org.jruby.internal.runtime.methods.DynamicMethod:151:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:391:in
`call'
from
ruby.jit.ruby.C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.$1_dot_8
.test.unit.testcase.run13748661_17241377:78:in `rescue_1$RUBY
$__rescue__'
from
ruby.jit.ruby.C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.$1_dot_8
.test.unit.testcase.run13748661_17241377:-1:in `ensure_1$RUBY
$__ensure__'
from
ruby.jit.ruby.C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.$1_dot_8
.test.unit.testcase.run13748661_17241377:76:in `__file__'
from org.jruby.internal.runtime.methods.DefaultMethod:265:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:168:in
`cacheAndCa
ll'
from org.jruby.runtime.CallSite$InlineCachingCallSite:406:in
`call'
from org.jruby.ast.CallOneArgBlockPassNode:60:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.runtime.InterpretedBlock:202:in `evalBlockBody'
from org.jruby.runtime.InterpretedBlock:153:in `yield'
from org.jruby.runtime.Block:105:in `yield'
from org.jruby.RubyArray:1415:in `each'
from org.jruby.RubyArray$i_method_0_0$RUBYFRAMEDINVOKER
$each:-1:in `call
'
from org.jruby.runtime.CallSite$InlineCachingCallSite:352:in
`call'
from org.jruby.ast.CallNoArgBlockNode:63:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.ast.BlockNode:67:in `interpret'
from org.jruby.internal.runtime.methods.DefaultMethod:163:in
`interprete
dCall'
from org.jruby.internal.runtime.methods.DefaultMethod:140:in
`call'
from org.jruby.internal.runtime.methods.DefaultMethod:274:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:168:in
`cacheAndCa
ll'
from org.jruby.runtime.CallSite$InlineCachingCallSite:406:in
`call'
from org.jruby.ast.CallOneArgBlockPassNode:60:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.runtime.InterpretedBlock:202:in `evalBlockBody'
from org.jruby.runtime.InterpretedBlock:153:in `yield'
from org.jruby.runtime.Block:105:in `yield'
from org.jruby.RubyArray:1415:in `each'
from org.jruby.RubyArray$i_method_0_0$RUBYFRAMEDINVOKER
$each:-1:in `call
'
from org.jruby.runtime.CallSite$InlineCachingCallSite:352:in
`call'
from org.jruby.ast.CallNoArgBlockNode:63:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.ast.BlockNode:67:in `interpret'
from org.jruby.internal.runtime.methods.DefaultMethod:163:in
`interprete
dCall'
from org.jruby.internal.runtime.methods.DefaultMethod:140:in
`call'
from org.jruby.internal.runtime.methods.DefaultMethod:274:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:168:in
`cacheAndCa
ll'
from org.jruby.runtime.CallSite$InlineCachingCallSite:406:in
`call'
from org.jruby.ast.CallOneArgBlockPassNode:60:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.runtime.InterpretedBlock:202:in `evalBlockBody'
from org.jruby.runtime.InterpretedBlock:153:in `yield'
from org.jruby.runtime.Block:105:in `yield'
from org.jruby.RubyArray:1415:in `each'
from org.jruby.RubyArray$i_method_0_0$RUBYFRAMEDINVOKER
$each:-1:in `call
'
from org.jruby.runtime.CallSite$InlineCachingCallSite:352:in
`call'
from org.jruby.ast.CallNoArgBlockNode:63:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.ast.BlockNode:67:in `interpret'
from org.jruby.internal.runtime.methods.DefaultMethod:163:in
`interprete
dCall'
from org.jruby.internal.runtime.methods.DefaultMethod:140:in
`call'
from org.jruby.internal.runtime.methods.DefaultMethod:274:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:403:in
`call'
from org.jruby.ast.CallOneArgBlockNode:60:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.ast.BlockNode:67:in `interpret'
from org.jruby.internal.runtime.methods.DefaultMethod:163:in
`interprete
dCall'
from org.jruby.internal.runtime.methods.DefaultMethod:140:in
`call'
from org.jruby.internal.runtime.methods.DefaultMethod:211:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:340:in
`call'
from org.jruby.ast.CallNoArgNode:61:in `interpret'
from org.jruby.ast.ReturnNode:85:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.internal.runtime.methods.DefaultMethod:163:in
`interprete
dCall'
from org.jruby.internal.runtime.methods.DefaultMethod:140:in
`call'
from org.jruby.internal.runtime.methods.DefaultMethod:211:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:340:in
`call'
from org.jruby.ast.VCallNode:82:in `interpret'
from org.jruby.ast.ReturnNode:85:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.ast.BlockNode:67:in `interpret'
from org.jruby.internal.runtime.methods.DefaultMethod:163:in
`interprete
dCall'
from org.jruby.internal.runtime.methods.DefaultMethod:140:in
`call'
from org.jruby.internal.runtime.methods.DefaultMethod:211:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:340:in
`call'
from org.jruby.ast.CallNoArgNode:61:in `interpret'
from org.jruby.ast.ReturnNode:85:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.internal.runtime.methods.DefaultMethod:163:in
`interprete
dCall'
from org.jruby.internal.runtime.methods.DefaultMethod:140:in
`call'
from org.jruby.internal.runtime.methods.DefaultMethod:295:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:442:in
`call'
from org.jruby.ast.CallTwoArgNode:59:in `interpret'
from org.jruby.ast.CallNoArgNode:61:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.ast.BlockNode:67:in `interpret'
from org.jruby.internal.runtime.methods.DefaultMethod:163:in
`interprete
dCall'
from org.jruby.internal.runtime.methods.DefaultMethod:140:in
`call'
from org.jruby.internal.runtime.methods.DefaultMethod:211:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:132:in
`cacheAndCa
ll'
from org.jruby.runtime.CallSite$InlineCachingCallSite:343:in
`call'
from org.jruby.ast.CallNoArgNode:61:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.ast.BlockNode:67:in `interpret'
from org.jruby.internal.runtime.methods.DefaultMethod:163:in
`interprete
dCall'
from org.jruby.internal.runtime.methods.DefaultMethod:140:in
`call'
from org.jruby.internal.runtime.methods.DefaultMethod:295:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:180:in
`cacheAndCa
ll'
from org.jruby.runtime.CallSite$InlineCachingCallSite:445:in
`call'
from org.jruby.ast.CallTwoArgNode:59:in `interpret'
from org.jruby.ast.NewlineNode:101:in `interpret'
from org.jruby.ast.BlockNode:67:in `interpret'
from org.jruby.ast.RootNode:126:in `interpret'
from org.jruby.Ruby:2107:in `loadFile'
from org.jruby.runtime.load.ExternalScript:58:in `load'
from org.jruby.runtime.load.LoadService:221:in `load'
from org.jruby.RubyKernel:830:in `load'
from org.jruby.RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER
$load:-1:in `cal
l'
from org.jruby.internal.runtime.methods.DynamicMethod:242:in
`call'
from org.jruby.internal.runtime.methods.DynamicMethod:151:in
`call'
from org.jruby.runtime.CallSite$InlineCachingCallSite:156:in
`cacheAndCa
ll'
from org.jruby.runtime.CallSite$InlineCachingCallSite:394:in
`call'
from C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.gems.
$1_dot_8.gems.rak
e_minus_0_dot_8_dot_1.lib.rake.rake_test_loader:5:in `block_0$RUBY
$__block__'
from C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.gems.
$1_dot_8.gems.rak
e_minus_0_dot_8_dot_1.lib.rake.rake_test_loaderBlockCallback
$block_0$RUBY$__bloc
k__xx1:-1:in `call'
from org.jruby.runtime.CompiledBlock:100:in `yield'
from org.jruby.runtime.Block:105:in `yield'
from org.jruby.RubyArray:1415:in `each'
from org.jruby.RubyArray$i_method_0_0$RUBYFRAMEDINVOKER
$each:-1:in `call
'
from org.jruby.runtime.CallSite$InlineCachingCallSite:144:in
`cacheAndCa
ll'
from org.jruby.runtime.CallSite$InlineCachingCallSite:374:in
`callIter'
from C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.gems.
$1_dot_8.gems.rak
e_minus_0_dot_8_dot_1.lib.rake.rake_test_loader:5:in `__file__'
from C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.gems.
$1_dot_8.gems.rak
e_minus_0_dot_8_dot_1.lib.rake.rake_test_loader:-1:in `__file__'
from C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.gems.
$1_dot_8.gems.rak
e_minus_0_dot_8_dot_1.lib.rake.rake_test_loader:-1:in `load'
from org.jruby.Ruby:544:in `runScript'
from org.jruby.Ruby:457:in `runNormally'
from org.jruby.Ruby:330:in `runFromMain'
from org.jruby.Main:214:in `run'
from org.jruby.Main:100:in `run'
from org.jruby.Main:84:in `main'
rake aborted!
Command failed with status (1): [C:/app/jruby-1.1.4/bin/jruby.bat -
Ilib;lib...]

(See full trace by running task with --trace)

C:\app\jruby-1.1.4\lib\ruby\gems\1.8\gems\rubeus-0.0.6-java>
----------------------------------------------------------------------------------------------------

taka_2

unread,
Oct 14, 2008, 4:12:37 AM10/14/08
to rubeus
重元です。

Linux(Ubuntu8.0.4)でも、同じエラーが出ました。
> ruby.jit.ruby.C_3a_.app.jruby_minus_1_dot_1_dot_4.lib.ruby.$1_dot_8 ...
>
> もっと読む >>

Takeshi Akima

unread,
Oct 21, 2008, 11:19:08 AM10/21/08
to rub...@googlegroups.com
秋間です。

やっと原因を突き止めました。
Rubeus::Extensions::Java::Awt::Dimension.createメソッドで
java.awt.Dimension.new を実行する際の引数の数が0または2個以外の
場合に、件の例外が発生していたようです。

なので、Rubeus::Extensions::Java::Awt::Dimension.createで
実際に渡す引数の数をチェックして、数が合わない場合はArgumentErrorを
raiseするように変更して、それに合わせてテストも変更しました。

Mac OS X 10.5.5 + Java 1.5.0_16 + JRuby 1.1.4
Windows XP Home Edition + 1.5.0_15 + JRuby 1.1.4
でテストを行いました。

今度こそ、これでOKそうならば0.0.7をリリースしたいと思います。

皆様、ご協力お願い致します。

taka_2 さんは書きました:

taka_2

unread,
Oct 22, 2008, 10:02:44 AM10/22/08
to rubeus
重元です。

以下、テストしてみた状況をお知らせします。

■WindowsXP
・テストは正常終了
・テストが二回実行される

■Linux(Ubuntu8.0.4 on VMWarePlayer)
・2failures(テストケースの問題?)
> ...
>
> もっと読む >>

taka_2

unread,
Oct 22, 2008, 10:12:29 AM10/22/08
to rubeus
重元です。

下の件、ログを貼り忘れたので、貼ります。

■WindowsXP
Finished in 5.402822 seconds.
................................................................................
.....
Finished in 2.937786 seconds.

85 tests, 343 assertions, 0 failures, 0 errors

C:\app\jruby-1.1.4\lib\ruby\gems\1.8\gems\rubeus-0.0.6-java>

■Linux(Ubuntu8.0.4 on VMWarePlayer)
taka@ubuntu-vm:~/rubeus$ jruby -S rake test
(in /opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java)
/opt/jruby-1.1.4/bin/jruby -Ilib:/opt/jruby-1.1.4/lib/ruby/gems/1.8/
gems/rubeus-0.0.6-java/lib "/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rake-0.8.1/lib/rake/rake_test_loader.rb" "/opt/jruby-1.1.4/lib/ruby/
gems/1.8/gems/rubeus-0.0.6-java/test/rubeus/test_extensions.rb" "/opt/
jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/test/rubeus/
extensions/java/sql/test_statement.rb" "/opt/jruby-1.1.4/lib/ruby/gems/
1.8/gems/rubeus-0.0.6-java/test/rubeus/extensions/java/sql/
test_result_set.rb" "/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rubeus-0.0.6-java/test/rubeus/extensions/java/sql/
test_driver_manager.rb" "/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rubeus-0.0.6-java/test/rubeus/extensions/java/sql/test_connection.rb"
"/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/test/rubeus/
extensions/java/sql/test_result_set_meta_data.rb" "/opt/jruby-1.1.4/
lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/test/rubeus/extensions/java/
awt/test_dimension.rb" "/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rubeus-0.0.6-java/test/rubeus/extensions/javax/swing/test_j_frame.rb"
"/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/test/rubeus/
extensions/javax/swing/test_j_panel.rb" "/opt/jruby-1.1.4/lib/ruby/
gems/1.8/gems/rubeus-0.0.6-java/test/rubeus/extensions/javax/swing/
test_box_layout.rb" "/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rubeus-0.0.6-java/test/rubeus/extensions/javax/swing/
test_j_scroll_pane.rb" "/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rubeus-0.0.6-java/test/rubeus/extensions/javax/swing/test_j_table.rb"
"/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/test/rubeus/
extensions/javax/swing/test_j_text_field.rb" "/opt/jruby-1.1.4/lib/
ruby/gems/1.8/gems/rubeus-0.0.6-java/test/rubeus/extensions/javax/
swing/test_timer.rb" "/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rubeus-0.0.6-java/test/rubeus/extensions/javax/swing/
test_j_component.rb" "/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rubeus-0.0.6-java/test/rubeus/extensions/javax/swing/
test_j_tabbed_pane.rb" "/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rubeus-0.0.6-java/test/rubeus/extensions/javax/swing/
test_j_split_pane.rb" "/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rubeus-0.0.6-java/test/rubeus/extensions/javax/swing/table/
test_default_table_model.rb" "/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rubeus-0.0.6-java/test/rubeus/awt/test_event.rb" "/opt/jruby-1.1.4/lib/
ruby/gems/1.8/gems/rubeus-0.0.6-java/test/rubeus/awt/test_setter.rb" "/
opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/test/rubeus/
awt/test_nestable.rb" "/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rubeus-0.0.6-java/test/rubeus/awt/test_attributes.rb"
Loaded suite /opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake/rake_test_loader
Started
....................................................F.........F......................
Finished in 6.204031 seconds.

1) Failure:
test_normal(TestJComponent) [/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/
rubeus-0.0.6-java/test/rubeus/extensions/javax/swing/
test_j_component.rb:15]:
<200> expected but was
<210>.

2) Failure:
test_default_preferred_size(TestJTable)
[/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/test/
rubeus/extensions/javax/swing/test_j_table.rb:21:in
`test_default_preferred_size'
/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/lib/
rubeus/awt/nestable.rb:35:in `add_new_component_to'
/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/lib/
rubeus/awt/nestable.rb:80:in `add_new_component_to'
/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/lib/
rubeus/awt/nestable.rb:71:in `process_block_for_new'
/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/lib/
rubeus/awt/nestable.rb:53:in `new_with_nestable'
/opt/jruby-1.1.4/lib/ruby/gems/1.8/gems/rubeus-0.0.6-java/test/
rubeus/extensions/javax/swing/test_j_table.rb:15:in
`test_default_preferred_size']:
<200> expected but was
<210>.

85 tests, 342 assertions, 2 failures, 0 errors
rake aborted!
Command failed with status (1): [/opt/jruby-1.1.4/bin/jruby -Ilib:/opt/
jrub...]

(See full trace by running task with --trace)
taka@ubuntu-vm:~/rubeus$


--------------------
Linuxのfailureは、OpenJDKだからかも知れないです。
明日以降、時間が取れたらSunのJDKにしてやってみます。
> ...
>
> もっと読む >>

taka_2

unread,
Oct 22, 2008, 10:26:05 AM10/22/08
to rubeus
重元です。

意外とダウンロード早かったので、
Linux + OpenJDKから、Linux + SunJDKになりました。

結果、Linux側はjruby -S rake test無事にエラーなしでパスしました。
(OpenJDKのバグ? というか仕様?)

あとは、Windowsでテストが二回走っちゃう件だけですね。。
> ........................................................................... .....
> .....
> ........................................................................... .....
> .....
> ...
>
> もっと読む >>

秋間武志

unread,
Oct 22, 2008, 10:48:23 AM10/22/08
to rub...@googlegroups.com
重元さん

毎度ありがとうございます。秋間です。

> 結果、Linux側はjruby -S rake test無事にエラーなしでパスしました。
> (OpenJDKのバグ? というか仕様?)

良かった良かった ^ ^


> あとは、Windowsでテストが二回走っちゃう件だけですね。。

あれ?まだ2回走ってます?僕のWindows環境では
> jruby -S rake test
> jruby test/test_all.rb
のどちらも1回しか動いてないようなんですが、
84 tests, 340 assertions, 0 failures, 0 errors
とかの出力が2回行われるということでしょうか?

2008/10/22 23:26 taka_2 <Takahiro....@gmail.com>:

taka_2

unread,
Oct 23, 2008, 11:53:20 AM10/23/08
to rubeus
重元です。

今日チェックアウトし直してみたら、
無事Windowsでもエラーなしでパスしました。

お騒がせしてすみません。


RapidSVNとかいうツールを使ってみたのですが、
どうも使い方間違ってるっぽかったです。
コマンドラインのツールの方がなじむなあ。。

On 10月22日, 午後11:48, "秋間武志" <akm2...@gmail.com> wrote:
> 重元さん
>
> 毎度ありがとうございます。秋間です。
>
> > 結果、Linux側はjruby -S rake test無事にエラーなしでパスしました。
> > (OpenJDKのバグ? というか仕様?)
>
> 良かった良かった ^ ^
>
> > あとは、Windowsでテストが二回走っちゃう件だけですね。。
>
> あれ?まだ2回走ってます?僕のWindows環境では> jruby -S rake test
> > jruby test/test_all.rb
>
> のどちらも1回しか動いてないようなんですが、
> 84 tests, 340 assertions, 0 failures, 0 errors
> とかの出力が2回行われるということでしょうか?
>
> 2008/10/22 23:26 taka_2 <Takahiro.Shigem...@gmail.com>:
> ...
>
> もっと読む >>
Reply all
Reply to author
Forward
0 new messages