Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Errors in Eclipse but not Netbeans exact same project(Errors in jsp file)
Errors in Eclipse but not Netbeans exact same project [message #1842989] Thu, 08 July 2021 19:31 Go to next message
Jim Whitaker is currently offline Jim WhitakerFriend
Messages: 26
Registered: October 2020
Junior Member
I have one project in eclipse, and same exact project in netbeans (I sync / mirror).

I have several errors in eclipse like:

javax.servlet cannot be resolved to a type

Multiple annotations found at this line:
	- javax.servlet cannot be resolved 
	 to a type


And happening in this code segment:
        <c:set var="surl" value="${pageContext.request.requestURL}" />

        <c:choose>
            <c:when test="${pageContext.request.queryString != null}">
                <c:set var="squy" value="${pageContext.request.queryString}" />
            </c:when>
            <c:otherwise>
                <c:set var="squy" value="t1=${t11}&page=${pageno}" />
            </c:otherwise>
        </c:choose>


        <%--<c:set var="squy" value="${pageContext.request.queryString}" />--%>
        <c:set var="sqm" value="?" />
        <%--${surl}${sqm}${squy}--%>
        <c:set var="surl2" value='${surl}${sqm}${squy}' />
        <%--${surl2}--%>
        <c:set var="sessvar" value="${surl2}" scope="session" />


But the project runs fine, no build errors, etc. I have in the lib folder:
jakarta.activation-2.0.0.jar
jakarta.el-api-4.0.0.jar
jakarta.servlet.jsp.jstl-2.0.0.jar
jakarta.servlet.jsp.jstl-api-2.0.0.jar
jakarta.servlet-api-5.0.0-M1.jar
jakarta.xml.bind-api-3.0.0.jar


Am I missing some? If so I have no idea where to get them.

And in the pom I have:
				<dependency>
					<groupId>org.glassfish.web</groupId>
					<artifactId>jakarta.servlet.jsp.jstl</artifactId>
					<version>2.0.0</version>
				</dependency>


That came from a stackoverflow post. I am using tomee however. Is there something I need that I am unaware of. And this is a jakarta ee 9 project.

Using the following: io.github.hantsy maven-archetype-jakartaee9

All runs and builds are fine. Any help appreciated.

Also those jstl's I included I got from a github page, I cannot find any instructions on downloading jstl libraries from any jakarta site that's needed with examples.

To add please see this issue:

https://github.com/eclipse-ee4j/jstl-api/issues/54

I am in the same situation, I am having to hunt for what I can find using Google. I cannot find any tutorials or examples of how to install the jstl tags or what jars I need or even where they go.

Project works, but I'd still like to setup fully correctly.

[Updated on: Fri, 09 July 2021 00:43]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1843002 is a reply to message #1842989] Sat, 10 July 2021 04:19 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Jakarta EE 9 uses new "jakarta" package names, not "javax", so you wouldn't have javax.servlet in the IDE if you're using it. Of course,
without knowing which version of Eclipse this is, what server you're using, or which files indicate a problem finding javax.servlet, there's
no way to know if not finding it is actually a problem or not.


_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Sat, 10 July 2021 04:21]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1843008 is a reply to message #1843002] Sat, 10 July 2021 17:22 Go to previous messageGo to next message
Jim Whitaker is currently offline Jim WhitakerFriend
Messages: 26
Registered: October 2020
Junior Member
Nitin DahyabhaiFriend Thanks for answering. Eclipse Version: 2021-06 (4.20.0). A jakarta ee 9 project. I even took all references out of pom to jstl. I downloaded
jakarta.servlet.jsp.jstl-2.0.0.jar from https://jakarta.ee/specifications/tags/2.0/ placed it in WEB-INF\lib. I even changed preferences to ignore these jstl errors,
but they still show up.

However the project builds fine and runs in server Tomee (apache-tomee-webprofile-9.0.0-M7) perfect. No errors running the project on server.
I think Eclipse must have a bug with jslt. I have this also in the jsp file:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>


