Thanks Dirk, I agree that "the best solution is to remove the quotes in the general case and fix cloudscape in the cloudscape store". I tried both JDBCDescriptorsStore and MySQLDescriptorsStore. BOTH works fine. Have a good one. Jiantao
-----Original Message----- From: Dirk Verbeeck [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 02, 2001 6:44 PM To: [EMAIL PROTECTED] Subject: Re: Inserted entry in permissons table when startup action is a reserved word in cloudscape, you have to quote it and in oracle a quoted column name is case sensitive thus action became "ACTION" I think the best solution is to remove the quotes in the general case and fix cloudscape in the cloudscape store. By the way, is mysql working with JDBCDescriptorsStore or are you using MySQLDescriptorsStore ? Thanks, Dirk Jiantao Pan wrote: > I track down the problem. > First of all I did what you suggested and put log for exception in the > code. However, there is no exception happened. > It seems to me the problem reside in the > slidestore.refererence.JDBCDescriptorsStore.java In the attached method. > Because the quote around "ACTION" make the condition never met, so no > row get deleted when revoke get called. > I tried to remove the quote, and it works for mysql. I am not sure the > reason behind the quote, whether removing quote cause any other problem. > Thanks > Jiantao > > /** > * Revoke a permission. > * > * @param permission Permission we want to create > * @exception ServiceAccessException Error accessing the Service > */ > public void revokePermission(Uri uri, NodePermission permission) > throws ServiceAccessException { > > PreparedStatement statement = null; > > try { > NodeRevisionNumber revisionNumber = > permission.getRevisionNumber(); > if(revisionNumber != null) { > statement = connection.prepareStatement > ("delete from permissions where object= ? and > subject = ? and \"ACTION\" = ? and revisionnumber = ? "); > statement.setString(4, revisionNumber.toString()); > } > else { > statement = connection.prepareStatement > ("delete from permissions where object = ? and > subject = ? and \"ACTION\" = ? and revisionnumber is NULL"); > } > > statement.setString(1, permission.getObjectUri()); > statement.setString(2, permission.getSubjectUri()); > statement.setString(3, permission.getActionUri()); > > statement.execute(); > } catch (SQLException e) { > getLogger().log(e,LOG_CHANNEL,Logger.ERROR); > throw new ServiceAccessException(this, e); > } finally { > closeStatement(statement); > } > > } > > > -----Original Message----- > From: Dirk Verbeeck [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 02, 2001 4:41 PM > To: [EMAIL PROTECTED] > Subject: Re: Inserted entry in permissons table when startup > > Jiantao Pan wrote: > > > I am using recent ( yesterday) build of slide and using > > JDBCDescriptorsStore and mysql. The attached is my Domain.xml. > > Everytime I startup the server, A new entry get inserted into the > > permissions table with object ='/', subject = '/' and action = '/'. > > Which means everybody can do any action on anything. > > I think this probably happens on other database also. Any suggestions > on > > why this happens? > > Thanks. > > Jiantao > > There was already a report on this issue, but maybe we can now use > bugzilla > to log everything. > http://nagoya.apache.org/bugzilla/ > > Can you help us debug the problem ? > We think it's a problem with mysql not having transaction support. > First of all you should use slidestore.mysql.MySQLDescriptorsStore > this store doesn't need transaction support. > Next, look at the log and try to find "Namespace base configuration was > already done before" > or "Could not rollback namespace base configuration: " > (Send me the logfile anyway, or attach it to the bug report) > > If you can build from source put > "getLogger().log(ex,LOG_CHANNEL,Logger.INFO);" > at Namespace.java:767 > (I can send you a debug version if you want) > > This permission object ='/', subject = '/' and action = '/' is used when > uploading the base configuration in domain.xml. > After initialization it should be deleted or rolled back in case of an > error. > > I don't have mysql installed so I need somebody to do some tests... > > Dirk
