Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Unable to create Eclipse RCP Application(IDE generated projects always fail to build)
Unable to create Eclipse RCP Application [message #1851263] Fri, 01 April 2022 04:37 Go to next message
Rob M is currently offline Rob MFriend
Messages: 11
Registered: July 2009
Junior Member
When I use the Eclipse IDE to create an empty Eclipse RCP application, I get the following error when I run:

javax.xml.bind
Missing Constraint: Import-Package: javax.xml.stream; version="0.0.0"

The IDE does not seem to offer any suggestions for fixing this.

I'm running Eclipse 2022-03 (4.23.0) under MacOS Monterey 12.3 with
JDK-17 (Amazon Corretto 17.0.2).

I've tried changing the JDK version but this has no effect.

Steps to recreate: (following a tutorial at o7planning)

- File > New > Other...​
- Select a wizard
- Plug-in Development > Plug-in Project
- Press Next
- Plug-in Project
- For Project Name, choose something like
HelloWorld
or
com.softmore.genity
- Target Platform: Eclipse
- Press Next
- Content
- Generate an activator, a Java class that controls the plug-in's life cycle?: Yes
Project (Running on the Web).
- Would you like to create a rich client application?: Yes
- Press Next
- Templates
- Available Templates: Eclipse RCP application
- Press Next
- Basic Eclipse 4 Application
- Java package name: org.o7planning.tutorial.rcp
- Add life cycle class: "Yes"
- Click Finish

Using a different

At this point, I'm unable to build any RCP applications with Eclipse.
Re: Unable to create Eclipse RCP Application [message #1851290 is a reply to message #1851263] Fri, 01 April 2022 14:04 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
That package should be present in both Java 11 and Java 17. Have you tried using it in some code in one of your bundles? E.g., if you use Ctrl-Shift-T can you open javax.xml.stream.StreamFilter?

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unable to create Eclipse RCP Application [message #1851296 is a reply to message #1851290] Fri, 01 April 2022 16:42 Go to previous messageGo to next message
Rob M is currently offline Rob MFriend
Messages: 11
Registered: July 2009
Junior Member
Thanks. I've by now tried, I think, about 20 or 30 different combinations of JDK, Eclipse versions, and tutorials. I haven't yet found a combination that runs any RCP application. There are bugs in every configuration, but the nature of the bugs varies depending on the configuration.

The built in tutorial in the Welcome screen of Eclipse has an RCP application tutorial that asks you to use a 3.x RCP application. If I'm not mistaken, 3.x was superseded 10 years ago by the e4 platform.

All of the configurations I've tried so far have used Eclipse "R" versions from 2021 and 2022. Do these releases still support RCP? Should I go back further? Would it be advisable to obtain a copy of Eclipse from, say, 2012 or so, when RCP was still more of a current technology?

At this point, I'm wondering the following
1. Is RCP is still supported?
2. Is MacOS fully supported?
3. What would be the most conservative combination of Eclipse version, JDK, and OS possible, to maximize the chances that applications build?
Re: Unable to create Eclipse RCP Application [message #1851309 is a reply to message #1851296] Fri, 01 April 2022 20:29 Go to previous messageGo to next message
Rob M is currently offline Rob MFriend
Messages: 11
Registered: July 2009
Junior Member
Also, my preferred IDE is just plain Emacs, and/or IntelliJ Idea, which is what everyone I know uses.

If it's possible, I'd very much prefer to develop the Eclipse RCP application without having to use Eclipse itself. Say, using just Emacs, or Emacs + IntelliJ.

Does anyone here have experience doing that? Would that just be asking for more trouble? Is it even possible?
Re: Unable to create Eclipse RCP Application [message #1851317 is a reply to message #1851309] Sat, 02 April 2022 08:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
I followed your steps and I see what you mean. I opened this issue to report the problem.

https://github.com/eclipse-pde/eclipse.pde.ui/issues/2

Note however, that you can continue the launch despite the message and for me the application does launch.

Note that by default you will launch with everything in the workspace and everything in the target platform so for me when I launched there were a bunch of errors being logged.

Via the plugins tab you can pick specific plugins to launch. So I choose that option, deselected all the plugins, selected just my RCP plugin, and that clicked Add Required Plugins. You can see this validates okay. Also note the checkbox "Validate plugins automatically..." It's possible to disable that if there are bogus complaints about missing things. You can see here too that the application has launched and nothing has been logged in the console.

index.php/fa/41849/0/
  • Attachment: RCP.png
    (Size: 674.01KB, Downloaded 1454 times)


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unable to create Eclipse RCP Application [message #1851348 is a reply to message #1851317] Sun, 03 April 2022 19:23 Go to previous messageGo to next message
Rob M is currently offline Rob MFriend
Messages: 11
Registered: July 2009
Junior Member
Thank you! Without your graphic, it would have taken me forever to find these configurations.

After applying your suggestions, the dependency error disappears. However, the application still won't run. Now I'm getting an XML validation error.
In the Problems pane, it says:
No grammar constraints (DTD or XML Schema).
applying to the product artifact.

Re: Unable to create Eclipse RCP Application [message #1851351 is a reply to message #1851348] Sun, 03 April 2022 21:24 Go to previous messageGo to next message
Rob M is currently offline Rob MFriend
Messages: 11
Registered: July 2009
Junior Member
Let me return again to a broader question. I feel like I might be barking up the wrong tree.

What would be the best alternative to Eclipse RCP, but using current, well supported technologies?

A component platform similar in purpose to RCP, but which is still actively supported, and for which there are working tools, would be ideal.
Re: Unable to create Eclipse RCP Application [message #1851355 is a reply to message #1851351] Mon, 04 April 2022 04:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Of course it's quite common to have an xml file for which there is not a known DTD or XML Schema, but the Language Server extensions insist on producing markers related to such things, which are especially annoying when you open a plugin.xml in the Plug-in Manifest Editor where you really do not need to be reminded that a plugin.xml doesn't have a DTD or XML Schema. The informational marker should appear only while the editor is open. You can turn it off via Window -> Preferences -> Language Servers and disable the XML Language Server for XMLContent Type. Unfortunately you can't control specific types of problem markers. The Windows -> Preferences -> XML -> XML Files -> Validation might also kick in and complain about things...

RCP is very broadly used and broadly adopted. I don't know that there are any other good alternatives. This would be one alternative if you're looking for a cloud-based result rather than a native desktop result:

https://theia-ide.org/

Regardless of what you choose, you should expect to invest a significant amount of time learning, and that's always a frustrating hill to climb...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unable to create Eclipse RCP Application [message #1851358 is a reply to message #1851351] Mon, 04 April 2022 05:10 Go to previous messageGo to next message
Rob M is currently offline Rob MFriend
Messages: 11
Registered: July 2009
Junior Member
UPDATE:

I've decided to try to find a combination of Eclipse version, OS, JDK, and documentation, that work together to reliably compile RCP applications.

I'm focusing on Eclipse version 4.4 (Luna) because there's a book by Lars Vogel on Eclipse RCP that uses that version. Since the book was never
updated, I suspect Eclipse 4.4 might be the high water mark for Eclipse RCP stability.

Unfortunately, Luna crashes on startup under MacOS Monterey with an error message "An error has occurred. See the log file null." As the message suggests, no log appears to have been written.

I've also so far tried the 7 releases nearest Luna. Six of them crash on startup. One has missing files.
I have yet to try versions of Eclipse before 2011 and between 2018 and 2019.

Eclipse 4.7 (Oxygen) crashes at startup like the others, but at least gets as far as writing a log file. It contains:
java.lang.NullPointerException: Cannot invoke "org.eclipse.swt.internal.cocoa.NSGraphicsContext.graphicsPort()" because "graphicsContext" is null
at org.eclipse.swt.widgets.Control.internal_new_GC(Control.java:2176)
at org.eclipse.swt.graphics.GC.<init>(GC.java:174)
at org.eclipse.swt.graphics.GC.<init>(GC.java:135)
at org.eclipse.jface.dialogs.Dialog.initializeDialogUnits(Dialog.java:934)
at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:142)
...

I can't easily test Eclipse on older versions of MacOS. But if I knew it worked, I'd figure something out. I'm also willing to run Windows or Linux.

So, I'm still in the boat that I haven't yet found any configuration of Eclipse that works.

I will continue to try combinations of operating system, Eclipse version, and JDK, until I either find something that works, or
I get a good suggestion for a better technology. Like everyone else, I'm going to move to the web eventually, but I was hoping
to start with desktop Java initially. However, if I have to fight every step of the way, I'll skip the desktop.

It would really help me if someone knows an OS
Re: Unable to create Eclipse RCP Application [message #1851359 is a reply to message #1851358] Mon, 04 April 2022 05:40 Go to previous messageGo to next message
Rob M is currently offline Rob MFriend
Messages: 11
Registered: July 2009
Junior Member
Thanks again for the advice about the XML validation. I turned off Language Server support for XML as you suggested. (Perhaps if I generated a DTD for the file types, it might also work?)

I'm getting closer, but still no launch. When I run the application, I now get no error message, nothing appears in the problems pane, but it just doesn't seem to launch.

Theia looks very interesting from the viewpoint of removing configuration issues. But I'm not ready for cloud deployment yet.
Re: Unable to create Eclipse RCP Application [message #1851367 is a reply to message #1851359] Mon, 04 April 2022 08:20 Go to previous messageGo to next message
Rob M is currently offline Rob MFriend
Messages: 11
Registered: July 2009
Junior Member
UPDATE:

I've tried on a second MacOS system running Catalina. I've tried every version of Eclipse going back to 2012, with JDK 8 and JDK 17.
Some of the error messages are different, but in no case can Eclipse compile even a Hello World RCP application.

I was considering trying an older Mac, a Windows 10 machine, and an Ubuntu Linux machine tomorrow. However, in view the remarkable
consistency of failures on Mac so far, I have lost confidence that RCP is a viable platform.

If there is a combination of Eclipse version, OS version, and JDK version, that you know for certain to be capable of compiling a Hello World
application, I will continue trying.

Otherwise, thank you for the help you gave me. In the meantime, I will be exploring other options.
Re: Unable to create Eclipse RCP Application [message #1851369 is a reply to message #1851359] Mon, 04 April 2022 08:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Only the current release is "supported" and only by virtue of there being a new current release every 3 months. If you're on a mac, old versions won't work on a new macos. The latest Eclipse and RCP applications based on it work well on all the current OSes running Java 11 or 17.

I can only help with a problem if I can reproduce it or you describe it in sufficient detail. So you get "an error message", but I cannot guess what it might be.

In this forum, if you click Preview Quick Reply you can use "Upload File" to attach pictures.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unable to create Eclipse RCP Application [message #1851389 is a reply to message #1851369] Mon, 04 April 2022 16:04 Go to previous messageGo to next message
Rob M is currently offline Rob MFriend
Messages: 11
Registered: July 2009
Junior Member
I'm not sure what you mean by "work well". Using a current Mac with the current release of Eclipse with JDK 17 (or any other JDK I've tried) using the default settings
for a Hello World RCP application, results in the errors I've already described. I've so far been unable to resolve some of the errors, but not to get the Hello World
application to launch. This is not what I mean by "working".

Since old versions of the Eclipse IDE won't even start on relatively recent Mac computers, for seemingly trivial reasons, like being unable to find the graphicsContext,
I suppose it might be pointless to develop using old versions of the RCP platform. But it's thrown everything into confusion and doubt.

There is of course a difference between "supported" and "working". Ideally, I'd like both. Currently, I have a "supported" system, but not working. If I have to choose,
I'll take "working" but "not supported".

I suppose if I keep working at it, I might learn enough to work around the IDE's ... misbehavior. If there's anyone else still trying to do RCP application
development (for e4), I assume that must be what they are doing. That is an option to consider, but combined with what I personally find to be a
baroque and awkward UX of the Eclipse IDE, it's a depressing prospect.

Since the app won't launch and the Problems pane shows no problem, I don't think a screen shot would be helpful.

(By the way, the posts in this forum don't seem to have a responsive web design, and I don't have horizontal scrolling or it's
awkward to read what's past about 150 characters per line.)
Re: Unable to create Eclipse RCP Application [message #1851401 is a reply to message #1851389] Tue, 05 April 2022 06:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
I showed you in my screen capture that it's working and launched without errors, i.e, . the underlined Empty E4 Application window in my screen capture. Yes it is pointless to develop against old versions of the frame using old versions of the tools.

If something isn't working for you, then I can only help if you share sufficient detail to help me understand. If the launched window doesn't come up when you launch the product, there must be something in the console indicating a failure... See the red button on the Console view in my screen capture; that being red indicates the process is running and clicking it would terminate the process..

Yes, the forum's UI is far less than ideal.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unable to create Eclipse RCP Application [message #1851409 is a reply to message #1851401] Tue, 05 April 2022 07:37 Go to previous messageGo to next message
Rob M is currently offline Rob MFriend
Messages: 11
Registered: July 2009
Junior Member
Success!

After trying countless variations on different computers, wiping my installation clean after each attempt, and reinstalling, I returned to the latest version of Eclipse. The
first thing I did was turn off Language Server support for XML. Then, followed the same steps again. Mysteriously, it launched this time. No errors. No dependency problems.

Thank you for your help. I hope I can finally start being productive now.
Re: Unable to create Eclipse RCP Application [message #1855615 is a reply to message #1851358] Sun, 23 October 2022 15:04 Go to previous messageGo to next message
Larry Edwards is currently offline Larry EdwardsFriend
Messages: 4
Registered: December 2016
Junior Member
Rob M wrote on Mon, 04 April 2022 05:10

[...]
Eclipse 4.7 (Oxygen) crashes at startup like the others, but at least gets as far as writing a log file. It contains:
java.lang.NullPointerException: Cannot invoke "org.eclipse.swt.internal.cocoa.NSGraphicsContext.graphicsPort()" because "graphicsContext" is null
at org.eclipse.swt.widgets.Control.internal_new_GC(Control.java:2176)
at org.eclipse.swt.graphics.GC.<init>(GC.java:174)
at org.eclipse.swt.graphics.GC.<init>(GC.java:135)
at org.eclipse.jface.dialogs.Dialog.initializeDialogUnits(Dialog.java:934)
at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:142)
...
[...]


Yes! We ran into this GC bug too (or at least one very similar)... It started happening with one version of macOS. I think Catalina. Couldn't find anything online about this issue, so thought it was a problem in our software. Spent significant time trying to debug it with no luck. If I recall we, ended up catching the error to allow things to continue, and the application would run albeit with some GUI glitches. Then it magically went away when we updated macOS (I think Big Sur). This was all with the same version of Eclipse RCP.
Re: Unable to create Eclipse RCP Application [message #1855683 is a reply to message #1855615] Wed, 26 October 2022 17:32 Go to previous message
Robbert Max is currently offline Robbert MaxFriend
Messages: 1
Registered: October 2022
Location: United States
Junior Member
Thank you soo much guys... I resolved my issue by just reading all your replies :) These coversation is very helpful for begginers.

Go To Getintopc for your needs.
Previous Topic:Eclipse tar.gz does not want to decompress
Next Topic:Eclipse IDE for Java pointing the wrong version of java
Goto Forum:
  


Current Time: Sun Dec 22 06:09:39 GMT 2024

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

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

Back to the top