Bug 1327245

Summary: Generated REST WAR blob parameter issue
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Jan Stastny <jstastny>
Component: TeiidAssignee: Van Halbert <vhalbert>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Stastny <jstastny>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: aszczucz, blafond, jolee, mbaluch, thauser, vhalbert
Target Milestone: ER3   
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-24 11:48:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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> updated the status of jira TEIID-2694 to Resolved

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