Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8875193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:54:54+00:00 2026-06-14T18:54:54+00:00

I am having problems using a schema in either DTD or XSD format to

  • 0

I am having problems using a schema in either DTD or XSD format to validate XML returned to JMeter.

The error code I am getting is this.

Assertion error: true
Assertion failure: false
Assertion failure message: error: line=1 col=71 schema_reference.4: Failed to read schema document 'schema.dtd', because 
1) could not find the document; 
2) the document could not be read; 
3) the root element of the document is not <xsd:schema>.

I have made sure the schema is in this same location as the Jmeter test and is not read only etc.

Sample DTD

<!ELEMENT userId (#PCDATA)>
<!ELEMENT recordId (#PCDATA)>
<!ELEMENT operationDateTime (#PCDATA)>
<!ELEMENT operationCode (#PCDATA)>
<!ELEMENT oldVal (#PCDATA)>
<!ELEMENT newVal (#PCDATA)>
<!ELEMENT listOfAuditItems ((auditItem))>
<!ELEMENT fieldName (#PCDATA)>
<!ELEMENT buscomp (#PCDATA)>
<!ELEMENT auditItem ((recordId, userId, operationCode, buscomp, operationDateTime, fieldName, oldVal, newVal))>
<!ELEMENT ariResponse ((listOfAuditItems))>

I checked the validity of the DTD file here and it passed!

Sample XML

    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <ariResponse>
        <listOfAuditItems>
            <auditItem>
                <recordId>2-1DFSGT</recordId>
                <userId>1-1SJKJS</userId>
                <operationCode>Modify</operationCode>
                <buscomp>Service Request</buscomp>
                <operationDateTime>2010-05-12T15:23:53.000+05:30</operationDateTime>
                <fieldName />
                <oldVal />
                <newVal />
                <auditLog>2*C311*EVT_STAT_CD16*TODO_PLAN_END_DT11*OWNER_LOGIN2*N34*Open19*2011-01-06
                    16:28:567*RITESHP2*O30*0*0*
                </auditLog>
            </auditItem>
        </listOfAuditItems>
        <returncode>0</returncode>
        <errormessage />
    </ariResponse>

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:54:55+00:00Added an answer on June 14, 2026 at 6:54 pm

    Summary: in the end I’ve used http://path.to.schema/myschema.xsd as the File Name parameter in the Assertion.

    Explanation: following Alies Belik’s advice, I’ve found that the code for setting up the schema looks something like this:

    DocumentBuilderFactory parserFactory = DocumentBuilderFactory.newInstance();
    ...
    parserFactory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource", xsdFileName);
    

    where xsdFileName is a string (the attribute string is actually a constant, I inlined it for readability).

    According to e.g. this page, the attribute, when in the form a String, is interpreted as an URI – which includes HTTP URLs. Since I already have the schema accessible through HTTP, I’ve opted for this solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this week I'm having problems logging in LinkedIn using ruby mechanize. My code is
I'm having problems getting Jackson to work in my Spring app. I'm using Spring
I am having problems mapping a legacy database schema using JPA annotations. The schema
I'm having problems using fopen in php. If I open the desired URL by
I am having problems using my custom class with a std::map. The class dynamically
I am having problems using the update method of scala.collection.immutable.HashMap.I don't see the reason
I'm having some problems using cascade operations on hibernate. I have one entity (TripleDBmodel),
I'm having some problems while using PDO. It all seems correct but I am
I'm using RichFaces and I'm having problems with the fileUpload flash component + IE
I'm having problems reading this one JPEG file using ImageIO.read(File file) - it throws

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.