jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martijn Hendriks <marti...@gx.nl>
Subject Jackrabbit fails to start if database user is not schema owner
Date Thu, 12 Mar 2009 13:23:51 GMT
Hi,

One of our customers has strict rules for DB access: the application can only do data manipulation,
which means that the database user configured in Jackrabbit's repository.xml is not the schema
owner. Of course, Jackrabbit can then only start if the schema is already present in the DB.
The DatabaseFileSystem.checkSchema method, however, fails to detect that situation:

Mar 3, 2009 4:00:53 PM org.apache.jackrabbit.core.fs.db.DatabaseFileSystem init
SEVERE: failed to initialize file system
java.sql.SQLException: CREATE TABLE permission denied in database 'wm98nute'.
        at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
        at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
        at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
        at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
        at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:723)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1163)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1116)
        at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.checkSchema(DatabaseFileSystem.java:1169)
        at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:184)
        at org.apache.jackrabbit.core.config.FileSystemConfig.createFileSystem(FileSystemConfig.java:47)
        at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:244)
        at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)

This is a stacktrace for an MSSQL DB, but I guess that the problem exists elsewhere too (at
least on Oracle). In order to fix this it seems necessary to fix all "checkSchema" methods
(DB file systems, (bundle) persistence managers, db datastore, db journal). Wat do you think?

Best regards,

Martijn


--

Martijn Hendriks
<GX> creative online development B.V.
 
t: 024 - 3888 261
f: 024 - 3888 621
e: martijnh@gx.nl
 
Wijchenseweg 111
6538 SW Nijmegen
http://www.gx.nl/ 



Mime
View raw message