facebook

Broken DTD Parsing BLOCKS Adding Struts Capabilities

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #242889 Reply

    jvance
    Member

    First, please see these old, unresolved threads:

    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-7126-highlight-dtd+strutsconfig.html
    https://www.genuitec.com/forums/topic/problem-to-add-struts-capability/&start=0&postdays=0&postorder=asc&highlight=dtd+strutsconfig

    When attempting to add struts capabilities to an existing project, MyEclipse fails to parse a properly formed struts-config.xml 1.2 file. The given file validates against the reference DTD at apache.org.

    Steps to reproduce:

    Create a new web project.

    Add struts capabilities to it. Be sure to select Struts 1.2 project.

    Remove webProject capabilities

    Re-add webProject capabilities

    attempt to add struts capabilities again

    A popup appears stating that one message resource was found. Fine. Then the struts capabilities dialog box appears and Struts 1.1 project is selected.

    Select Struts 1.2 project. An error message pops up: “Invalid Struts 1.2 config file found:
    org.jdom.input.JDOMParseException: Error on Line 6: element type “struts-config” must be declared.”

    Click on the Struts 1.1 project radio button and again a message appears stating that one message resource has been found. Click on the 1.0 button, and this message appears: “Invalid Struts 1.0 config file found:
    org.jdom.input.JDOMParseException: Error on Line 9: element type “global-exceptions” must be declared.”

    What’s going on? When you select a struts 1.0 project, MyEclipse attempts to validate the system-generated struts-config file against a struts-config 1.0 DTD. When you select a 1.1 project, it validates successfully against a 1.1 DTD (unless you add a 1.2 specific tag like “<description>”, in which case parsing fails). When you select 1.2, it attempts to validate against a BROKEN OR MISSING 1.2 DTD.

    Where are the DTDs that MyEclipse is using for validation, and when can it be fixed? It’s obviously not using the one specified in the DOCTYPE for the file, because running xml validation against the system generated struts-config.xml file generates no errors. If I can’t get this resolved pretty quickly, I will have to recommend to our development team against purchasing licenses. This is a showstopper.

    System:

    Windows XP with Service Pack 2
    Jdk 1.4.2.09
    Eclipse 3.1.1
    MyEclipse 4.0.2GA Evaluation

    The Struts Config file in question:

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE struts-config PUBLIC “-//Apache Software Foundation//DTD Struts Configuration 1.2//EN” “http://struts.apache.org/dtds/struts-config_1_2.dtd”&gt;

    <struts-config>
    <data-sources />
    <form-beans />
    <global-exceptions />
    <global-forwards />
    <action-mappings />
    <message-resources parameter=”com.yourcompany.struts.ApplicationResources” />
    </struts-config>

    #242916 Reply

    Riyad Kalla
    Member

    jvance,
    We appologize you ran into this we will look into it ASAP.

    #246701 Reply

    VincentVega
    Member

    Hi:

    I am having the exact same problem. In order to be able to add the Struts capabilities, I had to change the doctype declaration to v1.1. Once I did that no validation errors occured. However, the Struts Flow Overview is not working.

    Has there been a resolution to this problem?

    #246719 Reply

    Riyad Kalla
    Member

    Our appologies this was not addressed yet, I will try and bump the priority.

    #246794 Reply

    Riyad Kalla
    Member

    Just a quick update after asking for this bug to be evaluated, one of the developers on the team just went in and fixed it right up instead, so this will be available in 4.1.1, sorry for the delay.

    #261407 Reply

    glote
    Member

    I have the same problem with myeclipse 5.0 GA and a struts 1.1 config file.
    In XMLspy struts-config.xml is valid according to the struts-config_1_1.dtd

    The start of my struts-config.xml:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE struts-config PUBLIC “-//Apache Software Foundation//DTD Struts Configuration 1.1//EN” “http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd”&gt;
    <struts-config>

    #261408 Reply

    glote
    Member

    I have the same problem with myeclipse 5.0 GA and a struts 1.1 config file.
    In XMLspy struts-config.xml is valid according to the struts-config_1_1.dtd

    The start of my struts-config.xml:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE struts-config PUBLIC “-//Apache Software Foundation//DTD Struts Configuration 1.1//EN” “http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd”&gt;
    <struts-config>

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Broken DTD Parsing BLOCKS Adding Struts Capabilities

You must be logged in to post in the forum log in