Bug 466810 - EMFPlugin.IS_RESOURCES_BUNDLE_AVAILABLE is false: NullPointerException in ExtensibleURIConverterImpl.normalize (407)
Summary: EMFPlugin.IS_RESOURCES_BUNDLE_AVAILABLE is false: NullPointerException in Ext...
Status: RESOLVED WORKSFORME
Alias: None
Product: Oomph
Classification: Tools
Component: Setup (show other bugs)
Version: 1.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: That should not normally happen in an...
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2015-05-08 02:18 EDT by EPP Error Reports CLA
Modified: 2015-09-07 12:06 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description EPP Error Reports CLA 2015-05-08 02:18:14 EDT
The following incident was reported via the automated error reporting:


    code:                   2
    plugin:                 org.eclipse.core.jobs_3.7.0.v20150316-1238
    message:                An internal error occurred during: "Setup check...".
    fingerprint:            5ae21b87
    exception class:        java.lang.NullPointerException
    exception message:      -
    number of children:     0
    
    java.lang.NullPointerException: null
    at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.normalize(ExtensibleURIConverterImpl.java:407)
    at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.exists(ExtensibleURIConverterImpl.java:377)
    at org.eclipse.oomph.setup.internal.core.SetupContext.getWorkspace(SetupContext.java:607)
    at org.eclipse.oomph.setup.internal.core.SetupContext.createSelf(SetupContext.java:208)
    at org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup(SetupUIPlugin.java:329)
    at org.eclipse.oomph.setup.ui.SetupUIPlugin.access$3(SetupUIPlugin.java:252)
    at org.eclipse.oomph.setup.ui.SetupUIPlugin$1$1.run(SetupUIPlugin.java:205)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
   
  

General Information:

    reported-by:      Juan Cadavid
    anonymous-id:     e300b98e-1149-4aaf-9742-333470607a83
    eclipse-build-id: 4.5.0.I20150320-0800
    eclipse-product:  org.eclipse.epp.package.committers.product
    operating system: Windows8 6.2.0 (x86_64) - win32
    jre-version:      1.8.0_25-b18

The following plug-ins were present on the execution stack (*):
    1. org.eclipse.core.jobs_3.7.0.v20150316-1238
    2. org.eclipse.emf.ecore_2.11.0.v20150318-0449
    3. org.eclipse.emf_2.6.0.v20150323-0420
    4. org.eclipse.oomph.setup.core_1.1.0.v20150504-1714
    5. org.eclipse.oomph.setup_1.1.0.v20150504-1714
    6. org.eclipse.oomph.setup.ui_1.1.0.v20150504-1449

Please note that:
* Messages, stacktraces, and nested status objects may be shortened.
* Bug fields like status, resolution, and whiteboard are sent
  back to reporters.
* The list of present bundles and their respective versions was
  calculated by package naming heuristics. This may or may not reflect reality.

Other Resources:
* Report: https://dev.eclipse.org/recommenders/committers/confess/#/problems/554bc6f7e4b0ce2a89d2d330  
* Manual: https://dev.eclipse.org/recommenders/community/confess/#/guide


Thank you for your assistance.
Your friendly error-reports-inbox.
Comment 1 Ed Merks CLA 2015-05-08 04:07:59 EDT
Note that theory behind this problem is that EMFPlugin.IS_RESOURCES_BUNDLE_AVAILABLE is being initialized to false.  That should not normally happen in an IDE, and this is not only a problem for Oomph, but the EMF runtime itself will not function correctly if this is the case.  If you're looking at this bugzilla, we need information about how to reproduce this problem.  Likely it's the installation of some specific technology that's using EMF and is using it in a way where org.eclipse.emf.common is initialized so early that this logic is not functioning correctly:

  public static final boolean IS_RESOURCES_BUNDLE_AVAILABLE;
  static
  {
    boolean result = false;
    if (IS_ECLIPSE_RUNNING)
    {
      try
      {
        Bundle resourcesBundle = Platform.getBundle("org.eclipse.core.resources");
        result = resourcesBundle != null && (resourcesBundle.getState() & (Bundle.ACTIVE | Bundle.STARTING | Bundle.RESOLVED)) != 0;
      }
      catch (Throwable exception)
      {
        // Assume that it's not available.
      }
    }
    IS_RESOURCES_BUNDLE_AVAILABLE = result;
  }
