Home Analytics Developing analytics applications
The community of Analytics developers are invited to follow and participate in the developer network.
OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

error.CannotStartupOSGIPlatform: Null pointer ServiceLAuncher


I am getting the following error while the platform.startup gets called. 


I am using. Neon Eclipse: Version: Neon.3 Release (4.6.3)

Birt Runtime: birt 4.6.0


Birt Jars has been added in  the classpath entry for the class that runs it as java application. 


org.eclipse.birt.core.exception.BirtException: error.CannotStartupOSGIPlatform



Caused by: java.lang.NullPointerException

at org.eclipse.birt.core.framework.jar.ServiceLauncher.startup(ServiceLauncher.java:51)

at org.eclipse.birt.core.framework.Platform.startup(Platform.java:75)


Any help would be really appreciated.


I looked around the form and having hard time finding related to ServiceLauncher Null pointer application.



Thank you,



  • edited June 6, 2017

    Share some details of how the project is setup and how the BIRT runtime jars are used.

    Also what kind of a project it is?

    And more specifically, how does the project have the dependency on BIRT runtime jars ?


    Seems like the class is/was loaded by the bootstrap classloader and so results in the null pointer exception.

    To resolve that the jars would need to available on the classpath and be loaded by a classloader other than the bootstrap one.


    If the project is an Eclipse Java project then add the jars as external jars (Build Path > Configure Build Path... ) and the exception will go away.


    On a side note, I am curious how you are using 4.6 BIRT runtime as it is unusable without the workaround in this bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=497356.

  • Thank you for the reply. 

    I will try answering the questions in bullet points. 


    1. It is a Eclipse Java Project.

    2. I created a user library to add all the jars in the Java Build Path. 

    3. I run my reports using a Java class ( main method)

    4. Tried adding the jars in the User Entries under the Classpath of the Runtime Configuration. still same error.

    5. Even tried adding all the Birt Jars in the Jre/Lib folder.  still same error . ( it is boggling me as to how is it not finding the jars)

    6. I was using 4.5 and trying to migrate to 4.6 birt runtime.

    7. I do not use Web Viewer, I create EXCEL and PDF reports . 

    8. Looked at the class file ServiceLauncher.java. The null pointer occurs when it is trying to load the MANIFEST.MF file


    Please let me know if more information is needed. 


    I really do appreciate the reply. 


    At this point I am thinking back to getting lower version of Eclipse. 


    Thank you,

  • edited June 13, 2017

    Do not add the jars as a User Library and do not put them in the jre/lib folder. Doing that results in the classes being loaded by the bootstrap classloader and so it results in the null pointer exception. The reason for this is, calling getClassLoader() on a class loaded by bootstrap classloader returns null. 



    Remove the User Library and remove the jars from the jre/lib folder.


    Now add the jars as mentioned earlier.

    1. Right-click on the project and navigate, Build Path > Configure Build Path...

    2. Then under the Libraries tab, select Add External JARs. Navigate to the BIRT runtime SDK folder that has all the jars and add them.

    Alternatively, if you place all jars required by BIRT under a lib folder in your project then you can select Add JARs and add them. See what works best for your situation.


    The exception should go away now.

  • Thank you for the reply and I apologize for the delay. 


    And, I never realized this about BootStrap ClassLoader. So, I really appreciate it. 


    Back to the problem, I tried adding the jars mentioned in the option 1. and I get. 

    ClassNotFound exception for IRenderOption. ( Tried doing it both ways) This Class not found error only goes away if I add the jars to BootStrap ClassLoader.


    However, there is no issue when I use 4.5 version of BIRT Runtime. That is leading me to believe that something is not stable in version 4.6 yet. :)


    Thank you for your time. I really appreciate it. 

  • edited June 18, 2017

    The problem seems to be with the runtime jar.

    1. Open the jar, org.eclipse.birt.runtime_4.6.0-20160607.jar

    2. Navigate to META-INF folder under it.

    3. Remove the two files, ECLIPSE_.RSA and ECLIPSE_.SF, from META-INF folder.


    Use a utility like 7zip to remove the selected files from the runtime jar as shown in the linked image.



Sign In or Register to comment.