java.lang.IllegalArgumentException: type cannot be null in translator-odata
singhall Jan 30, 2017 10:23 AMHi ,
I am using teiid odata and ws libraries to for making a SAP Odata connector. I am able to create a connection and get all the properties for a SAP entity. But while trying to fetch the records I get the following exception
jvm 1 | ERROR [PROCESSOR] TEIID30019 Unexpected exception for request Mg/70YoK2pYp.17
jvm 1 | java.lang.IllegalArgumentException: type cannot be null
jvm 1 | at org.odata4j.edm.EdmDataServices.getEdmEntitySet(EdmDataServices.java:61)
jvm 1 | at org.odata4j.internal.EdmDataServicesDecorator.getEdmEntitySet(EdmDataServicesDecorator.java:41)
jvm 1 | at org.odata4j.format.xml.AtomFeedFormatParser.parseEntry(AtomFeedFormatParser.java:366)
jvm 1 | at org.odata4j.format.xml.AtomFeedFormatParser.parseFeed(AtomFeedFormatParser.java:168)
jvm 1 | at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:156)
jvm 1 | at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:44)
jvm 1 | at org.teiid.translator.odata.BaseQueryExecution.parse(BaseQueryExecution.java:91)
jvm 1 | at org.teiid.translator.odata.BaseQueryExecution.executeWithReturnEntity(BaseQueryExecution.java:123)
jvm 1 | at org.teiid.translator.odata.ODataQueryExecution.execute(ODataQueryExecution.java:100)
jvm 1 | at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1 | at java.lang.reflect.Method.invoke(Method.java:483)
jvm 1 | at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
jvm 1 | at com.sun.proxy.$Proxy272.execute(Unknown Source)
jvm 1 | at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
jvm 1 | at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
jvm 1 | at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
jvm 1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
jvm 1 | at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
jvm 1 | at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
jvm 1 | at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
jvm 1 | at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
jvm 1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
jvm 1 | at java.lang.Thread.run(Thread.java:745)
I have checked the URI getting build up at run time and when I hit the same using postman , its returning results.
This is my Entity
<EntityType Name="Account" sap:content-version="1">
<Key>
<PropertyRef Name="accountID"/>
</Key>
<Property Name="accountID" Type="Edm.String" Nullable="false" MaxLength="10" sap:label="BusinessPartner"/>
<Property Name="name1" Type="Edm.String" MaxLength="40" sap:label="Name 1"/>
<Property Name="isMyAccount" Type="Edm.Boolean" sap:label="TRUE"/>
</EntityType>
Any idea why its failing??