Okay, all your parameters seem to be good.
We never tried the DSPM with jboss nor SQLServer, but, by looking at the stack, I'm concluding that the java driver for MSSQL does not implement the supportsStatementPooling() method, so I think that if you force the optimizedServerSidePreparedStatement to "true" or "false" (by testing which is the fastest parameter) that will bypass the auto-detection system and consequently, won't crash like that.
Cheers,
   Anthony

John McClain a écrit :
Howdy - I am trying to get Anthony Ogiers datasourcepersistencemanager to
work with jackrabbit. I am using sqlserver as my datasource in jboss4.0.4ga
I have configured the following:

1) Jackrabbit-mssql-search.xml - this is a copy of
jackrabbit-mysql-search.xml from WEB-INF/config/repo-conf that I tweeked to
use DataSourcePersistenceManager, i.e.,
<PersistenceManager
class="com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager"
<!--<param name="dataSourceLocation"
value="java:comp/env/jdbc/magnoliaAuthor"/>--> <!--- This did not work, so I
looked at jmx-console and found that db was jndified at the following: -->
 <param name="dataSourceLocation" value="java:jdbc/magnoliaAuthor"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
          <param name="externalBLOBs" value="false"/>
          <param name="schema" value="mssql"/>
          <!--<param name="optimizedServerSidePreparedStatement"
value="true"/>-->
        </PersistenceManager>

2) Magnolia.properties - I modified thias to point to the new erpository
config file, i.e.,
magnolia.repositories.jackrabbit.config=WEB-INF/config/repo-conf/jackrabbit-
mssql-search.xml

3)Mssql-ds.xml - I created this and put it in <jboss server>/deploy
directory (where my datasource config files reside)
i.e., <datasources>
<local-tx-datasource>
  <jndi-name>jdbc/magnoliaAuthor</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://CANHCSNSQL001:11001;DatabaseName=
magnoliaAuthor;SelectMethod=cursor;</connection-url>
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
      <user-name>jboss_magnolia   </user-name>
      <password>dev_pwd</password>
      <min-pool-size>8</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <idle-timeout-minutes>20</idle-timeout-minutes>
      <track-statements/>
<prepared-statement-cache-size>32</prepared-statement-cache-size> </local-tx-datasource>
.
.
.
4) I placed the datasourcepersistencemanager.jar in WEB-INF/lib
5) My sqlserver drivers are in <jboss server>/lib - where my other db
drivers live
6) I removed magnoliaAuthor repositories dir - wanted a clean bootstrap

After doing the above, and restarting jboss, I get the following errors
INFO   info.magnolia.cms.beans.config.ConfigLoader 28.12.2006 17:26:29 --
Init content repositories
INFO   info.magnolia.cms.beans.config.ContentRepository 28.12.2006 17:26:29
-- System : loading JCR
INFO   info.magnolia.cms.beans.config.ContentRepository 28.12.2006 17:26:29
-- Loading workspace:website
INFO   info.magnolia.cms.beans.config.ContentRepository 28.12.2006 17:26:29
-- Loading workspace:config
INFO   info.magnolia.cms.beans.config.ContentRepository 28.12.2006 17:26:29
-- Loading workspace:users
INFO   info.magnolia.cms.beans.config.ContentRepository 28.12.2006 17:26:29
-- Loading workspace:userroles
INFO   info.magnolia.cms.beans.config.ContentRepository 28.12.2006 17:26:29
-- Loading workspace:usergroups
INFO   info.magnolia.cms.beans.config.ContentRepository 28.12.2006 17:26:29
-- Loading workspace:mgnlSystem
INFO   info.magnolia.cms.beans.config.ContentRepository 28.12.2006 17:26:29
-- Loading workspace:mgnlVersion
INFO   info.magnolia.cms.beans.config.ContentRepository 28.12.2006 17:26:29
-- Loading workspace:dms
INFO   info.magnolia.cms.beans.config.ContentRepository 28.12.2006 17:26:29
-- Loading workspace:Store
INFO   info.magnolia.cms.beans.config.ContentRepository 28.12.2006 17:26:29
-- Loading workspace:Expressions
INFO   info.magnolia.cms.beans.config.ContentRepository 28.12.2006 17:26:29
-- System : loading JCR magnolia
INFO   info.magnolia.jackrabbit.ProviderImpl 28.12.2006 17:26:29 -- Loading
repository at
C:\servers\jboss-4.0.4.GA\server\homeq\.\deploy\magnoliaAuthor.war\repositor
ies\magnolia (config file:
C:\servers\jboss-4.0.4.GA\server\homeq\.\deploy\magnoliaAuthor.war\WEB-INF\c
onfig\repo-conf\jackrabbit-mssql-search.xml)
ERROR
org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/magnoliaAut
hor] 28.12.2006 17:26:31 -- Exception sending context initialized event to
listener instance of class info.magnolia.cms.servlets.PropertyInitializer
java.lang.AbstractMethodError:
com.microsoft.jdbc.base.BaseDatabaseMetaData.supportsStatementPooling()Z
        at
com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager.checkSc
hema(DataSourcePersistenceManager.java:982)
        at
com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager.init(Da
taSourcePersistenceManager.java:306)
        at
org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(Repositor
yImpl.java:1029)
        at
org.apache.jackrabbit.core.RepositoryImpl.createVersionManager(RepositoryImp
l.java:286)
        at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:235)
        at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:484)
        at
org.apache.jackrabbit.core.jndi.BindableRepository.init(BindableRepository.j
ava:136)
        at
org.apache.jackrabbit.core.jndi.BindableRepository.create(BindableRepository
.java:1
.
.
.


Any one out there get DataSourcePersistenceManager working in JBOSS with sql
server???

Have a great day!
[EMAIL PROTECTED]

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------



----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to