MSSQL usage - repository.xml - basic question

This is a discussion on MSSQL usage - repository.xml - basic question within the Apache forums in Application Servers & Tools category; Hello, I'm new to jackrabbit and want it to use a MS SQL database server for storage. But my repository.xml seems to be wrong. My webserver is Tomcat 5.5 and the log shows me this: 22.07.2008 13:44:13 *WARN * ConfigurationErrorHandler: Error parsing the configuration at line 13 using system id null: org.xml.sax.SAXParseException: The content of element type "Security" must match "(SecurityManager,AccessManager,LoginModule?)" . (ConfigurationErrorHandler.java, line 43) 22.07.2008 13:44:13 *ERROR* RepositoryStartupServlet: RepositoryStartupServlet initializing failed: javax.servlet.ServletException: Error while creating repository (RepositoryStartupServlet.java, line 245) javax.servlet.ServletException: Error while creating repository at org.apache.jackrabbit.j2ee.RepositoryStartupServle t.initRepository(RepositoryStartupServlet.java:409 ) ... I hope that someone can help me and tell me ...

Go Back   Application Development Forum > Application Servers & Tools > Apache

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-22-2008, 08:22 AM
Martin Mayr
Guest
 
Default MSSQL usage - repository.xml - basic question

Hello,

I'm new to jackrabbit and want it to use a MS SQL database server for
storage.
But my repository.xml seems to be wrong.
My webserver is Tomcat 5.5 and the log shows me this:

22.07.2008 13:44:13 *WARN * ConfigurationErrorHandler: Error parsing the
configuration at line 13 using system id null:
org.xml.sax.SAXParseException: The content of element type "Security"
must match "(SecurityManager,AccessManager,LoginModule?)" .
(ConfigurationErrorHandler.java, line 43)
22.07.2008 13:44:13 *ERROR* RepositoryStartupServlet:
RepositoryStartupServlet initializing failed:
javax.servlet.ServletException: Error while creating repository
(RepositoryStartupServlet.java, line 245)
javax.servlet.ServletException: Error while creating repository
at
org.apache.jackrabbit.j2ee.RepositoryStartupServle t.initRepository(RepositoryStartupServlet.java:409 )
...

I hope that someone can help me and tell me what i made wrong.
The user i entered has full rights on this named instance to create/drop
tables and so on.

thanks!

my repository.xml:
---
<?xml version="1.0"?>
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
Jackrabbit 1.5//EN"

"http://jackrabbit.apache.org/dtd/repository-1.5.dtd">
<Repository>
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFi leSystem">
<param name="path" value="${rep.home}/repository" />
</FileSystem>
<Security appName="Jackrabbit">
<AccessManager
class="org.apache.jackrabbit.core.security.SimpleA ccessManager" />
<LoginModule
class="org.apache.jackrabbit.core.security.SimpleL oginModule">
<param name="anonymousId" value="anonymous" />
</LoginModule>
</Security>
<Workspaces rootPath="${rep.home}/workspaces"
defaultWorkspace="default" />
<Workspace name="${wsp.name}">
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFi leSystem">
<param name="path" value="${wsp.home}" />
</FileSystem>

<!-- MSSQL Server -->

<PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleD bPersistenceManager">
<param name="driver"
value="com.microsoft.sqlserver.jdbc.SQLServerDrive r" />
<param name="url"
value="jdbc:sqlserver://--ip--;instanceName=--instance--;SelectMethod=Cursor"
/>
<param name="user" value="--user--" />
<param name="password" value="--pass--" />
<param name="schema" value="mssql" />
<param name="schemaObjectPrefix" value="JACKRABBIT_${wsp.name}_" />
<param name="externalBLOBs" value="false" />
</PersistenceManager>
</Workspace>
<Versioning rootPath="${rep.home}/version">
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFi leSystem">
<param name="path" value="${rep.home}/version" />
</FileSystem>

<!-- MSSQL Server -->

<PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleD bPersistenceManager">
<param name="driver"
value="com.microsoft.sqlserver.jdbc.SQLServerDrive r" />
<param name="url"
value="jdbc:sqlserver://--ip--;instanceName=--instance--;SelectMethod=Cursor"
/>
<param name="user" value="--user--" />
<param name="password" value="--pass--" />
<param name="schema" value="mssql" />
<param name="schemaObjectPrefix" value="JACKRABBIT_VERSION_" />
<param name="externalBLOBs" value="false" />
</PersistenceManager>
</Versioning>
</Repository>

