This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I added a catalog to the XML Entity Catalogs (the same as I used in NB 3.6, it works there), but the node does not expand to show my library. When I try to validate a file, it uses the remote copy (the IDE hangs while it tries to locate the remote copy, so this is not good). I've included the catalog and the file I want to verify.
Created attachment 15847 [details] Catalog
Created attachment 15848 [details] The schema, for the local copy
Created attachment 15849 [details] Sample file to validate
This is a regression from NB 3.6. Ability to add a local schema to validate a file is important in J2EE, where most application types rely on some kind of framework (e.g. Struts, JSF). The schema for those configuration files are not included in NetBeans by default.
Thanks for report. It seems realy very serious...so I've check it too with your attachements and found that Catalog.xml is not possible expand in NetBeans 3.6 too :-/ So,that might means that it is either bug already in NB36 or your catalog is not all right.
But persistant hangs when connecting on the web is definitely appropirate performance bug... I guess it's done in AWT thread
Yes, XML validation (connecting to the URL of XSD) is definitely performed in AWT thread with is ugly and with slow conenctiong is might be very annoying. I'll attach 3 Thread dumps created during XML validation. Also, I'm going to attach my sample XML catalog which is correct and is able then expand in NB40 or NB36. If you, avk, can check this catalog and your posted, to make it clear wheather it's problem of your catalog or ide (and which version) thanks
Created attachment 15874 [details] my sample XML catalog which is possible to expand in NB40 and in NB36
Created attachment 15875 [details] 3 FullThreadDumps when validationg XML
seems that there's already bug #41049 complaining to "validate XML blocks AWT-QEUE"
Milane, can you please look at this?
Normally, we use the "SCHEMA" prefix in catalog for uri:name attribute: ========================= <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <uri name="SCHEMA:http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" uri="C:\opt\javaapps\dummy\portlet-app_1_0.xsd"/> ... ========================= Is there any rule how oasis catalogs for schemas should be specified ?
I guess that diffrent behaviour of the catalogs in 3.6 and 4.0 might be caused by different XML parser.
> from avk < ~~~~~~~~~~~~ I added a catalog to the XML Entity Catalogs (the same as I used in NB 3.6, it works there), but the node does not expand to show my library. > from Milan < ~~~~~~~~~~~~~~ I guess that diffrent behaviour of the catalogs in 3.6 and 4.0 might be caused by different XML parser. Well, there is only one XML parser now, in NB40. But What is different behaviour? I can't see it :-/ 'Cause neither in NB36 nor in NB40 the XML catalog is impossible to expand.
OOPS, I forgot to mention that validation against XML schema is working in a different way. XML schemas are looking for systemIDs, not publicIDs. It has never been working as Ana described in 3.6. That's the DTD way of catalog specification. If we want to validate against XML schema, the catalog should be specified using the <system> element, e.g : ================================================================ <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <system systemId="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" uri="file:///c:/opt/javaapps/dummy/portlet-app_1_0.xsd"/> </catalog> ================================================================ We can include multiple <system> elements if there are multiple schemas to resolve. In fact, there are actually 2 issues here : One is the issue (for documentation) to describe how XML catalogs for XML schemas should be specified. The second is the issue with StackOverflowError. Due to UI compatibility with DTD files, the <public> element is nice to include as well. This way we can achieve that catalog is correctly displayed in the Runtime tab and xsd file is also available from the catalogs tree : =========================================== <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <public publicId="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" uri="file:///c:/opt/javaapps/dummy/portlet-app_1_0.xsd"/> <system systemId="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" uri="file:///c:/opt/javaapps/dummy/portlet-app_1_0.xsd"/> </catalog> =========================================== I am sorry for the rubbish that I've written before.
Daniel and Milan, thank you both for addressing the issues so quickly. I have some more questions for both of you (details below). Daniel, the UI for adding the catalog from the runtime tab seems to have been impoverished from 3.6 -> 4.0. See details, and let me know if I should file a separate bug. Milan & Daniel, I have no idea why I thought that the Catalog.xml file I attached worked in 3.6 (I think I might have worked off the SWAN and the regular validation went quickly perhaps). Sorry to have misled you in the initial report - you are right of course. For what it's worth, the reason I created the file with that entry was that in NB 3.6 online help, there was a link to a document that specifies the OASIS catalog. And that had an entry like the one I created. The online help in 3.6 does not contain sufficient information to help with this. Now, I still can't get it going in 4.0 - it doesn't seem to be loaded when I add the file to the XML entity catalogs. It seems to me that the UI has gotten worse here. In 3.6, when I wanted to add a catalog, I could browse for it. Now it is just a text field. I tried both C:\opt\javaapps\dummy\Catalog.xml and file://localhost/C:/opt/javaapps/dummy/Catalog.xml but neither of these seem to load the file.
file:///c:/opt/javaapps/dummy/Catalog.xml doesn't work either.
Only small note about Browse button: The ui was not changed since 3.5. There is Browse button only for OASIS Catalog Resolver. So you have to set the Catalog Type to OASIS Catalog Resolver and then you will see the Browse button.
I need think little bit about answer, but till now, I will mention only browse button for XML catalog which is described in a bug #45266
Works for me (as I described) : - select the OASIS catalog option - browse the catalog.xml file - the <catalog> should contain both <public> and <system> elements This should be described in javadoc. I've tested both Windows and Linux platform. It is necessary to follow the rules for uri specification : Windows : file:///c:/opt/... Linux : file:/opt/...
BTW, Jesse Glick mentions in issue 40121 that there are some bugs in Xerces 2.6.0 in the XML catalog area. Wouldn't Xerces upgrade fix some of these issues?
Can we please consider this a NetBeans bug also? Because NetBeans doesn't help you fill in the text field. It's true that the URIs that Milan entered work, but the URI that I entered (which I copied from the browser URI field - this is what the URI that Opera generates if you open a file on disk using "Browse") does not work. I can get that same URI to work in IE though. I think it's insufficient to just fail and not add the user anymore in this already pretty convoluted task. So please readd the Browse buttoin to this dialog (it was available in 3.6).
I guess I am tired. I'll try again. I think this is a bug, not just a docs issue. This is why. 99% of the time, the user will be adding a reference to a local file. You basically use this because you want to replace the ordinary process that would involve using a remote file. Now I added a reference to a local file, which I generated by copying and pasting what my browser thinks the URI of the local file is. It is true that another format works, but that's not very relevant either. The URI I used is what my browser thinks the URI of the file is (and Internet Explorer understands the URI so it's not just my browser). You could either a) make the IDE recognize that format too (cop-out) b) if the IDE doesn't recognize the format, suggest something that will work (somewhat better, but still cop-out) c) provide a "browse" button. IMO, c is the best solution in terms of usability. Moreover, it's what we did in NB 3.6, so the current situation represents a deterioration in usability. Finally, in any other situation where we expect the user to enter a local file we have a browse button (I don't care that you can add a remote file in principle - that's a corner case, and it's covered even if you add the browse button).
Hello avk, I understand your point, but don't mix several issues into big one, please. 'cause noone then would ever know what's going on in such bug. I've already mentioned that I enter an issue #45266 for browse button and you asking for it in THIS CURRRENT bug again as "c" option of possible fix. Go ahead and enter separated issues (a, b, .... options. NOT "c") and let this bug in the state it is, please.
Hi Daniel, I missed that you filed the bug for the browse button. I would be grateful if you could file bug B (fail gracefully if the user input is not understood). Should we perhaps close this one entirely and file a new fresh bug for the documentation issue? Ana
OK Ana, Closing this bug will be probably the best solution. I would like also enter the B bug as I done for C "Browse" button bug, but I'm not sure if I understand exactly what's your idea of behaviour about wrong user input and what exact input do you mean. Only XML Catalog?.... So, if you could rather enter by yourself this bug, it'll be better. thanks for understanding -dan
I've updated the OASIS XML Catalog template to instruct the user how to specify the local XML schema resources.
*** Issue 40339 has been marked as a duplicate of this issue. ***
uhh... what should I verify? -updated XML Catalque Mounter ? -OASIS Catalog can be now expanded? -etc..? I'm closing it. If you find any further problem, please rather enter new issue, then reopening this one. Thanks