Error when finding references in Eclipse

482 views
Skip to first unread message

George Schneeloch

unread,
Aug 8, 2010, 6:55:57 PM8/8/10
to Scala IDE User
I'm having trouble finding references in Eclipse when the plugin is
installed. It pops up a dialog box and says an internal error occurred
during 'Java Search' java.lang.NullPointerException. Any ideas?


Steps to reproduce:
- I'm running Ubuntu 10.04
- I installed eclipse from the repro (sudo apt-get install eclipse).
Eclipse -> About Eclipse SDK says Version: 3.5.2, Build id:
M20100211-1343. I haven't installed any extra plugins at this point
- I created a very simple Java project, which has only this class:
package c.c.c;

public class Main {
Main main;

public void main3()
{
this.main = null;
}
}

If I move the cursor to main in the line 'this.main = null' and press
Shift+Ctrl+G (or right click -> References -> Workspace), it shows one
reference, like normal
- I started installing the Scala IDE. Help -> Install New Software.
Copied and pasted http://download.scala-ide.org/nightly-update-master-2.8.0.final/
into the upper textbox. Checked both JDT Weaving and Scala IDE
options, clicked next, accepted license.
- It says the content of the plugin is unsigned. I click ok, and it
asks me to restart Eclipse, which I do.
- It starts again. I move the cursor to this.main again and press Shift
+Ctrl+G, and a dialog box pops up:

An internal error occurred during: "Java Search".
java.lang.NullPointerException

-I clicked Show Error Log, double clicked on the error and found this:
java.lang.NullPointerException
at
org.eclipse.jdt.core.search.SearchPattern.createPattern_aroundBody1$advice(SearchPattern.java:
338)
at
org.eclipse.jdt.core.search.SearchPattern.createPattern(SearchPattern.java:
1)
at
org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:
124)
at org.eclipse.search2.internal.ui.InternalSearchUI
$InternalSearchJob.run(InternalSearchUI.java:91)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

and the session data:
eclipse.buildId=M20100211-1343
java.version=1.6.0_18
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86

If I uninstall the plugin the problem goes away:
- Help -> About Eclipse SDK -> Installation Details. I select both JDT
Weaving for Scala and Scala IDE for Eclipse, click Ok and restart
eclipse when it asks me to.

The same problem occurs if I use the experimental build with Eclipse
3.6.

-George Schneeloch

Matt Russell

unread,
Aug 9, 2010, 5:04:36 AM8/9/10
to Scala IDE User
On Aug 8, 11:55 pm, George Schneeloch <noisecape...@gmail.com> wrote:
> I'm having trouble finding references in Eclipse when the plugin is
> installed. It pops up a dialog box and says an internal error occurred
> during 'Java Search' java.lang.NullPointerException. Any ideas?

Appears to be the same problem as:

http://www.assembla.com/spaces/scala-ide/tickets/1000095

-- Matt

James Moore

unread,
Aug 9, 2010, 10:17:14 AM8/9/10
to scala-i...@googlegroups.com
On Mon, Aug 9, 2010 at 2:04 AM, Matt Russell <mattru...@gmail.com> wrote:
> Appears to be the same problem as:
>
>   http://www.assembla.com/spaces/scala-ide/tickets/1000095

Would installing AJDT be a good workaround?

--
James Moore
ja...@restphone.com
http://jamesmoorecode.blogspot.com/

David Bernard

unread,
Aug 9, 2010, 10:41:42 AM8/9/10
to scala-i...@googlegroups.com
Yes, it seems (for helios for galileo it's a little more tricky as you need to uninstall scala jdt weaving before and install equinox/jdt weaving provide by AJDT).

/davidB

George Schneeloch

unread,
Aug 10, 2010, 12:35:54 AM8/10/10
to scala-i...@googlegroups.com
Yes, AJDT fixes the problem, thanks!
-George
Reply all
Reply to author
Forward
0 new messages