Reply With Quote
  #2  
Old 07-22-2008, 08:43 AM
Alexander Klimetschek
Guest
 
Default Re: MSSQL usage - repository.xml - basic question

Hi Martin!

On Tue, Jul 22, 2008 at 2:22 PM, Martin Mayr <mamayr@cosy.sbg.ac.at> wrote:
> 22.07.2008 13:44:13 *WARN * ConfigurationErrorHandler: Error parsing the
> configuration at line 13 using system id null:
> org.xml.sax.SAXParseException: The content of element type "Security" must
> match "(SecurityManager,AccessManager,LoginModule?)" .
> (ConfigurationErrorHandler.java, line 43)


> <Security appName="Jackrabbit">
> <AccessManager
> class="org.apache.jackrabbit.core.security.SimpleA ccessManager" />
> <LoginModule
> class="org.apache.jackrabbit.core.security.SimpleL oginModule">
> <param name="anonymousId" value="anonymous" />
> </LoginModule>
> </Security>


Looks like you are using the current trunk (1.5 version of the DTD
referenced). The trunk (towards 1.5) contains changes regarding the
access control (for JCR 2.0) that require a new component
SecurityManager. Looks like you mixed an older repository.xml
(Security part) with a newer one (1.5 DTD).

The missing part (if you use the code from trunk) should look
something like this (but I am not an expert in the specific config):

<!--
security manager:
class: FQN of class implementing the
JackrabbitSecurityManager interface
-->
<SecurityManager
class="org.apache.jackrabbit.core.security.simple. SimpleSecurityManager"
workspaceName="security">
<!-- <param name="config" value="${rep.home}/security.xml"/> -->
</SecurityManager>

Otherwise you could also reference version 1.4 of the DTD at the top
of your repository.xml:

<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
Jackrabbit 1.4//EN"

"http://jackrabbit.apache.org/dtd/repository-1.4.dtd">


Regards,
Alex

--
Alexander Klimetschek
alexander.klimetschek@day.com

Reply With Quote
  #3  
Old 07-22-2008, 09:01 AM
Martin Mayr
Guest
 
Default Re: Re: MSSQL usage - repository.xml - basic question

Thank you very much!
I switched to version 1.4 from the page and it worked - maybe i'll try
later with version 1.5 but for now i'm happy it's running


Alexander Klimetschek schrieb:
> Hi Martin!
>
> On Tue, Jul 22, 2008 at 2:22 PM, Martin Mayr <mamayr@cosy.sbg.ac.at> wrote:
>
>> 22.07.2008 13:44:13 *WARN * ConfigurationErrorHandler: Error parsing the
>> configuration at line 13 using system id null:
>> org.xml.sax.SAXParseException: The content of element type "Security" must
>> match "(SecurityManager,AccessManager,LoginModule?)" .
>> (ConfigurationErrorHandler.java, line 43)
>>

>
>
>> <Security appName="Jackrabbit">
>> <AccessManager
>> class="org.apache.jackrabbit.core.security.SimpleA ccessManager" />
>> <LoginModule
>> class="org.apache.jackrabbit.core.security.SimpleL oginModule">
>> <param name="anonymousId" value="anonymous" />
>> </LoginModule>
>> </Security>
>>

>
> Looks like you are using the current trunk (1.5 version of the DTD
> referenced). The trunk (towards 1.5) contains changes regarding the
> access control (for JCR 2.0) that require a new component
> SecurityManager. Looks like you mixed an older repository.xml
> (Security part) with a newer one (1.5 DTD).
>
> The missing part (if you use the code from trunk) should look
> something like this (but I am not an expert in the specific config):
>
> <!--
> security manager:
> class: FQN of class implementing the
> JackrabbitSecurityManager interface
> -->
> <SecurityManager
> class="org.apache.jackrabbit.core.security.simple. SimpleSecurityManager"
> workspaceName="security">
> <!-- <param name="config" value="${rep.home}/security.xml"/> -->
> </SecurityManager>
>
> Otherwise you could also reference version 1.4 of the DTD at the top
> of your repository.xml:
>
> <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
> Jackrabbit 1.4//EN"
>
> "http://jackrabbit.apache.org/dtd/repository-1.4.dtd">
>
>
> Regards,
> Alex
>
>



Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:16 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.