Errors starting out [message #1841629] |
Mon, 24 May 2021 01:25  |
Eclipse User |
|
|
|
I started a Dynamic Web Project using Java EE Perspective. I get the following errors, please see image attached.
|
|
|
Re: Errors starting out [message #1841630 is a reply to message #1841629] |
Mon, 24 May 2021 02:44   |
Eclipse User |
|
|
|
You've collapsed all of the type categories in the Problems view, hiding the actual error descriptions. For one, though, it looks like your project doesn't
have a JRE on its Java Build Path.
|
|
|
Re: Errors starting out [message #1841631 is a reply to message #1841630] |
Mon, 24 May 2021 03:42   |
Eclipse User |
|
|
|
thank you, I was able to fix one of the errors in the original xml by adding tomcat to the build path but I still have the following errors showed in the screen shot.
|
|
|
Re: Errors starting out [message #1841675 is a reply to message #1841631] |
Tue, 25 May 2021 13:44   |
Eclipse User |
|
|
|
Again, the contents of your Problems view are collapsed, so there's no way to read the messages in there. Those messages are there to help you fix problems
before you launch the Tomcat server, and indicate reasons why things would misbehave if you launched the server anyway. This is going to be a very long
and slow to progress thread if you keep ignoring them.
The dialog you are showing shows that you don't have a Java 16 JRE correctly set up in your Installed JREs preference page. Go do that first. Then open the
project's Properties dialog (select the project and either right-click or use the Project menu in the menu bar), go to the Project Facets page,
and make sure the version of the Java facet matches a version from the Installed JREs preference page that you want to use, whether it's 16 or not.
Also, the contents of the WEB-INF folder are not directly retrievable by a web client. You'd store secure properties and configuration data in there. The web.xml
is not a valid file for testing the app from a client.
|
|
|
Re: Errors starting out [message #1841730 is a reply to message #1841675] |
Thu, 27 May 2021 03:44   |
Eclipse User |
|
|
|
Ok , thank you for your response.
As far as the Web-inf this is the default from Eclipse, it is supposed to work and compile. It is marked as the Deploy Path.
I still have 4 errors and not sure how to address them. I added JRE 16 to the build path. I find it frustrating since I recently installed Java 8 and not clear why Java 8 is necessary and Java 16 but I also reinstalled Eclipse after since it threw an exception. One is perhaps the runtime environment and the other is the development kit?
I took a bunch of screen shots.
so hopefully this can help you be able to give me an indication of how to get started...
|
|
|
|
Re: Errors starting out [message #1841759 is a reply to message #1841731] |
Thu, 27 May 2021 22:40   |
Eclipse User |
|
|
|
is the eclipse out of date? like as if I am using Wordpress to make a website but upgrade to php 8.0? is it something like that?
are people still using the Dynamic Web Project?
|
|
|
Re: Errors starting out [message #1841764 is a reply to message #1841759] |
Fri, 28 May 2021 03:08   |
Eclipse User |
|
|
|
I'm unclear on what lead you to the conclusion that Java 8 was necessary, but installing a Java runtime onto your machine doesn't
automatically tell Eclipse about it. You need to add them on the Installed JREs preference page. Your project can refer to almost
any runtime version in the abstract, but Eclipse won't know any concrete class libraries to build against until you put what's needed onto
the Installed JREs preference page. The version of Java that's included in many downloads is sufficient to run Eclipse, but it
might not be enough to actually develop Java things against. And if you're developing in Java, always use a JDK.
For the first image, it's a matter of "jaxrs" being flagged by the Spell Checking. You can use Ctrl+1 with the cursor
in the word to remedy that message, or pursue other options through the Spelling preference page.
For the second image, I'm guessing it's the same as https://github.com/eclipse/lemminx/issues/1042 (LemminX being a Language
Server). The Dynamic Web Project is still the project type to use for Java-based web apps, and it doesn't tend to start you out with
a web.xml file that wouldn't pass basic XML validation.
The third image shows the message "Java compiler does not match the version of the installed Java project facet" , related to the
Project Facets property page shown elsewhere in the Properties dialog. The Facets indicate what features your project contains
and helps make sure you are deploying to a runtime that can support all of that. As I understand it (which could be wrong), changing
the Java facet version sets the project to try and build against that version of the JRE (pulled from what's in your Installed JREs
preference page) as well as sets the Compiler settings for the project to use that version of the language. I've not been the biggest
fan of tying these together, for multiple reasons of late, but the message is telling you that the value on the Project Facets property
page isn't the value set on your compiler settings. You can reconcile the discrepancy using either the Project Facets or Java
Compiler property page in the dialog you're showing.
I'm not sure what the fourth image is supposed to show, but I did change up the default paths in 2021-03 to make it easier to migrate
the project to use headless build systems later on. If you want the previous values, you just need to fill them in in the wizard that
creates the project. The new values aren't wrong, they're just different from the old values.
|
|
|
Re: Errors starting out [message #1841839 is a reply to message #1841764] |
Tue, 01 June 2021 03:27   |
Eclipse User |
|
|
|
Thank you,
The reason I installed Java 8 JRE is because I realized I had a JDK installed but not necessarily a Java runtime edition and you said the following "The dialog you are showing shows that you don't have a Java 16 JRE correctly set up in your Installed JREs preference page. Go do that first. Then open the"
I seem to have figured something out with your help. thanks... do I need Java 8 JRE for anything?
there is a minor issue with build path but I will see if I can resolve it.
[Updated on: Tue, 01 June 2021 03:37] by Moderator Report message to a moderator
|
|
|
|
Re: Errors starting out [message #1841869 is a reply to message #1841868] |
Tue, 01 June 2021 14:49   |
Eclipse User |
|
|
|
I got rid of the errors but I still don't have the Tomcat at the source target... should I create a new case? basically I want that Tomcat executes the index.jsp to start this off...
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09784 seconds