[xep-support] Re: Premature end of file issue in Glassfish

From: Enrique Diaz Gaytan <EDiazGaytan@ICWGROUP.com>
Date: Thu Jan 02 2014 - 10:16:33 PST

Thank you Kevin
Do you have some sample how to combine xep xslt transformer with saxon in java?

Thanks
Enrique

From: Kevin Brown [mailto:kevin@renderx.com]
Sent: Tuesday, December 31, 2013 2:16 PM
To: Enrique Diaz Gaytan; 'RenderX Community Support List'
Subject: RE: [xep-support] Re: Premature end of file issue in Glassfish

I am not a Java expert but I would think what is registered as TransformerFactory first wins, in other words ... include saxon.jar before anything else in the classpath. I think there are also other ways ... http://www.onjava..com/pub/a/onjava/excerpt/java_xslt_ch5/index.html?page=3

Kevin Brown
RenderX

From: Enrique Diaz Gaytan [mailto:EDiazGaytan@ICWGROUP.com]<mailto:[mailto:EDiazGaytan@ICWGROUP.com]>
Sent: Tuesday, December 31, 2013 12:03 PM
To: 'kevin@renderx.com'; 'RenderX Community Support List'
Subject: RE: [xep-support] Re: Premature end of file issue in Glassfish

Thank you Kevin
Just one question how do I tell to Glassfish to use a different parser instead of Xalan because glassfish is taking the default from the classloader

Thanks
Enrique

From: xep-support-bounces@renderx.com<mailto:xep-support-bounces@renderx.com> [mailto:xep-support-bounces@renderx.com] On Behalf Of Kevin Brown
Sent: Tuesday, December 31, 2013 12:37 PM
To: 'RenderX Community Support List'
Subject: [xep-support] Re: Premature end of file issue in Glassfish

I would not use Xalan, the error below certainly exists because of Xalan and not XEP in any way.
I would also check server logs to see if there is any more information.
Could be stream not being reset, could be encoding issue, could be many things but I have always seen Xalan to be buggy and Saxon much better.

Kevin Brown
RenderX

From: xep-support-bounces@renderx.com<mailto:xep-support-bounces@renderx.com> [mailto:xep-support-bounces@renderx.com]<mailto:[mailto:xep-support-bounces@renderx.com]> On Behalf Of Enrique Diaz Gaytan
Sent: Tuesday, December 31, 2013 10:11 AM
To: 'xep-support@renderx.com'
Subject: [xep-support] Premature end of file issue in Glassfish

Hi All
I am migrating a web application which is using the xep jar for transformation of xslt the application was working on tomcat but not working on glassfish 4 JDK 7, and it's exactly the same xslt file, I think the issue is related to a dependencies conflict so please take a look at the following stack trace:
javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Premature end of file.
                at com.sun.org.apache.xalan.internal..xsltc.trax.TransformerImpl.transform(TransformerImpl.java:752)
                at com.sun.org.apache.xalan.internal..xsltc.trax.TransformerImpl.transform(TransformerImpl.java:353)
                at com.renderx.xep.FOTransformer.transform(Unknown Source)
                at com.icwgroup.esc.services.docgen.service.DocumentGeneratorServiceImpl.transform(DocumentGeneratorServiceImpl..java:139)
                at com.icwgroup.esc.services.docgen.service.DocumentGeneratorServiceImpl.generateStoreDocument(DocumentGeneratorServiceImpl.java:52)
                at com.icwgroup.esc.services.docgen.ws.DocumentGenerationService.generateDocument(DocumentGenerationService.java:54)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:606)
                at org.glassfish.webservices.InstanceResolverImpl$1.invoke(InstanceResolverImpl.java:143)
---------
org.xml.sax.SAXParseException; systemId: file:///C:/temp/XSLT_PATH/xep/documents/templates/ca_quote/01012010.xsl<file:///C:\temp\XSLT_PATH\xep\documents\templates\ca_quote\01012010.xsl>; lineNumber: 2; columnNumber: 4; Premature end of file.
                at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
                at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
                at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter..reportError(XMLErrorReporter.java:441)
                at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter..reportError(XMLErrorReporter.java:368)
                at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1388)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1019)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
                at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:846)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:775)
                at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)

Enrique Diaz
ICWGroup

!DSPAM:87,52c5aeb09851979515714!

_______________________________________________
(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
ww.renderx.com/terms-of-service.html
Received on Thu Jan 2 10:23:48 2014

This archive was generated by hypermail 2.1.8 : Thu Jan 02 2014 - 10:23:54 PST