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
[EMAIL PROTECTED] 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