-
15. Re: java.lang.IllegalArgumentException: type cannot be null in translator-odata
singhall Feb 2, 2017 9:40 AM (in response to singhall)Hi ,
Its the same issue with the above service too .
Here is the query
TravelAgencySet?$select=Currency,Langu,Url,Telephone,Region,Country,Agencynum,Name,City,Street,Postbox,Postcode&$top=50
and same exception
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:412)
jvm 1 | at org.odata4j.format.xml.AtomFeedFormatParser.parseFeed(AtomFeedFormatParser.java:173)
jvm 1 | at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:161)
jvm 1 | at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:49)
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)
jvm 1 | ERROR [PROCESSOR] TEIID30019 Unexpected exception for request iZfMft4/siji.6
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:412)
jvm 1 | at org.odata4j.format.xml.AtomFeedFormatParser.parseFeed(AtomFeedFormatParser.java:173)
jvm 1 | at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:161)
jvm 1 | at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:49)
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)
-
16. Re: java.lang.IllegalArgumentException: type cannot be null in translator-odata
singhall Feb 2, 2017 9:42 AM (in response to singhall)If possible , I can explain you the issue over a call/skpye
-
17. Re: java.lang.IllegalArgumentException: type cannot be null in translator-odata
rareddy Feb 2, 2017 10:04 AM (in response to singhall)Sorry, I can't do a call, I can only help in the community.
But I do not see any TravelAgencySet in the https://sapes4.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/$metadata
Are you working with a different service? Take look at the $metadata you are querying using odata translator, there must be a EntitySet and corresponding EntityType for every table exposed in Teiid.
Ramesh..
-
18. Re: java.lang.IllegalArgumentException: type cannot be null in translator-odata
singhall Feb 2, 2017 12:20 PM (in response to rareddy)Yes,
This is a different OData service which is being generated on our SAP box .
This is meta data for the service
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="1.0"
xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:sap="http://www.sap.com/Protocols/SAPData">
<edmx:DataServices m:DataServiceVersion="2.0">
<Schema Namespace="Z_TRAVELAGENCY_SRV" xml:lang="en"
xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
<EntityType Name="Stravelag" sap:content-version="1">
<Key>
<PropertyRef Name="Agencynum"/>
</Key>
<Property Name="Currency" Type="Edm.String" MaxLength="5" sap:label="Trav.Agency.Curr" sap:semantics="currency-code"/>
<Property Name="Langu" Type="Edm.String" MaxLength="1" sap:label="Language"/>
<Property Name="Url" Type="Edm.String" MaxLength="255" sap:label="Travel agency URL"/>
<Property Name="Telephone" Type="Edm.String" MaxLength="30" sap:label="Tel."/>
<Property Name="Region" Type="Edm.String" MaxLength="3" sap:label="Region"/>
<Property Name="Country" Type="Edm.String" MaxLength="3" sap:label="Country"/>
<Property Name="Agencynum" Type="Edm.String" Nullable="false" MaxLength="8" sap:label="Agency No." sap:updatable="false"/>
<Property Name="Name" Type="Edm.String" MaxLength="25" sap:label="Travel agency name"/>
<Property Name="City" Type="Edm.String" MaxLength="25" sap:label="City"/>
<Property Name="Street" Type="Edm.String" MaxLength="30" sap:label="Street"/>
<Property Name="Postbox" Type="Edm.String" MaxLength="10" sap:label="PO Box"/>
<Property Name="Postcode" Type="Edm.String" MaxLength="10" sap:label="Postal Code"/>
</EntityType>
<EntityContainer Name="Z_TRAVELAGENCY_SRV" m:IsDefaultEntityContainer="true">
<EntitySet Name="TravelAgencySet" EntityType="Z_TRAVELAGENCY_SRV.Stravelag" sap:searchable="true" sap:content-version="1"/>
</EntityContainer>
<atom:link rel="self" href="http://crm-qa-ehp3.pbi.global.pvt:8000/sap/opu/odata/sap/Z_TRAVELAGENCY_SRV/$metadata"
xmlns:atom="http://www.w3.org/2005/Atom"/>
<atom:link rel="latest-version" href="http://crm-qa-ehp3.pbi.global.pvt:8000/sap/opu/odata/sap/Z_TRAVELAGENCY_SRV/$metadata"
xmlns:atom="http://www.w3.org/2005/Atom"/>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
And this is the data which returned and parsing generated the exception
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="http://crm-qa-ehp3.pbi.global.pvt:8000/sap/opu/odata/sap/Z_TRAVELAGENCY_SRV/"
xmlns="http://www.w3.org/2005/Atom"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<id>http://crm-qa-ehp3.pbi.global.pvt:8000/sap/opu/odata/sap/Z_TRAVELAGENCY_SRV/TravelAgencySet</id>
<title type="text">TravelAgencySet</title>
<updated>2017-02-01T18:20:02Z</updated>
<author>
<name/>
</author>
<link href="TravelAgencySet" rel="self" title="TravelAgencySet"/>
<entry>
<title type="text">TravelAgencySet('10000001')</title>
<updated>2017-02-01T18:20:02Z</updated>
<category term="Z_TRAVELAGENCY_SRV.Stravelag" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href="TravelAgencySet('10000001')" rel="edit" title="Stravelag"/>
<content type="application/xml">
<m:properties>
<d:Currency>USD</d:Currency>
<d:Langu>E</d:Langu>
<d:Url>http://www.makemytrip.com</d:Url>
<d:Telephone>123-456-6789</d:Telephone>
<d:Region>MA</d:Region>
<d:Country>US</d:Country>
<d:Agencynum>10000001</d:Agencynum>
<d:Name>MakeMy Trip</d:Name>
<d:City>Boston</d:City>
<d:Street>50 Water St</d:Street>
<d:Postbox/>
<d:Postcode>02109-3902</d:Postcode>
</m:properties>
</content>
</entry>
</feed>
-
19. Re: java.lang.IllegalArgumentException: type cannot be null in translator-odata
rareddy Feb 2, 2017 1:56 PM (in response to singhall)I can't duplicate with your provided metadata and result feed using my unit test. Can you try the latest Teiid version?
-
TestSAPExecution.java 6.1 KB
-
-
20. Re: java.lang.IllegalArgumentException: type cannot be null in translator-odata
singhall Feb 2, 2017 2:20 PM (in response to rareddy)Sure,
I can do that, but if u think there is any difference in the code base for
translator-data in the latest version from 8.13.x
translator-odata depends upon translator-ws as per my thinking , and if that is going to make any difference let me know.
This same service was working for 8.11.x
-
21. Re: java.lang.IllegalArgumentException: type cannot be null in translator-odata
rareddy Feb 2, 2017 3:00 PM (in response to singhall)well between 8.11 and 8.13 few changes did happen, you can search our JIRA. Here is is what I found
-
22. Re: java.lang.IllegalArgumentException: type cannot be null in translator-odata
singhall Feb 3, 2017 8:31 AM (in response to rareddy)Going to the latest version is difficult for US. Is there any way we can fix this issue in 8.13, as this is the version other connectors are also getting developed ?
-
23. Re: java.lang.IllegalArgumentException: type cannot be null in translator-odata
rareddy Feb 3, 2017 9:54 AM (in response to singhall)I did check the unit test I provided on 8.13 I did not see any issues. If you can recreate the issue in a unit test that would be helpful. You can use embedded Teiid for it, if you want.