facebook

XML Validator issue [Closed]

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

    Hi ,
    I am using Eclipse 3.0.1 and MyEclipse 3.8.3 and when i use XML validator with Spring’s (http://www.springframework.org/dtd/spring-beans.dtd) applicationcontext.xml ,I am getting an DTD validation error
    saying the XML is not correct.

    If i try to validate the same applicationcontext.xml with the same DTD mentioned above with XMLSPY i don’t get any errors and moreover my application works fine with this xml.

    If required i can give the XML and the DTD file for further review..This is the standard SPRING Framework applicationcontext.xml file.

    I hope this is just a XML validator issue.

    I am Working from Australia on a Struts -Spring based J2EE project.
    Any Help would be appreciated.

    #221941 Reply

    Greg
    Member

    Could you go ahead and sanitize your applicationcontext.xml file and post it here. Make sure the santized version still has the same DTD validation error. Don’t worry about the DTD file since I can get a copy from the provided URL.

    Can you development machine access the internet normally? no need to go through a proxy?

    #222065 Reply

    richardoz
    Participant

    I am having similiar problems with the validator. I am running Eclipse 3.0.1 with MyEclipse 3.8.2
    — here a sample xml doc:
    <?xml version=”1.0″?>
    <!DOCTYPE ejb-jar PUBLIC
    “-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN”
    http://java.sun.com/dtd/ejb-jar_2_0.dtd”&gt;
    <ejb-jar>
    <enterprise-beans>
    <message-driven>
    <ejb-name>TextMDB</ejb-name>
    <ejb-class>com.xerisoft.test.TextMDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
    <message-driven-destination>
    <destination-type>javax.jms.Queue</destination-type>
    </message-driven-destination>
    <res-ref-name>jms/QCF</res-ref-name>
    <resource-ref>
    <res-type>javax.jms.QueueConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </message-driven>
    </enterprise-beans>
    </ejb-jar>
    —— validation errors:
    2 The content of element type “resource-ref” must match “(description?,res-ref-name,res-type,res-auth,res-sharing-scope?)”. ejb-jar.xml JbossMdbTest/src/META-INF line 19 January 2, 2005 9:39:02 AM
    2 The content of element type “message-driven” must match “(description?,display-name?,small-icon?,large-icon?,ejb-name,ejb-class,transaction-type,message-selector?,acknowledge-mode?,message-driven-destination?,env-entry*,ejb-ref*,ejb-local-ref*,security-identity?,resource-ref*,resource-env-ref*)”. ejb-jar.xml JbossMdbTest/src/META-INF line 20 January 2, 2005 9:39:02 AM

    Thanks for any feedback!

    #222072 Reply

    Scott Anderson
    Participant

    The errors seem legitimate. According to the DTD, a resource-ref must contain a res-ref-name element before the res-type and you don’t have one.

    #222074 Reply

    richardoz
    Participant

    Thank you! I realized that about an hour after I posted. BTW, the MyEclipse Workbench has saved me many hours.. It’s well worth the price.

    #222103 Reply

    Scott Anderson
    Participant

    Richard,

    Glad to hear you worked it out. 🙂

    #222847 Reply

    Hi Guys,
    Sorry for delayed reply…
    At work i am reaching web through Proxy & firewall .
    At home again through Firewall but no proxy.
    I am getting error with both places.

    If i changes the DTD declaration the error disappears …
    <!DOCTYPE beans SYSTEM “spring-beans.dtd”>
    The below stuff is not working
    <!DOCTYPE beans PUBLIC “-//SPRING//DTD BEAN//EN” “http://www.springframework.org/dtd/spring-beans.dtd”&gt;

    The applicationcontext.xml is from JPETSTORE application which is published with SPRING FRAMEWORK.
    ERROR DESCRIPTION

    <bean id=”baseTransactionProxy” class=”org.springframework.transaction.interceptor.TransactionProxyFactoryBean”
    abstract=”true”>

    Attribute abstract must be declared for element type bean .
    Is the error.I ran through the xml file with xmlspy and it was reported as valid file after DTD validation,.

    #222919 Reply

    Thomas SMETS
    Member

    Spring file validation issue too…
    What is the solution … ?

    \T,

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: XML Validator issue [Closed]

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