Bug 1327245 - Generated REST WAR blob parameter issue
Summary: Generated REST WAR blob parameter issue
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Teiid
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER3
: 6.3.0
Assignee: Van Halbert
QA Contact: Jan Stastny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-14 14:46 UTC by Jan Stastny
Modified: 2016-08-24 11:48 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-24 11:48:18 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker TEIID-2694 0 Major Closed Support for Blob Input in Teiid REST services 2016-06-03 20:41:00 UTC

Description Jan Stastny 2016-04-14 14:46:04 UTC
Description of problem:
There is a problem with dynamic REST WAR generation from a vdb, which contains PROCEDURE with blob argument. See linked TEIID-2694.

VDB fragment:
<vdb name="rest-generate" version="1">
  <property name="{http://teiid.org/rest}auto-generate" value="true"/>
  <model name="h2">
    <property name="importer.useFullSchemaName" value="false"/>
    <source name="h2-connector" translator-name="h2"
      connection-jndi-name="java:/H2DB" />
  </model>
  <model name="View" type ="VIRTUAL">
     <metadata type="DDL"><![CDATA[
        SET NAMESPACE 'http://teiid.org/rest' AS REST;
        CREATE VIRTUAL PROCEDURE insertBlob(IN id integer,IN blobField blob) OPTIONS ("REST:METHOD" 'POST', "REST:URI" 'insertBlob')
        AS
        BEGIN
            INSERT INTO h2.EntityBlob(id,blob_field) VALUES (id, blobField);
        END
        ]]> </metadata>
  </model>
</vdb>

Exception message:
WARN  [org.teiid.PROCESSOR] (http-localhost/127.0.0.1:8080-1) TEIID30020 Processing exception for request 1AXGlt/xZAEo.1 'TEIID30558 Error converting parameter number 1 with value "<root><p4>bar</p4></root>" of class java.lang.String to expected type blob.'. Originally QueryResolverException 'TEIID30082 Expected value of type 'blob' but ''<root><p4>bar</p4></root>'' is of type 'string' and no implicit conversion is available.' ResolverUtil.java:232. Enable more detailed logging to see the entire stacktrace.


DV 6.3.0 ER1.2

Comment 1 JBoss JIRA Server 2016-04-14 15:09:04 UTC
Steven Hawkins <shawkins@redhat.com> updated the status of jira TEIID-2694 to Resolved

Comment 2 JBoss JIRA Server 2016-06-03 20:41:01 UTC
Steven Hawkins <shawkins@redhat.com> updated the status of jira TEIID-2694 to Closed


Note You need to log in before you can comment on or make changes to this bug.