Hpricot-0.6-java issues

Hi all. Has anyone had any issues with Hpricot lately? I’m running
on JRuby 1.1.2…

irb(main):001:0> require ‘rubygems’
=> true
irb(main):002:0> require ‘hpricot’
=> true
irb(main):003:0> t = “this is a test google
=> “this is a test google
irb(main):004:0> h = Hpricot(t)
Exception in thread “main” java.lang.NoSuchMethodError:
org.jruby.runtime.builtin.IRubyObject.getInstanceVariable(Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;
at HpricotScanService.hpricot_scan(HpricotScanService.java:931)
at HpricotScanService.__hpricot_scan(HpricotScanService.java:1324)
at HpricotScanServiceCallback$__hpricot_scan_S1.call(Unknown Source)
at
org.jruby.runtime.callback.InvocationCallback.execute(InvocationCallback.java:67)
at
org.jruby.internal.runtime.methods.FullFunctionCallbackMethod.call(FullFunctionCallbackMethod.java:69)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:91)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:278)
at
org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:675)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:324)
at
org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:318)
at
org.jruby.evaluator.ASTInterpreter.localAsgnNode(ASTInterpreter.java:1295)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:403)
at
org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:318)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:107)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:264)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1134)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:370)
at
org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:648)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:324)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:107)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:264)
at
org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:670)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:324)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:267)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:155)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:332)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1116)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:370)
at
org.jruby.evaluator.ASTInterpreter.dAsgnNode(ASTInterpreter.java:872)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:344)
at
org.jruby.evaluator.ASTInterpreter.rootNode(ASTInterpreter.java:1654)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:474)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.evaluator.ASTInterpreter.evalWithBinding(ASTInterpreter.java:224)
at org.jruby.RubyKernel.eval(RubyKernel.java:814)
at org.jruby.RubyKernelInvoker$eval_s_method_0_3.call(Unknown Source)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:66)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:261)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1134)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:370)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:261)
at
org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:670)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:324)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1115)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:370)
at
org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:318)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:309)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:363)
at
org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:653)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:324)
at
org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:318)
at
org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1556)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:468)
at
org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:318)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.Block.yield(Block.java:114)
at
org.jruby.evaluator.ASTInterpreter.yieldNode(ASTInterpreter.java:1850)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:509)
at
org.jruby.evaluator.ASTInterpreter.ensureNode(ASTInterpreter.java:1084)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:364)
at
org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:318)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:275)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1139)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:370)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.Block.yield(Block.java:114)
at
org.jruby.evaluator.ASTInterpreter.yieldNode(ASTInterpreter.java:1850)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:509)
at
org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:318)
at
org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1556)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:468)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:115)
at org.jruby.runtime.Block.yield(Block.java:109)
at org.jruby.RubyKernel.loop(RubyKernel.java:1001)
at org.jruby.RubyKernelInvoker$loop_s_method_0_0.call(Unknown Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:295)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:91)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:278)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1139)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:370)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:115)
at org.jruby.runtime.Block.yield(Block.java:109)
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:842)
at org.jruby.RubyKernelInvoker$rbCatch_s_method_1_0.call(Unknown
Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneBlock.call(JavaMethod.java:397)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:91)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:278)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1139)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:370)
at
org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:318)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:91)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:278)
at
org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:675)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:324)
at
org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:318)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:107)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:264)
at
org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:670)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:324)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:115)
at org.jruby.runtime.Block.yield(Block.java:109)
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:842)
at org.jruby.RubyKernelInvoker$rbCatch_s_method_1_0.call(Unknown
Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneBlock.call(JavaMethod.java:397)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:91)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:278)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1139)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:370)
at
org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:318)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:267)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:155)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:332)
at
ruby.Users.richmanalang.lib.jruby.bin.jirb.file(/Users/richmanalang/lib/jruby/bin/jirb:19)
at
ruby.Users.richmanalang.lib.jruby.bin.jirb.file(/Users/richmanalang/lib/jruby/bin/jirb)
at
ruby.Users.richmanalang.lib.jruby.bin.jirb.load(/Users/richmanalang/lib/jruby/bin/jirb)
at org.jruby.Ruby.runScript(Ruby.java:512)
at org.jruby.Ruby.runNormally(Ruby.java:432)
at org.jruby.Ruby.runFromMain(Ruby.java:312)
at org.jruby.Main.run(Main.java:144)
at org.jruby.Main.run(Main.java:89)
at org.jruby.Main.main(Main.java:80)


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Try the hpricot available from http://caldersphere.net. It’s slightly
newer and should be compatible with API changes around the 1.1.x
timeframe that you’re running into here. Unfortunately we haven’t
gotten this gem pushed into the main gem repository; I’m not sure what
it will take to do this, i.e., if we have to get _why to push it there
or what.

jruby -S gem install hpricot --source http://caldersphere.net

/Nick

On Wed, Jul 16, 2008 at 8:14 PM, Rich M. [email protected]
wrote:

Exception in thread “main” java.lang.NoSuchMethodError:
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:264)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:670)
at org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:344)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:91)
at org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:91)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:675)
at org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:324)
at org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:370)
at ruby.Users.richmanalang.lib.jruby.bin.jirb.load(/Users/richmanalang/lib/jruby/bin/jirb)
http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

I set up a wiki page about this a while back when I had the same issue
and
Nick solved it for me too.
http://wiki.jruby.org/wiki/Hpricot

-Joe

It doesn’t look like the hpricot gem here works anymore. This is what
I’m
getting with jruby trunk.
arthman:jruby jjathman$ jruby -S gem install hpricot --source
http://caldersphere.net
JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
WARNING: RubyGems 1.2+ index not found for:
http://caldersphere.net/

RubyGems will revert to legacy indexes degrading performance.
ERROR: could not find gem hpricot locally or in a repository

Yeah, sorry about that. I haven’t been able to get RubyGems upgraded
on my gem server yet.

Instead, try installing from Rubyforge! I just uploaded a new 0.6.161
hpricot gem that should work with trunk JRuby that should be appearing
soon.

In a pinch, you can manually download from here and install the gem
file directly.

http://caldersphere.net/gems/hpricot-0.6.161-jruby.gem

/Nick

On Wed, Jul 30, 2008 at 10:33 PM, Joseph A. [email protected]
wrote:

newer and should be compatible with API changes around the 1.1.x
wrote:

Exception in thread “main” java.lang.NoSuchMethodError:
org.jruby.internal.runtime.methods.FullFunctionCallbackMethod.call(FullFunctionCallbackMethod.java:69)
at
org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:155)
at
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:318)
org.jruby.evaluator.ASTInterpreter.ensureNode(ASTInterpreter.java:1084)
at
org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1556)
at org.jruby.RubyKernelInvoker$loop_s_method_0_0.call(Unknown
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:370)
at
org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:620)
at
org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:842)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Don’t be sorry, if it wasn’t for you a lot of us would be out of luck!
Just
did an update from Rubyforge and it works great. Thanks again for the
help.
I updated the wiki page to reflect the version in rubyforge working.
Joe

On Wed, Jul 30, 2008 at 11:35 PM, Joseph A. [email protected]
wrote:

I updated the wiki page to reflect the version in rubyforge working.

Thanks for that!

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email