Home » Language IDEs » ServerTools (WTP) » XML Catalog User entries ignored by embedded tomcat
| |
Re: XML Catalog User entries ignored by embedded tomcat [message #512322 is a reply to message #512108] |
Thu, 04 February 2010 11:50 |
Valentin Messages: 36 Registered: July 2009 |
Member |
|
|
Hi David, I don't know much about how embedded servers work, but I would
suspect they don't ship by default or use the workspace XML catalog. Looking
at the problem from a pure XML point of view, I suspect it would be up to
the program that parses that XML file to provide an entity resolver, perhaps
delegating to an XML catalog to resolve your schema. The schema itself may
be located on the web or shipped with your application. I would suggest you
ask the Spring folks if they support this scenario.
Regards, Valentin
"David Durham" <david.durham.jr@gmail.com> wrote in message
news:hkcupq$mgb$1@build.eclipse.org...
> I'm extending spring with a namespace. The way that works you provide a
> schema xsd file in your jar and hook into spring xml processing for schema
> validation and such. In eclipse, the schema is expected to be available
> at a given location. For instance:
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:ws="http://mywork/namespace
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
> http://mywork/namespace
> http://mywork/namespace.xsd
> ">
>
> Now.. I can add an entry in the eclipse XML catalog so that the XML editor
> works. However, when I launch my webapp with an embedded WTP tomcat
> instance, I see this error:
>
> Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The
> matching wildcard is strict, but no declaration can be found for element
> 'myelement'
>
> This is the same error the editor was giving before I added the user entry
> to xml catalogs. So, does WTP use those entries as well? It would appear
> not. Anyone seen this and have a solution?
>
> Thanks.
>
>
|
|
| | | | |
Re: XML Catalog User entries ignored by embedded tomcat [message #512622 is a reply to message #512588] |
Fri, 05 February 2010 16:28 |
David Durham Messages: 9 Registered: July 2009 |
Junior Member |
|
|
Does it really matter where exactly it is on the classpath? Ultimately it resides in a jar file in the .metadata/.plugins/org.eclipse.wst.server.core/tmp0/.../WEB- INF/lib, but it could also be in .metadata/.plugins/.../WEB-INF/classes and it still would not work.
It's the setup of the embedded tomcat container that is causing my problem. I have not dug into the embedded environment enough to say, "Ok the parser is setup this way .. so that's why it's not working in one scenario, but my standalone server does work because a parser is setup this way." Instead, I was kind of hoping that someone would say "this is how you can make the embedded tomcat container honor the user entries in preferences -> XML Catalog, .. or no you can not do that, and we'll note that as a feature request."
In fact, I was going to add it as a feature request myself, but bugzilla comes back with:
Sorry, either the product WTP Server Tools does not exist or you aren't authorized to enter a bug into it.
at: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=WTP%20Se rver%20Tools
Thanks,
Dave
|
|
|
Re: XML Catalog User entries ignored by embedded tomcat [message #512641 is a reply to message #512622] |
Fri, 05 February 2010 13:02 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
David Durham wrote:
> Does it really matter where exactly it is on the classpath? Ultimately
> it resides in a jar file in the
> .metadata/.plugins/org.eclipse.wst.server.core/tmp0/.../WEB- INF/lib,
> but it could also be in .metadata/.plugins/.../WEB-INF/classes and it
> still would not work.
> It's the setup of the embedded tomcat container that is causing my
> problem. I have not dug into the embedded environment enough to say,
> "Ok the parser is setup this way .. so that's why it's not working in
> one scenario, but my standalone server does work because a parser is
> setup this way." Instead, I was kind of hoping that someone would say
> "this is how you can make the embedded tomcat container honor the user
> entries in preferences -> XML Catalog, .. or no you can not do that,
> and we'll note that as a feature request."
>
> In fact, I was going to add it as a feature request myself, but bugzilla
> comes back with:
>
> Sorry, either the product WTP Server Tools does not exist or you
> aren't authorized to enter a bug into it.
>
> at:
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=WTP%20Se rver%20Tools
>
> Thanks,
> Dave
The difference in the behavior between the embedded Tomcat and your
external Tomcat is likely due to a configuration difference between the
Tomcats, a bug or quirk in spring, a bug in WTP, or some combination of
these. The prior question relates to the "bug in WTP" possibility,
based on some past history. I just need to confirm that the jar is
where it belongs and it contains the xsd where it should. If this is
coming from project in your workspace and a certain past bug (don't
remember the number) has reappeared, then the answer could be "no". To
avoid wasting time, I need to eliminate this before pursuing other
possibilities.
If the jar and xsd are where they should be under "tmp0/.../WEB-
INF/lib", or you get the same error putting the xsd in the appropriate
location under WEB-INF/classes, then it would help to have a stacktrace
for the startup error you are seeing, if one is available in some log
output. It would also help to know which version of WTP, Spring, and
Tomcat you are using.
Cheers,
Larry
|
|
| |
Re: XML Catalog User entries ignored by embedded tomcat [message #512647 is a reply to message #512641] |
Fri, 05 February 2010 18:26 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
Larry Isaacs wrote:
> David Durham wrote:
>> Does it really matter where exactly it is on the classpath?
>> Ultimately it resides in a jar file in the
>> .metadata/.plugins/org.eclipse.wst.server.core/tmp0/.../WEB- INF/lib,
>> but it could also be in .metadata/.plugins/.../WEB-INF/classes and it
>> still would not work. It's the setup of the embedded tomcat container
>> that is causing my problem. I have not dug into the embedded
>> environment enough to say, "Ok the parser is setup this way .. so
>> that's why it's not working in one scenario, but my standalone server
>> does work because a parser is setup this way." Instead, I was kind
>> of hoping that someone would say "this is how you can make the
>> embedded tomcat container honor the user entries in preferences -> XML
>> Catalog, .. or no you can not do that, and we'll note that as a
>> feature request."
>>
>> In fact, I was going to add it as a feature request myself, but
>> bugzilla comes back with:
>>
>> Sorry, either the product WTP Server Tools does not exist or you
>> aren't authorized to enter a bug into it.
>>
>> at:
>> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=WTP%20Se rver%20Tools
>>
>> Thanks,
>> Dave
>
> The difference in the behavior between the embedded Tomcat and your
> external Tomcat is likely due to a configuration difference between the
> Tomcats, a bug or quirk in spring, a bug in WTP, or some combination of
> these. The prior question relates to the "bug in WTP" possibility,
> based on some past history. I just need to confirm that the jar is
> where it belongs and it contains the xsd where it should. If this is
> coming from project in your workspace and a certain past bug (don't
> remember the number) has reappeared, then the answer could be "no". To
> avoid wasting time, I need to eliminate this before pursuing other
> possibilities.
>
> If the jar and xsd are where they should be under "tmp0/.../WEB-
> INF/lib", or you get the same error putting the xsd in the appropriate
> location under WEB-INF/classes, then it would help to have a stacktrace
> for the startup error you are seeing, if one is available in some log
> output. It would also help to know which version of WTP, Spring, and
> Tomcat you are using.
>
> Cheers,
> Larry
Never mind about the stacktrace, I saw Bug 301985.
Cheers,
Larry
|
|
|
Goto Forum:
Current Time: Mon Sep 23 12:51:14 GMT 2024
Powered by FUDForum. Page generated in 0.03680 seconds
|