db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Leroux <s...@wanadoo.fr>
Subject Re: ERROR 42X51 class not found
Date Sun, 25 Oct 2009 11:08:18 GMT
Hi,

I noticed that you run all your manual tests as root on your unix box (prompt 
sh#). Will the Derby server run under that identity too?

That lets me suspect perhaps a problem with the permissions on your files/folders.

That's a little bit doubtful, since usually /var/lib is readable and traversable 
by everyone. Anyway, as we are in an impasse here,  worth trying to check those 
permissions (ls -l - look for rx on directories and r on files). Then try to run 
the following command on a shell, with CLASSPATH correctly set, and /under the 
identity used by Derby/:
  derby$  java derbyPk.Functions
                         ^^^^^^^^ (/class/ name here!)

If you get "NoSuchMethod: main" the files are readable. So this is definitively 
a Derby problem.
On the other hand, if you still get ClassNotFound exception, check again the 
permissions. If you packaged your files as a JAR, search for a problem with it 
on your server (something wrong while building/copying the JAR?). "jar tvf" 
could give more informations.


On that matters, (should I have put that first ;)? ), I noticed that your class 
path is:
   /var/lib/derby/db-derby-10.5.3.0-bin/lib/
But if you packaged your files as a JAR on your server, shouldn't it be:
   /var/lib/derby/db-derby-10.5.3.0-bin/lib/myjar.jar
                                              ^^^^^^^^^


Nothing really convincing here. I agree. But it should help narrowing the 
problem. Somehow...

Sylvain.


Thomas Hill a écrit :
> derby.Functions is a class and TF_Clients_AI2 a method.
> 
> the java code reads:
> 
> package derbyPk;
> 
> public class Functions {
>    public static void TF_Clients_AI2(int iRowID, String vcClientID, String
> vcClientName) throws SQLException
>    {
>    ...
>    }
> }
> 
> As said all of this worked fine when running the derby Networkserver on
> localhost and with the java code stored in the filesystem on localhost.
> 
> Thanks
> 
> 
> 


-- 
Website: http://www.chicoree.fr



Mime
View raw message