[
https://issues.jboss.org/browse/TEIID-5148?page=com.atlassian.jira.plugin...
]
Fábio Franco updated TEIID-5148:
--------------------------------
Steps to Reproduce:
*On Postgres*
----
# Create a table
{code:sql}
CREATE TABLE public.mapping
(
column1 numeric(18,2)
)
{code}
# Create a function/procedure which inserts data into this table and returns nothing
{code:sql}
CREATE OR REPLACE FUNCTION public.insert_test()
RETURNS void AS
$BODY$
BEGIN
insert into public.mapping
select 12.4;
END $BODY$ LANGUAGE plpgsql
{code}
# Execute the function in PgAdmin (works)
{code:sql}
select public.insert_test();
{code}
*On Teiid*
----
# Execute the function via native call from within Teiid (fails with {color:red}[38000]
org.postgresql.util.PGobject java.lang.ClassNotFoundException:
org.postgresql.util.PGobject{color})
{code:sql}
select * from (call "ds2.native"(
"request" => 'select public.insert_test();'
)) a;;
{code}
was:
*On Postgres*
----
# Create a table
{code:sql}
CREATE TABLE public.mapping
(
column1 numeric(18,2)
)
{code}
# Create a function/procedure which inserts data into this table and returns nothing
{code:sql}
CREATE OR REPLACE FUNCTION public.insert_test()
RETURNS void AS
$BODY$
BEGIN
insert into public.mapping
select 12.4;
END $BODY$ LANGUAGE plpgsql
{code}
# Execute the function in PgAdmin (works)
{code:sql}
select public.insert_test();
{code}
# Execute the function via native call from within Teiid (fails with {color:red}[38000]
org.postgresql.util.PGobject java.lang.ClassNotFoundException:
org.postgresql.util.PGobject{color})
{code:sql}
select * from (call "ds2.native"(
"request" => 'select public.insert_test();'
)) a;;
{code}
Native: Executing procedures without return values yields an error
------------------------------------------------------------------
Key: TEIID-5148
URL:
https://issues.jboss.org/browse/TEIID-5148
Project: Teiid
Issue Type: Bug
Affects Versions: 9.3.3
Environment: * teiid 9.3.3
* jdbc driver: postgresql-9.4.1212.jre7.jar
* PostgreSQL 9.6.2 on x86_64-pc-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2,
64-bit
* java 1.8.0_141-b15
Reporter: Fábio Franco
Assignee: Steven Hawkins
Executing procedures without return values yields an error when executed via native
function from within teiid. The stacktrace is as follows:
{code}
[2017-11-14 11:25:48] [38000] org.postgresql.util.PGobject
[2017-11-14 11:25:48] java.lang.ClassNotFoundException: org.postgresql.util.PGobject
[2017-11-14 11:25:48] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[2017-11-14 11:25:48] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[2017-11-14 11:25:48] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
[2017-11-14 11:25:48] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[2017-11-14 11:25:48] at java.lang.Class.forName0(Native Method)
[2017-11-14 11:25:48] at java.lang.Class.forName(Class.java:348)
[2017-11-14 11:25:48] at
java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:677)
[2017-11-14 11:25:48] at
org.teiid.netty.handler.codec.serialization.CompactObjectInputStream.resolveClass(CompactObjectInputStream.java:112)
[2017-11-14 11:25:48] at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1819)
[2017-11-14 11:25:48] at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1713)
[2017-11-14 11:25:48] at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1986)
[2017-11-14 11:25:48] at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
[2017-11-14 11:25:48] at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:422)
[2017-11-14 11:25:48] at
org.teiid.client.BatchSerializer$ColumnSerializer.readObject(BatchSerializer.java:552)
[2017-11-14 11:25:48] at
org.teiid.client.BatchSerializer$ObjectColumnSerializer.readObject(BatchSerializer.java:283)
[2017-11-14 11:25:48] at
org.teiid.client.BatchSerializer$ObjectColumnSerializer.access$2400(BatchSerializer.java:228)
[2017-11-14 11:25:48] at
org.teiid.client.BatchSerializer$ArrayColumnSerializer2.readObject(BatchSerializer.java:177)
[2017-11-14 11:25:48] at
org.teiid.client.BatchSerializer$ColumnSerializer.readColumn(BatchSerializer.java:543)
[2017-11-14 11:25:48] at
org.teiid.client.BatchSerializer.readBatch(BatchSerializer.java:924)
[2017-11-14 11:25:48] at
org.teiid.client.ResultsMessage.processResults(ResultsMessage.java:120)
[2017-11-14 11:25:48] at
org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:755)
[2017-11-14 11:25:48] at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:65)
[2017-11-14 11:25:48] at
org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:561)
[2017-11-14 11:25:48] at
org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135)
[2017-11-14 11:25:48] at
org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40)
[2017-11-14 11:25:48] at
org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79)
[2017-11-14 11:25:48] at
org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:285)
[2017-11-14 11:25:48] at
org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:337)
[2017-11-14 11:25:48] at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
[2017-11-14 11:25:48] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2017-11-14 11:25:48] at java.lang.reflect.Method.invoke(Method.java:498)
[2017-11-14 11:25:48] at
org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:98)
[2017-11-14 11:25:48] at com.sun.proxy.$Proxy3.read(Unknown Source)
[2017-11-14 11:25:48] at
org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:427)
[2017-11-14 11:25:48] at
org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:570)
[2017-11-14 11:25:48] at
org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:423)
[2017-11-14 11:25:48] at
org.teiid.jdbc.StatementImpl.executeQuery(StatementImpl.java:354)
[2017-11-14 11:25:48] at
com.intellij.database.remote.jdbc.impl.RemoteStatementImpl.executeQuery(RemoteStatementImpl.java:161)
[2017-11-14 11:25:48] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2017-11-14 11:25:48] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2017-11-14 11:25:48] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2017-11-14 11:25:48] at java.lang.reflect.Method.invoke(Method.java:498)
[2017-11-14 11:25:48] at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
[2017-11-14 11:25:48] at sun.rmi.transport.Transport$1.run(Transport.java:200)
[2017-11-14 11:25:48] at sun.rmi.transport.Transport$1.run(Transport.java:197)
[2017-11-14 11:25:48] at java.security.AccessController.doPrivileged(Native Method)
[2017-11-14 11:25:48] at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
[2017-11-14 11:25:48] at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
[2017-11-14 11:25:48] at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
[2017-11-14 11:25:48] at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
[2017-11-14 11:25:48] at java.security.AccessController.doPrivileged(Native Method)
[2017-11-14 11:25:48] at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
[2017-11-14 11:25:48] at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[2017-11-14 11:25:48] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[2017-11-14 11:25:48] at java.lang.Thread.run(Thread.java:745) (no stack trace)
{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)