[teiid-issues] [JBoss JIRA] (TEIID-3477) NPE when trying to use OData service with void functions

Jaime Meritt (JIRA) issues at jboss.org
Wed May 13 11:32:19 EDT 2015


Jaime Meritt created TEIID-3477:
-----------------------------------

             Summary: NPE when trying to use OData service with void functions
                 Key: TEIID-3477
                 URL: https://issues.jboss.org/browse/TEIID-3477
             Project: Teiid
          Issue Type: Bug
          Components: OData
    Affects Versions: 8.10.1
            Reporter: Jaime Meritt
            Assignee: Steven Hawkins
            Priority: Minor


I have Teiid configured to work with OData sources and tested it successfully with the Northwind v2 endpoint.  However, when trying to use my custom OData service I get an NPE during the metadata import process.  After some debugging I have tracked this down to a null returnType coming back from the following code in the ODataMetadataProcessor which will see a null for void functions.  I looked for a translator property to suppress import of procedures to work around it but have yet to find anything that will help so I think this requires a code change to workaround.
 
// add return type
EdmType returnType = function.getReturnType();
if (returnType.isSimple()) {
  mf.addProcedureParameter(...
}
 
Appreciate any help you can provide.  Thanks, Jaime
See stack trace below
Caused by: java.lang.NullPointerException
  at org.teiid.translator.odata.ODataMetadataProcessor.addFunctionImportAsProcedure(ODataMetadataProcessor.java:396)
  at org.teiid.translator.odata.ODataMetadataProcessor.getMetadata(ODataMetadataProcessor.java:119)
  at org.teiid.translator.odata.ODataMetadataProcessor.process(ODataMetadataProcessor.java:92)
  at org.teiid.translator.odata.ODataExecutionFactory.getMetadata(ODataExecutionFactory.java:112)
  at org.teiid.translator.odata.ODataExecutionFactory.getMetadata(ODataExecutionFactory.java:53)
  at org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:83)
  at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:60)
  at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
  at org.teiid.runtime.EmbeddedServer.loadMetadata(EmbeddedServer.java:762)
  at org.teiid.runtime.AbstractVDBDeployer.loadMetadata(AbstractVDBDeployer.java:168)
  at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:712)
  at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:653)




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the teiid-issues mailing list