We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

An dataset extraction in OpenClinica 13.0

Hi dear

I have deployed the OpenClinica 13.0 with tomcat 7 in the Window 10.
Everything was OK except for the dataset extraction.
After I created the dateset and was about to export dateset in any format, an error message occured in the sidebar as below:


The extract data job failed with the message:
java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence.
More information may be available in the log files.

The log information of the action as follows:
11/09 17:52:06 [test] FTP ERROR o.a.o.j.XsltTransformJob:510 - Error executing extract
net.sf.saxon.trans.DynamicError: java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence.
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:283)
at net.sf.saxon.event.Sender.send(Sender.java:144)
at net.sf.saxon.event.Sender.send(Sender.java:46)
at net.sf.saxon.Controller.transform(Controller.java:1340)
at org.akaza.openclinica.job.XsltTransformJob.executeInternal(XsltTransformJob.java:242)
at org.akaza.openclinica.job.XsltStatefulJob.executeInternal(XsltStatefulJob.java:23)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence.
at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)
at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.scanContent(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:270)
... 8 common frames omitted
11/09 17:52:06 [test] FTP INFO o.a.o.j.XsltTransformJob:560 - Job XsltTriggers.3_HTML_3_2017-11-09-175204119.html1510221124119 finished.
11/09 17:52:10 [] FTP INFO chriszhong o.a.o.c.e.ExportDatasetServlet:513 - action is blank
11/09 17:52:10 [] FTP INFO chriszhong o.a.o.c.e.ExportDatasetServlet:515 - just set dataset to request
11/09 17:52:10 [] FTP WARN chriszhong o.a.o.c.e.ExportDatasetServlet:546 -
11/09 17:52:10 [] FTP WARN chriszhong o.a.o.c.e.ExportDatasetServlet:547 - file list length: 0
11/09 17:52:10 [] FTP WARN chriszhong o.a.o.c.e.ExportDatasetServlet:588 - just set file list to request, sending to page
11/09 17:52:26 [test] FTP INFO o.a.o.s.BulkEmailSenderService:42 - Executing now...0 taskScheduler-25 0
11/09 17:52:26 [test] FTP INFO o.a.o.s.BulkEmailSenderService:46 - Nothing left to do getting out...

It seems like a compatibility problem, but I just can't figure it out.

It would be very appreciated if you can give me some advice to work it out...

Best Regards

Chris

Best Answers

  • forifori Posts: 7
    Accepted Answer
    Hello,

    cause of your problem:
    tomcat runs (usually) with the default codepage of the operating system.

    Default codepage of Windows is Windows-1251 (or something like that)

    Dataexport in OC works liek this:
    1. create an ODM-XML-File
    2. transform that file using XSLT to desired output format

    xslt-transformation expects UTF-8 (as it is defined in ODM-xml-header)

    Solution: run Tomcat explicitly using UTF-8:

    add set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8" to your setenv.bat inside $TOMCAT_HOME/bin (create if not exists)

    see also https://stackoverflow.com/a/11343571

    Best, Florian
  • paperaeroplanepaperaeroplane Posts: 10
    edited November 2017 Accepted Answer
    Hi Florian:

    I had been follow your guide, created the file and added a stript "-Dfile.encoding=UTF8" in tomcat JAVA windows setting page, the Dataexport functioni works.

    Thank you very much!

    Best, Chris

Answers

  • paperaeroplanepaperaeroplane Posts: 10
    via Email
    Hi Florian:

    I had been follow your guide, created the file and added a stript "-Dfile.encoding=UTF8" in tomcat JAVA windows setting page, the Dataexport functioni works.

    Thank you very much!

    Best, Chris
Sign In or Register to comment.