You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Bruno Dusausoy <br...@yp5.be> on 2011/05/03 13:43:52 UTC

schemaCheckEnabled in DbFileSystem

Hi,

I have a NullPointerException when I try to start Jackrabbit with a 
DbFileSystem using MySql as RDBMS :

03-mai-2011 13:36:04 org.apache.jackrabbit.core.fs.db.DatabaseFileSystem 
init
SEVERE: failed to initialize file system
java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:61)
at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
at 
org.apache.jackrabbit.core.util.db.CheckSchemaOperation.run(CheckSchemaOperation.java:80)
at 
org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:197)
at 
org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1057)
at 
org.apache.jackrabbit.core.config.RepositoryConfig.getFileSystem(RepositoryConfig.java:911)
at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:285)
at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:605)

When searching a bit, indeed, the "ddl" field of the 
CheckSchemaOperation class is null.
When searching further I've noticed that

// check if schema objects exist and create them if necessary
if (isSchemaCheckEnabled()) {
     createCheckSchemaOperation().run();
}

in the init() method of the DatabaseFileSystem class.
schemaCheckEnabled is true by default.

I've tried to turn it off but failed.

So, two questions in one here : should I let it turned on ? If yes, how 
can I get rid of this npe ? If no, how can I turn it off properly ?

Thanks.

Regards.
-- 
Bruno Dusausoy
YP5 Software
--
Pensez environnement : limitez l'impression de ce mail.
Please don't print this e-mail unless you really need to.

Re: schemaCheckEnabled in DbFileSystem

Posted by Bruno Dusausoy <br...@yp5.be>.
On 3/05/2011 13:48, Stephen Byrne wrote:
> On 05/03/2011 07:43 AM, Bruno Dusausoy wrote:

[...]
>>
>> I've tried to turn it off but failed.
>
> Did you make sure to turn it off in the workspace.xml for the workspace,
> not in the repository.xml?
>>

Hi Stephen,

No, I've tried to do it in the repository.xml, like what's described 
here : 
http://jackrabbit.510166.n4.nabble.com/NPE-in-ObservationManagerImpl-with-Jackrabbit-2-1-1-on-JBoss-td2549067.html

I've retried and it works now, thanks a lot.

BUT what if I actually want the table to be automatically created in my 
database ? The ddlstream is still null so I get this NPE.
Can it be that this is a access problem to my database ? (I should have 
pointed to the mailing-list that I have absolutely no problem with a 
full-memory DbFileSystem and PersistenceManager)

Regards.
-- 
Bruno Dusausoy
YP5 Software
--
Pensez environnement : limitez l'impression de ce mail.
Please don't print this e-mail unless you really need to.

Re: schemaCheckEnabled in DbFileSystem

Posted by Stephen Byrne <st...@lincware.com>.
On 05/03/2011 07:43 AM, Bruno Dusausoy wrote:
> Hi,
>
> I have a NullPointerException when I try to start Jackrabbit with a
> DbFileSystem using MySql as RDBMS :
>
> 03-mai-2011 13:36:04 org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
> init
> SEVERE: failed to initialize file system
> java.lang.NullPointerException
> at java.io.Reader.<init>(Reader.java:61)
> at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
> at
> org.apache.jackrabbit.core.util.db.CheckSchemaOperation.run(CheckSchemaOperation.java:80)
>
> at
> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:197)
>
> at
> org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1057)
>
> at
> org.apache.jackrabbit.core.config.RepositoryConfig.getFileSystem(RepositoryConfig.java:911)
>
> at
> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:285)
> at
> org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:605)
>
> When searching a bit, indeed, the "ddl" field of the
> CheckSchemaOperation class is null.
> When searching further I've noticed that
>
> // check if schema objects exist and create them if necessary
> if (isSchemaCheckEnabled()) {
> createCheckSchemaOperation().run();
> }
>
> in the init() method of the DatabaseFileSystem class.
> schemaCheckEnabled is true by default.
>
> I've tried to turn it off but failed.

Did you make sure to turn it off in the workspace.xml for the workspace, 
not in the repository.xml?
>
> So, two questions in one here : should I let it turned on ? If yes, how
> can I get rid of this npe ? If no, how can I turn it off properly ?
>
> Thanks.
>
> Regards.


-- 
Stephen Byrne
LincWare, LLC
stephen@lincware.com

Re: schemaCheckEnabled in DbFileSystem

Posted by Stefan Guggisberg <st...@gmail.com>.
On Tue, May 3, 2011 at 1:43 PM, Bruno Dusausoy <br...@yp5.be> wrote:
> Hi,
>
> I have a NullPointerException when I try to start Jackrabbit with a
> DbFileSystem using MySql as RDBMS :
>
> 03-mai-2011 13:36:04 org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
> init
> SEVERE: failed to initialize file system
> java.lang.NullPointerException
> at java.io.Reader.<init>(Reader.java:61)
> at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
> at
> org.apache.jackrabbit.core.util.db.CheckSchemaOperation.run(CheckSchemaOperation.java:80)
> at
> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:197)
> at
> org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1057)
> at
> org.apache.jackrabbit.core.config.RepositoryConfig.getFileSystem(RepositoryConfig.java:911)
> at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:285)
> at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:605)
>
> When searching a bit, indeed, the "ddl" field of the CheckSchemaOperation
> class is null.

that's most likely caused by misconfiguration.
make sure you're specifying "mysql" as schema, i.e.

 <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
    [...]
    <param name="schema" value="mysql"/>
    [...]
</FileSystem>

cheers
stefan

> When searching further I've noticed that
>
> // check if schema objects exist and create them if necessary
> if (isSchemaCheckEnabled()) {
>    createCheckSchemaOperation().run();
> }
>
> in the init() method of the DatabaseFileSystem class.
> schemaCheckEnabled is true by default.
>
> I've tried to turn it off but failed.
>
> So, two questions in one here : should I let it turned on ? If yes, how can
> I get rid of this npe ? If no, how can I turn it off properly ?
>
> Thanks.
>
> Regards.
> --
> Bruno Dusausoy
> YP5 Software
> --
> Pensez environnement : limitez l'impression de ce mail.
> Please don't print this e-mail unless you really need to.
>