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: 8
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: 4430
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: 8
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: 8
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 messageGo to next message
Dean Hiller is currently offline Dean HillerFriend
Messages: 8
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.
Re: where to report this bug in eclipse 4.9 [message #1798312 is a reply to message #1797941] Thu, 15 November 2018 08:17 Go to previous message
Patrick Moran is currently offline Patrick MoranFriend
Messages: 141
Registered: March 2018
Senior Member
I have seen this kind of thing from Eclipse very often. I have been working on one project for a rather long time, and I try to avoid getting everything messed up if I make one mistake by copying projects over and over again, so I get

Tomcat_1
Tomcat_2
Tomcat_n

Working on Tomcat_n I am likely to get some "borrowing" from an earlier version. Or, if I change to another project, e.g., Fishback_3, and I just run it to be reminded of how it works, Eclipse will run Tomcat_n unless I edit Fishbacck_3. It doesn't matter what I do, add a single letter and erase it is enough, then I save, and after that Eclipse lets go of Tomcat.

When I was just getting started this kind of thing drove me crazy.. Even worse, if I did something very wrong with Tomcat_n then all the Tomcat projects might be corrupted.

Because of this group suicide movement, I started making new Workspaces every time I got to something that was really worth saving even if it was just a milestone along the way. That way if I programmed in an infinite loop or whatever, I would only lose a few of the most recent trials, and they probably wouldn't be of any use anyway.

Eclipse keeps all sorts of stuff in invisible configuration files of some kind. I think that is where versions are getting lumped together. My stuff is particularly prone to trouble, I suspect, because I keep all the same blocks of code from version to version, plus or minus some change.

Previous Topic:Project Structure matching Filesystem Structure
Next Topic:Visual Model Editor not opening
Goto Forum:
  


Current Time: Thu Mar 28 16:18:04 GMT 2024

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

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

Back to the top