Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Maven Issues Importing JDT
Maven Issues Importing JDT [message #1695459] Thu, 14 May 2015 17:21 Go to next message
Eclipse UserFriend
Hello!

Apologies in advance if I'm posting in the wrong forums.

I'm running Eclipse Luna on Mac OSX (10.9.5 Mavericks) with jdk1.8.0_40.jdk. I set the JDK compliance level to 1.8 and found this error when re-compiling:

index.php/fa/21818/0/

A quick Google search showed the StackMapFrame class belongs to the Eclipse compiler, so I figured it doesn't hurt to take a peek at the source code.

Git cloned the repository per instructions here

When I import the project as a maven project, I run into:

index.php/fa/21820/0/

I've tried a few things from googling around such as running mvn from command line (which results in yet another error), updating pom.xml (which ended up with more errors), updating my maven version (brew install maven3), installing the m2e plugin, setting the maven installation home to maven3 home (doesn't let me set that value).

Any hints on how to resolve this?

Thanks!!
Re: Maven Issues Importing JDT [message #1695595 is a reply to message #1695459] Sun, 17 May 2015 13:01 Go to previous messageGo to next message
Eclipse UserFriend
Regarding the AIOOBE in StackMapFrame: You may have run into https://bugs.eclipse.org/448112 which has been fixed for Luna SR2. So if you haven't yet, updating to SR2 (4.4.2) may resolve your issue.

If that's not it, please file a new bug - ideally with a small code snippet that triggers the bug. TIA.

Stephan
Re: Maven Issues Importing JDT [message #1695596 is a reply to message #1695595] Sun, 17 May 2015 13:10 Go to previous messageGo to next message
Eclipse UserFriend
Regarding your maven issues: JDT developers typically don't use Maven locally, simply importing projects as Plugin Projects should get you going - preferably if the host Eclipse is an SDK flavor (aka "Eclipse for Committers").

In case you still want a local maven build, have you seen https://wiki.eclipse.org/JDT_Core_Committer_FAQ#Running_tests_from_the_command_line ?
If you tried to follow those steps and it didn't work, feedback on what exactly failed would be helpful.

But as I said, for JDT/Core development, maven is not needed.

Stephan

Re: Maven Issues Importing JDT [message #1695860 is a reply to message #1695596] Tue, 19 May 2015 16:18 Go to previous messageGo to next message
Eclipse UserFriend
Ah, thank you so much!

I updated to Luna R2 as suggested and the issue seemed to persist.

Running JDT/Core from command line revealed the issue.

The fix was to change a method signature in a utility class from:
public static <X> Set<? extends X> intersection(Collection<? extends X> a, Collection<? extends X> b);

to
public static <X> Set<X> intersection(Collection<? extends X> a, Collection<? extends X> b);


I'm fine with changing the code in this case (Effective Java Item 28 'Do not use wildcard types as return types'), but it probably shouldn't cause a compile to fail. I tried to extract the code to a minimal code snippet but the compiler fails to error out.

Similar issue with some wildcard bounds which I resolved by adding explicit type parameters:

This is causing infinite recursion (using AllOf from org.hamcrest libraries and GreaterOrEqual, etc from org.mockito libraries):
Matcher<Integer> isInValidRange = AllOf.allOf(new GreaterOrEqual<>(50000), new LessOrEqual<>(65535));


I'd file a bug for both of these, but it's hard to see if somebody else already reported a similar issue. Shall I file anyway?

Cheers,
Andrew
Re: Maven Issues Importing JDT [message #1695862 is a reply to message #1695860] Tue, 19 May 2015 16:31 Go to previous message
Eclipse UserFriend
If you still see the AIOOBE from StackMapFrame in 4.4.2, yes: reporting a bug with a reproducing example would be helpful.

OOME in ConstantPool is new to me (well, ConstantPool needn't be the culprit...), but infinite recursion is more likely to throw StackOverflowError, mhh?
Also here: if you can reproduce a bug would be helpful.

Stephan
Previous Topic:debug show only subclass variables
Next Topic:How to install WebTools on Kepler?
Goto Forum:
  


Current Time: Sun Apr 20 18:10:15 EDT 2025

Powered by FUDForum. Page generated in 0.03636 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top