No errors show up in bean classes or servlets. Just those on the jsp jstl..
That's why I asked am I missing a jar, or is it a bug in eclipse. Netbeans shows no errors. I even made a war, deployed to Tomee, ran perfect.

[Updated on: Sat, 10 July 2021 17:25]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1843009 is a reply to message #1843008] Sat, 10 July 2021 19:54 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

You're not missing a jar or anything. It's the JSP EL handling happening behind the scenes that's not properly adapted to
the newer package names. Retry it with WTP 3.23M1/2021-09M1.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Errors in Eclipse but not Netbeans exact same project [message #1843010 is a reply to message #1843009] Sat, 10 July 2021 21:41 Go to previous messageGo to next message
Jim Whitaker is currently offline Jim WhitakerFriend
Messages: 26
Registered: October 2020
Junior Member
I tried searching in market place, tried from here https://projects.eclipse.org/projects/webtools/releases/3.23, clicked link to here https://marketplace.eclipse.org/content/eclipse-java-ee-developer-tools-0 then here.
I dragged it over, but only 3.22 shows installed. How do I install the one above.

[Updated on: Sat, 10 July 2021 21:42]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1843011 is a reply to message #1843010] Sat, 10 July 2021 23:09 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Technically it's out on Friday. You could try to install features from https://download.eclipse.org/webtools/downloads/drops/R3.23.0/S-3.23.0.M1-20210710223640/repository/
and force Eclipse to consider the site's contents for updating along the way.

If the messages about javax.servlet also appear in the Problems View, you would need to invoke validation again for them to be cleared up.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Errors in Eclipse but not Netbeans exact same project [message #1843014 is a reply to message #1843011] Sun, 11 July 2021 02:31 Go to previous messageGo to next message
Jim Whitaker is currently offline Jim WhitakerFriend
Messages: 26
Registered: October 2020
Junior Member
Wouldn't install yet, I will wait til it's released. Thanks
Re: Errors in Eclipse but not Netbeans exact same project [message #1843156 is a reply to message #1843014] Fri, 16 July 2021 17:21 Go to previous messageGo to next message
Jim Whitaker is currently offline Jim WhitakerFriend
Messages: 26
Registered: October 2020
Junior Member
I got the WTP 3.23M1/2021-09M1 installed, it took care of most errors, but still get warning like:
A problem was encountered using TagExtraInfo class org.apache.taglibs.standard.tei.ForEachTEI for 'c:forEach'


So I am guessing that it's just an Eclipse problem, the project builds and runs perfect.

[Updated on: Fri, 16 July 2021 17:21]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1843159 is a reply to message #1843156] Fri, 16 July 2021 19:14 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Yes, specifically the known problem in bug 571273. The changes to the parameter and return types under Jakarta EE 9 mean that the translation mechanism behind the editor and validation has to be updated.

_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Fri, 16 July 2021 19:15]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1856209 is a reply to message #1843159] Mon, 28 November 2022 02:35 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
Is this problem fixed? I still have this problem in the latest version of 2022-09 eclipse
Re: Errors in Eclipse but not Netbeans exact same project [message #1856303 is a reply to message #1856209] Thu, 01 December 2022 18:42 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

No, it is not yet fixed.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Errors in Eclipse but not Netbeans exact same project [message #1856308 is a reply to message #1856303] Thu, 01 December 2022 22:31 Go to previous messageGo to next message
NGUENA ZEBS HAUPUR FAUST is currently offline NGUENA ZEBS HAUPUR FAUSTFriend
Messages: 1
Registered: December 2022
Junior Member
Before continuing, I have 2 questions for you:
what version of java are you using? and did you install the Apache tomcat software from the APACHE Foundation??

the version of java must respond to the specificity of Tomcat, that is to say your server.
Re: Errors in Eclipse but not Netbeans exact same project [message #1856698 is a reply to message #1856308] Fri, 23 December 2022 09:03 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
I seem to have similar problems in 2022-12. I don't know whether our problems are the same, because I don't have this problem in 2022-03

Error messages like this
javax.servlet cannot be resolved to a type
The superclass "javax.servlet.http.HttpServlet", determined from the Dynamic Web Module facet version (2.5), was not found on the Java Build Path
javax.servlet cannot be resolved to a type

https://www.eclipse.org/forums/index.php?t=getfile&id=42798&
Re: Errors in Eclipse but not Netbeans exact same project [message #1856912 is a reply to message #1856698] Mon, 09 January 2023 07:51 Go to previous messageGo to next message
Sanjeev Rao is currently offline Sanjeev RaoFriend
Messages: 2
Registered: January 2023
Junior Member
I think the problem is that you are trying to use the JSTL (JSP Standard Tag Library) in your project, but the JSTL jars are not in your classpath, so the classes cannot be found by the compiler.

To fix this, you need to add the JSTL jars to your classpath. You can either add them to the lib folder of your project, or add them to the classpath of your project in your build tool (e.g. Maven or Gradle).

To add the JSTL jars using Maven, you can add the following dependency to your pom.xml file:

<dependency>
  <groupId>jakarta.servlet</groupId>
  <artifactId>jakarta.servlet-api</artifactId>
  <version>5.0.0-M1</version>
</dependency>

<dependency>
  <groupId>jakarta.servlet.jsp</groupId>
  <artifactId>jakarta.servlet.jsp-api</artifactId>
  <version>5.0.0-M1</version>
</dependency>

<dependency>
  <groupId>jakarta.servlet.jsp.jstl</groupId>
  <artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
  <version>2.0.0</version>
</dependency>

<dependency>
  <groupId>org.glassfish.web</groupId>
  <artifactId>jakarta.servlet.jsp.jstl</artifactId>
  <version>2.0.0</version>
</dependency>


Make sure to run mvn clean install after adding these dependencies to your pom.xml file to download and install the jars.

Alternatively, you can download the JSTL jars from a Maven repository and add them to your classpath manually.

Once you have the jars, you can add them to your classpath by placing them in the lib folder of your project, or by adding them as dependencies in your build tool.

I hope this helps! Let me know if you have any more questions.
Re: Errors in Eclipse but not Netbeans exact same project [message #1856923 is a reply to message #1856698] Mon, 09 January 2023 17:01 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Your Dynamic Web facet version is 2.5, meaning you are targeting Servlet 2.5. Was that your intention? You targeted runtime doesn't seem to have the APIs expected from a Servlet 2.5 container.

_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Mon, 09 January 2023 17:36]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1856961 is a reply to message #1856923] Wed, 11 January 2023 06:30 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
How do I set the default version of Dynamic Web? I know that you can choose a version when creating a new project, but I import a maven project (there is no eclipse setting file in this project, and the default version is not set). The default version after import is 2.5, but I need 5.0. I know how to change the dynamic Web of project to 5.0, but how to change the default value so that the default version is 5.0 after the project is imported?Now, I need to manually modify this version after each import
Re: Errors in Eclipse but not Netbeans exact same project [message #1856982 is a reply to message #1856961] Wed, 11 January 2023 16:07 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

I'm not sure. Do the deployment descriptors in it, or anything else, refer to 5.0?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Errors in Eclipse but not Netbeans exact same project [message #1856993 is a reply to message #1856982] Thu, 12 January 2023 05:53 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
project\.settings\org.eclipse.wst.common.project.facet.core.xml
There is such xml in the setting file of the project, where the jst.web records Dynamic Web version 2.5
But this setting file does not exist in my maven project,It is automatically generated after importing eclipse
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <fixed facet="wst.jsdt.web"/>
  <installed facet="java" version="11"/>
  <installed facet="jst.web" version="2.5"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>


[Updated on: Thu, 12 January 2023 05:55]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1857004 is a reply to message #1856993] Thu, 12 January 2023 14:11 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

So nothing there before import? Not the version number in a web.xml file, or 5.0 API dependencies?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Errors in Eclipse but not Netbeans exact same project [message #1857016 is a reply to message #1857004] Fri, 13 January 2023 01:49 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
web.xml look like this
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
    version="6.0">


pom.xml 's dependency
In fact, the jakarta.servlet version is 6.0
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet.jsp</groupId>
            <artifactId>jakarta.servlet.jsp-api</artifactId>
        </dependency>

        <!-- Required only for Tomcat. If run on other J2EE server,
            remove this dependency and use provided tag libraries. -->
        <dependency>
            <groupId>jakarta.servlet.jsp.jstl</groupId>
            <artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>jakarta.servlet.jsp.jstl</artifactId>
            <scope>runtime</scope>
        </dependency>
Re: Errors in Eclipse but not Netbeans exact same project [message #1857060 is a reply to message #1857016] Sun, 15 January 2023 21:29 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Maybe it's a copy/paste mistake, but there are no version numbers in those dependency elements.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Errors in Eclipse but not Netbeans exact same project [message #1857066 is a reply to message #1857060] Mon, 16 January 2023 02:35 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
The version of my web.xml web-app is 6.0
Servlet version is also 6.0
Tomcat used is 10.1

I'm not sure what is the relationship between the three versions of web-app,servlet and dynamic web module
I guess the version of dynamic web module I should use may be 6.0...I don't know whether there is a 6.0 dynamic web module
But I think there seems to be a problem with Eclipse's recognition of the dynamic web module version. When my web.xml version is set to 3.0,4.0 and 2.5, after importing, the dynamic web module can be set to the corresponding version
However, when my web.xml is set to 6.0, after importing the project, the dynamic web module version is set to 2.5...
Is Eclipse 2022-12 not supporting the 6.0 version, resulting in these errors?

Re: Errors in Eclipse but not Netbeans exact same project [message #1857067 is a reply to message #1857066] Mon, 16 January 2023 06:53 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

It's a bit of both. Version 6 hasn't been added as a facet in WTP for 2022-12, and m2e-wtp isn't aware of 6.0, or even 5.0. I'm working
on the WTP side of it, but I can't predict if/when my PR on m2e-wtp will get merged. When both changes are merged and released,
the Maven import will make use of the referenced schema and/or version number in a web.xml if it's present, and the level of Servlet
API that's on the Java Build Path otherwise.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Errors in Eclipse but not Netbeans exact same project [message #1857095 is a reply to message #1857067] Tue, 17 January 2023 01:47 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
In Eclipse 2022 - 12, if I want to use Servlet 6.0, I can only manually change the version of the dynamic web module to 5.0.This is a temporary solution
In addition, even in 2023-03, there may not be 6.0, so we need to wait for the release of WTP
Is my understanding right


Re: Errors in Eclipse but not Netbeans exact same project [message #1857096 is a reply to message #1857095] Tue, 17 January 2023 03:52 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Yes.

This is really disconnected from the question that started this thread.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Errors in Eclipse but not Netbeans exact same project [message #1857097 is a reply to message #1857096] Tue, 17 January 2023 05:41 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
Yes, at first I didn't know that the dynamic web module is related to the servlet version I use
Nitin Dahyabhai Friend, thank you very much
Re: Errors in Eclipse but not Netbeans exact same project [message #1857099 is a reply to message #1857097] Tue, 17 January 2023 08:26 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

The WTP changes will be in M2 on the 26th, and are in the CI builds now. I'm not sure what the build schedule is for me2-wtp, but
those changes were merged into their main branch.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Errors in Eclipse but not Netbeans exact same project [message #1857101 is a reply to message #1857099] Tue, 17 January 2023 09:02 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
Thank you. I will try it when M2 is released
Re: Errors in Eclipse but not Netbeans exact same project [message #1857413 is a reply to message #1857101] Mon, 06 February 2023 02:02 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
Hi Nitin Dahyabhai,M2 has been released. I have tried it. Although the dynamic web module has added version 6.0, it is still recognized as 2.5 when import maven project
I want to know what determines the version when importing project
I want to judge whether it is a problem of project or eclipse
The project is generated through mvn archetype:generate command,It does not contain any eclipse setting information
The version of web.xml is 6.0
jakarta servlet version is 6.0.0,The web.xml and servlet dependency information can be viewed in the above chat record


[Updated on: Mon, 06 February 2023 02:07]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1857417 is a reply to message #1857413] Mon, 06 February 2023 15:44 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Odd. org.eclipse.jst.j2ee.core's org.eclipse.jst.jee.util.internal.JavaEEQuickPeek class should recognize 6.0 if you're referring
to the web-app_6_0.xsd schema or declaring version 6.0 as the version in your web-app element. M2E-WTP uses that class
to read the web.xml (in org.eclipse.m2e.wtp.WarPluginConfiguration), but I thought it would return 4.0 and not 2.5 until the next release
containing the changes supporting 5.0 and 6.0.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Errors in Eclipse but not Netbeans exact same project [message #1857425 is a reply to message #1857417] Tue, 07 February 2023 06:27 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
It seems that an exception was caught when reading the version in WarPluginConfiguration, and the default version 2.5 was returned..
    try {
      IFacetedProject fProject = ProjectFacetsManager.create(project);
      if (fProject != null && fProject.hasProjectFacet(WebFacetUtils.WEB_FACET))
        return fProject.getProjectFacetVersion(WebFacetUtils.WEB_FACET); 
    } catch (Exception e) {
      LOG.warn(NLS.bind(Messages.Error_Reading_Project_Facet, project.getName()), e);
    } 
    return WTPProjectsUtil.DEFAULT_WEB_FACET;

Where is the log of M2E-WTP.. It seems that the log is output, but I can't find it in the error log view or workspace

[Updated on: Tue, 07 February 2023 06:28]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1857426 is a reply to message #1857425] Tue, 07 February 2023 07:35 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Interesting, it's using the slf4j logging, so I'm not sure where it goes either, but
then it shouldn't have gotten that far down unless everything above it, both based
on the web.xml contents and the Maven/Java classpath, failed. You were debugging
this using the master branch of m2e-wtp and WTP from 2023-03 M2? Due
to an oversight, it might not properly update from an existing 2022-12 release.


_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Tue, 07 February 2023 07:41]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1857429 is a reply to message #1857426] Tue, 07 February 2023 09:51 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
Yes, I use eclipse-jee-2023-03-M2.
The version of m2e-wtp used is 1.5.2

I try to debug,It seems that there is no exception, but there is no added support for 6.0. It is recognized that web.xml is not found,
fProject.hasProjectFacet(WebFacetUtils.WEB_FACET) == false,The default 2.5 is returned

The master branch of m2e-wtp has added support for 6.0, but this version has not been integrated in the eclipse-jee-2023-03-M2...
It seems that the latest m2e-wtp has not been released...Will the m3 version be released? Or will it wait until 2023-06?





[Updated on: Tue, 07 February 2023 10:06]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1857438 is a reply to message #1857429] Tue, 07 February 2023 19:26 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

I don't have any insight into when the next release is planned. I've asked. https://github.com/eclipse-m2e/m2e-wtp/pull/20#issuecomment-1419210263

How do I generate the project you're trying this on? I want to make sure I'm not overlooking something that needs doing in WTP.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Errors in Eclipse but not Netbeans exact same project [message #1857442 is a reply to message #1857438] Wed, 08 February 2023 02:00 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
The project I use is still under local development, and Maven dependency is still unavailable
I found a similar one at maven center,Generate by the following command
mvn archetype:generate -B ^
-DarchetypeGroupId=com.apuntesdejava ^
-DarchetypeArtifactId=jakartaee9-essentials ^
-DarchetypeVersion=0.2 ^
-DgroupId=demo ^
-DartifactId=test ^
-Dversion=0.0.1-SNAPSHOT ^
-Dpackage=demo.test

The web.xml version it uses is 5.0, but it also becomes 2.5 after maven import
Re: Errors in Eclipse but not Netbeans exact same project [message #1857529 is a reply to message #1857442] Tue, 14 February 2023 05:12 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
No Message Body

[Updated on: Tue, 14 February 2023 05:30]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1857531 is a reply to message #1857529] Tue, 14 February 2023 05:29 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
Hi Nitin DahyabhaiFriend,
There seems to be no https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd in Eclipse 2023-03 M2
index.php/fa/42929/0/
Web.xml will have errors without network
index.php/fa/42930/0/
I tried to add it manually, but there are still errors
index.php/fa/42931/0/
index.php/fa/42932/0/
Is there anything missing when I manually append...
  • Attachment: xmlerror.png
    (Size: 83.47KB, Downloaded 1975 times)
  • Attachment: xml.png
    (Size: 14.53KB, Downloaded 1968 times)
  • Attachment: addXml.png
    (Size: 18.52KB, Downloaded 1968 times)
  • Attachment: weberror2.png
    (Size: 90.87KB, Downloaded 1972 times)
  • Attachment: web-app_6_0.xsd
    (Size: 12.71KB, Downloaded 109 times)
Re: Errors in Eclipse but not Netbeans exact same project [message #1857842 is a reply to message #1857531] Wed, 01 March 2023 04:15 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

> There seems to be no https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd in Eclipse 2023-03 M2

I've added them all into RC1, but that doesn't leave time to try more for this release if that doesn't solve the problem.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Errors in Eclipse but not Netbeans exact same project [message #1857952 is a reply to message #1857842] Wed, 08 March 2023 07:47 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
I tried RC1
6.0 has been added
Other errors occurred,It seems to be related to jakartaee10
index.php/fa/43003/0/

It is really difficult to migrate from javax to jakarta,I will wait for the next release
Thanks for your help
  • Attachment: web_xml.png
    (Size: 46.76KB, Downloaded 3018 times)

[Updated on: Wed, 08 March 2023 07:48]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1858801 is a reply to message #1857952] Sun, 23 April 2023 06:56 Go to previous messageGo to next message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
hi, Nitin
After trying 2023-03,In addition to the issue with web.xml above, I also discovered a new issue
When the Dynamic Web Module version is 6.0, Eclipse does not consider it a web project,When right-clicking and selecting Run as, there is no Run On Server option
Re: Errors in Eclipse but not Netbeans exact same project [message #1858805 is a reply to message #1858801] Sun, 23 April 2023 22:24 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

It's a known problem further discussed in https://bugs.eclipse.org/bugs/show_bug.cgi?id=581077 , that part of which is addressed in the next release, 2023-06.

_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Fri, 09 June 2023 07:10]

Report message to a moderator

Re: Errors in Eclipse but not Netbeans exact same project [message #1859511 is a reply to message #1858805] Tue, 13 June 2023 06:38 Go to previous message
panda mkk is currently offline panda mkkFriend
Messages: 38
Registered: April 2022
Member
https://www.eclipse.org/forums/index.php?t=getfile&id=43003&
This issue still exists in Eclipse 2023-06
When using Servlet 6.0/Jakarta EE 10 and without a network, web.xml may have errors:

Referenced file contains errors (jar:file:/D:/eclipse-jee-2023-06-RC1-win32-x86_64/eclipse/plugins/org.eclipse.jst.standard.schemas_1.2.500.v202302261818.jar!/dtdsAndSchemas/jakartaee_10.xsd).

The display in 「Show Details」 is as follows
schema_reference.4:Failed to read schema document "https://www.w3.org/2001/xml.xsd",because 1) cloud not find the document;
2) the document cloud not be read; 3) the root element of the document is not <xsd:schema>.
src-resolve:Cannot resolve the name 'xml:lang' to a(n) 'attribute declaration' component.


[Updated on: Tue, 13 June 2023 06:38]

Report message to a moderator

Previous Topic:Checksum does not match
Next Topic:Place cursor in console without having to click there
Goto Forum:
  


Current Time: Thu Mar 28 14:27:32 GMT 2024

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

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

Back to the top