Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P2Tests fail since separation of batch compiler plugin from jdt core #419

Closed
iloveeclipse opened this issue Dec 2, 2022 · 15 comments · Fixed by eclipse-jdt/eclipse.jdt.core#592
Assignees
Labels
regression Regression defect
Milestone

Comments

@iloveeclipse
Copy link
Member

iloveeclipse commented Dec 2, 2022

See for example https://download.eclipse.org/eclipse/downloads/drops4/I20221201-1800/testresults/html/org.eclipse.pde.build.tests_ep427I-unit-cen64-gtk3-java11_linux.gtk.x86_64_11.html

org.eclipse.jdt.core.JDTCompilerAdapter is now in separated bundle (after eclipse-jdt/eclipse.jdt.core#181), and some platform code somewhere used jdt.core bundle as ant dependency.
Now the bundle is there, but outside of OSGI world it simply can't find batch compiler classes anymore, and ant rightly complains that the Class org.eclipse.jdt.core.JDTCompilerAdapter could not be loaded because of an invalid dependency.

If I only knew where org.eclipse.jdt.core library was set to be in the classpath of ant!
It should be now replaced through org.eclipse.jdt.core.compiler.batch and the problem will be solved.

Stack:

The following error occurred while executing this line: /home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.pde.build_3.11.400.v20220923-1253/scripts/build.xml:108: The following error occurred while executing this line: 
/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.pde.build_3.11.400.v20220923-1253/templates/headless-build/customTargets.xml:13: 
The following error occurred while executing this line: 
/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.pde.build_3.11.400.v20220923-1253/templates/headless-build/allElements.xml:17: The following error occurred while executing this line: 
/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.pde.build_3.11.400.v20220923-1253/scripts/genericTargets.xml:119: 
The following error occurred while executing this line: /home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.pde.build_3.11.400.v20220923-1253/scripts/genericTargets.xml:124: The following error occurred while executing this line: 
/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/pdebuild_folder/pde.build/263272/features/F/build.xml:43: 
The following error occurred while executing this line: /home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/pdebuild_folder/pde.build/263272/features/F/build.xml:14: 
The following error occurred while executing this line: 
/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/pdebuild_folder/pde.build/263272/plugins/c/build.xml:124: 
The following error occurred while executing this line: 
/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/pdebuild_folder/pde.build/263272/plugins/c/build.xml:86: 
Class org.eclipse.jdt.core.JDTCompilerAdapter could not be loaded because of an invalid dependency./home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.pde.build_3.11.400.v20220923-1253/scripts/build.xml:39: 
The following error occurred while executing this line:/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.pde.build_3.11.400.v20220923-1253/scripts/build.xml:108: 
The following error occurred while executing this line:/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.pde.build_3.11.400.v20220923-1253/templates/headless-build/customTargets.xml:13: 
The following error occurred while executing this line:/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.pde.build_3.11.400.v20220923-1253/templates/headless-build/allElements.xml:17: 
The following error occurred while executing this line:/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.pde.build_3.11.400.v20220923-1253/scripts/genericTargets.xml:119: 
The following error occurred while executing this line:/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.pde.build_3.11.400.v20220923-1253/scripts/genericTargets.xml:124: The following error occurred while executing this line:/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/pdebuild_folder/pde.build/263272/features/F/build.xml:43: 
The following error occurred while executing this line:/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/pdebuild_folder/pde.build/263272/features/F/build.xml:14: The following error occurred while executing this line:/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/pdebuild_folder/pde.build/263272/plugins/c/build.xml:124: 
The following error occurred while executing this line:/home/jenkins/agent/workspace/AutomatedTests/ep427I-unit-cen64-gtk3-java11/workarea/I20221201-1800/eclipse-testing/test-eclipse/eclipse/pdebuild_folder/pde.build/263272/plugins/c/build.xml:86: 
Class org.eclipse.jdt.core.JDTCompilerAdapter could not be loaded because of an invalid dependency.
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:582)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
at jdk.internal.reflect.GeneratedMethodAccessor181.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:34)
at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:716)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:573)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)at org.eclipse.ant.core.AntRunner.run(AntRunner.java:506)
at org.eclipse.pde.build.tests.PDETestCase.runAntScript(PDETestCase.java:158)
at org.eclipse.pde.build.tests.PDETestCase.runAntScript(PDETestCase.java:150)
at org.eclipse.pde.build.tests.PDETestCase.runBuild(PDETestCase.java:128)
at org.eclipse.pde.build.internal.tests.p2.P2Tests.testBug263272(P2Tests.java:677)

