Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » WTP M5 - Configuring XML Catalog entries to allow offline creation of Webapps/Servlets with dtds
WTP M5 - Configuring XML Catalog entries to allow offline creation of Webapps/Servlets with dtds [message #107299] Wed, 25 May 2005 05:29 Go to next message
Eclipse UserFriend
Hi,

I am using eclipse M5, I found the problem with XML catalog.
org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver class is the
culprit.
registerDtD function has empty implementation, I think that function should
add dtds to the supportedDtDs Hashmap. When resolveEntity method of
org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver is called to
resolve entities, since the hashmap doesn't contain any thing it returns
null and ClassLoader cannot find the dtd resource even if it is in the
classpath. I have modified this file and I have enclosed the
J2EEXmlDtDEntityResolver.class,wtpemf.jar with this mail.Plz take a backup
of
%eclipseInstallDir%\plugins\org.eclipse.jst.j2ee.core_1.0.0\ runtime\mofj2ee.jar
file and put the downloaded J2EEXmlDtDEntityResolver in the mofj2ee.jar
using winzip or jar.
DOMUtilities class is not setting the entity resolver in the
newDefaultDocumentBuilder method. So I modified wtpemf.jar.
Download enclosed wtpemf.jar and put it in
%eclipseInstallDir%\plugins\org.eclipse.wst.common.emf_1.0.0 \runtime.
It works fine for me. But one thing which I don't really understand how xsds
are resolved correctly by the parser, even if the uri entry of xsd in the
XML catalog is incorrect ( No internet scenario).

Krishna Dasyam



Re: WTP M5 - Configuring XML Catalog entries to allow offline creation of Webapps/Servlets with dtds [message #107442 is a reply to message #107299] Wed, 25 May 2005 16:49 Go to previous messageGo to next message
Eclipse UserFriend
Hi Krishna,

Thanks for investigating the problem and providing a fix. Please open a
bugzilla defect against the Web Tools project's jst.j2ee component.
Include the comments from your post and attach a patch for your fix.
Opening a bugzilla bug ensures that the development owner will see the
work you've done.

Thanks for the help.

Lawrence
Re: WTP M5 - Configuring XML Catalog entries to allow offline creation of Webapps/Servlets with dtds [message #107533 is a reply to message #107442] Wed, 25 May 2005 23:27 Go to previous messageGo to next message
Eclipse UserFriend
Hi Lawrence,

How should I open a bugzilla defect? How do I know whether that bug already
exists in the bugzilla?

Krishna Dasyam
<lmandel@ca.ibm.com> wrote in message news:d72odb$v6a$1@news.eclipse.org...
> Hi Krishna,
>
> Thanks for investigating the problem and providing a fix. Please open a
> bugzilla defect against the Web Tools project's jst.j2ee component.
> Include the comments from your post and attach a patch for your fix.
> Opening a bugzilla bug ensures that the development owner will see the
> work you've done.
>
> Thanks for the help.
>
> Lawrence
Re: WTP M5 - Configuring XML Catalog entries to allow offline creation of Webapps/Servlets with dtds [message #107547 is a reply to message #107533] Thu, 26 May 2005 01:16 Go to previous messageGo to next message
Eclipse UserFriend
Hi Krishna,

To open a bug go to https://bugs.eclipse.org/bugs/. Select "Report a
New Bug" and select the webtools component. You will need to sign up
for a bugzilla account if you have not yet done so. Then you just enter
the bug details.

To see if the bug already exists you can select "find a bug report" and
do an advanced search.

A good resource to check out is https://bugs.eclipse.org/bugzilla.html

Mark


Krishna Dasyam wrote:
> Hi Lawrence,
>
> How should I open a bugzilla defect? How do I know whether that bug already
> exists in the bugzilla?
>
> Krishna Dasyam
> <lmandel@ca.ibm.com> wrote in message news:d72odb$v6a$1@news.eclipse.org...
>
>>Hi Krishna,
>>
>>Thanks for investigating the problem and providing a fix. Please open a
>>bugzilla defect against the Web Tools project's jst.j2ee component.
>>Include the comments from your post and attach a patch for your fix.
>>Opening a bugzilla bug ensures that the development owner will see the
>>work you've done.
>>
>>Thanks for the help.
>>
>>Lawrence
>
>
>
Re: WTP M5 - Configuring XML Catalog entries to allow offline creation of Webapps/Servlets with dtds [message #107560 is a reply to message #107547] Thu, 26 May 2005 01:42 Go to previous messageGo to next message
Eclipse UserFriend
Hi Mark,

Thank you, I will open a new bug if it is already not there.

Krishna Dasyam

"Mark Hutchinson" <mhutchin@gmail.com> wrote in message
news:d73m9b$rhv$1@news.eclipse.org...
> Hi Krishna,
>
> To open a bug go to https://bugs.eclipse.org/bugs/. Select "Report a New
> Bug" and select the webtools component. You will need to sign up for a
> bugzilla account if you have not yet done so. Then you just enter the bug
> details.
>
> To see if the bug already exists you can select "find a bug report" and do
> an advanced search.
>
> A good resource to check out is https://bugs.eclipse.org/bugzilla.html
>
> Mark
>
>
> Krishna Dasyam wrote:
>> Hi Lawrence,
>>
>> How should I open a bugzilla defect? How do I know whether that bug
>> already exists in the bugzilla?
>>
>> Krishna Dasyam
>> <lmandel@ca.ibm.com> wrote in message
>> news:d72odb$v6a$1@news.eclipse.org...
>>
>>>Hi Krishna,
>>>
>>>Thanks for investigating the problem and providing a fix. Please open a
>>>bugzilla defect against the Web Tools project's jst.j2ee component.
>>>Include the comments from your post and attach a patch for your fix.
>>>Opening a bugzilla bug ensures that the development owner will see the
>>>work you've done.
>>>
>>>Thanks for the help.
>>>
>>>Lawrence
>>
>>
Re: WTP M5 - Configuring XML Catalog entries to allow offline creation of Webapps/Servlets with dtds [message #107602 is a reply to message #107299] Thu, 26 May 2005 07:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: laurentd75__no___spa_m.yahoo.fr

Krishna Dasyam wrote:

> I am using eclipse M5
> I found the problem with XML catalog.

Hi Krishna,

Thanks for investigating this problem.

I'm not sure what version of Eclipse+WTP you are referring to ?

Is it Eclipse 3.1M5 + WTP M3, or Eclipse 3.1M6 + WTP M4, or perhaps
Eclipse 3.1M7 with some integration build of WTP ?

I did try your patch in both WTP M3 and WTP M4:

- in M3, id does not seem to make any difference unfortunately, I still
have the 'external entity not found' message for Webapp 2.3 DTD when
trying to create a J2EE Web project while not connected to the Internet.

- it appears to be incompatible with M4 since I receive a lot of errors
after I install it and start Eclipse.

So, I wonder if you could try yourself, with your setup, to configure an
XML Catalog entry for Webapp_2_3.dtd, then create a J2EE Web 2.3 project
while not connected to the Internet, and tell us whether it works of if
you receive the same error.

> org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver class is the
> culprit.
> registerDtD function has empty implementation, I think that function should
> add dtds to the supportedDtDs Hashmap.

I did take a look at the codefor this class. There were "TODO" comments
that clearly stated that the code to add the catalog entry to the hashmap
was disabled for now until "the correct location for adding the entry"
could be determined.

So I'm not sure if you just uncommented the code that was here, because
maybe there's more to it than just that ?



> When resolveEntity method of
> org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver is called to
> resolve entities, since the hashmap doesn't contain any thing it returns
> null and ClassLoader cannot find the dtd resource even if it is in the
> classpath.

I fail to see what the classpath has to do with XML Catalog entries,
although many people (including you) seem to imply that the local versions
of DTDs and XSDs should be placed in te classpath...

Could anybody clarify whether the classpath plays any role in XML Catalog,
and give us a clear statement/explanation if it does ??


> DOMUtilities class is not setting the entity resolver in the
> newDefaultDocumentBuilder method. So I modified wtpemf.jar.
> Download enclosed wtpemf.jar and put it in
> %eclipseInstallDir%pluginsorg.eclipse.wst.common.emf_1.0.0ru ntime.

Similarly, taking a look at this class I saw some code was commented out.
For example, in the method your're referring to, there is a statement
that's commented out because "it causes exceptions with the IBM JDK".

Could you give us a more detailed explanation of the modification you did ?

Maybe you could submit a Bugzilla report and attacge the modified source
code to it for people to look at ?

Many thanks again for your help in trying to resolve this issue,

Laurent
Re: WTP M5 - Configuring XML Catalog entries to allow offline creation of Webapp [message #108052 is a reply to message #107602] Sun, 29 May 2005 05:41 Go to previous messageGo to next message
Eclipse UserFriend
It looks like we have some XML processing code that's not hooked up to
reuse the XML catalog. I'd suggest opening a bugzilla bug with a
description like "Create a J2EE Web project while not connected to the
Internet does not respect XML Catalog settings". I don't work on the
J2EEXmlDtDEntityResolver related code so I'm not sure if there are any
reasone why there's a seemingly specialized mechanism for locating DTD's
(or if this is just a case of old crusty code that needs to be fixed up).
I'll chat with the folks who work on the J2EE components and ensure we
post back here with a clear answer.

Thanks for posting and bringing this to our attention!
Re: WTP M5 - Configuring XML Catalog entries to allow offline creation of Webapps/Servlets with dtds [message #108469 is a reply to message #107602] Wed, 01 June 2005 02:06 Go to previous messageGo to next message
Eclipse UserFriend
Hi Laurent,

I am using 3.1.0 build I20050218-1600 (I guess it is 3.1 M5) with wtp 1.0.
In my previous post I forgot to mention about dtds. You need to put the
attached dtds in the mofj2ee.jar. dtd files should be in the dtds folder
from the root folder of mofj2ee.jar so that
org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver can find dtds. I
am sure it will work now. Infact I tried to attach modified mofj2ee.jar in
the previous post itself but it is more than 1 MB so the server did not
accept it.

Krishna



"Laurent D" <laurentd75__no___spa_m@yahoo.fr> wrote in message
news:e1d5f20eb4f28dc78089f273c8cb43e2$1@www.eclipse.org...

> Krishna Dasyam wrote:
>
>> I am using eclipse M5
>> I found the problem with XML catalog.
>
> Hi Krishna,
>
> Thanks for investigating this problem.
>
> I'm not sure what version of Eclipse+WTP you are referring to ?
>
> Is it Eclipse 3.1M5 + WTP M3, or Eclipse 3.1M6 + WTP M4, or perhaps
> Eclipse 3.1M7 with some integration build of WTP ?
>
> I did try your patch in both WTP M3 and WTP M4:
>
> - in M3, id does not seem to make any difference unfortunately, I still
> have the 'external entity not found' message for Webapp 2.3 DTD when
> trying to create a J2EE Web project while not connected to the Internet.
>
> - it appears to be incompatible with M4 since I receive a lot of errors
> after I install it and start Eclipse.
>
> So, I wonder if you could try yourself, with your setup, to configure an
> XML Catalog entry for Webapp_2_3.dtd, then create a J2EE Web 2.3 project
> while not connected to the Internet, and tell us whether it works of if
> you receive the same error.
>
>> org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver class is the
>> culprit.
>> registerDtD function has empty implementation, I think that function
>> should
>> add dtds to the supportedDtDs Hashmap.
>
> I did take a look at the codefor this class. There were "TODO" comments
> that clearly stated that the code to add the catalog entry to the hashmap
> was disabled for now until "the correct location for adding the entry"
> could be determined.
>
> So I'm not sure if you just uncommented the code that was here, because
> maybe there's more to it than just that ?
>
>
>
>> When resolveEntity method of
>> org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver is called to
>> resolve entities, since the hashmap doesn't contain any thing it returns
>> null and ClassLoader cannot find the dtd resource even if it is in the
>> classpath.
>
> I fail to see what the classpath has to do with XML Catalog entries,
> although many people (including you) seem to imply that the local versions
> of DTDs and XSDs should be placed in te classpath...
>
> Could anybody clarify whether the classpath plays any role in XML Catalog,
> and give us a clear statement/explanation if it does ??
>
>
>> DOMUtilities class is not setting the entity resolver in the
>> newDefaultDocumentBuilder method. So I modified wtpemf.jar.
>> Download enclosed wtpemf.jar and put it in
>> %eclipseInstallDir%pluginsorg.eclipse.wst.common.emf_1.0.0ru ntime.
>
> Similarly, taking a look at this class I saw some code was commented out.
> For example, in the method your're referring to, there is a statement
> that's commented out because "it causes exceptions with the IBM JDK".
>
> Could you give us a more detailed explanation of the modification you did
> ?
>
> Maybe you could submit a Bugzilla report and attacge the modified source
> code to it for people to look at ?
>
> Many thanks again for your help in trying to resolve this issue,
>
> Laurent
>
>



  • Attachment: dtds.zip
    (Size: 61.82KB, Downloaded 154 times)
Re: WTP M5 - Configuring XML Catalog entries to allow offline creation of Webapp [message #109933 is a reply to message #108052] Wed, 08 June 2005 00:03 Go to previous message
Eclipse UserFriend
Just to follow up... I had a chat with the J2EE folks about the
J2EEXmlDtDEntityResolver code. It seems as though this code should be
updated to utilize the XML Catalog at development time. There are some
'deployment time' issues that we need to figure out also but there doesn't
seem to be a good reason why some of J2EE realted xml processors aren't
utilizing the catalog. If folks haven't done so already, please open a
bugzilla bug with a description like "Create a J2EE Web project does not
respect XML Catalog settings". The more you votes the faster we'll
investigate further and try to fix.

thanks for your lending your eyeballs and spotting these sorts of issues!
Previous Topic:WTP Web Projects
Next Topic:right WTP build for RC1
Goto Forum:
  


Current Time: Tue Jul 22 09:13:11 EDT 2025

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

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

Back to the top