Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: STS 3.5 - MVC template problem - log4j.dtd not found

  1. #21
    Join Date
    Jul 2011
    Location
    Denmark
    Posts
    31

    Default

    Quote Originally Posted by mtlcpu View Post
    Hi Gr3y

    Didn't get the red cross here.

    Can you post exactly the string you entered in the XML catalog ?
    The string i entered was:
    -//APACHE//DTD LOG4J 1.2//EN

    And key type was: Public ID

    File was: org.apache.log4j_1.2.15.v201012070815.jar

    I can live with the warning, doesn't bother me.

  2. #22
    Join Date
    Jul 2011
    Posts
    9

    Default

    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.

  3. #23
    Join Date
    Jul 2011
    Location
    Denmark
    Posts
    31

    Default

    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?

  4. #24
    Join Date
    Jul 2011
    Posts
    9

    Default

    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.

  5. #25
    Join Date
    Jul 2011
    Location
    Denmark
    Posts
    31

    Default

    mtlcpu, thanks. That was what I needed to do. After saving the file again, the warning vanishes.

  6. #26
    Join Date
    Jul 2011
    Posts
    9

    Default

    Glad to see it worked. Cheers !

  7. #27
    Join Date
    May 2011
    Posts
    21

    Default

    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

  8. #28

    Default

    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •