Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 62 Insurance
- 536.1K On-Premises Infrastructure
- 138.2K Analytics Software
- 38.6K Application Development Software
- 5.7K Cloud Platform
- 109.4K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.2K Integration
- 41.6K Security Software
getMdmMetadataProvider NullPointerException

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
-
Were you able to successfully create a DataProvider and with it create an OLAP session to the database?
https://docs.oracle.com/cd/B28359_01/olap.111/b28127/discover.htm#sthref185
-
Thanks Ken Chin,
I solved the problem by adding the corresponding version of ojdbc6 and orai18n with jdk1.8, all of them was downloaded on oracle website.