Most important part of the stack

Caused by: java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:283)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:716)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:639)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:607)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:587)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:566)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:335)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:397)
at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:496)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:622)
at org.eclipse.ant.core.AntCorePreferences$WrappedClassLoader.findClass(AntCorePreferences.java:94)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.eclipse.ant.internal.core.AntClassLoader.loadClassPlugins(AntClassLoader.java:69)
at org.eclipse.ant.internal.core.AntClassLoader.findClass(AntClassLoader.java:47)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1421)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1108)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at org.apache.tools.ant.util.ClasspathUtils.newInstance(ClasspathUtils.java:253)
... 217 more
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter cannot be found by org.eclipse.jdt.core.compiler.batch_3.33.0.v20221205-1735
at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:536)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 246 more
@iloveeclipse
Copy link
Member Author

@vik-chand : do you know where in the platform code (PDE?/Ant?) we specify or resolve ant classpath and add org.eclipse.jdt.core library?

@iloveeclipse
Copy link
Member Author

OK, that was not that easy but I believe I've found it: org.eclipse.jdt.core bundle embedded jdtCompilerAdapter.jar that was extracted by PDE from the jar and placed to ant runtime, see org.eclipse.ant.internal.ui.datatransfer.BuildFileCreator...

Now, the jar simply misses classes moved to batch compiler bundle.

@iloveeclipse
Copy link
Member Author

State before eclipse-jdt/eclipse.jdt.core#182:
image

Current state:
image

iloveeclipse added a commit to iloveeclipse/eclipse.jdt.core that referenced this issue Dec 2, 2022
…t#181)

Add moved classes located now in org.eclipse.jdt.core.compiler.batch to
the jdtCompilerAdapter.jar used by pde.build & Ant (see
org.eclipse.ant.internal.ui.datatransfer.BuildFileCreator).

See
eclipse-pde/eclipse.pde#419
eclipse-jdt#181
iloveeclipse added a commit to eclipse-jdt/eclipse.jdt.core that referenced this issue Dec 2, 2022
Add moved classes located now in org.eclipse.jdt.core.compiler.batch to
the jdtCompilerAdapter.jar used by pde.build & Ant (see
org.eclipse.ant.internal.ui.datatransfer.BuildFileCreator).

See
eclipse-pde/eclipse.pde#419
#181
iloveeclipse added a commit to iloveeclipse/eclipse.jdt.core that referenced this issue Dec 2, 2022
…ipse-jdt#181)

Add moved classes located now in org.eclipse.jdt.core.compiler.batch to
the jdtCompilerAdapter.jar used by pde.build & Ant (see
org.eclipse.ant.internal.ui.datatransfer.BuildFileCreator).

See
eclipse-pde/eclipse.pde#419
eclipse-jdt#181
iloveeclipse added a commit to eclipse-jdt/eclipse.jdt.core that referenced this issue Dec 2, 2022
Add moved classes located now in org.eclipse.jdt.core.compiler.batch to
the jdtCompilerAdapter.jar used by pde.build & Ant (see
org.eclipse.ant.internal.ui.datatransfer.BuildFileCreator).

See
eclipse-pde/eclipse.pde#419
#181
@iloveeclipse
Copy link
Member Author

I hope with eclipse-jdt/eclipse.jdt.core#579 the problem should be fixed.
Will see in next SDK build...

@iloveeclipse
Copy link
Member Author

I hope with eclipse-jdt/eclipse.jdt.core#579 the problem should be fixed.

Nope, same error: https://download.eclipse.org/eclipse/downloads/drops4/I20221205-0710/testresults/html/org.eclipse.pde.build.tests_ep427I-unit-macM1-java17_macosx.cocoa.aarch64_17.html

Hmm. I can't see what should be different now, because I don't know how ant/PDE uses ecj.

@merks
Copy link
Contributor

merks commented Dec 5, 2022

It's little odd. It says org.eclipse.jdt.core.JDTCompilerAdapter could not be loaded because of an invalid dependency and also says org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter cannot be found by org.eclipse.jdt.core.compiler.batch_3.33.0.v20221202-1820 but I wouldn't expect the latter to be trying to find (load the class for) the former...

@iloveeclipse
Copy link
Member Author

and also says org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter cannot be found by org.eclipse.jdt.core.compiler.batch_3.33.0.v20221202-1820

Arrgh, Ed, I was blind, I didn't expected that there is more than "just" missing JDTCompilerAdapter!

The code in org.eclipse.ant.internal.core.AntClassLoader.loadClassPlugins(String) looks over contributed org.eclipse.ant.core.AntCorePreferences.WrappedClassLoader instances.
I assume these don't know that batch compiler should be re-exported by jdt.core or something like this.
So trivial patch would be to contribute something to ant.core from batch compiler. Non trivial patch would fix classloading :-)

@iloveeclipse
Copy link
Member Author

So trivial patch would be to contribute something to ant.core from batch compiler. Non trivial patch would fix classloading :-)

Neither one is trivial. There must be yet another hack or hardcoded assumption somewhere.

Most important part of the stack

Caused by: java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:283)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:716)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:639)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:607)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:587)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:566)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:335)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:397)
at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:496)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:622)
at org.eclipse.ant.core.AntCorePreferences$WrappedClassLoader.findClass(AntCorePreferences.java:94)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.eclipse.ant.internal.core.AntClassLoader.loadClassPlugins(AntClassLoader.java:69)
at org.eclipse.ant.internal.core.AntClassLoader.findClass(AntClassLoader.java:47)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1421)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1108)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at org.apache.tools.ant.util.ClasspathUtils.newInstance(ClasspathUtils.java:253)
... 217 more
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter cannot be found by org.eclipse.jdt.core.compiler.batch_3.33.0.v20221205-1735
at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:536)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 246 more

If I contribute batch compiler as "extraClasspathEntry", I still see same error.

   <extension
         point="org.eclipse.ant.core.extraClasspathEntries">
      <extraClasspathEntry
            eclipseRuntime="false"
            headless="true"
            library="/">
      </extraClasspathEntry>
   </extension>

If I add ant library as optional dependency to batch compiler, I can load DefaultCompilerAdapter from JDTCompilerAdapter but in next step ant throws exception that the super interfaces are different - because they were loaded from different class loaders.

So JDT or PDE or ANT did before something to load batch compiler from same ant classloader that loaded DefaultCompilerAdapter. I don't see how they did that yet. :-(

@laeubi
Copy link
Contributor

laeubi commented Dec 6, 2022

What sounds strange is that "org.eclipse.jdt.core.compiler.batch" is mentioned in the exception but you said it does not depends on ant (or does it?). I think I have seen some ant jar mangling stuff.

Have you tried using

DynamicImport-Package: org.apache.tools.ant.*, ... probably more ant stuff that is used by any ant.jar ...

SO probably you could remove the ant.jar from the classpath, then see what packages are required and add all of those as optional/dynamic imports...

@iloveeclipse
Copy link
Member Author

The problem is not missing ant but wrong classloader.
The hack was to NOT load class by jdt core

@laeubi
Copy link
Contributor

laeubi commented Dec 6, 2022

The problem is not missing ant but wrong classloader. The hack was to NOT load class by jdt core

So it does work now? Because what I wanted to say is that if you only import one package but others are also required they might be loaded from somwhere else and producing issues.

@iloveeclipse
Copy link
Member Author

So it does work now?

Yes. I'm just busy with other work. I have to write some documentation wrap up before committing how this magic works so next time someone wants to debug a problem it would be easier to find who does what and why and why not in usual way.

@laeubi
Copy link
Contributor

laeubi commented Dec 6, 2022

Great! That is really good to hear.

iloveeclipse added a commit to iloveeclipse/eclipse.jdt.core that referenced this issue Dec 6, 2022
See README.md why the JDTCompilerAdapter classloading is not trivial.

TL;DR: OSGI classloader from org.eclipse.jdt.core bundle should not find
JDTCompilerAdapter class (!) so the ant started from Eclipse can find it
inside jdtCompilerAdapter.jar contributed by ... org.eclipse.jdt.core
bundle.

Fixes eclipse-pde/eclipse.pde#419
iloveeclipse added a commit to iloveeclipse/eclipse.jdt.core that referenced this issue Dec 6, 2022
See README.md why the JDTCompilerAdapter classloading is not trivial.

TL;DR: OSGI classloader from org.eclipse.jdt.core bundle should not find
JDTCompilerAdapter class (!) so the ant started from Eclipse can find it
inside jdtCompilerAdapter.jar contributed by ... org.eclipse.jdt.core
bundle.

Fixes eclipse-pde/eclipse.pde#419
iloveeclipse added a commit to eclipse-jdt/eclipse.jdt.core that referenced this issue Dec 6, 2022
See README.md why the JDTCompilerAdapter classloading is not trivial.

TL;DR: OSGI classloader from org.eclipse.jdt.core bundle should not find
JDTCompilerAdapter class (!) so the ant started from Eclipse can find it
inside jdtCompilerAdapter.jar contributed by ... org.eclipse.jdt.core
bundle.

Fixes eclipse-pde/eclipse.pde#419
@iloveeclipse iloveeclipse self-assigned this Dec 6, 2022
@iloveeclipse iloveeclipse added this to the 4.27 M1 milestone Dec 6, 2022
@iloveeclipse iloveeclipse added the regression Regression defect label Dec 6, 2022
@iloveeclipse
Copy link
Member Author

iloveeclipse added a commit to eclipse-jdt/eclipse.jdt.core that referenced this issue Dec 7, 2022
Add moved classes located now in org.eclipse.jdt.core.compiler.batch to
the jdtCompilerAdapter.jar used by pde.build & Ant (see
org.eclipse.ant.internal.ui.datatransfer.BuildFileCreator).

See
eclipse-pde/eclipse.pde#419
#181
iloveeclipse added a commit to eclipse-jdt/eclipse.jdt.core that referenced this issue Dec 7, 2022
Add moved classes located now in org.eclipse.jdt.core.compiler.batch to
the jdtCompilerAdapter.jar used by pde.build & Ant (see
org.eclipse.ant.internal.ui.datatransfer.BuildFileCreator).

See
eclipse-pde/eclipse.pde#419
#181
iloveeclipse added a commit to eclipse-jdt/eclipse.jdt.core that referenced this issue Dec 7, 2022
See README.md why the JDTCompilerAdapter classloading is not trivial.

TL;DR: OSGI classloader from org.eclipse.jdt.core bundle should not find
JDTCompilerAdapter class (!) so the ant started from Eclipse can find it
inside jdtCompilerAdapter.jar contributed by ... org.eclipse.jdt.core
bundle.

Fixes eclipse-pde/eclipse.pde#419
robstryker pushed a commit to robstryker/eclipse.jdt.core that referenced this issue Jul 18, 2024
…t#181)

Add moved classes located now in org.eclipse.jdt.core.compiler.batch to
the jdtCompilerAdapter.jar used by pde.build & Ant (see
org.eclipse.ant.internal.ui.datatransfer.BuildFileCreator).

See
eclipse-pde/eclipse.pde#419
eclipse-jdt#181
robstryker pushed a commit to robstryker/eclipse.jdt.core that referenced this issue Jul 18, 2024
…ipse-jdt#181)

Add moved classes located now in org.eclipse.jdt.core.compiler.batch to
the jdtCompilerAdapter.jar used by pde.build & Ant (see
org.eclipse.ant.internal.ui.datatransfer.BuildFileCreator).

See
eclipse-pde/eclipse.pde#419
eclipse-jdt#181
robstryker pushed a commit to robstryker/eclipse.jdt.core that referenced this issue Jul 18, 2024
See README.md why the JDTCompilerAdapter classloading is not trivial.

TL;DR: OSGI classloader from org.eclipse.jdt.core bundle should not find
JDTCompilerAdapter class (!) so the ant started from Eclipse can find it
inside jdtCompilerAdapter.jar contributed by ... org.eclipse.jdt.core
bundle.

Fixes eclipse-pde/eclipse.pde#419
robstryker pushed a commit to robstryker/eclipse.jdt.core that referenced this issue Jul 18, 2024
…t#181)

Add moved classes located now in org.eclipse.jdt.core.compiler.batch to
the jdtCompilerAdapter.jar used by pde.build & Ant (see
org.eclipse.ant.internal.ui.datatransfer.BuildFileCreator).

See
eclipse-pde/eclipse.pde#419
eclipse-jdt#181
robstryker pushed a commit to robstryker/eclipse.jdt.core that referenced this issue Jul 18, 2024
…ipse-jdt#181)

Add moved classes located now in org.eclipse.jdt.core.compiler.batch to
the jdtCompilerAdapter.jar used by pde.build & Ant (see
org.eclipse.ant.internal.ui.datatransfer.BuildFileCreator).

See
eclipse-pde/eclipse.pde#419
eclipse-jdt#181
robstryker pushed a commit to robstryker/eclipse.jdt.core that referenced this issue Jul 18, 2024
See README.md why the JDTCompilerAdapter classloading is not trivial.

TL;DR: OSGI classloader from org.eclipse.jdt.core bundle should not find
JDTCompilerAdapter class (!) so the ant started from Eclipse can find it
inside jdtCompilerAdapter.jar contributed by ... org.eclipse.jdt.core
bundle.

Fixes eclipse-pde/eclipse.pde#419
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants