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

Discussions about using 3rd party extension with OpenOffice.org

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

Postby Tailor » Tue Nov 17, 2015 10:10 am

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.
Last edited by Tailor on Tue Nov 24, 2015 3:44 pm, edited 1 time in total.
OpenOffice 4.1.2 on Windows 7
Tailor
 
Posts: 9
Joined: Mon Nov 16, 2015 12:34 pm

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

Postby RoryOF » Tue Nov 17, 2015 10:21 am

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!
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28779
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby Tailor » Tue Nov 17, 2015 10:24 am

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...
OpenOffice 4.1.2 on Windows 7
Tailor
 
Posts: 9
Joined: Mon Nov 16, 2015 12:34 pm

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

Postby RoryOF » Tue Nov 17, 2015 10:31 am

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.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28779
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby RoryOF » Tue Nov 17, 2015 10:41 am

Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28779
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby Tailor » Tue Nov 17, 2015 10:45 am

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 :)
OpenOffice 4.1.2 on Windows 7
Tailor
 
Posts: 9
Joined: Mon Nov 16, 2015 12:34 pm

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

Postby RoryOF » Tue Nov 17, 2015 11:21 am

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.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28779
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby RoryOF » Tue Nov 17, 2015 5:20 pm

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?
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28779
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby Tailor » Tue Nov 17, 2015 5:36 pm

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.
OpenOffice 4.1.2 on Windows 7
Tailor
 
Posts: 9
Joined: Mon Nov 16, 2015 12:34 pm

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

Postby RoryOF » Tue Nov 17, 2015 6:57 pm

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.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28779
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby Tailor » Fri Nov 20, 2015 4:34 pm

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.
Attachments
fehleruno.PNG
First error message
fehleruno2.PNG
Second error message which popped up after I pressed "OK" on the first one.
OpenOffice 4.1.2 on Windows 7
Tailor
 
Posts: 9
Joined: Mon Nov 16, 2015 12:34 pm

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

Postby mauriciobaeza » Fri Nov 20, 2015 4:42 pm

You can compile manually...

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

Best regards
______________________________________________
Everything not given is lost
AOO 4.1 / LibO 4.3 on ArchLinux with Gnome3
Please, I do not answer private questions, you use the forum
mauriciobaeza
 
Posts: 56
Joined: Thu Apr 22, 2010 5:03 am

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

Postby Tailor » Fri Nov 20, 2015 4:51 pm

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 :/
OpenOffice 4.1.2 on Windows 7
Tailor
 
Posts: 9
Joined: Mon Nov 16, 2015 12:34 pm

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

Postby mauriciobaeza » Fri Nov 20, 2015 5:15 pm

It's Python...

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

Best regards
______________________________________________
Everything not given is lost
AOO 4.1 / LibO 4.3 on ArchLinux with Gnome3
Please, I do not answer private questions, you use the forum
mauriciobaeza
 
Posts: 56
Joined: Thu Apr 22, 2010 5:03 am

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

Postby RoryOF » Fri Nov 20, 2015 5:49 pm

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.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28779
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby Tailor » Tue Nov 24, 2015 3:43 pm

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_mbox/openoffice-api/201308.mbox/%3C521F24E8.8080800@codebuilders.net%3E

I will now include a "solved"-tag for this thread.
Thank you all for your help and input :)
OpenOffice 4.1.2 on Windows 7
Tailor
 
Posts: 9
Joined: Mon Nov 16, 2015 12:34 pm


Return to Extensions

Who is online

Users browsing this forum: No registered users and 1 guest