Issue 126700 - ODT created in 2.1 version is not working 4.1.1
Summary: ODT created in 2.1 version is not working 4.1.1
Status: CONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.4.1
Hardware: All All
: P4 Normal
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: regression
: 126983 (view as issue list)
Depends on:
Blocks:
 
Reported: 2015-11-26 06:28 UTC by Hemlata
Modified: 2017-02-24 20:08 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Sample of ODT that is cauing issue (25.01 KB, application/vnd.oasis.opendocument.text)
2015-11-26 06:28 UTC, Hemlata
no flags Details
Error Message with Sample and AOO 4.1.2 (17.90 KB, image/png)
2015-11-28 18:32 UTC, orcmid
no flags Details
Exception caught by Windows in the AOO 4.1.2 .doc export (26.76 KB, image/png)
2015-11-28 18:48 UTC, orcmid
no flags Details
TEMPLATE-A (21.23 KB, application/vnd.oasis.opendocument.text)
2016-04-18 09:05 UTC, Hemlata
no flags Details
TEMPLATE-A-GENERATED-ODT (9.85 KB, application/vnd.oasis.opendocument.text)
2016-04-18 09:10 UTC, Hemlata
no flags Details
TEMPLATE-B (25.01 KB, application/vnd.oasis.opendocument.text)
2016-04-18 09:12 UTC, Hemlata
no flags Details
TEMPLATE-B-GENERATED-ODT (13.60 KB, application/vnd.oasis.opendocument.text)
2016-04-18 09:12 UTC, Hemlata
no flags Details
TEMPLATE-A-ErrorMessage (40.80 KB, image/png)
2016-04-18 09:19 UTC, Hemlata
no flags Details
Manifest.xml of TEMPLATE-A-GENERATED-ODT (1.15 KB, text/xml)
2016-04-25 10:39 UTC, Hemlata
no flags Details
File resaved by portable OOo 2.4.1 (17.83 KB, application/vnd.oasis.opendocument.text)
2016-04-25 18:06 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Hemlata 2015-11-26 06:28:28 UTC
Created attachment 85172 [details]
Sample of ODT that is cauing issue

Description :
We have a web application with .NET framework 4.5.2 and c#. The operating system is Windows 8. It runs in IIS version 7.5. We are using Open office 4.1.1 for generating documents.
We have more than 100 templates created using openoffice 2.1 version. The same templates we are using to generate documents using openoffice 4.1.1.
 After generating  the document its getting converted as MS word of version MS Office 2003, During the conversion process to word, we are getting the below errors only for few templates.
ISSUE 1 : 
URL seems to be an unsupported one

- Exception occurred: URL seems to be an unsupported one.

ISSUE 2 : 
Type 'unoidl.com.sun.star.lang.IllegalArgumentException' in Assembly 'cli_uretypes, Version=1.0.9.0, Culture=neutral, PublicKeyToken=ce2cb7e279207b9e' is  not marked as serializable.

- Exception occurred: Type 'unoidl.com.sun.star.lang.IllegalArgumentException' in  
Assembly 'cli_uretypes, Version=1.0.9.0, Culture=neutral, PublicKeyToken=ce2cb7e279207b9e' is not marked as serializable.
Source: mscorlib


Attached the sample ODT; which is causing the problem
Comment 1 oooforum (fr) 2015-11-27 08:40:51 UTC
OOo 2.1 is very old (2006). I don't remember when ODF format has been upgraded from 1.0/1.1 to 1.2 (extended). 

Your document opens fine with AOO 4.1.2 and Win7 x64 Pro.
I don't have "URL seems to be an unsupported one".
Could you provide a step-by-step procedure to reproduce?
Comment 2 orcmid 2015-11-28 18:32:42 UTC
Created attachment 85176 [details]
Error Message with Sample and AOO 4.1.2

