Null pointer issue : JavaImpl in non public class inheriting an interface

Skip to first unread message

मृदुल मनोहर मिश्र

Nov 19, 2016, 3:40:51 PM11/19/16
to eclim-dev
  I have been getting a NullPointer error whenever I try to execute JavaImpl in a non public (package access class) inheriting an interface. The split window shows all the methods that need to be implemented in new class but as soon as I hit enter, it  throws null pointer error. Here is a skeleton code which will throw the error, interestingly if I implement interface in public class (e.g. TestImpl below) I don't see the error. I am running ArchLinux, PingEclim gives output 'eclim 2.6.0, eclipse 4.6.1). Installed java version is :

aur/jdk 8u112-1 [installed] (719) (11.21)
    Oracle Java Development Kit

Code : 
package org.implerror;

interface Interface1 {
    void method1();

class Class1 implements Interface1 {
/* Executing :JavaImpl here */

/* Having this skeleton doesn't impact the behavior
public class TestImpl {
    public static void main(String[] args) {


NullPointer error:

2016-11-19 12:28:44,211 ERROR [org.eclim.command.Main] Command failed
        at org.eclim.plugin.jdt.command.impl.ImplCommand.getSibling(
        at org.eclim.plugin.jdt.command.impl.ImplCommand.insertMethods(
        at org.eclim.plugin.jdt.command.impl.ImplCommand.execute(
        at org.eclim.command.Main$
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(
        at org.eclipse.swt.widgets.Display.runAsyncMessages(
        at org.eclipse.swt.widgets.Display.readAndDispatch(
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(
        at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(
        at org.eclipse.ui.internal.Workbench$
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(
        at org.eclim.eclipse.EclimApplication.start(
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.eclipse.equinox.launcher.Main.invokeFramework(
        at org.eclipse.equinox.launcher.Main.basicRun(
        at org.eclipse.equinox.launcher.Main.main(
NGSession 2: org.eclim.command.Main exited with status 1

मृदुल मनोहर मिश्र

Nov 19, 2016, 3:44:39 PM11/19/16
to eclim-dev
Also I have installed eclim via aur.

aur/eclim 2.6.0-1 [installed] (114) (2.37)
    Brings Eclipse functionality to Vim


Eric Van Dewoestine

Nov 27, 2016, 8:23:03 PM11/27/16
> ...

So far I can't reproduce this. Based on the error it looks like the
type for the file couldn't be determined, but I can't replicate that
case. Can you try running

:let g:EclimLogLevel = 'trace'

Then run the command again and try to add a method. Then send met the
result of running:


If you can do this using the same example you provided above, that
would be ideal, so I can compare against my version of that example.


मृदुल मनोहर मिश्र

Dec 4, 2016, 1:44:39 PM12/4/16
to eclim-dev
Thanks for your reply Eric.
I followed the steps mentioned by you and this is what I get:

:messages output on vim:

Messages maintainer: Bram Moolenaar <>
"" 18L, 302C
(0s) system: "/usr/lib/eclipse/plugins/org.eclim_2.6.0/bin/eclim" --nailgun-server localhost --nailgun-port 9091 -editor vim -command projects
(0s) system: "/usr/lib/eclipse/plugins/org.eclim_2.6.0/bin/eclim" --nailgun-server localhost --nailgun-port 9091 -editor vim -command java_impl -p "TIJ4P" -f "src/java/org/implerror/" -o 107 -e u
(0s) system: "/usr/lib/eclipse/plugins/org.eclim_2.6.0/bin/eclim" --nailgun-server localhost --nailgun-port 9091 -editor vim -command java_impl -p "TIJ4P" -f "src/java/org/implerror/" -t "org.imp
lerror.Class1" -s "org.implerror.Interface1" -m '["method1()"]'
^Iat org.eclim.plugin.jdt.command.impl.ImplCommand.getSibling(
^Iat org.eclim.plugin.jdt.command.impl.ImplCommand.insertMethods(
^Iat org.eclim.plugin.jdt.command.impl.ImplCommand.execute(
^Iat org.eclim.command.Main$
^Iat org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(
^Iat org.eclipse.swt.widgets.Display.runAsyncMessages(
^Iat org.eclipse.swt.widgets.Display.readAndDispatch(
^Iat org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$
^Iat org.eclipse.core.databinding.observable.Realm.runWithDefault(
^Iat org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(
^Iat org.eclipse.ui.internal.Workbench$
^Iat org.eclipse.core.databinding.observable.Realm.runWithDefault(
^Iat org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
^Iat org.eclipse.ui.PlatformUI.createAndRunWorkbench(
^Iat org.eclipse.ui.internal.ide.application.IDEApplication.start(
^Iat org.eclim.eclipse.EclimApplication.start(
^Iat org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
^Iat org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
^Iat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
^Iat sun.reflect.NativeMethodAccessorImpl.invoke(
^Iat sun.reflect.DelegatingMethodAccessorImpl.invoke(
^Iat java.lang.reflect.Method.invoke(
^Iat org.eclipse.equinox.launcher.Main.invokeFramework(
^Iat org.eclipse.equinox.launcher.Main.basicRun(
^Iat org.eclipse.equinox.launcher.Main.main(
while executing command (port: 9091): -editor vim -command java_impl -p "TIJ4P" -f "src/java/org/implerror/" -t "org.implerror.Class1" -s "org.implerror.Interface1" -m '["method1()"]'
"" 18L, 302C
"" 18L, 302C written
(0s) system: "/usr/lib/eclipse/plugins/org.eclim_2.6.0/bin/eclim" --nailgun-server localhost --nailgun-port 9091 -editor vim -command java_src_update -p "TIJ4P" -f "src/java/org/implerror/" -v 

And the eclim log from the shell:
2016-12-04 10:41:17,072 ERROR [org.eclim.command.Main] Command failed
        at org.eclim.plugin.jdt.command.impl.ImplCommand.getSibling(
        at org.eclim.plugin.jdt.command.impl.ImplCommand.insertMethods(
        at org.eclim.plugin.jdt.command.impl.ImplCommand.execute(
Reply all
Reply to author
0 new messages