You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by wo...@yahoo.co.jp on 2005/08/09 21:29:50 UTC
BUILTIN authentication provider doesn't work.
Hi there,
derby.authentication.provider=BUILTIN seems not working with Derby
10.1.1
I've added the following lines in my derby.properties file.
-----
derby.connection.requireAuthentication=true
derby.authentication.provider=BUILTIN
derby.user.mike=mikepass
-----
My code attempts to get a db connection as follows but I get an invalid
userid error.
-----
Properties prop = new Properties();
prop.put("user", "mike");
prop.put("password", "mikepass");
Connection conn = DriverManager.getConnection(DB_URL, prop);
-----
How come ? I followed the doc says though and my derby.properties file
is properly read.
I took a look at org/apache/derby/impl/jdbc/authentication/BasicAut
henticationServiceImpl.java.
It's weird...
The code imports org.apache.derby.iapi.reference.MessageId class, but
I couldn't find the MessageId class under the
org.apache.derby.iapi.reference directory in any jar files.
( I found the source code in the trunk though )
There's only one class under the directory in jar and the name of the
class is
Attribute.class.
My derby 10.1.1 is really 10.1.1 ???
hm...
Thanks in advance.
wolfgang
Re: BUILTIN authentication provider doesn't work.
Posted by wo...@yahoo.co.jp.
Hi Jean,
Thanks a lot !
My problem was related to
http://db.apache.org/derby/faq.html#schema_exist
and has gone with ur help.
Cheers,
Wolfgang
Re: BUILTIN authentication provider doesn't work.
Posted by "Jean T. Anderson" <jt...@bristowhill.com>.
Hi, Wolfgang,
Just now I tested the LinuxWorld/LinuxFest Derby lab with 10.1.1 and the
BUILTIN authentication is working for me. I'm not spotting what I'm
doing differently from you, but maybe you can spot something.
Here's the derby.properties file:
$ cat derby.properties
derby.connection.requireAuthentication=true
derby.authentication.provider=BUILTIN
derby.user.app=derby
derby.user.derbyfest=penguin
The sample program for the lab is a modified version of
db-derby-10.1.1.0-bin/demo/simple/SimpleApp.java. Here's the connection
code:
public String protocol = "jdbc:derby:";
...
Connection conn = null;
Properties props = new Properties();
props.put("user", "derbyfest");
props.put("password", "penguin");
conn = DriverManager.getConnection(protocol + "DerbyTours", props);
You might try SimpleApp.java on your setup and see if that works.
If it won't work for you, please feel free to ask for more help.
-jean
wolfgang127us@yahoo.co.jp wrote:
> Hi there,
>
> derby.authentication.provider=BUILTIN seems not working with Derby
> 10.1.1
>
> I've added the following lines in my derby.properties file.
> -----
> derby.connection.requireAuthentication=true
> derby.authentication.provider=BUILTIN
> derby.user.mike=mikepass
> -----
>
> My code attempts to get a db connection as follows but I get an invalid
> userid error.
> -----
> Properties prop = new Properties();
> prop.put("user", "mike");
> prop.put("password", "mikepass");
> Connection conn = DriverManager.getConnection(DB_URL, prop);
> -----
>
> How come ? I followed the doc says though and my derby.properties file
> is properly read.
>
> I took a look at org/apache/derby/impl/jdbc/authentication/BasicAut
> henticationServiceImpl.java.
> It's weird...
>
> The code imports org.apache.derby.iapi.reference.MessageId class, but
> I couldn't find the MessageId class under the
> org.apache.derby.iapi.reference directory in any jar files.
> ( I found the source code in the trunk though )
>
> There's only one class under the directory in jar and the name of the
> class is
> Attribute.class.
>
> My derby 10.1.1 is really 10.1.1 ???
> hm...
>
> Thanks in advance.
>
> wolfgang
>
>