Page 1 of 1

[Solved] Error creating an UNOIDL-file for an extension

Posted: Tue Nov 17, 2015 10:10 am
by Tailor
Hey everyone!
I'm trying to program an extension in Netbeans 8.0.2 with Java (1.7) for OpenOffice Writer. I already downloaded the Apache OpenOffice Plugin for Netbeans 8. I want (have) to create an idl-File with the wizard of the plugin.
The procedure I tried: Opening the wizard, selecting "Empty UNOIDL file" as File-Type from the Apache OpenOffice Category, then selecting "Service" as my Data Type an check the box for "Also Create an Implementation Object". Now I have to choose an interface for this file, but when I click on the button to choose from the types I get the message displayed "No types available".
I tried to google the hell out of that error message but I couldn't find anything related to OpenOffice or the API.
Has anyone ever had this message before? What can I do to get all the types displayed?

Things I tried:
- configuring the SDK via bat-file "setsdkenv_windows.bat" that came with the SDK
- trying to find older versions of the plugin (failed, are there any resources?)

So if you have any idea why this is happening and what I can do to solve this I greatly appreciate your effort! I also apologize if the question came up here and was solved, I tried the search function but didn't find anything.

Re: Error while creating an UNOIDL-file for an extension

Posted: Tue Nov 17, 2015 10:21 am
by RoryOF
Did you install, in Netbeans /Tools /Options /Miscellaneous : AOO API Plugin the paths to OO and the OO SDK?

An offtopic, but related note: I had a Java application compiling under OO 4.1.1 and Netbeans 8.0.2 running on Xubuntu 15.10, successfully making the OXT; I transitioned to OO 4.1.2, Netbeans 8.1 and Xubuntu 15.10 and it has ceased making the OXT. So beware of upgrading everything at once!

Re: Error while creating an UNOIDL-file for an extension

Posted: Tue Nov 17, 2015 10:24 am
by Tailor
Thank you for your quick reply, RoryOf!

Yes, I also configured the paths for the OO and the OO SDK in Netbeans! No problems there I guess.

Yeah, maybe OO 4.1.2 is the problem here, but I really don't know yet...

Re: Error while creating an UNOIDL-file for an extension

Posted: Tue Nov 17, 2015 10:31 am
by RoryOF
There is an SDK for 4.1.2 and a 4.1.3 Netbeans plugin; I suspect the only difference in the SDK is the version identifier (but I haven't checked). If you don't get a solution here, I suggest posting to the Apache OO dev list at dev@openoffice.apache.org as there is some advanced Java/OO knowledge there.

I should say that my Java knowledge is non-existent - I learned procedural programming and am groping my way blindly into Java.

Re: Error while creating an UNOIDL-file for an extension

Posted: Tue Nov 17, 2015 10:41 am
by RoryOF

Re: Error while creating an UNOIDL-file for an extension

Posted: Tue Nov 17, 2015 10:45 am
by Tailor
I also found that tutorial some days ago. It would be quite helpful I suppose if you are already familiar with idl-files. But since I have never worked with that before and don't know if the wizard creates references somewhere in the project I would prefer to use the wizard to help me create an idl-file. But I will look into the tutorial again, thanks :)

Re: Error while creating an UNOIDL-file for an extension

Posted: Tue Nov 17, 2015 11:21 am
by RoryOF
This is perhaps "teaching granny how to suck eggs" time: I find it is often useful to actually implement the example code in a tutorial to see if it works, then to hack that a little to prove that I can successfully make some working change.

OT Re: Error while creating an UNOIDL-file for an extension

Posted: Tue Nov 17, 2015 5:20 pm
by RoryOF
I've reinstalled (on another computer) Xubuntu 15.04, Netbeans 8.0.2, OO 4.1.1 and OO SDK 4.1.1. Now my Java application is compiling and making a working OXT. I intend to change one thing at a time and test the application each time. Any suggestions as to sequence of changes?

Re: Error while creating an UNOIDL-file for an extension

Posted: Tue Nov 17, 2015 5:36 pm
by Tailor
A working OXT was always created for my extensions. I now just avoid working with idl-files and hope I can avoid working with them... It's my first time writing an extension for OO so I don't know what is coming my way...

I also installed the OO SDK 4.1.1 + OO 4.1.1 in the hopes that it would solve the problem, but it sadly didn't.

Re: Error while creating an UNOIDL-file for an extension

Posted: Tue Nov 17, 2015 6:57 pm
by RoryOF
OK, I now have Netbeans 8,1, with OO netbeans extension 4.1.3, OO 4.12, OO SDK 4.1.2 running on Xubuntu 15.10; compiling the Java code and generating the OXT. It is quite sensitive - it will often not generate the OXT for reasons I do not know, and I reload a master copy of my code and voila! it works again.

Re: Error while creating an UNOIDL-file for an extension

Posted: Fri Nov 20, 2015 4:34 pm
by Tailor
I wanted to share with you my troubleshooting progress from the last few days.

In some bugzilla-issue-archives I came across a similar bug: https://bz.apache.org/ooo/show_bug.cgi?id=124818
At the bottom of the page someone suggested to start Netbeans with a 32-bit-version of the JDK so I did that.

Now when I want to create a new unoidl-file I get the types displayed correctly, but when I click "Finish" I get an error message followed by another one.
I attached the screenshots of the error messages below. (just cropped out my PC-username)

Maybe someone is able to make sense of this all...


PS: On my adventures through bugzilla-archives I found that this bug may exist since 2009... That is just CRAZY.

Also: I would REALLY appreciate it if someone who can create functioning idl-files would share their setup with me. It has nothing to do with creating OXTs or anything. I just want to create an idl-file.

Re: Error while creating an UNOIDL-file for an extension

Posted: Fri Nov 20, 2015 4:42 pm
by mauriciobaeza
You can compile manually...

You can look: https://github.com/UniversoLibreMexicoA ... ext.py#L35

Best regards

Re: Error while creating an UNOIDL-file for an extension

Posted: Fri Nov 20, 2015 4:51 pm
by Tailor
Thank you for your reply mauriciobaeza! What programming language is this? (I'm programming in Java)


Maybe I'm in the wrong subforum? Please redirect me to the right one where I can report these bugs and get help. It's not like there is a problem with the extension I wrote (because I haven't written anything yet), I think there is a problem with the plugin from OO. But maybe I'm wrong and I don't see it :/

Re: Error while creating an UNOIDL-file for an extension

Posted: Fri Nov 20, 2015 5:15 pm
by mauriciobaeza
It's Python...

Translate this code to Java is easy, because only are some paths and call execute.

Best regards

Re: Error while creating an UNOIDL-file for an extension

Posted: Fri Nov 20, 2015 5:49 pm
by RoryOF
Tailor wrote: In some bugzilla-issue-archives I came across a similar bug: https://bz.apache.org/ooo/show_bug.cgi?id=124818
At the bottom of the page someone suggested to start Netbeans with a 32-bit-version of the JDK so I did that.
This would make sense on Windows, because OpenOffice is a 32 bit application.

Re: Error while creating an UNOIDL-file for an extension

Posted: Tue Nov 24, 2015 3:43 pm
by Tailor
Maybe someone encounters similar problems to mine, so I will tell you how I fixed my current problem:

Let the wizard create the idl-file (with the error-message) and just replace the "#import"-statement with "#include" for the interface. The file then compiles perfectly fine.

See this exchange for more information: https://mail-archives.apache.org/mod_mb ... ers.net%3E

I will now include a "solved"-tag for this thread.
Thank you all for your help and input :)