This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 230704 - NoSuchMethodError: org.jrubyparser.ast.RootNode.getBody()Lorg/jrubyparser/ast/Node;
Summary: NoSuchMethodError: org.jrubyparser.ast.RootNode.getBody()Lorg/jrubyparser/ast...
Status: RESOLVED INCOMPLETE
Alias: None
Product: ruby
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-04 06:10 UTC by Exceptions Reporter
Modified: 2013-06-06 23:28 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 200315


Attachments
stacktrace (939 bytes, text/plain)
2013-06-04 06:10 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2013-06-04 06:10:42 UTC
Build: NetBeans IDE 7.3 (Build 201302132200)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_13-b20
OS: Mac OS X

User Comments:
jenno2000: Drag'n Drop from Windows Explorer to IDE

eggmatters: With a project open, NetBeans "loses" it's ability to intellisense associated data members and object mappings. A very basic, core, fundamental part of using an IDE. Found related bugs whose build fixes led to more bugs and more instability. Details? Where to start? I suggest you tear this thing apart and try it again. I'm seeing way to many bugs, instabilities and basic fundamental flaws to really waste my time to try to help. Nice going oracle. This platform rocked when it was just Sun.

jenno2000: Error after a RailsController File opened

jenno2000: Error by opening IDE

GUEST: Check hierarchy

jenno2000: After a Rails App created an DB was created




Stacktrace: 
java.lang.NoSuchMethodError: org.jrubyparser.ast.RootNode.getBody()Lorg/jrubyparser/ast/Node;
   at org.netbeans.modules.ruby.RubyParser.parseBuffer(RubyParser.java:591)
   at org.netbeans.modules.ruby.RubyParser.parse(RubyParser.java:130)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callParse(TaskProcessor.java:596)
   at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:236)
   at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:718)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
Comment 1 Exceptions Reporter 2013-06-04 06:10:44 UTC
Created attachment 135300 [details]
stacktrace
Comment 2 eggmatters 2013-06-05 21:36:14 UTC
Project navigation resumed after re-installing plugin and updating java. Exception still persists as of jenno2000's comments
Comment 3 enebo 2013-06-06 14:44:15 UTC
The error makes no sense unless there is an older version of jruby-parser.jar somewhere getting used instead of the one which ships with the plugin.  getBody() replaced getBodyNode().  To see this error I can only think an older jar is getting picked up somehow.  I am unsure the best way to resolve this but I would look for 'jrubyparser-*.jar' files.  You should see only one and I believe only jrubyparser-0.4.2.jar.

---- Comments on other part of the original description 

As for the somewhat openly hostile Oracle note.  Oracle no longer directly supports this plugin and it is a volunteer effort.  This latest round of changes was more invasive then anyone wanted because Netbeans APIs drifted enough for NB 7.3 to break the Ruby plugin to the point of not working and jruby-parser was updated to support 1.9 support (which was about 3 years overdue).  fwiw, the tests that are part of this suite runs green and takes over an hour to run.  I would think with that much coverage things would not be so fundamentally broken...

@eggmatters could you perhaps open up the first basic issue you found with regards to intellisense of data member and object mappings.  So far, I believe you are the first to report this?  A basic reproduction will help.
Comment 4 eggmatters 2013-06-06 18:21:41 UTC
@enobo,

My find resulted in no versioned file of the pattern you provided. It did appear that an older jrubyparser.jar was installed simply by looking at the dates for it in the .netbeans/7.3/modules directory. The following command showed:

find . -name "*" | xargs egrep "jrubyparser-*.jar" 2> /dev/null
./config/Modules/org-netbeans-libs-jrubyparser.xml:    <param name="jar">modules/org-netbeans-libs-jrubyparser.jar</param>
./update_tracking/org-netbeans-libs-jrubyparser.xml:        <file crc="3861581626" name="modules/org-netbeans-libs-jrubyparser.jar"/>

