Hi Gr3y
Once you've selected the file, you need to manually add "jar:file:" as a prefix and "!/org/apache/log4j/xml/log4j.dtd" at the end (without the "") as noted before in the thread.
You also need to put the full path of the file, not only the jar name (although I'm sure you did that if you used the file explorer to chose it).
Hope this helps.
Hello mtlcpu
Thanks for assist, however I still get the warning.
However, I did miss the part about jar:file: in the beginning before.
My XML Catalog entry now looks like this (this is on a mac btw)
Location: jar:file:/Users/gr3y/springsource/sts-2.7.1.RELEASE/plugins/org.apache.log4j_1.2.15.v201012070815.jar!/org/apache/log4j/xml/log4j.dtd
Key type: Public ID
Key: -//APACHE//DTD LOG4J 1.2//EN
With this, I still get the warning: The file cannot be validated as the XML definition "/Users/gr3y/workspace/Hello/MVC/src/test/resources/log4j.dtd (No such file or directory)" that is specified as describing the syntax of the file cannot be located.
Note, selected the log4j file through Finder.
Did I miss anything this time?
Well,
I have to say I'm not familiar with the path on Mac so I guess that's they way it should be and the rest looks fine.
The last thing you might want to make sure to do is to save the file. For me, I had to add a space somewhere and then remove it. This would put the file in a "modified" state and then upon saving, the warning went away. I know that if you just save the file, it doesn't do anything and the warning will remain. You need to modify it in some way (even if it means to change it back right after) to trigger a modified state and then a re-eval of the file.
If that doesn't work, I might have to do with the way to write the path on the Mac system and I'll let someone else more knowledgeable comment on this issue.
mtlcpu, thanks. That was what I needed to do. After saving the file again, the warning vanishes.![]()
Glad to see it worked. Cheers !
For what it's worth - this is still happening in a default install of STS 2.8.0.MS Build 201109211000
I was able to resolve the issue by:
1) Updating the XML Catalog as described above (from Preferences->XML->XML Catalog), which replaced the red X with a yellow !
On my Mac:
Location: jar:file:/Users/<myusername>/springsource/sts-2.8.0.M2/plugins/org.apache.log4j_1.2.15.v201012070815!/org/apache/log4j/xml/log4j.dtd
Key type: Public ID
Key: -//APACHE//DTD LOG4J 1.2//EN
2) To remove the yellow !, cut all content from log4j.xml in the MVC application, save, and then paste it back and save.
Hope this gets fixed before the release rollout!
Cheers!
Larry
Thank you very much for the input. We are tracking this issue here and plan to address this for the STS 2.8 release:
STS-916: Add log4j.dtd to public XML catalog
https://issuetracker.springsource.com/browse/STS-916
Steffen
Steffen Pingel
--
Committer, SpringSource Tool Suite
Senior Developer, Tasktop