T
Tom Harris
I have been trying to get YAJB to work on my system for the last three
days, without success. The platform I'm running on is Windows 2003
Server, with Ruby 1.8.3 and YAJB 0.8.1.
I have ruby installed in the default location on Windows, which is
c:\ruby
I have my JAVA_HOME set to the root of my Java folder: D:\jdk1.5.0_06
When I run "ruby setup.rb", everything seems fine.
I then go into the sample folder and run "ruby gui_simple.rb", and
nothing happens. It just sits there.
I then modified gui_simple.rb to include the following after the include
statement, so I could see what was going wrong:
JBRIDGE_OPTIONS = {
:jvm_stdout => :t,
:jvm_log_level => "debug",
:bridge_log => true
}
The output follows:
JavaBridge: Startup communication bridge...
CLASSPATH: "$CLASSPATH";c:/ruby/lib/ruby/site_ruby/1.8/yajb/yajb.jar
java -classpath
""$CLASSPATH";c:/ruby/lib/ruby/site_ruby/1.8/yajb/yajb.jar"
jbridge.BridgeBuilder jbridge.comm.
binstream.BStream_JBServer -remoteport:2390 -logLevel:debug
JVM: Start main routine.
JVM: CodeGen: ImplFlagField
JVM: CodeGen: SuperClassField
JVM: CodeGen: MethodFinderField
JVM: CodeGen: SessionManagerField
JVM: CodeGen: IdField
JVM: CodeGen: InjectMethod
JVM: CodeGen: SendMessage
JVM: CodeGen: OverrideMethod_check
JVM: CodeGen: OverrideMethod_return
JVM: CodeGen: SuperCaller
JVM: CodeGen: SuperConstructor
JVM: CG: OriginalMethod
JVM: OK.
JVM: Initialized.
start up BinStream connection on 2390
BinServer: waiting for client's connection...
It just sits there forever. No gui, nothing.
Finally, I hit CTRL-C, and get the following:
EXIT JavaBridge...
----GC: begin cancelling finalizer: 0
nil
c:/ruby/lib/ruby/site_ruby/1.8/yajb/jbridge.rb:451:in `__startup_JVM':
undefined method `message' for nil:NilCla
ss (NoMethodError)
from c:/ruby/lib/ruby/site_ruby/1.8/yajb/jbridge.rb:440
c:/ruby/lib/ruby/site_ruby/1.8/yajb/jbridge.rb:451:in `__startup_JVM':
undefined method `message' for nil:NilCla
ss (NoMethodError)
from c:/ruby/lib/ruby/site_ruby/1.8/yajb/jbridge.rb:440
Originally, I had been thinking my application was wrong somehow, as I
had barrelled ahead without trying the samples. But, after trying to
figure this out, I finally decided to see if the samples worked, which
as you can above, did not. So, what is going wrong here? This being the
only usable Java bridge that needs no special compilation for the
platform, I thought this would also be the only one I could use on
Windows being within Cygwin. I really need to avoid that.
My main application is Java based, but after playing with Rails I
decided that the configuration GUI had to be in Ruby. So, YAJB will be
used just to notify the main application that configuration changes have
occurred. Tha java class is very simple, and if I could just get YAJB
working, I'd be done.
Can someone please tell me what might be wrong and what I can do to fix
it?
Tom Harris
Cisco Systems, Inc.
days, without success. The platform I'm running on is Windows 2003
Server, with Ruby 1.8.3 and YAJB 0.8.1.
I have ruby installed in the default location on Windows, which is
c:\ruby
I have my JAVA_HOME set to the root of my Java folder: D:\jdk1.5.0_06
When I run "ruby setup.rb", everything seems fine.
I then go into the sample folder and run "ruby gui_simple.rb", and
nothing happens. It just sits there.
I then modified gui_simple.rb to include the following after the include
statement, so I could see what was going wrong:
JBRIDGE_OPTIONS = {
:jvm_stdout => :t,
:jvm_log_level => "debug",
:bridge_log => true
}
The output follows:
JavaBridge: Startup communication bridge...
CLASSPATH: "$CLASSPATH";c:/ruby/lib/ruby/site_ruby/1.8/yajb/yajb.jar
java -classpath
""$CLASSPATH";c:/ruby/lib/ruby/site_ruby/1.8/yajb/yajb.jar"
jbridge.BridgeBuilder jbridge.comm.
binstream.BStream_JBServer -remoteport:2390 -logLevel:debug
JVM: Start main routine.
JVM: CodeGen: ImplFlagField
JVM: CodeGen: SuperClassField
JVM: CodeGen: MethodFinderField
JVM: CodeGen: SessionManagerField
JVM: CodeGen: IdField
JVM: CodeGen: InjectMethod
JVM: CodeGen: SendMessage
JVM: CodeGen: OverrideMethod_check
JVM: CodeGen: OverrideMethod_return
JVM: CodeGen: SuperCaller
JVM: CodeGen: SuperConstructor
JVM: CG: OriginalMethod
JVM: OK.
JVM: Initialized.
start up BinStream connection on 2390
BinServer: waiting for client's connection...
It just sits there forever. No gui, nothing.
Finally, I hit CTRL-C, and get the following:
EXIT JavaBridge...
----GC: begin cancelling finalizer: 0
nil
c:/ruby/lib/ruby/site_ruby/1.8/yajb/jbridge.rb:451:in `__startup_JVM':
undefined method `message' for nil:NilCla
ss (NoMethodError)
from c:/ruby/lib/ruby/site_ruby/1.8/yajb/jbridge.rb:440
c:/ruby/lib/ruby/site_ruby/1.8/yajb/jbridge.rb:451:in `__startup_JVM':
undefined method `message' for nil:NilCla
ss (NoMethodError)
from c:/ruby/lib/ruby/site_ruby/1.8/yajb/jbridge.rb:440
Originally, I had been thinking my application was wrong somehow, as I
had barrelled ahead without trying the samples. But, after trying to
figure this out, I finally decided to see if the samples worked, which
as you can above, did not. So, what is going wrong here? This being the
only usable Java bridge that needs no special compilation for the
platform, I thought this would also be the only one I could use on
Windows being within Cygwin. I really need to avoid that.
My main application is Java based, but after playing with Rails I
decided that the configuration GUI had to be in Ruby. So, YAJB will be
used just to notify the main application that configuration changes have
occurred. Tha java class is very simple, and if I could just get YAJB
working, I'd be done.
Can someone please tell me what might be wrong and what I can do to fix
it?
Tom Harris
Cisco Systems, Inc.