The plugin does not show up in my list of installed plugins (tools->plugin) so I am not sure how to remove it. I downloaded the .tgz: 1367260843_updates.zip from the here. It does appear that the file is older but I am concerned that, a) the older version exists and was not removed. B) Netbeans can parse ruby files but it is not showing me that plugin.


Additionally, I apologize for the comments concerning oracle yet, I was surprised and dismayed when I found that they would no longer support ruby and you folks were on your own. As far as the issue I saw with Intellisense, I believe I may have resolved it. 

I updated recently to NetBeans 7.3 when this occurred. I did have an older ruby jar. When I migrated, I also needed to update my java version ("1.7.0_21"). I am running a Debian kernel so, This is an entirely manual process as most *nix providers either cannot or are concerned about licensing to release an open source java v7.* 

The issue reported occurred after the exception I reported was thrown, and went away after I removed the ruby packages. Upon re-installation of the ruby package, I noticed my $JAVA_HOME variable was not set to the proper java version. Once I resolved this, the functionality returned. 

Oddly, the only exception thrown was this. I am not indicating that this is a root cause, but there was no other exceptions or issues reported in the logs. While I would not be convinced that this is a root cause, it would point out to either some tight coupling, improper exception handling and or not-detailed enough logging ("Java versions don't match!")
Comment 5 eggmatters 2013-06-06 18:26:44 UTC
Update: 

I am trying to completely remove ruby and am not having success. It looks like there's an amalgam of old ruby jars and new ones. In .netbeans/modules/ext, I did find: "jruby-parser-0.1.jar" which I assume is wrong.
Comment 6 eggmatters 2013-06-06 18:48:26 UTC
Ok, I think we can close this. Following the manual module removal guidelines from https://forums.netbeans.org/topic22217.html I was able to remove the ruby modules entirely. I then re-ran my plugin updater (set a plugin portal to point to the ruby module I downloaded yesterday.) and re-installed. It is reporting v0.4.2 for the jruby parser. 

I personally think that this exposes not a failure for the ruby maintainers but, more in the plugin updating process. If you "uninstall" a plugin, it should be removed from your system. If you re-install a plugin and there are older, existing jars, .xml, .nbm's or whatever, it should either warn you or overwrite them. 

I also think a more explicit installation process should be noted. I initially followed Geertjans blog: https://blogs.oracle.com/geertjan/entry/ruby_in_netbeans_ide_7 where he explains "Note: For those who don't care about the gory details, i.e., who simply want to use Ruby in NetBeans IDE 7.2, go to the Plugin Manager in NetBeans IDE 7.2, and register  https://blogs.oracle.com/geertjan/resource/nb-72-community-ruby.xml  as a new update center. Though the update center is, as you can see, in this blog, the NBMs that will be available once you've registered the update center are located at java.net." Which caused all of this hassle in the first place
Comment 7 enebo 2013-06-06 22:40:07 UTC
Ah I am really happy to hear you found the underlying issue.  It is a bummer it did not remove those old files.  I also agree that this is not something Ruby plugin should remove and it might just be undesirable Netbeans behavior?  If not then I am sure someone will let me know at some point :|

You are right that something needs to be changed for installation instructions.  I will try and see how I can change the plugin description to point at good instructions and probably even a screencast since we have that one non-.nbm file.
Comment 8 enebo 2013-06-06 22:42:10 UTC
Not sure on actual nb policies so I am marking this as incomplete because it turned out to fairly likely not be a Ruby plugin issue but an idiosyncrasy to module updates?
Comment 9 eggmatters 2013-06-06 23:28:09 UTC
Thanks enobo,

Let me know if I can help with documentation. I plan to write an internal installation guide for our company. I'm off to scaffolding. Thanks also to you and your group for maintaining this piece. I do like Netbeans and want to see it succeed. It does a great many things better than eclipse in my experience, and you can't beat the price.

good luck!