The issue was related to my WEB-INF\config\repo-conf\*.xml file defining the
persistence manager.

Somehow the <param name="schemaObjectPrefix" value="${wsp.name}_"/> tag was
commented. Therefore each repository were trying to use the same 4 tables
since no prefix was defined for any table. As a result there was the same
root node being inserted in the same table. That explains the MySQL error
related to the unique index constraint.

Slowly,,, learning about JSR-170 and magnolia :-|

Christian

> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] 
> Sent: December 19, 2006 09:31
> To: [email protected]
> Subject: Re: [magnolia-user] Using 
> com.iorgagroup....DataSourcePersistenceManager
> 
> 
> > -----Original Message-----
> > From: [email protected] [mailto:[EMAIL PROTECTED]
> > Sent: December 18, 2006 18:50
> > To: [email protected]
> > Subject: Re: [magnolia-user] Using 
> > com.iorgagroup....DataSourcePersistenceManager
> > 
> > 
> > In point 6, did you replace all references from derby to
> > DataSourcePersistenceManager ?
> 
> I did clear all of the directory in the repository directory 
> of my webapp. And I did change the config files used for the 
> repository.jackrabbit.config in the magnolia.properties to 
> point to my config using the correct DSPM.
> 
> > And do you clear your MySQL tables of the magnolia database
> > between each 
> > of your tests ?
> 
> Forgot to mention it, yes I did drop all the tables from my schema.
> 
> > Perhaps clearing out the work dir of Tomcat could also help.
> > 
> 
> I just tried and no luck.
> 
> > We've tested the DataSourcePersistenceManager with Tomcat 5.0
> > and MySQL 
> > 5.0.24a-community-nt on Windows XP, and also MySQL 4.1.12 
> on Red Hat 
> > Enterprise Linux 4.3 and I never had that problem ... and I already 
> > heard of that deadbeef-face-babe-cafe-babecafebabe node 
> > somewhere in the 
> > list, but not with our DSPM. It's seems to be a jackrabbit 
> > configuration 
> > problem...
> > 
> > Could you also check your MySQL created tables and look for 
> integrity
> > constraints on tables ?
> > 
> 
> Each table created by the mysql.ddl file (located in the
> DataSourcePersistenceManager.jar) creates a unique Index on 
> the index column
> of each of the 4 tables.
> 
> So it throws an exception when we try to insert a node with 
> the same index
> (deadbeef-face-babe-cafe-babecafebabe) as a node already 
> inserted in the
> table.
> 
> I guess this is the expected behaviour for the repository.
> 
> My setup is similar to yours, apart from using Tomcat 5.5.20.
> 
> Let me know if you have any idea on what can be the issue.
> 
> Thanks,
> 
> Christian
> 
> 
> >     Anthony
> > 
> > Christian Sylvestre a écrit :
> > > Guillaume Pichenot <[EMAIL PROTECTED]> writes:
> > >
> > >   
> > >> Did you see this thread on the ML ? 
> > >> http://news.gmane.org/gmane.comp.cms.magnolia.user/cutoff=5778
> > >>
> > >> Seems like it is the exact same case.
> > >> To put it in a nutshell :
> > >>
> > >> Changing the Persistance Manager after the repository was 
> > bootstraped
> > >> is usually neither recommanded nor effective.
> > >> In order to activate the change, you have got to make magnolia  
> > >> bootstrap. Here are some basic steps.
> > >>
> > >> - Backup your website, configuration and documents 
> > repositories using
> > >> the xml export servlets/pages.
> > >> - Delete your old repositories folder (but make sure you 
> > backup your  
> > >> whole site first, of course). This will force a bootstrap, 
> > therefore  
> > >> force using the choosen persistance method from the get-go.
> > >> - Replace your saved xmls in /web-inf/bootstrap/common (or 
> > re-import  
> > >> them later, as you prefer, there are various restoring 
> strategies)
> > >> - Relaunch your magnolia instances, and watch your 
> > databases fill (a  
> > >> 3-5 minute task on a fast box for a site the size of the 
> > Samples demo  
> > >> Wars provided with Magnolia).
> > >>
> > >>     
> > >
> > > I did read the threads on backup and on how to use the 
> > > DataSourcePersistenceManager. But I am definitely doing something 
> > > wrong.
> > >
> > > I used the magnoliaAuthor and the magnoliaPublic WAR files.
> > >
> > > Here are the steps I took.
> > >
> > > 1- I first launched Tomcat without any changes (so using 
> > derby as the 
> > > persistence manager).
> > > 2- From the magnoliaAuthor export page I then exported websites, 
> > > users, config and (not being sure if I had to) I also 
> exported dms, 
> > > Expressions, Store, usergroups and userroles...
> > > 3- I shutdown Tomcat.
> > > 4- I deleted the repository.
> > > 5- Just to checked I restarted tomcat without changing the 
> > persistence 
> > > manager (so using Derby) and the bootstrapping worked fine 
> > as far as I 
> > > could say.
> > > 6- I shutdown tomcat, deleted the repository and changed the 
> > > persistence manager to the DataSourcePersistenceManager.
> > > 7- I then got an exception while starting up. I then change 
> > the debug 
> > > level to debug and I step through the code of 
> > > DataSourcePersistenceManager through eclipse in order to 
> > try to find 
> > > the source of the problem. And from what I can see the problem is 
> > > happening when trying to store a new node: cause 
> > > MySQLIntegrityConstraintViolationException  (id=101) failed 
> > to write 
> > > property state: 
> > > 
> > 
> deadbeef-face-babe-cafe-babecafebabe/{http://www.jcp.org/jcr/1.0}prima
> > > ryType
> > >
> > > I included a copy of the stdout below.
> > >
> > > Ideas on what I am doing wrong would be welcome.
> > >
> > > Thanks,
> > >
> > > Christian
> > >
> > > INFO   info.magnolia.jackrabbit.ProviderImpl 
> > ProviderImpl.java(init:143)
> > > 18.12.2006 17:36:47  Loading repository at 
> > > 
> > 
> C:\software\apache-tomcat-5.5.20\webapps\magnoliaAuthor\repositories\m
> > > agnoli
> > > a (config file:
> > > 
> > C:\software\apache-tomcat-5.5.20\webapps\magnoliaAuthor\WEB-IN
> > F\config\repo-
> > > conf\jackrabbit-mysql-search-mysql-pooled.xml)
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(init:291) 18.12.2006 
> 17:36:47   -
> > > Initializing persistence manager...
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(initializeDataSource:269) 
> > 18.12.2006
> > > 17:36:47   -    Datasource java:comp/env/jdbc/magnolia now 
> > available.
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > 
> > DataSourcePersistenceManager.java(prepareSchemaObjectPrefix:93
> > 4) 18.12.2006
> > > 17:36:48   -    Preparing schema prefix
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(checkSchema:972) 
> > 18.12.2006 17:36:48   -
> > > Produit: MySQL 5.0.26-community-nt
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(checkSchema:974) 
> > 18.12.2006 17:36:48   -
> > > Supports Statement Pooling: false
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(checkSchema:976) 
> > 18.12.2006 17:36:48   -
> > > Checking for schema existance...
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(checkSchema:981) 
> > 18.12.2006 17:36:48   -
> > > optimizedServerSidePreparedStatement autodetected, setting 
> > to : false
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(checkSchema:996) 
> > 18.12.2006 17:36:48   -
> > > schema autodetected, setting to : mysql
> > > WARN   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(checkSchema:1014) 
> > 18.12.2006 17:36:48   -
> > > Schema not existing. Starting database objects creation 
> > using mysql.ddl
> > > file...
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(checkSchema:1051) 
> > 18.12.2006 17:36:49   -
> > > Schema successfully created.
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(initializeDSPMQuery:279) 
> > 18.12.2006
> > > 17:36:49   -    Using server side standard statements.
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(init:328) 18.12.2006 
> 17:36:49   -
> > > Persistance manager successfully initialized.
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(store:619) 18.12.2006 
> 17:36:49   -
> > > Starting storage of changeLog...
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(getBLOBStore:248) 
> > 18.12.2006 17:36:49   -
> > > Getting Blob store instance.
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(store:720) 18.12.2006 
> 17:36:49   -
> > > Working on added states...
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(store:812) 18.12.2006 
> > 17:36:49   - Leaving
> > > storage of changeLog method.
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(load:384) 18.12.2006 
> > 17:36:49   - Loading
> > > node state (id=deadbeef-face-babe-cafe-babecafebabe)
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(init:291) 18.12.2006 
> 17:36:49   -
> > > Initializing persistence manager...
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(initializeDataSource:269) 
> > 18.12.2006
> > > 17:36:49   -    Datasource java:comp/env/jdbc/magnolia now 
> > available.
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > 
> > DataSourcePersistenceManager.java(prepareSchemaObjectPrefix:93
> > 4) 18.12.2006
> > > 17:36:49   -    Preparing schema prefix
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(checkSchema:972) 
> > 18.12.2006 17:36:49   -
> > > Produit: MySQL 5.0.26-community-nt
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(checkSchema:974) 
> > 18.12.2006 17:36:49   -
> > > Supports Statement Pooling: false
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(checkSchema:976) 
> > 18.12.2006 17:36:49   -
> > > Checking for schema existance...
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(checkSchema:981) 
> > 18.12.2006 17:36:49   -
> > > optimizedServerSidePreparedStatement autodetected, setting 
> > to : false
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(checkSchema:996) 
> > 18.12.2006 17:36:49   -
> > > schema autodetected, setting to : mysql
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(initializeDSPMQuery:279) 
> > 18.12.2006
> > > 17:36:49   -    Using server side standard statements.
> > > INFO   
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(init:328) 18.12.2006 
> 17:36:49   -
> > > Persistance manager successfully initialized.
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(store:619) 18.12.2006 
> 17:36:49   -
> > > Starting storage of changeLog...
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(getBLOBStore:248) 
> > 18.12.2006 17:36:49   -
> > > Getting Blob store instance.
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(store:720) 18.12.2006 
> 17:36:49   -
> > > Working on added states...
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(store:812) 18.12.2006 
> > 17:36:49   - Leaving
> > > storage of changeLog method.
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(store:619) 18.12.2006 
> 17:36:50   -
> > > Starting storage of changeLog...
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(getBLOBStore:248) 
> > 18.12.2006 17:36:50   -
> > > Getting Blob store instance.
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(store:684) 18.12.2006 
> 17:36:50   -
> > > Working on modified states...
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(store:720) 18.12.2006 
> 17:36:50   -
> > > Working on added states...
> > > ERROR  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(store:801) 18.12.2006 
> > 17:37:50  failed to
> > > write property state:
> > > 
> > deadbeef-face-babe-cafe-babecafebabe/{http://www.jcp.org/jcr/1
> > .0}primaryType
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(store:812) 18.12.2006 
> > 17:37:50   - Leaving
> > > storage of changeLog method.
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(load:384) 18.12.2006 
> > 17:37:50   - Loading
> > > node state (id=cafebabe-cafe-babe-cafe-babecafebabe)
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(load:415) 18.12.2006 
> > 17:37:50   - Loading
> > > property state
> > > 
> > (id=deadbeef-face-babe-cafe-babecafebabe/{http://www.jcp.org/j
> > cr/1.0}primary
> > > Type)
> > > DEBUG  
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > > DataSourcePersistenceManager.java(getBLOBStore:248) 
> > 18.12.2006 17:37:50   -
> > > Getting Blob store instance.
> > > ERROR  org.apache.jackrabbit.core.RepositoryImpl
> > > RepositoryImpl.java(<init>:248) 18.12.2006 17:37:50  Failed 
> > to initialize
> > > workspace 'default'
> > > javax.jcr.ItemNotFoundException:
> > > 
> > deadbeef-cafe-babe-cafe-babecafebabe/{http://www.jcp.org/jcr/1
> > .0}primaryType
> > >  at
> > > 
> > org.apache.jackrabbit.core.ItemManager.createItemInstance(Item
> > Manager.java:4
> > > 64)
> > >
> > >
> > >   
> > >> Once again, read the (whole) thread sabout installing
> > >> DataSourcePersManager and/or about backuping and restoring 
> > Magnolia  
> > >> instances.
> > >>
> > >> Nice day to you,
> > >> G.
> > >>
> > >> Le 14 déc. 06 à 20:15, Christian Sylvestre a écrit :
> > >>
> > >>     
> > >>> I am looking forward to use Magnolia for a fairly big web 
> > site and 
> > >>> for simplicity of management I would prefer to have the 
> repository
> > >>> located in
> > >>> MySQL.
> > >>>
> > >>> I then follow the procedure describes in some posting 
> to the user
> > >>> list on
> > >>> how to change the persistence manager to the one from 
> > iorgagroup.com.
> > >>>
> > >>> It seems to be working fine when I started Tomcat for the first
> > >>> time since
> > >>> I could see those messages in the console:
> > >>>
> > >>> INFO   info.magnolia.jackrabbit.ProviderImpl 
> > ProviderImpl.java(init: 
> > >>> 143)
> > >>> 14.12.2006 20:01:18  Loading repository at 
> > >>> 
> > C:\software\apache-tomcat-5.5.20\webapps\magnoliaAuthor\repositories
> > >>> \magnolia
> > >>> (config file: 
> > >>> C:\software\apache-tomcat-5.5.20\webapps\magnoliaAuthor\WEB-INF
> > >>> \config\repo-conf\jackrabbit-mysql-search-mysql-p
> > >>> ooled.xml)
> > >>> WARN 
> > >>> 
> > com.iorgagroup.jackrabbit.core.state.db.DataSourcePersistenceManager
> > >>> DataSourcePersistenceManager.java(checkSchema:1014) 14.12.2006
> > >>> 20:01:19
> > >>> -    Schema not existing. Starting database objects 
> creation using
> > >>> mysql.ddl file...
> > >>>
> > >>> So that looks fine, the tables have been created in MySQL.
> > >>>
> > >>> However the tables are empty? Shouldn't the whole 
> content of the 
> > >>> repository be created in MySQL?
> > >>>
> > >>> And if I look at any of the workspace.xml files I can see this: 
> > >>> <PersistenceManager 
> > >>> 
> > class="org.apache.jackrabbit.core.state.db.DerbyPersistenceManager">
> > >>>
> > >>> Shouldn't the persistence manager be the one I defined in my
> > >>> repository
> > >>> configuration file?
> > >>>
> > >>> Any help would be welcome.
> > >>>
> > >>> Thanks,
> > >>>
> > >>> Christian
> > >>>
> > >>> Note; FYI I am using Magnolia 3.0.1, Java 1.5 and Tomcat 5.5
> > >>>
> > >>>
> > >>> ----------------------------------------------------------------
> > >>> for list details see 
> > >>> http://www.magnolia.info/en/magnolia/developer.html
> > >>> ----------------------------------------------------------------
> > >>>       
> > >> ----------------------------------------------------------------
> > >>
> > >>     
> > >
> > >
> > > ----------------------------------------------------------------
> > > for list details see 
> > > http://www.magnolia.info/en/magnolia/developer.html
> > > ----------------------------------------------------------------
> > >
> > >   
> > 
> > ----------------------------------------------------------------
> > for list details see 
> > http://www.magnolia.info/en/magnolia/developer.html
> > ----------------------------------------------------------------
> > 
> 
> 
> ----------------------------------------------------------------
> 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