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 225437 - JVI-Plugin: NoClassDefFoundError: org/netbeans/modules/editor/completion/ScreenBoundsProvider
Summary: JVI-Plugin: NoClassDefFoundError: org/netbeans/modules/editor/completion/Scre...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 226478 (view as bug list)
Depends on:
Blocks: 179047
  Show dependency tree
 
Reported: 2013-01-29 01:26 UTC by Exceptions Reporter
Modified: 2013-05-18 02:53 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 197339


Attachments
stacktrace (1.57 KB, text/plain)
2013-01-29 01:26 UTC, Exceptions Reporter
Details
Speculations where the patched classes are coming from (208.59 KB, image/png)
2013-03-08 00:16 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2013-01-29 01:26:23 UTC
Build: NetBeans IDE 7.3 RC1 (Build 201301240957)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_10-b18
OS: Windows 7

User Comments:
joe7pak: Anytime I type the word 'Thread', this occurs.

joe7pak: Editing this block of code:


        try
        {
            Thread[] threads = new Thread[]{ new Thread( "thread1" ), new Thread( "thread2" ), new Thread( "thread3" ) };
            for( Thread thread : threads )
            {
                thread.s
            }
 
            assertTrue( failMsg, success );
        }

Occurred right when I typed the 's' after 'thread.'

GUEST: Code completion

joe7pak: try
            {
                Thread.sleep( 1000 );
            }
            catch( InterruptedException e )
            {
            }

Occurred right when after I typed 'Thread.' that was in front of the already existing 'sleep'.




Stacktrace: 
java.lang.NoClassDefFoundError: org/netbeans/modules/editor/completion/ScreenBoundsProvider
   at org.netbeans.modules.editor.completion.CompletionLayoutPopup.getPreferredSize(CompletionLayoutPopup.java:166)
   at org.netbeans.modules.editor.completion.CompletionLayout$CompletionPopup.show(CompletionLayout.java:383)
   at org.netbeans.modules.editor.completion.CompletionLayout.showCompletion(CompletionLayout.java:143)
   at org.netbeans.modules.editor.completion.CompletionImpl$7.run(CompletionImpl.java:1016)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)
Comment 1 Exceptions Reporter 2013-01-29 01:26:26 UTC
Created attachment 130752 [details]
stacktrace
Comment 2 Jaroslav Tulach 2013-01-29 10:22:26 UTC
What is 
com.raelity.jvi.nb.patches.org.netbeans.modules.editor.completion
? The name of the module sounds very suspicious and I'd start investigation for the classloading error here...
Comment 3 markiewb 2013-03-08 00:00:25 UTC
*** Bug 226478 has been marked as a duplicate of this bug. ***
Comment 4 markiewb 2013-03-08 00:16:09 UTC
Created attachment 132363 [details]
Speculations where the patched classes are coming from

(In reply to comment #2)
> What is 
> com.raelity.jvi.nb.patches.org.netbeans.modules.editor.completion
> ? The name of the module sounds very suspicious and I'd start investigation for
> the classloading error here...

Any news here? The cause could be the vi/vim plugin from http://jvi.sourceforge.net/? See the attached screenshot for some speculations/details
Comment 5 mcmagi 2013-03-26 02:40:09 UTC
I am also having this issue and is definitely related to the jvi plugin.  The plugin must be completely uninstalled (not simply disabled) in order for auto-complete to work properly.  This is odd, since this only happens on my home machine.  I also have NB73+jvi on my work machine and I do not have this problem there.

Quite unfortunate as jvi was my greatest reason for continuing to use NetBeans.
Comment 6 markiewb 2013-03-26 06:44:27 UTC
(In reply to comment #5)
> I am also having this issue and is definitely related to the jvi plugin.  The
> plugin must be completely uninstalled (not simply disabled) in order for
> auto-complete to work properly.  This is odd, since this only happens on my
> home machine.  I also have NB73+jvi on my work machine and I do not have this
> problem there.
> 
> Quite unfortunate as jvi was my greatest reason for continuing to use NetBeans.

Please file a ticket at http://jvi.sourceforge.net/
Comment 7 abargnesi 2013-03-27 14:06:32 UTC
Filed a ticket at the jVi project:

https://sourceforge.net/p/jvi/bugs/174/
Comment 8 err 2013-03-27 15:19:06 UTC
jVi does not patch any NB modules in NB-7.3.

With the plugin manager you can verify that they are not installed in your NB-7.3.

Is it possible that if NB imports plugins from a previous version that it could pick up patch jars that came from modules that would not install?

This issue may be jVi related but the two modules
    com-raelity-jvi-nb-patches-org-netbeans-modules-editor-completion.nbm
    com-raelity-jvi-nb-patches-org-openide-text.nbm
should have nothing to do with the problem. These have implementation dependencies and will only install on NB-7.0 (and not in NB-7.0.1 or later).

Not sure when I'll get some time to look at it, but if I can't reproduce it (see comment #5) then finding a solution will be difficult.

I have run into problems when importing everything from 7.2 into 7.3 during install. I have found that if I install without import and then selectively install and import jVi (and some other) options that problems are avoided. Could this be a difference in the two systems mentioned in comment #5?
Comment 9 mcmagi 2013-03-27 16:14:09 UTC
Actually, my experience was exactly the opposite.  I upgraded my work machine from NB 7.2 to 7.3 then imported the modules and jVi works fine.  It's still using jVi 1.4.7 and I've refrained from upgrading to 1.4.8 to avoid this issue from occurring there.

My home machine was a fresh install of NB 7.3.  I then installed jVi 1.4.8 via the jVi update center (which is under Available Plugins).  When that didn't work I tried uninstalling the plugin, then downloading and installing 1.4.8 manually from the jVi website.  I also repeated with 1.4.7 to no avail.
Comment 10 err 2013-03-27 16:24:12 UTC
The module
    com-raelity-jvi-nb-patches-org-netbeans-modules-editor-completion.nbm
can be installed in NB-7.3! Investigating.

Uninstalling this modules should fix the problem.

BTW, IIUC, taking this modules out of the UC will not fix situations where the module is already installed.
Comment 11 err 2013-03-27 17:12:07 UTC
com-raelity-jvi-nb-patches-org-netbeans-modules-editor-completion.nbm patches a single class, CompletionLayoutPopup, in org.netbeans.modules.editor.completion. The module depends on 
    org.netbeans.modules.editor.completion 
and under "Project > Libraries > Editor Code Completion > Edit Module Dependencies" the 
    Implementation Version
is selected.

However that doesn't really do what I wanted. In the manifest there is
    OpenIDE-Module-Module-Dependencies
       ="org.netbeans.modules.editor.completion/1 = 1
which wouldn't seem to be the kind of restriction I was looking for. I don't know if this is a NB bug or a misunderstanding on my part; but I think that explains why the module is allowed to install.

The patch does in fact reference ScreenBoundsProvider which apparently no longer exists in editor/completion.
Comment 12 err 2013-03-27 17:14:28 UTC
Correction
    In the manifest there is
should read
    In the updates.xml there is
Comment 13 err 2013-03-27 17:53:30 UTC
Jarda,
could you comment on my misconceptions as discussed in comment 11?
Comment 14 err 2013-03-27 23:09:20 UTC
I've removed the offending modules from the Update Center and nbvi-1.4.8.zip file. I've modified the plugin portal to remove NB-7.0 support for the UC.

A bad install must be manually fixed,
Use the NB plugin manager to uninstall
    com-raelity-jvi-nb-patches-org-netbeans-modules-editor-completion.nbm
display name is
    jVi: NB-7.0.1 patch for jvi command line completion
Comment 15 mcmagi 2013-03-28 02:49:29 UTC
That fixed the problem.  Thanks!
Comment 16 err 2013-03-28 13:11:40 UTC
Can the implementation version (and spec version) of
    org.netbeans.modules.editor.completion
be changed. Preferably in a 7.3 patch release. That would fix the problem for any corrupted installations.
Comment 17 err 2013-05-02 17:34:46 UTC
(In reply to comment #16)

ping. Can the impl version be changed? Is there some kind of problem in doing so?

> Can the implementation version (and spec version) of
>     org.netbeans.modules.editor.completion
> be changed. Preferably in a 7.3 patch release. That would fix the problem for
> any corrupted installations.
Comment 18 Dusan Balek 2013-05-03 06:52:14 UTC
The module spec version has been already changed as part of
http://hg.netbeans.org/jet-main/rev/7015a3b5cad6
Comment 19 err 2013-05-03 16:32:23 UTC
IIUC, the implementation version must also be changed.

When I set up the patch module, I used an implementation dependency. There may have been a better or more complete way to do this, but it is too late to change what has already been released.
Comment 20 Dusan Balek 2013-05-14 17:22:07 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/c6aeab1f75eb
Comment 21 Quality Engineering 2013-05-18 02:53:35 UTC
Integrated into 'main-golden', will be available in build *201305172300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c6aeab1f75eb
User: Dusan Balek <dbalek@netbeans.org>
Log: Increasing module implementation varsion - see issue #225437.