Forum Stats

  • 3,826,351 Users
  • 2,260,634 Discussions
  • 7,896,914 Comments

Discussions

getMdmMetadataProvider NullPointerException

User_ZYUN4
User_ZYUN4 Member Posts: 2 Green Ribbon

hi every one,

I'm a new in OLAP API, I have created cube by AWM then I want to access the cube to select data using java application. But I'm stuck in create MdmMetadataProvider, it throw nullpointerexception in this code:

 showInfo("Getting the MDM MetadataProvider.");

 showInfo("Getting the MDM MetadataProvider.");

  try

  {

   mp = (MdmMetadataProvider) dp.getMdmMetadataProvider();

  }

  catch (Exception e)

  {

   showError("Cannot create the MDM metadata provider." + e);

 e.printStackTrace();

  }

Inaddition , I use oracle db 19.6,

and ojdbc10.jar (/jdbc/lib), olap_api.jar (/olap/api/lib)

this is stacktrace:

ERROR: Cannot create the MDM metadata provider.java.lang.NullPointerException

java.lang.NullPointerException

at oracle.olapi.data.source.DataProvider.getConnectionInterface(Unknown Source)

at oracle.olapi.data.source.DataProvider.getMetadataProviderInterface(Unknown Source)

at oracle.olapi.data.source.DataProvider.getMetadataProviderInterface(Unknown Source)

at oracle.olapi.metadata.MetadataFetcher.initialize(Unknown Source)

at oracle.olapi.metadata.MetadataFetcher.<init>(Unknown Source)

at oracle.olapi.metadata.BaseMetadataProvider.<init>(Unknown Source)

at oracle.olapi.metadata.mdm.MdmMetadataProvider.<init>(Unknown Source)

at oracle.olapi.data.source.DataProvider.createMdmMetadataProvider(Unknown Source)

at oracle.olapi.data.source.DataProvider.getMdmMetadataProvider(Unknown Source)

at oracle.olapi.examples.Context11g._createProviders(Context11g.java:253)

at oracle.olapi.examples.Context11g._connect(Context11g.java:189)

at oracle.olapi.examples.Context11g.<init>(Context11g.java:107)

at oracle.olapi.examples.BaseExample11g.createContext(BaseExample11g.java:137)

at oracle.olapi.examples.BaseExample11g.initialize(BaseExample11g.java:107)

at oracle.olapi.examples.BaseExample11g.execute(BaseExample11g.java:65)

at oracle.olapi.examples.BaseExample11g.execute(BaseExample11g.java:86)

at oracle.olapi.examples.cursor.CursorConceptsExamples.main(CursorConceptsExamples.java:311)

Does anyone help me fix this?

Answers