Liferay Service Builder SaxException - liferay

I get an error when I build my service:
org.apache.axis.ConfigurationException: org.xml.sax.SAXException: Fatal Error: URI=null Line=1258: The content of elements must consist of well-formed character data or markup.
org.xml.sax.SAXException: Fatal Error: URI=null Line=1258: The content of elements must consist of well-formed character data or markup.
at org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError(XMLUtils.java:723)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
I need some help. Thank you in advance

Quoting your error message:
The content of elements must consist of well-formed character data or
markup
The best assumption is that you have invalid xml. A decent XML editor should be able to point you to the root cause by flagging the erroneous place in your file. If it really is in line 1258 (as the message says), it might be too large to ask to post the file here.
Liferay's ServiceBuilder comes with a DTD which is typically referenced. This will make sure that the XML editor has enough information to validate the file. Make sure the DTD declaration matches the Liferay version that you compile to (that the SDK belongs to)

Related

Are there any XSD files to validate XML for the https://www.w3.org/TR/widgets/ namespace?

In the intelliJ suite, xsd validation is performed automatically and you get an error if a given schema is not found. I tried to find an xsd file for the w3c widgets namespace but i couldn't.
If there is no such thing, what is the best practice here? Just add a rule to each file to ignore the error? (that is not a good one imo)
Generate a schema automatically from the file? (but if i add something i need to regenerate it?)

Parsing a XML file and handling missing tags

I'm trying to parse a XML file in order to retrieve the data in a list.
I need to extract the TITRE_N, the AUTEURS_N and the RESUME_N. I know how to do it but my problem is that for some reference, I don't have any data for AUTEURS_N. there is no tag and the result as you can think it that all the data after are shift! Do you know how I can parse this doc and handle the fact that sometimes I'm missing one tag that I usefully use?
thx a lot!

JAXB - while unmarshalling code breaks due to extra tags in xml. Need to write code so that even if extra xml tags comes it should not break

I am marshelling xml to some java object which as some basic properties along with #XMLTransient private Collection ignoreTags but when extra tags comes in the xml code breaks during unmarshling. I want to write bullet proof code so that even if extra tag comes it should not break.

Validate BizTalk Schema in Visual Studio - "Custom component invocation failed"

Well, that error message doesn't help at all. I have a flat file schema that I cannot get working.
The XML is valid, but BizTalk can't work with it. Is there a way to enable verbose error logging when calling Validate Schema? Is there a better tool for validating/testing BizTalk schemas than Visual Studio?
I'm new to BizTalk and I'm stumped.
It sounds like something is wrong in your call to validate the schema. By any chance, did you forget to set the Input Instance Filename property?
There were two problems: Schemas built using the flat file wizard inexplicably default to Xml source. So it didn't know it wasn't dealing with .txt. Plus I had it set to expect 0 records.
Hi I had faced the same problem.
I had build a tool to convert TDS1 format schema to flat file schema. The xml schema was correct but it was not getting validated. Then i compared with my existing flat file schema and i found that child delimiter type was wrong. My tool was creating flat file schema with delimiter type set to hex for all the record info.
But ; is a character and not hex.
original record info attribute: child_delimiter_type="hex"
Changed record info attribute: child_delimiter_type="char"
So please check your delimiter type and other record info attributes as well.
Hope this will help....

m3g format validation

When loading my model.m3g file, Loader throws IOException, indicating my .m3g is not valid, but it doesn't tell where or which object is invalid.
Viewers floating around on the web can't open it either; nor do they prompt any specific error message.
I know the file is mostly good because I can manually parse the file and know each Mesh, Appearance, World, Camera, Background object are valid.
How can I diagnose further?
IOException comes from the following 2 reasons:
1. if name, or any resource referenced from it, cannot be resolved or accessed
2. if the data in name, or in any resource referenced from it, is not in accordance with the M3G and PNG file format specifications.
for "File Format for Mobile 3D Graphics API" refer the following link:
http://www.developer.nokia.com/document/Java_Developers_Library_v2/GUID-07274ED2-697C-4987-ABE9-7FFE82605633/file-format.html

Resources