- This topic has 7 replies, 5 voices, and was last updated 19 years, 11 months ago by Thomas SMETS.
-
AuthorPosts
-
Raja krishnanMemberHi ,
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.
GregMemberCould 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?
richardozParticipantI 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”>
<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 AMThanks for any feedback!
Scott AndersonParticipantThe 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.
richardozParticipantThank 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.
Scott AndersonParticipantRichard,
Glad to hear you worked it out. 🙂
Raja krishnanMemberHi 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”>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,.
Thomas SMETSMemberSpring file validation issue too…
What is the solution … ?\T,
-
AuthorPosts