Re: No Class Def found and other issues I get with my own plugin in 8.2

geertjan wielenga <[email protected]> Tue, 4 Jul 2017 16:55:14 +0200
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Organization Oracle Corporation
Message-ID <[email protected]>
Without a way to reproduce it, no one can help.

Gj


On 4-7-2017 16:54, Volodymyr wrote:
>   Hi,
>
> Anyone, please help, when install the plugin in NetBeans, I get the 
> strange error below. But when run/debug it from my dev environment, so 
> it starts another NetBeans instance, it works just fine in the 
> instance. Maybe someone ran into such issue, or maybe has at least an 
> idea why it might be happening and what are the possible ways to fix it?
>
> *java.lang.ClassCastException: com.forcenb.project.ForceProject cannot 
> be cast to com.forcenb.project.ForceProject*
>
> In a code like this:
>
>                     FileObject file = 
> Utilities.actionsGlobalContext().lookup(FileObject.class);
>                     ForceProject project = null;
>                     if (file != null) {
>                         project = (ForceProject) 
> FileOwnerQuery.getOwner(file);
>                     }
>
>
> Any help appreciated.
>
> Thanks.
>
> --- Оригінальне повідомлення ---
> Від кого: "Volodymyr" <[email protected]>
> Дата: 3 липня 2017, 18:15:00
>
>     Hi,
>
>     I am getting the same error for my own plugin as these are:
>     http://statistics.netbeans.org/exceptions/detail.do?id=215797. 33
>     duplicates. How do I know if it has been fixed?
>
>     Here is what I get when doing an autocomplete:
>     ===========
>     SEVERE [org.openide.util.RequestProcessor]: Error in
>     RequestProcessor
>     org.netbeans.spi.editor.completion.support.AsyncCompletionTask
>     java.lang.NoClassDefFoundError:
>     com/forcenb/editor/vf/completion/VfCompleter
>         at
>     com.forcenb.editor.vf.completion.vfCompletionProvider$1.query(VfCompletionProvider.java:51)
>         at
>     org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:223)
>     ===========
>
>     Another issue is that I get strange error:
>     java.lang.ClassCastException: com.forcenb.project.ForceProject
>     cannot be cast to com.forcenb.project.ForceProject
>
>     in a code like this:
>
>                         FileObject file =
>     Utilities.actionsGlobalContext().lookup(FileObject.class);
>                         ForceProject project = null;
>                         if (file != null) {
>                             project = (ForceProject)
>     FileOwnerQuery.getOwner(file);
>                         }
>
>     Any clue why would this be happening?
>
>     Thanks.
>