I am trying to write a function in Derby that returns a UDT that is registered with the database.

When creating an instance of the Java class that represents the UDT in the jar file that is attached to the database, I get the IllegalAccessError. The class that is creating the instance, and the UDT class are defined in the same package. Both class are declared to be public. So, I am baffled and don't know what I am doing wrong.

I would really appreciate if some one could point me to some sample code illustrating the use of UDTs in Java code.

Thanks in advance,