Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » where to report this bug in eclipse 4.9
where to report this bug in eclipse 4.9 [message #1797821] Wed, 07 November 2018 01:56 Go to next message
Dean Hiller is currently offline Dean HillerFriend
Messages: 4
Registered: November 2018
Junior Member
This is quite tricky to reproduce and not sure I can but I thought I would at least let someone know. I am not sure if it is just my computer yet either. I need to test this on another computer and don't have one :(. I think it is just mine though.

I upgraded to eclipse 4.9(build id 20180917-1800) along with 'Buildship Gradle Integration 2.0'. eclipse 4.8 still works with these steps while 4.9 fails.

The project is https://github.com/deanhiller/webpieces

I import it using the gradle plugin which goes smoothly. To shortcut the issue a bit and reproduce, I have found I can add this line to "ProdServerForIDE.java" right at the start of main()

H2DbPlugin p = new H2DbPlugin(new H2DbConfig());

This compiles fine but then when I run ProdServerForIDE.java, it fails with something indicating it is using an older jar (and more importantly not the code in the sibling project with that plugin).

I can still import it into eclipse but then when starting DevelopmentServer.java, it is using stale old jar files from the repo and I get the error

Exception in thread "main" java.lang.NoSuchMethodError: org.webpieces.plugins.hsqldb.H2DbPlugin.<init>(Lorg/webpieces/plugins/hsqldb/H2DbConfig;)V
at xxxxxx.ProdServerForIDE.main(ProdServerForIDE.java:37)

NOTE: H2DbPlugin.java is a file in a sibling project that used to have the constructor H2DbPlugin(). but in eclipse with the gradle plugin, it should be using the local code.

I tried deleting caches but clearly I am missing one as the only way the wrong class is loaded and we can't find the right constructor is if it is somewhere.

I deleted ~/.gradle/caches and checked .m2 and .ivy to no avail as those did not have my jar files old or new.

still searching for a cache somewhere on the system BUT why is eclipse using it anyways!!!! It should be like eclipse 4.8 using the sibling project directly.

I have been at this for 90 minutes so far trying to add much detail to this post. I will update as I find more info.

Actually, the gradle project has NO version info on this jar to grab the right version out of a gradle cache anyways. All projects in webpieces generate one jar and are given the same version at release time. This makes the issue even more weird.

I am quite sure if I used a new computer my issue would go away as that version of the jar would no longer exist.

I will add more info as I figure out more but seems eclipse 4.9 is loading some wonky jar it should not load somehow.
Re: where to report this bug in eclipse 4.9 [message #1797824 is a reply to message #1797821] Wed, 07 November 2018 03:33 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3297
Registered: July 2009
Senior Member

Are you using Gradle, Maven, or Ivy. I thought you couldn't
mix them together.


Nitin Dahyabhai
Eclipse Web Tools Platform
Re: where to report this bug in eclipse 4.9 [message #1797863 is a reply to message #1797824] Wed, 07 November 2018 15:20 Go to previous messageGo to next message
Dean Hiller is currently offline Dean HillerFriend
Messages: 4
Registered: November 2018
Junior Member
I am using gradle but to be safe was trying to delete it from all caches. I searched my whole file system for that jar and deleted it from everywhere and eclipse still somehow sees an older version. it is so weird.
Re: where to report this bug in eclipse 4.9 [message #1797940 is a reply to message #1797863] Fri, 09 November 2018 01:06 Go to previous messageGo to next message
Dean Hiller is currently offline Dean HillerFriend
Messages: 4
Registered: November 2018
Junior Member
Is there any way to find out where the class file or jar is coming from since it is definitely not coming from the source *.java file? How to trace this down?
Re: where to report this bug in eclipse 4.9 [message #1797941 is a reply to message #1797940] Fri, 09 November 2018 01:21 Go to previous message
Dean Hiller is currently offline Dean HillerFriend
Messages: 4
Registered: November 2018
Junior Member
I manually deleted webpieces/webserver-plugins/plugin-h2db/bin/plugin-h2db and cleaned the project and that fixed the first issue. WTF. How in the world is old *class files still there even? is eclipse not doing a datetime check on *.java vs. *.class file. I then ran into a new one and solve that and now on a new one related to same thing. I tried deleting all of them with

find . -name "bin" | xargs rm -rf

but still running into one more for some weird reason. I then ran these

find . -name "eclipse-output" | xargs rm -rf
find . -name "out" | xargs rm -rf
find . -name "output" | xargs rm -rf

The last one is where I have gradle writing the output so that one is actually up to date but I deleted it just in case. This solved it which means eclipse must be reading class files from multiple locations(That seems like a very very bad bug).

Also, I REALLY hope eclipse gradle plugin is not trying to share the output of gradle and keeps them separate as developers run gradle clean while running servers in eclipse so that would just break stuff as the gradle deletes class files. I should be able to have 2 sets of output dirs just fine but eclipse or gradle plugin is mucking something up in the later releases.

I am a little confused as I checked my previous eclipse and output was also set to 'bin' which is weird. we usually change this to eclipse-output as bin is way to non-descriptive and can conflict with some projects that use the bin directory differently.

Anyways, I am solved but seems like eclipse has some wonky thing going on there.
Previous Topic:Aggregation Issue on a Group - getting repetition
Next Topic:Missing Web Tools on Eclipse for Java
Goto Forum:
  


Current Time: Wed Nov 14 13:00:13 GMT 2018

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

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

Back to the top