I was deploying everything manually so far (drag n drop using an ftp client) in 
my Magnolia project.

We decided to switch to an automated deployment. This is done by having our 
instances committed in svn, building one war file per instance and then 
dropping the war files in the "webapps" directory (in between stopping and 
restarting tomcat).

I took off the following directories from "magnoliaAuthor" and "magnoliaPublic" 
directories since they are "dynamic" (Magnolia writes into them):
cache
logs
repositories
tmp
history

I configured Magnolia accordingly in "magnolia.properties" file.


After these changes I get the following error during Magnolia start up:


FAILED TO STARTUP:
2011-06-24 16:29:37,182 ERROR 
core.persistence.bundle.BundleDbPersistenceManager: failed to write bundle: 
deadbeef-cafe-babe-cafe-babecafebabe
java.sql.SQLException: The statement was aborted because it would have caused a 
duplicate key value in a unique or primary key constraint or unique index 
identified by 'SQL110613160035510' defined on 'USERROLES_BUNDLE'.
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown 
Source)
        at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
Source)
        at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown 
Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown 
Source)
        at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown 
Source)
        ... a lot more

Caused by: ERROR 23505: The statement was aborted because it would have caused 
a duplicate key value in a unique or primary key constraint or unique index 
identified by 'SQL110613160035510' defined on 'USERROLES_BUNDLE'.
        at org.apache.derby.iapi.error.StandardException.newException(Unknown 
Source)
        at 
org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(Unknown 
Source)
        at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(Unknown 
Source)
        at org.apache.derby.impl.sql.execute.IndexChanger.insert(Unknown Source)
        at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(Unknown 
Source)
        at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown 
Source)
        at 
org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown 
Source)
        at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown 
Source)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown 
Source)
        ... 61 more


>From what I understand of the error message, Magnolia is trying to write to 
>the database during start up and is not allowed because it tries to write an 
>object having the same ID of an object already present in the Db. This object 
>happens to be a user (cf. "defined on 'USERROLES_BUNDLE' ").

Did you come across similar issue or have an idea why I encountered this 
problem? if yes, please let me know your thoughts.

Thanks, a.

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=5d6228cc-e91c-4248-9c21-ec0083ad1814


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to