(In reply to oooforum from comment #1)
> OOo 2.1 is very old (2006). I don't remember when ODF format has been
> upgraded from 1.0/1.1 to 1.2 (extended). 
> 
> Your document opens fine with AOO 4.1.2 and Win7 x64 Pro.
> I don't have "URL seems to be an unsupported one".
> Could you provide a step-by-step procedure to reproduce?

The defect occurs when saving the document as .doc (Word 97-2003).

For the provided sample, I obtained the attached error message while the export to .doc was happening.  

PS: The document is identified as in ODF 1.1 format, having been generated from OpenOffice 2.2 (originally created on 2012-03-06 with the particular sample saved on 2014-06-11).  It is unlikely that a breaking change between ODF 1.0/1.1 and ODF 1.2 is an issue.
Comment 3 orcmid 2015-11-28 18:48:23 UTC
Created attachment 85177 [details]
Exception caught by Windows in the AOO 4.1.2 .doc export

(In reply to orcmid from comment #2)
> Created attachment 85176 [details]
> Error Message with Sample and AOO 4.1.2
[ ... ]
> The defect occurs when saving the document as .doc (Word 97-2003).
> PS: The document is identified as in ODF 1.1 format, having been generated
> from OpenOffice 2.2 (originally created on 2012-03-06 with the particular
> sample saved on 2014-06-11).  It is unlikely that a breaking change between
> ODF 1.0/1.1 and ODF 1.2 is an issue.
Correction: the document is identified as in ODF 1.0 format.  (The OOo 2.x were all ODF 1.0/1.1, the OOo 3.x began ODF 1.2 as I recall).

Here is the "Debug" report from the failure message in the previous attachment.  The problem is an uncaught Windows exception.  Brief examination of the .ODT does not reveal any obvious defect.
Comment 4 Hemlata 2015-11-29 03:07:54 UTC
Yes Open office 2,1 version is very old one. So, we planned to migrate to new version.
But after migration we are facing this issue.

You have seen so many placeholder in the attached odt. We bring data from database and then finally we create odt(with actual data) and then we convert this odt file to .doc file.

On converting, we are getting issue. again we rollback to 2.1. Its working fine
Comment 5 Hemlata 2015-12-07 06:33:53 UTC
Hi Orcmid,

Please help us.
Comment 6 Hemlata 2016-04-18 09:05:28 UTC
Created attachment 85453 [details]
TEMPLATE-A
Comment 7 Hemlata 2016-04-18 09:10:25 UTC
Created attachment 85454 [details]
TEMPLATE-A-GENERATED-ODT
Comment 8 Hemlata 2016-04-18 09:12:11 UTC
Created attachment 85455 [details]
TEMPLATE-B
Comment 9 Hemlata 2016-04-18 09:12:41 UTC
Created attachment 85456 [details]
TEMPLATE-B-GENERATED-ODT
Comment 10 Hemlata 2016-04-18 09:19:50 UTC
Created attachment 85457 [details]
TEMPLATE-A-ErrorMessage
Comment 11 Hemlata 2016-04-18 09:22:36 UTC
ISSUE 1 : ( PLEASE REFER THE DESCRIPTION SECTION ISSUE 1)
URL seems to be an unsupported one:

We just wants to add more details on this issue. Please check the below details. 

We have attached the Template which has placeholders to store information retrieved from database, for your reference ( see attached TEMPLATE-A ), which is working fine with OOP 2.1 without any issues.  As we mentioned our application retrieves information from database and fills in template placeholders and creates an ODT file and saves in the folder. Then our application tries to convert the odt file to word doc. Everything  works perfectly in OOP2.1.

But when we use OOP4.1.1, our application creates the odt file and saves in the folder. But after that our application not able to open the odt as the odt is corrupted. We are getting some error message when manually try to open the odt file with OOP4.1.1

We have attached the odt file which we manually not able to open with OOP4.1.1 ( see attached TEMPLATE-A-GENERATED-ODT ) and we have attached the error message what we got when manually open the odt file ( see attached TEMPLATE-A-ErrorMessage. ). The error message says YES or NO. If we click yes then the file opens without any issue and we are able to see all the content loaded from database.

What could be the reason for the odt file is being corrupted?
Why this issue happens only in OOP4.1.1 and only to specific templates?  (Note : We have more than  400 templates and almost all templates works without any issues with OOP4.1.1)


ISSUE 2 : 
Binary URP bridge disposed during call

Here the issue bit different from ISSUE 1. 

We have attached the Template which has placeholders to store information retrieved from database, for your reference ( see attached TEMPLATE-B ), which is working fine with OOP 2.1 without any issues.  As we mentioned our application retrieves information from database and fills in template placeholders and creates an ODT file and saves in the folder. Then our application tries to convert the odt file to word doc. Everything  works perfectly in OOP2.1.

But when we use OOP4.1.1, our application creates the odt file and saves in the folder.. We are able to open the odt file with OOP4.1.1 Manually. Here the odt file is created without any issue and we are able to see all the content loaded from database . But still we are getting the error message “Binary URP bridge disposed during call “ while our application trying to convert to word file from odt file.  

We have attached the odt file which we manually able to open with OOP4.1.1  without any issue( see attached TEMPLATE-B-GENERATED-ODT ) 

Why this issue happens only in OOP4.1.1 and only to specific templates?  (Note : We have more than  400 templates and almost all templates works without any issues with OOP4.1.1)

We would like to have a call with you guys. Please provide us any contact number to call. That would be very help full. 

Thanks in Advance.
Comment 12 Regina Henschel 2016-04-18 09:56:36 UTC
Your manifest.xml (in folder META-INF) differs from the actual content in "TEMPLATE-A-GENERATED_ODT". Please make your application write a correct manifest.xml and then try it again.

BTW: You document is not a template, but a text document with user-fields.
Comment 13 Hemlata 2016-04-22 10:54:28 UTC
Hi Regina,

Thanks for your Information.

But we are not able to catch what you said.We are not abel to get manifest.xml file form document.Please provide more information.

Thanks,
Hema
Comment 14 Regina Henschel 2016-04-22 15:09:37 UTC
How does your application create the file?

You should try, whether your application writes valid files, if you use a basic document, which has been created in AOO version 4.1.1. If that works, you only need a new "TEMPLATE".

You can try this way too: Take a new Writer document in version 4.1.1. Then insert the old document via menu Insert > File... Make correction as needed and use that file as new "TEMPLATE".


The odt file is actually a zip container. You can look into the container, on Windows using 7-zip for example. Then you see the folder META-INF. Go into it and you see the file manifest.xml. Open it with an editor, here on Windows I use "XML Notepad 2007" for that. When you have corrected the file save it and close the editor. 7-zip ask you whether the content in the archive should be updated. Agree. Then try, whether your application makes a valid file now.

You find details about odf package in http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part3.html

I cannot guarantee, that it will work with a correct manifest, because I do not know your application.
Comment 15 Hemlata 2016-04-25 10:39:19 UTC
Created attachment 85502 [details]
Manifest.xml  of  TEMPLATE-A-GENERATED-ODT
Comment 16 Hemlata 2016-04-25 10:42:40 UTC
Hi Regina,

Thanks for the information. We are able to extract the manifest.xml file for template TEMPLATE-A-GENERATED-ODT and we have attached the same.

Please guide us what is wrong with this manifest.xml file and what needs to be chenaged in manifest.xml file.?


Thanks,
Hema.
Comment 17 Regina Henschel 2016-04-25 18:06:16 UTC
Created attachment 85503 [details]
File resaved by portable OOo 2.4.1

I give up. The document TEMPLATE-B-GENERATED-ODT is "corrupt", but I do not find all errors, to make it work, and have no time for further investigation. 

If you compare the document TEMPLATE-A with the document TEMPLATE-A-GENERATED-ODT, you see, that some folders and files are missing. Therefore the file manifest.xml lists elements, which are not contained in the package.

In addition I have found a style:style element without name.

And I have found, that a lot of styles are duplicate.

But solving all these, does not repair the file. Or I have not found all of such problems. But I agree, that a file, which opens in OOo 2.4 should open in OOo3 as well.

I have tried something different, which might help you. I have opened the file TEMPLATE-A-GENERATED-ODT in a portable version of OOo2.4.1. and resaved it without any change. The re-saved file opens in AOO 4.1.2. So you might find the problem, by comparing the files.
Comment 18 Regina Henschel 2016-04-25 18:11:51 UTC
The file opens in portable OOo 2.4.1 and after re-save without changes, the re-saved file can be opened in AOO4.1.2. Opening already fails in OOo3.2.1.
Comment 19 Hemlata 2016-04-27 06:30:38 UTC
Thank you so much Regina.

The solution you provided fixed the ISSUE 1 ( COMMENT 11).

Same solution we tried for ISSUE 2 ( comment 11 ) but i did not work. Please help us to resolve the ISSUE 2.

Thanks in Advance,
Hema
Comment 20 oooforum (fr) 2017-02-20 13:09:04 UTC
*** Issue 126983 has been marked as a duplicate of this issue. ***