Questions tagged [saxparseexception]

The Java exception which encapsulates an XML parse error or warning.

The Java exception which encapsulates an XML parse error or warning.
This exception will include information for locating the error in the original XML document.

125 questions
4
votes
3 answers

Thymeleaf v2.0.15 SaxParse Exception - Scanner state not 24

I am trying to use Thymeleaf template engine for generating Emails in my Spring Web Application. I have followed the documentation on their website, but I keep getting a SaxParseException no matter how simple my HTML5 template is. I am using a HTML…
Encory
  • 53
  • 1
  • 3
3
votes
1 answer

Camunda - why is process engine not getting created?

I am trying to integrate the BPMN tool : camunda in my app . I have been using the camunda docs here : https://docs.camunda.org/stable/guides/getting-started-guides/spring-framework/#set-up/application-context for that purpose . I have added the…
The Dark Knight
  • 5,455
  • 11
  • 54
  • 95
3
votes
1 answer

Android XmlSax Parsor Error in Xml file

Error:org.xml.sax.SAXParseException; lineNumber: 0; columnNumber: 0; cvc-pattern-valid: Value 'build-tools;23.0.0 rc2' is not facet-valid with respect to pattern '[a-zA-Z0-9_-;.]+' for type 'segmentListType'. This error i am getting when i compile…
Jitender
  • 123
  • 1
  • 12
3
votes
1 answer

How to throw Java SAXParseException for bad XML documents in Try/Catch

I am trying to parse elements out of a XML document. It works for most of them, but sometimes I may get a fatal error because I am given a badly formatted XML document. I want to ignore those cases when I get those XML documents by throwing an…
Jayizzle
  • 532
  • 1
  • 6
  • 24
3
votes
1 answer

Is it possible to catch SAXParseException in JAX-RS/JAXB webservice?

I would like to check in a JAX-RS webservice request that valid XML was included in the body. However, this code: @PUT @Produces(MediaType.TEXT_XML) @Consumes(MediaType.TEXT_XML) @Path("/{objectID}") public MyObject…
sdoca
  • 7,832
  • 23
  • 70
  • 127
3
votes
1 answer

Document root element "configuration", must match DOCTYPE root "null"

Hi I'm trying to connect Spring MVC to MySQL using MyBatis. While setting, I got error message something like: org.xml.sax.SAXParseException: Document root element "configuration", must match DOCTYPE root "null". After googling I found that it some…
dev.taek
  • 37
  • 1
  • 1
  • 5
3
votes
1 answer

Error in XML parsing in the dtd file "Open quote is expected for attribute "{1}" associated with an element type... "

My address.dtd file is as follows. When I tried to parse my address.xml file using SAXParserFactory, the exception come as, "org.xml.sax.SAXParseException; systemId: file:/home/samitha/svnrepo/XML/XMLParserTest/src/address.dtd; lineNumber: 9;…
Samitha Chathuranga
  • 1,689
  • 5
  • 30
  • 57
3
votes
3 answers

cvc-complex-type.3.2.2: Attribute xsi:schemaLocation is not allowed to appear in in Java DOM

I am attempting to validate my XML using XSD in Java by using DOM validator. Although, manually, I know that the document is indeed valid, DOM validator shouts back at me and says: cvc-complex-type.3.2.2: Attribute is not…
An SO User
  • 24,612
  • 35
  • 133
  • 221
2
votes
1 answer

Java - XSD Validator : Get the node of the element containing the validation error

Hie, I am working in Java 8 and currently I am trying to validate XML with XSD schema using a validator (javax.xml.validation.Validator). My goal is to be able to retrieve the node of the element containing the validation error. In my code I used an…
Interceptor
  • 23
  • 1
  • 5
2
votes
2 answers

SAXParseException returns null for getSystemId()

Why SAXParseException returns null for getSystemId()? What is System Identifier? import java.io.StringReader; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.ErrorHandler; …
Vjy
  • 2,106
  • 3
  • 22
  • 34
2
votes
3 answers

DTD Info and Related Errors when Validating (XSD Schema) -- Can They Be Ignored?

So I've got a large amount of XML files. For years they've caused trouble because the people that write them do them by hand, so errors naturally occurred. It's high time we get around to validating them and providing feedback on what's wrong when…
bobber205
  • 12,948
  • 27
  • 74
  • 100
2
votes
1 answer

Replace text returned from messages.properties in gsp

I have a text in gsp as follows: The problem is the message returned can contain characters such as & and when exporting this gsp to pdf, the following error occurs: Caused by:…
Kshitij Bajracharya
  • 811
  • 2
  • 14
  • 37
2
votes
2 answers

The namespace of element 'Root' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'?

I have an xml document: And I would like to validate this xml with help of the following xsd:
Timofey
  • 2,478
  • 3
  • 37
  • 53
2
votes
1 answer

error when i try to run app on emulator android studio

i just build an app on android studio, when i run it on emulator error occured here the code. need ur help here the code : Error:Execution failed for task ':app:buildInfoDebugLoader'. > Exception while loading build-info.xml :…
Tyas
  • 73
  • 1
  • 10
2
votes
0 answers

Unexpected token (position:TEXT) --- parsing XML

I have a problem parsing a xml file. I'm working on two devices: A S4 mini with API 19 and a S7 with API 23. With the S7 everything is working fine, but with the S4 I get this error: org.xml.sax.SAXParseException: Unexpected token (position:TEXT …
Koss
  • 124
  • 2
  • 13
1
2
3
8 9