I am trying to use the UserUtility class to add permissions for a given user. However, when I attempt to execute the code, I receive the following error:

org.apache.derby.client.am.SqlException: The class 'UserUtility' does not exist or is inaccessible. This can happen if the class is not public. SQLSTATE: XJ001: Java exception: 'UserUtility: java.lang.ClassNotFoundException'.

Here is the code snippet I am executing:

public void test() throws Exception
        ClientDataSource dataSource = new ClientDataSource();

        Statement s = dataSource.getConnection().createStatement();
        s.executeUpdate("Call UserUtility::add('mary', 'READ_ACCESS_PERMISSION')");

I have checked that the derby.jar is set on the classpath on the server (my localhost) but can see no other reason why the UserUtility class cannot be found and I have verified that the class is public in the derby.jar file. I am using version of Derby in a client/server capacity.

Can you help please?

Thanks in anticipation.


Stephen Mainstone
Deutsche Bank [/] London
Phone: + 44 (0) 20 7545 8920


This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.