db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <knut.hat...@oracle.com>
Subject Re: Classloading issue in Derby function
Date Thu, 07 Nov 2013 12:27:01 GMT
Pugazhal Srinivasan <PSrinivasan@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:

Alternatively, you can access the function from ij by putting the
application jar file on the class path when you start ij. Something

  java -cp /path/to/derbytools.jar:/path/to/derby.jar:/path/to/application.jar org.apache.derby.tools.ij

Hope this helps,

Knut Anders

View raw message