Comment 2 Ed Merks CLA 2015-05-22 08:04:37 EDT
We need details.  Please reopen when you have them.
Comment 3 Karel Gardas CLA 2015-09-07 11:07:54 EDT
Hello,

got to the same NPE from the same source so I'm sending at least stack trace. Hopefully this will help to analyse the true cause of this issue. And yes, this is not happening inside the IDE, but this is RAP/Parsley based application, so just pure equinox + bundles required to have this running.

Thanks,
Karel

osgi> !SESSION 2015-09-07 17:00:16.943 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_60
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -dev file:/home/karel/openpmf-v4-wsps/pmf4ui-rap-openpmf-v2_uli_stuff_v2/.metadata/.plugins/org.eclipse.pde.core/Emf_Parsley_RAP_UI_Example/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog -console -data /home/karel/openpmf-v4-wsps/pmf4ui-rap-openpmf-v2_uli_stuff_v2/.metadata/.plugins/org.eclipse.rap.tools.launch/Emf_Parsley_RAP_Launch

!ENTRY org.eclipse.ui.workbench 4 0 2015-09-07 17:00:23.688
!MESSAGE Unable to create view ID openpmf.rap.ui.llpolicyviewsaveable: An unexpected exception was thrown.
!STACK 0
java.lang.NullPointerException
	at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.normalize(ExtensibleURIConverterImpl.java:407)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:370)
	at org.eclipse.emf.parsley.resource.ResourceLoader.getResource(ResourceLoader.java:57)
	at org.eclipse.emf.parsley.views.AbstractSaveableView.loadResource(AbstractSaveableView.java:67)
	at org.eclipse.emf.parsley.views.AbstractSaveableView.createPartControl(AbstractSaveableView.java:61)
	at org.eclipse.emf.parsley.views.AbstractSaveableTreeFormView.createPartControl(AbstractSaveableTreeFormView.java:36)
	at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:226)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:599)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:310)
	at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:542)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:185)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:265)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:64)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:479)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1262)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1215)
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1614)
	at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:659)
	at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:585)
	at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:573)
	at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:269)
	at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:980)
	at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2627)
	at org.eclipse.ui.internal.WorkbenchWindow$26.run(WorkbenchWindow.java:3077)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:66)
	at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:3058)
	at org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(WorkbenchWindow.java:763)
	at org.eclipse.ui.internal.Workbench$18.runWithException(Workbench.java:1266)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:230)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:1092)
	at org.eclipse.ui.internal.StartupThreading.runWithWorkbenchExceptions(StartupThreading.java:55)
	at org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Workbench.java:1262)
	at org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Workbench.java:2061)
	at org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbench.java:1992)
	at org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWindow(WorkbenchConfigurer.java:188)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:790)
	at org.eclipse.ui.internal.Workbench$27.runWithException(Workbench.java:1640)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:230)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:1092)
	at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:110)
	at org.eclipse.ui.internal.Workbench.init(Workbench.java:1635)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2655)
	at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2530)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:701)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:684)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157)
	at openpmf.rap.ui.Application.start(Application.java:34)
	at org.eclipse.rap.ui.internal.application.EntryPointApplicationWrapper.createUI(EntryPointApplicationWrapper.java:38)
	at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:172)
	at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:284)
	at java.lang.Thread.run(Thread.java:745)
	at org.eclipse.rap.rwt.internal.lifecycle.UIThread.run(UIThread.java:105)
Comment 4 Ed Merks CLA 2015-09-07 12:06:17 EDT
Yes, but it appears that Parsely is passing a null URI up to EMF, so that sounds like a Parsely problem not an EMF nor an Oomph problem.