You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2010/07/19 12:29:50 UTC

[jira] Commented: (DERBY-4745) Custom Authentication Provider : ClassNotFoundException

    [ https://issues.apache.org/jira/browse/DERBY-4745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889811#action_12889811 ] 

Knut Anders Hatlen commented on DERBY-4745:
-------------------------------------------

The script that starts the server uses both the CLASSPATH environment variable and the -jar command line option, and then the CLASSPATH variable will be ignored. See the documentation for the -jar option here: http://download-llnw.oracle.com/docs/cd/E17409_01/javase/6/docs/technotes/tools/windows/java.html#-jar

It says: "When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored."

If you add derbynet.jar to CLASSPATH and replace "java ... -jar derbyrun.jar server start ..." with "java ... org.apache.derby.drda.NetworkServerControl start ...", the server should be able to find the class.

> Custom Authentication Provider : ClassNotFoundException
> -------------------------------------------------------
>
>                 Key: DERBY-4745
>                 URL: https://issues.apache.org/jira/browse/DERBY-4745
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.6.1.0
>         Environment: Linux machine.dom 2.6.34.1-vos #1 SMP Fri Jul 9 19:40:43 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux
> java version "1.6.0_18"
> Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
> Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode)
>            Reporter: EDAH-TALLY
>             Fix For: 10.6.1.0
>
>         Attachments: derby.log, start_server.sh, sysifo.log
>
>
> Hello,
> I'm trying to implement the custom authentication provider facility of Derby and am constantly hitting against a ClassNotFoundException.
> I created a DB on a Derby server running in ssl mode basic with no security manager. The DB is created with the following properties : 
>         CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.connection.requireAuthentication', 'true')
>         CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.defaultConnectionMode', 'noAccess')
>         CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.propertiesOnly', 'true')
>         CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.authentication.provider', 'lab.DerbyAP')
> derby.authentication.provider points to the custom class lab.DerbyAP, which is in a jar file on the server and in the classpath of the script starting the server (see attachement).
> When the DB is created, an authorized user can connect normally.
> If the server is shutdown and started again, no one can connect again. The database can't be booted on account of the custom class lab.DerbyAP not being found, though it is present and in the classpath.
> I attach also derby.log and sysinfo output or details.
> It seems that the server can't find at all a class in the classpath, or the classpath 'inside' the server does not reference the class.
> I tried also using the derby.database.classpath property after installing the jar file containing the custom class using sqlj.install_jar, but to no avail. The ClassNotFoundException still gets fired.
> I can't see what I'm missing, it smells like a single simple point but after three days researching the problem... it's getting long !
> Please advse.
> Thank you.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.