There are some situation raises the kind of exception, it seems difficult to make answer without more information or your extension package.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
I have a similar project which I stripped down to find the cause. I found that the manifest.xml may be the problem. Here the manifest.xml which does not work:
The problem is the last file entry with "OOHelloWorld.jar". Without this entry I can register the OOo plugin. But I have seen also other examples with such a line inside. And I have seen other projects where this line is inside but commented out. What is correct now?
Additionally, your de.agentes.oo.helloworld.HelloAddon class does not have __writeRegistryServiceInfo and __getComponentFactory methods which are called through component registration.
And you do not need description.xml entry in the META-INF/manifest.xml file.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
thank you for your help and for studying my example. I guess the __writeRegistryServiceInfo and __getComponentFactory will be called via reflexion. I will try it and report again...
When will component registration happen? During call of 'unopkg add...' or after Openoffice is started?
javatux wrote:When will component registration happen? During call of 'unopkg add...' or after Openoffice is started?
Installation time.
The code generated by Eclipse or Netbeans plug-in provides their own central registration class which allows to register multiple component easily. But if you do not know registration process of UNO components written in Java, see following document and examples in DevGuide.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Now I see a little bit clearer. The first error I made was the incomplete Class-Path entry in the MANIFEST.MF. Unfortunately you'll get not really a hint from 'unopkg add -v ...' if something is wrong with your classes or classpath.
And with the correct classpath I saw the execption from missing __writeRegistryServiceInfo and __getComponentFactory method. Now I also understand the difference between uno-typelibrary (this is for normal jars) and uno-component (for jars with classes which implements com.sun.star.lang.XServiceInfo).