From: | thomas(dot)hallgren at home(dot)se (Thomas Hallgren) |
---|---|
To: | |
Subject: | [Pljava-dev] Passing custom java object to PL/Java |
Date: | 2005-10-17 18:58:53 |
Message-ID: | 4353F46D.2050603@home.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
rakesh at rakeshv.org wrote:
> Is it possible to pass custom Java objects to PL/Java (the reverse of
> passing from PL/Java to client programs? The error I get seems to
> indicate that the custom data type I defined in the deployment
> descriptor is not recognised when I do the setType on PGobject.
I doubt that the error you get is related to PL/Java. The stack trace
indicates a problem with setObject in the client, not the server. But
even if you do get around sending a UDT to PL/Java, it will not be
accepted at present. The PL/Java type-system needs some more work.
Regards,
Thomas Hallgren
>
> I tried to do so as shown in the following files:
>
> http://www.rakeshv.org/tmp/test.java - wrapper program that does the
> JDBC invocation from client code.
>
> http://www.rakeshv.org/tmp/RecurrenceTest.java - The PL/Java utility
> class
>
> http://www.rakeshv.org/tmp/Recurrence.java - The custom data that is
> passed from client to server.
>
> http://www.rakeshv.org/tmp/DeploymentDescriptor.ddr - The deployment
> descriptor
>
> The following is the stack trace from the program:
>
> org.postgresql.util.PSQLException: Unknown type testType.
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.setPGobject(AbstractJdbc2Statement.java:1480)
>
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1616)
>
> at
> org.postgresql.jdbc3.AbstractJdbc3Statement.setObject(AbstractJdbc3Statement.java:1436)
>
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1627)
>
> at test.main(test.java:26)
>
> Rakesh
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/pljava-dev
From | Date | Subject | |
---|---|---|---|
Next Message | Petr Michálek | 2005-10-17 21:45:05 | [Pljava-dev] Passing custom java object to PL/Java |
Previous Message | Rakesh Vidyadharan | 2005-10-17 17:38:57 | [Pljava-dev] Passing custom java object to PL/Java |