cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

E3 error - Unable to load document type due to errors parsing DTD

kristian.vantas
1-Visitor

E3 error - Unable to load document type due to errors parsing DTD

I'm trying to get an instance of Arbortext PE/E3 5.4 running and am getting this error. I suspect it is a configuration somewhere that I need to make, or a parameter setting on, say, the E3ConvertMethodInterface, but I can't figure out what needs to be set. Does anyone have any ideas?

Error-
Arbortext PE Convert Internal Error e3::convert: ...
Unable to load document type due to errors parsing DTD: "D:\foo.xsd"

Java-
E3ConvertMethodInterface convert = e3.createConvertMethod(CONVERT_FORMAT);
convert.setParameter(E3ConvertMethodInterface.FOSI_PARAMETER, fosi);
convert.setParameter(E3ConvertMethodInterface.PDF_CONFIG_FILE_PARAMETER,"D:\\apps\\PTC\\PE\\lib\\screen.pdfcf");
convert.setParameter(E3ConvertMethodInterface.INPUT_FORMAT_PARAMETER, "xml");
long fileSize = convert.post("D:/in.xml", "D:/out.pdf"); // <---- fails here
6 REPLIES 6

Does anyone know where the javadoc for these APIs are? I checked the documentation/programmer's reference but there is no mention of the available jars (e3client.jar in this case) but the samples directory utilizes these APIs.

Hi Kristian--

Before you start mucking around with java APIs, check your doctype configuration. It sounds like your document points to a "foo.xsd" schema. If PE can't find the schema file, it will abort the job.

You may need to update the catalog file on the PE server so it knows how to resolve the schema URI specified in your document.

Make sure that's all working correctly before you start digging around in the PE java code.

--Clay

"V

Thanks for the replay Clay.

I renamed foo.xsd (not the actual name, by the way, I'm using our production XSD for this - just would prefer to utilize the API rather than a com.arbortext.epic.Acl.func("_pubpdf::run_pubpdf", dviPath,params) call from java that we've successfully used for the past 6 years).

After renaming the XSD, I get: [A15015] Could not open the Schema/DTD file "D:\foo.xsd"

Instead of: Unable to load document type due to errors parsing DTD: "D:\foo.xsd"

So I think it finds it fine, it just seems to me it is unable to parse it correctly. Maybe it thinks it is a DTD (ie- as if the advanced setting "usexsdasdtd=on" is on or some other parameter which could be set via E3ConvertMethodInterface.setParameter).

Hi Kristian--

Given what you said here, I would double-check the validity of your XSD file. Try loading it into Arbortext Editor as if it were a standard XML document, and you should get information on any errors in the document.

--Clay

Clay Helberg
Senior Consultant

TerraXML
1380 Forest Park Circle, Suite 100
Lafayette, CO 80027

Yeah good ideas. It might be finding a wrong version of the schema? I think Clay is on the money regards checking catalog files and the like. Something that can also help is to try using PE Interactive on the server itself and check that it is finding the correct doctypes and so on.

-Gareth

Thank you for the ideas Gareth and Clay.

The schema is the same version we've been using in our production environment, which has been working fine. But again, on our production server it uses com.arbortext.epic.Acl which I would like to move away from as these other API's feel much cleaner.

On the server I'm trying to set up, PE Interactive loads the document (which points to the schema) just fine, passes Check Completeness, etc.

It seems like a configuration/setting specifically on an API call. I'll keep digging.
Announcements

Top Tags