So you shouldn't have to modify the sun-web.xml programmatically? I guess it's a configuration issue then...
I looked down to the database tables and at the moment there are following tables:
db_user(user_id, role_ref [references to db_role.role_id], username, pwd);
user_role(username, role_name);
db_role(role_id, username);
This seems a little odd way to put them so could the problem lay here? In glassfish db_user is the user table and user_role the group table.
[Message sent by forum member 'tonnie' (tonnie)]
http://forums.java.net/jive/thread.jspa?messageID=337364