[JBoss JIRA] (TEIID-3471) unable to consume odata service deployed in teiid
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3471?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-3471:
-------------------------------------
[~shawkins] It looks like OReva can handle the collection type when defined as property in {EntityType} or {ComplexType} and {FunctionImport} return. It does not handle in the {FunctionImport} as input Parameter. Since Function Import supports in-lining of the parameter values during the execution on a GET based call, this becomes an issue. I believe, we will have same issue in V4, but in V4 I think I modeled as "Action" in those cases (Action is always POST based). I will double check that.
IMO, it may be easier to avoid adding this "arrayiterate" or any functions with collection type as parameter in OData service generation side, than consuming side, as I do not think any other service will expose in similar situation.
> unable to consume odata service deployed in teiid
> -------------------------------------------------
>
> Key: TEIID-3471
> URL: https://issues.jboss.org/browse/TEIID-3471
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.7
> Reporter: Mark Drilling
> Assignee: Ramesh Reddy
> Attachments: deployment-exception.txt, MyVDB-vdb.xml, standalone-snippet.xml
>
>
> I am unable to consume odata service created in teiid.
> Steps to reproduce and files are attached.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3479) Typo in SecurityHelper method neogitiateGssLogin
by Jaime Meritt (JIRA)
Jaime Meritt created TEIID-3479:
-----------------------------------
Summary: Typo in SecurityHelper method neogitiateGssLogin
Key: TEIID-3479
URL: https://issues.jboss.org/browse/TEIID-3479
Project: Teiid
Issue Type: Bug
Components: Embedded
Affects Versions: 8.11
Reporter: Jaime Meritt
Assignee: Steven Hawkins
Priority: Trivial
There is a typo in the new method neogitiateGssLogin in the SecurityHelper interface. Definitely a nit but good to fix before GA and it proliferates
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3478) A malformed query is generated by Salesforce translator when a view model made over Salesforce tables, which have primarykey-foreignkey relationship, is queried with a where clause.
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3478?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3478:
---------------------------------------
This looks to be a duplicate of TEIID-3378
> A malformed query is generated by Salesforce translator when a view model made over Salesforce tables, which have primarykey-foreignkey relationship, is queried with a where clause.
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-3478
> URL: https://issues.jboss.org/browse/TEIID-3478
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Reporter: Pranav K
> Assignee: Steven Hawkins
>
> A malformed query is generated by Salesforce translator when a view model made over Salesforce tables, which have primarykey-foreignkey relationship, is queried with a where clause. (See steps to reproduce)
> Log:
> Caused by: javax.resource.ResourceException: [MalformedQueryFault [ApiQueryFault [ApiFault exceptionCode='MALFORMED_QUERY'
> exceptionMessage='
> FROM Case WHERE Case.AccountId != NULLAccount.Name = 'LYCEE AGRICOLE
> ^
> ERROR at Row:1:Column:93
> Bind variables only allowed in Apex code'
> ]
> row='1'
> column='93'
> ]
> ]
>
> at org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.query(SalesforceConnectionImpl.java:177) ~[connector-salesforce-8.10.0.Final-lib.jar:8.10.0.Final]
> at org.teiid.translator.salesforce.execution.QueryExecutionImpl.execute(QueryExecutionImpl.java:138) ~[translator-salesforce-8.10.0.Final.jar:8.10.0.Final]
> ... 18 common frames omitted
> Caused by: com.sforce.soap.partner.fault.MalformedQueryFault: null
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_60-ea]
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[na:1.7.0_60-ea]
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_60-ea]
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[na:1.7.0_60-ea]
> at java.lang.Class.newInstance(Class.java:374) ~[na:1.7.0_60-ea]
> at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:627) ~[force-wsc-22.0.0.jar:na]
> at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:504) ~[force-wsc-22.0.0.jar:na]
> at com.sforce.ws.transport.SoapConnection.parseDetail(SoapConnection.java:229) ~[force-wsc-22.0.0.jar:na]
> at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:203) ~[force-wsc-22.0.0.jar:na]
> at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:149) ~[force-wsc-22.0.0.jar:na]
> at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98) ~[force-wsc-22.0.0.jar:na]
> at com.sforce.soap.partner.PartnerConnection.query(PartnerConnection.java:1335) ~[force-partner-api-22.0.0.jar:na]
> at org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.query(SalesforceConnectionImpl.java:172) ~[connector-salesforce-8.10.0.Final-lib.jar:8.10.0.Final]
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3478) A malformed query is generated by Salesforce translator when a view model made over Salesforce tables, which have primarykey-foreignkey relationship, is queried with a where clause.
by Pranav K (JIRA)
[ https://issues.jboss.org/browse/TEIID-3478?page=com.atlassian.jira.plugin... ]
Pranav K commented on TEIID-3478:
---------------------------------
I did a fix for this locally, for myself to proceed. I anyway made a pull request for the same: https://github.com/teiid/teiid/pull/460
Thanks
> A malformed query is generated by Salesforce translator when a view model made over Salesforce tables, which have primarykey-foreignkey relationship, is queried with a where clause.
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-3478
> URL: https://issues.jboss.org/browse/TEIID-3478
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Reporter: Pranav K
> Assignee: Steven Hawkins
>
> A malformed query is generated by Salesforce translator when a view model made over Salesforce tables, which have primarykey-foreignkey relationship, is queried with a where clause. (See steps to reproduce)
> Log:
> Caused by: javax.resource.ResourceException: [MalformedQueryFault [ApiQueryFault [ApiFault exceptionCode='MALFORMED_QUERY'
> exceptionMessage='
> FROM Case WHERE Case.AccountId != NULLAccount.Name = 'LYCEE AGRICOLE
> ^
> ERROR at Row:1:Column:93
> Bind variables only allowed in Apex code'
> ]
> row='1'
> column='93'
> ]
> ]
>
> at org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.query(SalesforceConnectionImpl.java:177) ~[connector-salesforce-8.10.0.Final-lib.jar:8.10.0.Final]
> at org.teiid.translator.salesforce.execution.QueryExecutionImpl.execute(QueryExecutionImpl.java:138) ~[translator-salesforce-8.10.0.Final.jar:8.10.0.Final]
> ... 18 common frames omitted
> Caused by: com.sforce.soap.partner.fault.MalformedQueryFault: null
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_60-ea]
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[na:1.7.0_60-ea]
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_60-ea]
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[na:1.7.0_60-ea]
> at java.lang.Class.newInstance(Class.java:374) ~[na:1.7.0_60-ea]
> at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:627) ~[force-wsc-22.0.0.jar:na]
> at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:504) ~[force-wsc-22.0.0.jar:na]
> at com.sforce.ws.transport.SoapConnection.parseDetail(SoapConnection.java:229) ~[force-wsc-22.0.0.jar:na]
> at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:203) ~[force-wsc-22.0.0.jar:na]
> at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:149) ~[force-wsc-22.0.0.jar:na]
> at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98) ~[force-wsc-22.0.0.jar:na]
> at com.sforce.soap.partner.PartnerConnection.query(PartnerConnection.java:1335) ~[force-partner-api-22.0.0.jar:na]
> at org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.query(SalesforceConnectionImpl.java:172) ~[connector-salesforce-8.10.0.Final-lib.jar:8.10.0.Final]
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3478) A malformed query is generated by Salesforce translator when a view model made over Salesforce tables, which have primarykey-foreignkey relationship, is queried with a where clause.
by Pranav K (JIRA)
Pranav K created TEIID-3478:
-------------------------------
Summary: A malformed query is generated by Salesforce translator when a view model made over Salesforce tables, which have primarykey-foreignkey relationship, is queried with a where clause.
Key: TEIID-3478
URL: https://issues.jboss.org/browse/TEIID-3478
Project: Teiid
Issue Type: Bug
Components: Salesforce Connector
Reporter: Pranav K
Assignee: Steven Hawkins
A malformed query is generated by Salesforce translator when a view model made over Salesforce tables, which have primarykey-foreignkey relationship, is queried with a where clause. (See steps to reproduce)
Log:
Caused by: javax.resource.ResourceException: [MalformedQueryFault [ApiQueryFault [ApiFault exceptionCode='MALFORMED_QUERY'
exceptionMessage='
FROM Case WHERE Case.AccountId != NULLAccount.Name = 'LYCEE AGRICOLE
^
ERROR at Row:1:Column:93
Bind variables only allowed in Apex code'
]
row='1'
column='93'
]
]
at org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.query(SalesforceConnectionImpl.java:177) ~[connector-salesforce-8.10.0.Final-lib.jar:8.10.0.Final]
at org.teiid.translator.salesforce.execution.QueryExecutionImpl.execute(QueryExecutionImpl.java:138) ~[translator-salesforce-8.10.0.Final.jar:8.10.0.Final]
... 18 common frames omitted
Caused by: com.sforce.soap.partner.fault.MalformedQueryFault: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_60-ea]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[na:1.7.0_60-ea]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_60-ea]
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[na:1.7.0_60-ea]
at java.lang.Class.newInstance(Class.java:374) ~[na:1.7.0_60-ea]
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:627) ~[force-wsc-22.0.0.jar:na]
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:504) ~[force-wsc-22.0.0.jar:na]
at com.sforce.ws.transport.SoapConnection.parseDetail(SoapConnection.java:229) ~[force-wsc-22.0.0.jar:na]
at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:203) ~[force-wsc-22.0.0.jar:na]
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:149) ~[force-wsc-22.0.0.jar:na]
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98) ~[force-wsc-22.0.0.jar:na]
at com.sforce.soap.partner.PartnerConnection.query(PartnerConnection.java:1335) ~[force-partner-api-22.0.0.jar:na]
at org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.query(SalesforceConnectionImpl.java:172) ~[connector-salesforce-8.10.0.Final-lib.jar:8.10.0.Final]
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3471) unable to consume odata service deployed in teiid
by Ron Sigal (JIRA)
[ https://issues.jboss.org/browse/TEIID-3471?page=com.atlassian.jira.plugin... ]
Ron Sigal commented on TEIID-3471:
----------------------------------
Hi Ramesh,
Ok, I see that
{code}
@Path("utf8")
@Produces("text/plain;charset=utf-8")
@POST
public String utf8()
{
System.out.println("TestResource.utf8()");
return "ok";
}
...
@Test
public void testAcceptNoUtf8() throws Exception
{
ClientRequest request = new ClientRequest("http://localhost:8081/utf8/");
request.accept("text/plain");
ClientResponse<?> response = request.post();
Assert.assertEquals(200, response.getStatus());
String entity = response.getEntity(String.class);
System.out.println("result: " + entity);
}
{code}
results in
org.jboss.resteasy.spi.NotAcceptableException: RESTEASY001530: No match for accept header
whereas
{code}
@Path("nocharset")
@Produces("text/plain")
@POST
public String noCharset()
{
return "ok";
}
...
@Test
public void testAcceptUtf8No() throws Exception
{
ClientRequest request = new ClientRequest("http://localhost:8081/nocharset/");
request.accept("text/plain;charset=utf-8");
ClientResponse<?> response = request.post();
Assert.assertEquals(200, response.getStatus());
String entity = response.getEntity(String.class);
System.out.println("result: " + entity);
}
{code}
works fine. The relevant code is
{code}
@Override
public boolean isCompatible(MediaType other)
{
boolean result;
if (other == null)
result = false;
if (getType().equals(MEDIA_TYPE_WILDCARD) || other.getType().equals(MEDIA_TYPE_WILDCARD))
result = true;
else if (getType().equalsIgnoreCase(other.getType()) && (getSubtype().equals(MEDIA_TYPE_WILDCARD) || other.getSubtype().equals(MEDIA_TYPE_WILDCARD)))
result = true;
else
{
if (getType().equalsIgnoreCase(other.getType())
&& this.getSubtype().equalsIgnoreCase(other.getSubtype()))
{
if (getParameters() == null || getParameters().size() == 0)
{
result = true;
}
else
{
result = this.equals(other);
}
}
else
{
result = false;
}
}
return result;
}
{code}
in org.jboss.resteasy.util.WeightedMediaType in the resteasy-jaxrs module.
Very interesting. Honestly, I'm not sure how to think about this. The JAX-RS 1.1 spec says "An implementation MUST NOT invoke a method whose effective value of @Produces does not match the request Accept header.", but I don't see where it ever actually defines "match". And Resteasy passes the TCK tests. Really, I'm not even sure what "match" SHOULD mean. We could get crazy and do full blown unification (http://en.wikipedia.org/wiki/Unification_%28computer_science%29). Ugh.
Resource matching is a very fundamental notion in JAX-RS, and I wouldn't want to make any changes without being very careful.
Any thoughts about how to interpret "match"?
-Ron
> unable to consume odata service deployed in teiid
> -------------------------------------------------
>
> Key: TEIID-3471
> URL: https://issues.jboss.org/browse/TEIID-3471
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.7
> Reporter: Mark Drilling
> Assignee: Ramesh Reddy
> Attachments: deployment-exception.txt, MyVDB-vdb.xml, standalone-snippet.xml
>
>
> I am unable to consume odata service created in teiid.
> Steps to reproduce and files are attached.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3471) unable to consume odata service deployed in teiid
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3471?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3471:
---------------------------------------
There are two issues. The first is that object isn't a good type for odata. The second is that the odata4j logic can't handle a collection property in any place other than in a function return. We may need to do some pre-processing of the xml to omit entities and functions that have collection or object properties.
> unable to consume odata service deployed in teiid
> -------------------------------------------------
>
> Key: TEIID-3471
> URL: https://issues.jboss.org/browse/TEIID-3471
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.7
> Reporter: Mark Drilling
> Assignee: Ramesh Reddy
> Attachments: deployment-exception.txt, MyVDB-vdb.xml, standalone-snippet.xml
>
>
> I am unable to consume odata service created in teiid.
> Steps to reproduce and files are attached.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3477) NPE when trying to use OData service with void functions
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3477?page=com.atlassian.jira.plugin... ]
Ramesh Reddy updated TEIID-3477:
--------------------------------
Affects Version/s: 8.3
(was: 8.10.1)
> 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.3
> Reporter: Jaime Meritt
> Assignee: Ramesh Reddy
> Priority: Minor
> Labels: Beta2
> Fix For: 8.11
>
>
> 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)
10 years, 11 months