java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.batch.FileSystem.getClasspath with xtend-maven-plugin:2.14.0 and jdt.core 3.14.0 instead of 3.13.102 #493
Comments
@vorburger can you please provide a complete stacktrace |
sure, running
and I guess this could be interesting:
|
urls[21] = file:/home/vorburger/.m2/repository/org/eclipse/jdt/org.eclipse.jdt.compiler.apt/1.3.110/org.eclipse.jdt.compiler.apt-1.3.110.jar |
dunno... don't see us fixing those in our parent POM here, and I don't see anything (obvious) which could be related to this jump out at me in this effective POM here. If you have reason to suspect that this is problem is due to some version mismatch combination in this particular project, and not a general issue with "pure" (only) Xtend, then please do feel absolutely free to close this issue. |
well the problem is that platform and jdt maven poms are full of bad ranges and we have to find a way to "correct" that in our gradle and maven dependencies |
=> if you inc jdt.core you need to inc compiler.tool and compiler.apt too |
but only with 3.14.0, it seems? (it's fine withou with 3.13.102). OK so then let me close this issue. Please re-open if I misunderstood and there is actually something which needs to be done. |
I'm experiencing the same problem with xtext-maven-plugin 2.15.0: https://travis-ci.org/LorenzoBettini/javamm/builds/433411433 can it be something similar to eclipse/xtext#1231 ? |
i am sure that you accidentially pick bad version combinations. can you please give a list of what you pick? e.g. why is org.eclipse.jdt.core 3.15 picked? why are multiple versions of compiler.apt/tool picked? |
The configuration is quite simple, and in the very current version can be found here https://github.com/LorenzoBettini/javamm/blob/cfff136dacb293f96227e34b6443aece1fbf97c8/javamm.examples/pom.xml where I also tried to add a dep on xtend.core, which, from what I understand, has the pinned version of jdt, but that doesn't change anything and I still get the problem... I'm using tycho 1.2.0 and xtext 2.15.0 (TP is 2018-09). |
yes but this mixes a big pile of tycho and maven dependencies which dont fit together. so no wonder. |
so I simply can't use xtext-maven-plugin I guess... or could I try something else? |
no the problem is this:
what about making sure that tycho and maven depenencies match or you use excludes/includes whatever(the part tycho sucks) |
My deps have not further deps so I don't think they're the problem... from the stacktrace it looks like xtext-maven-plugin is trying to use a method from jdt.core which is not there anymore
and even trying to force jdt.core to previous versions like 3.13.102 doesn't seem to help... that's why I was guessing it's a problem in xtext-maven-plugin, but I've just realized that this very issue is against xtend, so should I open a new one for xtext-maven-plugin? I haven't tried, but I guess this could be reproduced with https://github.com/xtext/maven-xtext-example switching to xtext 2.15... |
this happens when a stoneage old compiler.tol/apt is used with a newer jdt.core problem is tycho: how can you tell tycho to use that? did you do it? did you change the target platform? can you simply try to (1) explicitely set used jdt.core, compiler.tool and compiler.apt version to the latest gratest from 2018-09 |
I've already tried with jdt.core 2.15.0 (as a maven dep to xtext-maven-plugin, I guess that's what you suggested right?) but it fails as well, and not surprisingly since that method, with that signature, has been removed... |
On the very contrary: it's jdt.core file:/home/travis/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.core/3.15.0.v20180905-0317/org.eclipse.jdt.core-3.15.0.v20180905-0317.jar which is a p2 dep that gets into the way and breaks everything from what I understand... |
yes this is what i try to tell you all the time ...... |
=> my idea: use jdt.core/compiler.apt/tool from 2018-09 as maven dependencies explicitely and see what happens. |
OK, got it... with
it finally works! But I don't understand why the workaround for xtend-maven-plugin was to use older versions of jdt... so that was an unrelated issue I guess. BTW: thanks :) |
well it could happen that jdt never broke the code between different versions so it will have worked randomly/by luck |
mh... but then who's calling that jdt method in the end? |
We really should pin the versions of every dependency in the xtend-maven-plugin to avoid such trouble. It is very unusual for a Maven plugin that there is any ranged (transitive) dependency. |
No this is the xtext maven plugin when |
i propose to close this as wont fix. |
Please reopen if there is a better plan or additional information to be taken into account. |
Our builds take latest Xtend compiler. JDT API changed, Xtend compiler fails. So we need to fix the JDT compiler version. See eclipse/xtext-xtend#493 for details
Our builds take latest Xtend compiler. JDT API changed, Xtend compiler fails. So we need to fix the JDT compiler version. See eclipse/xtext-xtend#493 for details
while fiddling with eclipse/xtext#1231 for https://jira.opendaylight.org/browse/ODLPARENT-156 I've a few things, among them specifying org.eclipse.jdt:org.eclipse.jdt.core version 3.14.0, and this lead to:
[ERROR] Failed to execute goal org.eclipse.xtend:xtend-maven-plugin:2.14.0:compile (default) on project aclservice-impl: Execution default of goal org.eclipse.xtend:xtend-maven-plugin:2.14.0:compile failed: An API incompatibility was encountered while executing org.eclipse.xtend:xtend-maven-plugin:2.14.0:compile: java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.batch.FileSystem.getClasspath(Ljava/lang/String;Ljava/lang/String;ZLorg/eclipse/jdt/internal/compiler/env/AccessRuleSet;Ljava/lang/String;Ljava/util/Map;)Lorg/eclipse/jdt/internal/compiler/batch/FileSystem$Classpath;
I'm guessing that this is probably perfectly normal, as I'm mixing an "old" previously released Xtend version (2.14.0) with the barely a few days old just freshly pushed latest JDT Photon release (3.14.0), and that this will be fixed in a future Xtend version, but just thought I would let you guys know about this anyway. It's NOT blocking me, as just using jdt.core version 3.14.0 instead of 3.13.102 to work around eclipse/xtext#1231 is fine.
The text was updated successfully, but these errors were encountered: