Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Application runs fine in eclipse, but compilation problem after export
Application runs fine in eclipse, but compilation problem after export [message #1857553] Wed, 15 February 2023 01:11 Go to next message
Shay Carter is currently offline Shay CarterFriend
Messages: 3
Registered: February 2023
Junior Member
I have an extensive java plugin/feature project that I have previously been able to export using the built in Eclipse export, and build an installer for MacOS (using Eclipse 4.6.3) and Java8.

Now I am trying to run a new version of the source code, on version 4.17.10 of Eclipse and Java11. It compiles and runs fine when running from within Eclipse.

However when I export the .product file, and then build using the previous method from before, I get what looks like all the necessary files in the .App directory, however shortly after starting the program (the splashscreen appears, and the initial configuration appears), the program crashes with an error instantiating the workbench, and this printed out in the console:

java.lang.Error: Unresolved compilation problem: 

	at com.raytheon.uf.viz.ui.menus.DiscoverMenuContributions.discoverContributions(DiscoverMenuContributions.java:137)
	at com.raytheon.uf.viz.personalities.cave.workbench.VizWorkbenchAdvisor.createDynamicMenus(VizWorkbenchAdvisor.java:315)
	at com.raytheon.viz.ui.personalities.awips.AWIPSWorkbenchAdvisor.createDynamicMenus(AWIPSWorkbenchAdvisor.java:178)
	at com.raytheon.uf.viz.personalities.cave.workbench.VizWorkbenchAdvisor.createWorkbenchWindowAdvisor(VizWorkbenchAdvisor.java:238)
	at org.eclipse.ui.internal.WorkbenchWindow.getWindowAdvisor(WorkbenchWindow.java:2702)
	at org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpening(WorkbenchWindow.java:1776)
	at org.eclipse.ui.internal.WorkbenchWindow.setup(WorkbenchWindow.java:815)
	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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:999)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:140)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:96)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.inject(ContextInjectionFactory.java:83)
	at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1469)
	at org.eclipse.ui.internal.StandardTrim.createStatusLine(StandardTrim.java:119)
	at org.eclipse.ui.internal.StandardTrim.createWidget(StandardTrim.java:48)
	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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:999)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:140)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:405)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:346)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:227)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:94)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:37)
	at org.eclipse.e4.ui.workbench.renderers.swt.ToolControlRenderer.createWidget(ToolControlRenderer.java:129)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:999)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:659)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:765)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:736)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:730)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:714)
	at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:71)
	at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarRenderer.processContents(TrimBarRenderer.java:109)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:673)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$1.run(PartRenderingEngine.java:544)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:528)
	at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.processContents(WBWRenderer.java:689)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:673)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:765)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:736)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:730)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:714)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1083)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:153)
	at com.raytheon.uf.viz.personalities.cave.component.CAVEApplication.startComponent(CAVEApplication.java:178)
	at com.raytheon.uf.viz.application.VizApplication.start(VizApplication.java:102)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	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.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)


I have tried cleaning and rebuilding the project many times before exporting, to no avail.
Re: Application runs fine in eclipse, but compilation problem after export [message #1857554 is a reply to message #1857553] Wed, 15 February 2023 01:59 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Eclipse can generate a .class file even when the sources have broken statements. So what does the IDE say about com.raytheon.uf.viz.ui.menus.DiscoverMenuContributions.java line 137?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Application runs fine in eclipse, but compilation problem after export [message #1857581 is a reply to message #1857554] Wed, 15 February 2023 21:04 Go to previous messageGo to next message
Shay Carter is currently offline Shay CarterFriend
Messages: 3
Registered: February 2023
Junior Member
There are absolutely no compile errors in eclipse.

And that line specifically, is just the definition of a method:

137    public static void discoverContributions() {
138        discoverContributions("menus");
139    }


My other hesitancy is the extra new line between the "java.lang.Error: Unresolved compilation problem:" and the first line that specifies the DiscoverMenuContributions file... I've seen other instances (online) of the compilation problem error, and usually the line following it has slightly more information about what the exact error, but not in my case. I'm wondering if that message is being caught somewhere and not printed out, which is also making this harder to debug...

[Updated on: Wed, 15 February 2023 21:09]

Report message to a moderator

Re: Application runs fine in eclipse, but compilation problem after export [message #1860374 is a reply to message #1857553] Wed, 02 August 2023 04:05 Go to previous messageGo to next message
Jonathan Masters is currently offline Jonathan MastersFriend
Messages: 2
Registered: July 2019
Junior Member
The answers to this original question do not address the simple query: Why is there a difference between the IDE created class file and the one that it exports.

I have been grappling with this on a large project for over three months and have found no answer.

To help with the OP, I suggest that you look into the @dot.log files in the logs.zip in your exported product. The exact cause of the error will be reported there. I suspect as you have moved from Java 8 to Java 11, that a library is providing a class that is now in the standard library and the modulepath and classpath clash: This clash is now enforced as an error. Im sure however there can be other reasons in your move upwards in the Java revision space.
Re: Application runs fine in eclipse, but compilation problem after export [message #1860592 is a reply to message #1860374] Fri, 18 August 2023 20:15 Go to previous message
Shay Carter is currently offline Shay CarterFriend
Messages: 3
Registered: February 2023
Junior Member
What you suggested is exactly what I had to do.

I was mistakenly overlooking those log files and had the exact issue you were alluding to. In previous versions of java (before 11) this "clash" was not enforced as a compilation issue, but it is now. So I had to un-jar some of the imports, remove the duplicate packages, re-jar them, and then export from eclipse.

I also had to explicitly specify java11 compliance for over 300+ plugins.

Thank you for providing the correct answer! I should have updated this post a while ago when we finally figured it out.

[Updated on: Fri, 18 August 2023 20:17]

Report message to a moderator

Previous Topic:Trying to UNinstall Mylyn Git integration, get strange error
Next Topic:Multiple makefile errors only in Eclipse
Goto Forum:
  


Current Time: Sat Apr 27 22:57:32 GMT 2024

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

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

Back to the top