You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Pugazhal Srinivasan <PS...@loomissayles.com> on 2013/11/06 22:09:04 UTC
Classloading issue in Derby function
In a application server we configure and use the Embedded derby server to
register a derby function table (in EJB in our case) and are able to call
the function from other places in the application, including servlet.
But we are unable to call the same function using ij. The error is "ERROR
42X51: The class 'some.class' does not exist or is inaccessible."
How to make the embedded server to remember the classloader that
registered the function so that it can be called from outside the
application server.
Re: Classloading issue in Derby function
Posted by Knut Anders Hatlen <kn...@oracle.com>.
Pugazhal Srinivasan <PS...@loomissayles.com> writes:
> In a application server we configure and use the Embedded derby server
> to register a derby function table (in EJB in our case) and are able
> to call the function from other places in the application, including
> servlet.
>
> But we are unable to call the same function using ij. The error is
> "ERROR 42X51: The class 'some.class' does not exist or is
> inaccessible."
>
> How to make the embedded server to remember the classloader that
> registered the function so that it can be called from outside the
> application server.
Hi Pugazhal,
It is possible to store jar files in the database so that table
functions or other stored procedures can be used even if they are not on
the application's class path.
This is described in Derby Developer's Guide. See the section called
"Loading classes from a database" here:
http://db.apache.org/derby/docs/10.10/devguide/
Alternatively, you can access the function from ij by putting the
application jar file on the class path when you start ij. Something
like:
java -cp /path/to/derbytools.jar:/path/to/derby.jar:/path/to/application.jar org.apache.derby.tools.ij
Hope this helps,
--
Knut Anders