Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
XML and Related Technologies
what's the correct format for dozer mapping file?
zenius lee
Greenhorn
Posts: 10
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello,
I am trying to use dozer and I follow the sample configuration file provided by dozer web site.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mappings PUBLIC "-//DOZER//DTD MAPPINGS//EN" "http://dozer.sourceforge.net/schema/beanmapping.xsd">
but I got a exception:
URI: http://dozer.sourceforge.net/schema/beanmapping.xsd Message: The markup declarations contained or pointed to by the document type declaration must be well-formed. Exception in thread "main" org.dozer.MappingException: org.xml.sax.SAXException: Parsing Fatal Error Line: 2 URI: http://dozer.sourceforge.net/schema/beanmapping.xsd Message: The markup declarations contained or pointed to by the document type declaration must be well-formed. at org.dozer.util.MappingUtils.throwMappingException(MappingUtils.java:88) at org.dozer.loader.xml.MappingFileReader.read(MappingFileReader.java:64) at org.dozer.loader.CustomMappingsLoader.load(CustomMappingsLoader.java:67) at org.dozer.DozerBeanMapper.loadCustomMappings(DozerBeanMapper.java:149) at org.dozer.DozerBeanMapper.getMappingProcessor(DozerBeanMapper.java:132) at org.dozer.DozerBeanMapper.map(DozerBeanMapper.java:94) at DozerSampleSpringTest.main(DozerSampleSpringTest.java:28) Caused by: org.xml.sax.SAXException: Parsing Fatal Error Line: 2 URI: http://dozer.sourceforge.net/schema/beanmapping.xsd Message: The markup declarations contained or pointed to by the document type declaration must be well-formed.
Can anyone help me out?
Paul Clapham
Marshal
Posts: 28177
95
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I find it very odd that a DTD declaration would point to a schema. Very odd indeed. I would expect it to point to a valid DTD. Apparently the parser agrees with me. You might consider reporting that to the people who support the product.
Balu Sadhasivam
Ranch Hand
Posts: 874
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Check out the version of Dozer framework , i guess the latest one supports xsd. but valid DTD for older versions is
<!DOCTYPE mappings PUBLIC "-//DOZER//DTD MAPPINGS//EN" "dozerbeanmapping.dtd">
Dominic Kalvap
Greenhorn
Posts: 1
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Change xml header with following, it should fix your problem.
<mappings xmlns="http://dozer.sourceforge.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://dozer.sourceforge.net schema/beanmapping.xsd">
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Spring/*Hibernate*/Struts - "Error parsing XML"
Classic Tag Handler
Problem with hibernate.cfg.xml
i have written code for dom but output given from the exception caught in the code
TLD
More...