Fórumok

Web.xml errors in non-Liferay project

Chris Dailey, módosítva 9 év-val korábban

Web.xml errors in non-Liferay project

Junior Member Bejegyzések: 30 Csatlakozás dátuma: 2014.11.24. Legújabb bejegyzések
I have a workspace in Eclipse that has both a Liferay CE Server and a standalone Tomcat Server (which contains some JAX-WS web services).

Since I installed the Liferay IDE module into Tomcat, I am getting validation errors in the web.xml for the non-Liferay web application.

I've gone through the Eclipse project options and couldn't find a place to turn them off. The question therefore is:
Can these warnings be disabled for non-Liferay projects? If doable by configuration change, where are the properties found?

Thanks!
Chris

P.S. Of note is that some of the warnings are on the version of the file in the build folder which was built by ant, not by Eclipse, and is not listed as a source or binary folder for the project. So it looks like the Liferay Display Descriptor validation is not only happening on non-Liferay projects, but also on non-source folders.

EDIT:
The welcome-file-list entry in the web.xml looks like this:
 <welcome-file-list>
    <welcome-file>index.jsf</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
thumbnail
Olaf Kock, módosítva 9 év-val korábban

RE: Web.xml errors in non-Liferay project (Válasz)

Liferay Legend Bejegyzések: 6403 Csatlakozás dátuma: 2008.09.23. Legújabb bejegyzések
The default value for the welcome-file-list contains a lot of items that you won't use at all (if any). My recommendation: Just delete the lines. If they're not there - why have them? How many landing files do you expect to have.

Explain in detail if it's more than one ;)
Chris Dailey, módosítva 9 év-val korábban

RE: Web.xml errors in non-Liferay project

Junior Member Bejegyzések: 30 Csatlakozás dátuma: 2014.11.24. Legújabb bejegyzések
True, most of them are not ones I'd use. In this particular project, I can pare down the ones that give an error as you suggest, which means it's an acceptable solution.

These two things still surprise me:

1. Liferay validations are happening on non-Liferay projects.
2. Even non-source and non-build destination files in the folder are being validated.
thumbnail
Olaf Kock, módosítva 9 év-val korábban

RE: Web.xml errors in non-Liferay project

Liferay Legend Bejegyzések: 6403 Csatlakozás dátuma: 2008.09.23. Legújabb bejegyzések
Hi Chris,

