- This topic has 9 replies, 3 voices, and was last updated 16 years, 5 months ago by
Riyad Kalla.
-
AuthorPosts
-
Oleg KonovalovMemberHi,
I am trying to convert large EAR project from Eclipse J2EE into MyEclipse EAR project
[using ME7 trial].
Built subproject, targets, cleaned up all the errors, there is one left, it looks pretty
strange to me.
Referenced file contains error [weblogic.xml file from my Web project].
src-resolve: Cannot resolve the name: ‘j2ee:servlet-nameType’ to a(n) ‘type definition’ component. line756
In details window it says:
The errors below were detected when validating the file weblogic-web-app.xsd via the file weblogic.xml . In most cases these errors can be detected by validating weblogic-web-app.xsd directly. However it is possible that errors will occur only when weblogic-web-app.xsd is validated in the context of weblogic.xml.Any idea ?
My weblogic.xml is pretty simple and short, has no line 756 or j2ee:servlet-nameType
The app works fine in Eclipse 3.4 for J2EE and runs on Weblogic9, and I have made no changes in the source code.Please help.
Thank you,
Oleg.
Here is weblogic.xml [26 lines]<?xml version=”1.0″ encoding=”UTF-8″?>
<weblogic-web-app xmlns=”http://www.bea.com/ns/weblogic/90″ xmlns:j2ee=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd”>
<weblogic-version>9.2</weblogic-version><session-descriptor>
<persistent-store-type>replicated_if_clustered</persistent-store-type>
<!–
set the value in web.xml
<session-param>
<param-name>TimeoutSecs</param-name>
<param-value>1800</param-value>
</session-param>
<session-param>
<param-name>CookieName</param-name>
<param-value>OTCSESSIONID</param-value>
</session-param>
–>
</session-descriptor>
<jsp-descriptor>
<keepgenerated>true</keepgenerated>
<page-check-seconds>0</page-check-seconds>
<debug>true</debug>
</jsp-descriptor>
<context-root>/pcc5webapp</context-root></weblogic-web-app>
January 21, 2009 at 4:56 pm #293797
Oleg KonovalovMemberOops, I forgot to mention that the file it complains about is:
file:/C:/Program Files/Genuitec/Common/plugins/com.genuitec.eclipse.j2eedt.core_7.0.0.zmyeclipse70020081206/catalog-xsd/weblogic-web-app.xsd
But when I double-click on error, it opens up my weblogic.xml.January 26, 2009 at 1:19 pm #293959
Loyal WaterMemberOleg,
I’m not sure what could be the cause of this problem. I’ll check with the dev team if they know about this issue.January 29, 2009 at 3:15 pm #294148
Oleg KonovalovMemberNipun,
Did you check that problem with dev team ?
TIA,
Oleg.February 2, 2009 at 9:48 am #294224
Riyad KallaMemberOleg,
This turned out to be a bug on our end, sorry for that. You can go to Project > Clean, and clean the project and let it rebuild and the error should disappear. It’s just when validation is manually forced on the file that the error pops up.
February 2, 2009 at 10:05 am #294234
Riyad KallaMemberOleg,
After some more investigation, it looks like the problem is that the BEA website hosting the XSD (http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd) is actually down right now, so the XML Validator cannot load the XSD file and validate. So it’s not a bug as much as a poor error message.
Give the BEA site some time to come back online and see if the error disappears.
February 3, 2009 at 5:34 pm #294317
Oleg KonovalovMemberRiyad,
I tried to Clean, Refresh, rebuild the project, still getting that error.
What I don’t understand is the error details, it says:
src-resolve: Cannot resolve the name ‘j2ee:servlet-nameType’ to a(n) ‘type definition’ component.
and points to line 756.
My web.xml is much smaller than 756 lines and doesn’t have that “name” inside.
Could you please explain to me that error?
Any way to fix it ?TIA,
Oleg.February 4, 2009 at 1:08 pm #294361
Riyad KallaMemberOleg,
Clean your project and rebuild it now, the XSD is back up and it should work (BEA’s site is back online)
Also note that the error you are referring to is complaining about the XSD file, not your XML file. There is an error validating the types in the XSD as used in your XML… it was all goofed up becuase the site was dead. Should be better now.
February 5, 2009 at 9:10 am #294407
Oleg KonovalovMemberRiyad,
I have already done that yesterday and today, after BEA site went up,
still getting that error no matter what (Restart, Refresh, Clean, Build manually).
So is it validating weblogic-web-app.xsd against weblogic.xml ?
Why there are no problems when I run this project in regular Eclipse (J2EE version) ?Anyway, how do we resolve that problem ?
TIA,
Oleg.February 5, 2009 at 12:04 pm #294444
Riyad KallaMemberOleg,
This bug was really bothering me so I went digging on Google and eventually found this post from 2 years ago where I actually researched this already:
https://www.genuitec.com/forums/topic/weblogic-xml-for-wl-9-1-myeclipse-wrongly-shows-error/#post-255626As it turns out, the header being used and the XSD provided for 9.0 is invalid for WebLogic when you try and validate them in any valid XML validator… so the error is actually *correct*
The fastest way to get this error to be quiet is probably to right-click on the XML file, go down to MyEclipse and select “Exclude from Validation”
-
AuthorPosts