db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anjana Prakash <anjana.prak...@actian.com>
Subject RE: Writing user defined System procedure
Date Mon, 07 Dec 2015 07:25:22 GMT
More analysis indicates that
In scenario where a user defined system procedure calls derby class org/apache/derby/imp l/load/Import.
It fails with Class Not found exception 
Because the Jarloader.java restricts only certain package to be accessible and raises class
not found exception for package 
org/apache/derby/imp l *

I tried another alternative where in system procedure are not registered using  install_jar
instead define as classpath. 
However this fails with exception " ERROR 42X01: Syntax error: DERBY-PROPERTIES"

Need ability where in user defined function can call derby class and reuse the existing functionality.

-----Original Message-----
From: Anjana Prakash 
Sent: Monday, December 07, 2015 9:23 AM
To: derby-dev@db.apache.org
Subject: RE: Writing user defined System procedure


I verified the version of derby.jar that is used to compiled the stored procedure and used
at runtime by ij they both refer the same lib folder. Below is the error I am getting

ERROR 38000: The exception 'java.lang.NoClassDefFoundError: org/apache/derby/imp l/load/Import'
was thrown while evaluating an expression.
ERROR XJ001: Java exception: 'org/apache/derby/impl/load/Import: java.lang.NoCla ssDefFoundError'.
ERROR XJ001: Java exception: 'org.apache.derby.impl.load.Import: java.lang.Class NotFoundException'.


-----Original Message-----
From: Bryan Pendleton [mailto:bpendleton.derby@gmail.com]
Sent: Monday, December 07, 2015 7:34 AM
To: derby-dev@db.apache.org
Subject: Re: Writing user defined System procedure

> My system procedure is accessing some of  the derby utility function. 
> At run time of the procedure (in ij) it fails with exception
> ERROR XJ001: Java exception: 'org/apache/derby/impl/load/Import: java.lang.NoClassDefFoundError'.
> In my stored procedure jar the manifest file has class-path reference as derby.jar.

Can you post the full stack trace?

NoClassDefFoundError is a fairly unusual failure. In my experience, it generally has to do
with CLASSPATH issues, and specifically with cases where there is a subtle difference between
the classes that you compiled against, and the classes that you are running with.

For example, maybe you compiled your system procedure against a0 new version of Derby, but
somehow when you are running you are running with an older version of derby.jar.


View raw message