despite my answer, I do agree with your point 1 in principle - but that's taken care of. I just stepped in to provide a quick fix. Good to see that you find it acceptable as well. I'll step back so that the root cause (your #1 in the post that I'm answering to) can be fixed.
thumbnail
Gregory Amerson, módosítva 9 év-val korábban

RE: Web.xml errors in non-Liferay project

Liferay Legend Bejegyzések: 1123 Csatlakozás dátuma: 2010.02.16. Legújabb bejegyzések
Chris Dailey:
I have a workspace in Eclipse that has both a Liferay CE Server and a standalone Tomcat Server (which contains some JAX-WS web services).

Since I installed the Liferay IDE module into Tomcat, I am getting validation errors in the web.xml for the non-Liferay web application.

I've gone through the Eclipse project options and couldn't find a place to turn them off. The question therefore is:
Can these warnings be disabled for non-Liferay projects? If doable by configuration change, where are the properties found?

Thanks!
Chris

P.S. Of note is that some of the warnings are on the version of the file in the build folder which was built by ant, not by Eclipse, and is not listed as a source or binary folder for the project. So it looks like the Liferay Display Descriptor validation is not only happening on non-Liferay projects, but also on non-source folders.

EDIT:
The welcome-file-list entry in the web.xml looks like this:
 <welcome-file-list>
    <welcome-file>index.jsf</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>


Hey Chris,

We addressed this issue in our latest release. So simply install the latest version of the Liferay IDE version 2.2.1 and these errors should go away (you may have to manually re-validate the project).
Chris Dailey, módosítva 9 év-val korábban

RE: Web.xml errors in non-Liferay project

Junior Member Bejegyzések: 30 Csatlakozás dátuma: 2014.11.24. Legújabb bejegyzések
Gregory Amerson:
We addressed this issue in our latest release. So simply install the latest version of the Liferay IDE version 2.2.1 and these errors should go away (you may have to manually re-validate the project).

Hi, Gregory,

The version I have is 2.2.1.201411200728-ga2 (and that's the only version I've used), so it appears to still be an issue.

Between Olaf's suggestion to just remove the fields and me running "ant clean" to get rid of the temporary build folder, the error messages can be made to go away in my particular case. It does seem that the two concerns I mentioned in my reply to Olaf are still valid, albeit at a much lower priority. It's up to you guys whether you think it's important enough to look into it.
thumbnail
Gregory Amerson, módosítva 9 év-val korábban

RE: Web.xml errors in non-Liferay project

Liferay Legend Bejegyzések: 1123 Csatlakozás dátuma: 2010.02.16. Legújabb bejegyzések
Chris Dailey:
Gregory Amerson:
We addressed this issue in our latest release. So simply install the latest version of the Liferay IDE version 2.2.1 and these errors should go away (you may have to manually re-validate the project).

Hi, Gregory,

The version I have is 2.2.1.201411200728-ga2 (and that's the only version I've used), so it appears to still be an issue.

Between Olaf's suggestion to just remove the fields and me running "ant clean" to get rid of the temporary build folder, the error messages can be made to go away in my particular case. It does seem that the two concerns I mentioned in my reply to Olaf are still valid, albeit at a much lower priority. It's up to you guys whether you think it's important enough to look into it.



Hey Chris,

We will take a closer look at this problem tomorrow. But for now can you check something? In your eclipse/plugins folder do you have a jar file that is named this?
org.eclipse.jst.jee.web.xml_1.0.0***
This is the bundle where the web.xml validation is coming from. That bundle was included in our IDE 2.2.0 release but we removed it in IDE 2.2.1 release because of the very issue you have found. So one thing you could do is completely uninstall Liferay IDE 2.2.1, make sure that plugin isn't there and then reinstall the latest IDE.
Chris Dailey, módosítva 9 év-val korábban

RE: Web.xml errors in non-Liferay project

Junior Member Bejegyzések: 30 Csatlakozás dátuma: 2014.11.24. Legújabb bejegyzések
Gregory Amerson:
Hey Chris,

We will take a closer look at this problem tomorrow. But for now can you check something? In your eclipse/plugins folder do you have a jar file that is named this?
org.eclipse.jst.jee.web.xml_1.0.0***
This is the bundle where the web.xml validation is coming from. That bundle was included in our IDE 2.2.0 release but we removed it in IDE 2.2.1 release because of the very issue you have found. So one thing you could do is completely uninstall Liferay IDE 2.2.1, make sure that plugin isn't there and then reinstall the latest IDE.


Hi, Gregory,

It does not look like there is a jar with that name. This is probably more than you need, but here is what I have for *xml* in the eclipse-luna\plugins folder:

C:\apps\eclipse-luna\plugins&gt;dir *xml*
 Volume in drive C has no label.
 Volume Serial Number is XXXX-XXXX

 Directory of C:\apps\eclipse-luna\plugins

2014-11-27  08:04           117,491 com.liferay.ide.xml.search.ui_2.2.1.201411200728-ga2.jar
2014-07-07  12:51              javax.xml.rpc_1.1.0.v201209140446
2014-07-07  12:51    <dir>          javax.xml.soap_1.2.0.v201005080501
2014-07-07  12:51            39,699 javax.xml.stream_1.0.1.v201004272200.jar
2014-07-07  12:51            56,127 javax.xml.ws_2.1.0.v200902101523.jar
2014-07-07  12:51           237,996 javax.xml_1.3.4.v201005080400.jar
2014-07-07  12:51           102,713 org.apache.xml.resolver_1.2.0.v201005080400.jar
2014-07-07  12:51           302,018 org.apache.xml.serializer_2.7.1.v201005080400.jar
2014-07-07  12:51           229,157 org.apache.xmlrpc_3.0.0.v20100427-1100.jar
2014-07-07  12:51           211,965 org.eclipse.datatools.enablement.oda.xml.ui_1.2.7.v201403131825.jar
2014-07-07  12:51           121,913 org.eclipse.datatools.enablement.oda.xml_1.2.5.v201403131825.jar
2014-07-07  12:51           248,728 org.eclipse.datatools.modelbase.sql.xml.query_1.0.2.v201201131123.jar
2014-07-07  12:51           276,805 org.eclipse.datatools.sqltools.parsers.sql.xml.query_1.0.0.v201107221520.jar
2014-11-25  12:48            98,126 org.eclipse.emf.mapping.ecore2xml.ui_2.7.0.v20141013-0308.jar
2014-11-25  12:48            40,222 org.eclipse.emf.mapping.ecore2xml_2.8.0.v20141013-0308.jar
2014-07-07  12:51            44,137 org.eclipse.jetty.xml_8.1.3.v20120522.jar
2014-11-25  12:53           223,608 org.eclipse.m2e.editor.xml_1.5.0.20140623-0838.jar
2014-11-27  08:05            36,657 org.eclipse.mylyn.commons.xmlrpc_3.13.0.v20140702-2155.jar
2014-11-27  08:04           172,751 org.eclipse.sapphire.modeling.xml_8.1.0.201411041306.jar
2014-11-27  08:04            30,606 org.eclipse.sapphire.ui.swt.xml.editor_8.1.0.201411041306.jar
2014-11-25  12:55           775,071 org.eclipse.wst.xml.core_1.1.901.v201408131505.jar
2014-11-27  08:04           289,335 org.eclipse.wst.xml.search.core_1.0.0.201410302212.jar
2014-11-27  08:04           649,636 org.eclipse.wst.xml.search.editor_1.0.0.201410302212.jar
2014-11-27  08:04           188,249 org.eclipse.wst.xml.search.ui_1.0.0.201410302212.jar
2014-11-25  12:55            19,282 org.eclipse.wst.xml.ui.infopop_1.0.400.v201309112106.jar
2014-07-07  12:51           971,838 org.eclipse.wst.xml.ui_1.1.500.v201403122203.jar
2014-11-27  08:07            23,513 org.eclipse.wst.xml.xpath.core_1.3.0.v201108312022.jar
2014-11-27  08:07            89,192 org.eclipse.wst.xml.xpath.ui_1.1.101.v201204252215.jar
2014-11-27  08:06            53,191 org.eclipse.wst.xml.xpath2.processor.doc.user_2.0.0.v201209212251.jar
2014-11-27  08:06           658,726 org.eclipse.wst.xml.xpath2.processor_2.1.101.v201409111854.jar
2014-11-27  08:06            21,144 org.eclipse.wst.xml.xpath2.wtptypes_2.0.0.v201208081543.jar
2014-11-27  08:06            15,908 org.eclipse.wst.xml.xpath2_1.1.0.v201309251557.jar
2014-11-25  12:55           132,676 org.eclipse.wst.xmleditor.doc.user_1.0.700.v201208081537.jar
2014-07-07  12:51             6,637 org.eclipse.wtp.xml.capabilities_1.0.100.v201005102000.jar
              32 File(s)      6,485,117 bytes
               2 Dir(s)  274,255,953,920 bytes free

C:\apps\eclipse-luna\plugins&gt;</dir>


And here is *web*:

C:\apps\eclipse-luna\plugins&gt;dir *web*
 Volume in drive C has no label.
 Volume Serial Number is XXXX-XXXX

 Directory of C:\apps\eclipse-luna\plugins

2014-07-07  12:50           613,341 org.eclipse.help.webapp_3.6.300.v20140407-1855.jar
2014-07-07  12:51           114,527 org.eclipse.jetty.webapp_8.1.3.v20120522.jar
2014-11-25  12:54            52,425 org.eclipse.jst.j2ee.webservice.ui_1.1.500.v201302011850.jar
2014-11-25  12:54           260,634 org.eclipse.jst.j2ee.webservice_1.1.400.v201302011850.jar
2014-11-25  12:56           466,541 org.eclipse.jst.j2ee.web_1.1.800.v201403061855.jar
2014-11-25  12:56            39,455 org.eclipse.jst.jee.web_1.0.500.v201404021628.jar
2014-11-25  12:56           155,788 org.eclipse.wst.jsdt.web.core_1.0.700.v201307151913.jar
2014-11-25  12:56            14,400 org.eclipse.wst.jsdt.web.support.jsp_1.0.600.v201307151913.jar
2014-11-25  12:56           211,179 org.eclipse.wst.jsdt.web.ui_1.0.800.v201403271809.jar
2014-11-25  12:57            10,597 org.eclipse.wst.web.ui.infopop_1.0.300.v200805140206.jar
2014-11-25  12:55            83,904 org.eclipse.wst.web.ui_1.1.600.v201302011850.jar
2014-11-25  12:55           125,399 org.eclipse.wst.webtools.doc.user_1.0.500.v201208081537.jar
2014-11-25  12:57            73,083 org.eclipse.wst.web_1.1.800.v201312041437.jar
2014-07-07  12:51             6,603 org.eclipse.wtp.web.capabilities_1.0.100.v201005102000.jar
2014-07-07  12:51            40,510 org.objectweb.asm.tree_5.0.1.v201404251740.jar
2014-07-07  12:51            64,028 org.objectweb.asm_5.0.1.v201404251740.jar
              16 File(s)      2,332,414 bytes
               0 Dir(s)  274,255,507,456 bytes free

C:\apps\eclipse-luna\plugins&gt;


Could the org.eclipse.jst.j2ee.web_1.1.800.v201403061855.jar file be the equivalent of what you were referring to?

I'll try uninstalling the plugin and seeing if it's still there and report back.

EDIT TO ADD: I uninstalled Liferay IDE and Liferay IDE AlloyUI and m2e-liferay, and the two file lists I had above did not change. Strangely the liferay jars still appear to be in the plugins folder. I'm looking at the Eclipse Installation Details screen, and it is indeed starting up in C:\apps\eclipse-luna, so it's not a mistake of which folder I'm working in. Without starting from a fresh Eclipse install, it would be difficult to say what is going on.

Regards,
Chris
thumbnail
Gregory Amerson, módosítva 9 év-val korábban

RE: Web.xml errors in non-Liferay project

Liferay Legend Bejegyzések: 1123 Csatlakozás dátuma: 2010.02.16. Legújabb bejegyzések
Can you open up the markers view (window > show view > other > search for markers) and then select your web.xml file that has errors and then find the error markers in the markers view and right-click and delete them? Then try to revalidate the web.xml file and see if the errors return.
Chris Dailey, módosítva 9 év-val korábban

RE: Web.xml errors in non-Liferay project

Junior Member Bejegyzések: 30 Csatlakozás dátuma: 2014.11.24. Legújabb bejegyzések
Hi, Gregory,

After clearing out the errors as Olaf suggested, I'm no longer able to get them to come back by trying to recreate the errors. Which is good in one sense, but it does not help in figuring out why the errors happened in the first place. In retrospect I clearly should have created a copy of the project with the error when it had the error and before making changes in order to reproduce the problems.

Chris