cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to create new space due to error: The transaction was

a5sk4s
Champ in-the-making
Champ in-the-making
I'm trying to follow the tutorial (more or less) after installing alfresco from source (with some manual steps involved - several config files weren't copied into the Tomcat directories and I had to manually move them over - not sure what went wrong - I used build-tomcat and deploy-tomcat).

When trying working with space templates and following the steps in the tutorial, I get the error below.  It happens when selecting the Finish button.  I'm uncertain, if this is caused by any steps I missed during the installation.

I'm using Alfresco 0.5.0 on Tomcat 5.0.30 and have OpenOffice and ImageMagick installed as well.

All the tests except one ran correctly.  The test TextMiningContentTransformerTest.testBugFixAR1 first caused an error, which I tried to fix by changing assertNotNull("… farmers_markets_list_2003.doc") to assertNotNull("… farmers_markets_list_2003.doc", is), but now its still a failure, because the document isn't there.


Please correct the errors below then click Finish.
Failed to create new space due to error: The transaction was not committed - Content conversion failed: reader: Content[ url=file://2005\8\31\aa1f3ce4-1a3a-11da-ac62-f17d33e50603.bin, mimetype=text/html, encoding=null] writer: Content[ url=file://2005\9\1\96625377-1b0a-11da-9f96-db9c2f83ab06.bin, mimetype=text/plain, encoding=null]


org.alfresco.service.cmr.repository.ContentIOException: Content conversion faile
d:
   reader: Content[ url=file://2005\8\31\aa1f3ce4-1a3a-11da-ac62-f17d33e50603.bin, mimetype=text/html, encoding=null]
   writer: Content[ url=file://2005\9\1\4f16fba9-1b0a-11da-9f96-db9c2f83ab06.bin, mimetype=text/plain, encoding=null]
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:131)
        at org.alfresco.repo.content.RoutingContentService.transform(RoutingContentService.java:282)
        at org.alfresco.repo.content.RoutingContentService$$EnhancerByCGLIB$$4f882b56.transform(<generated>)
        at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.indexProperty(LuceneIndexerImpl.java:1337)
        at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.createDocuments(LuceneIndexerImpl.java:1118)
        at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.indexImpl(LuceneIndexerImpl.java:1021)
        at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.indexImpl(LuceneIndexerImpl.java:1009)
        at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.flushPending(LuceneIndexerImpl.java:854)
        at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.prepare(LuceneIndexerImpl.java:648)
        at org.alfresco.repo.search.impl.lucene.LuceneIndexerAndSearcherFactory.prepare(LuceneIndexerAndSearcherFactory.java:676)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:579)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:530)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:390)
        at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:253)
        at org.alfresco.web.bean.wizard.NewSpaceWizard.finish(NewSpaceWizard.java:237)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:138)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:62)
        at javax.faces.component.UICommand.broadcast(UICommand.java:106)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:110)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:184)
        at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:271)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:102)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
        at org.alfresco.web.app.servlet.AlfrescoFacesServlet.service(AlfrescoFacesServlet.java:49)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.alfresco.web.app.servlet.ModeDetectionFilter.doFilter(ModeDetectionFilter.java:59)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:90)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.alfresco.service.cmr.repository.ContentIOException: Failed to open stream onto channel:
   accessor: Content[ url=file://2005\8\31\aa1f3ce4-1a3a-11da-ac62-f17d33e50603.bin, mimetype=text/html, encoding=null]
        at org.alfresco.repo.content.AbstractContentReader.getContentInputStream(AbstractContentReader.java:209)
        at org.alfresco.repo.content.transform.StringExtractingContentTransformer.transformText(StringExtractingContentTransformer.java:96)
        at org.alfresco.repo.content.transform.StringExtractingContentTransformer.transformInternal(StringExtractingContentTransformer.java:81)
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:127)
        … 57 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: Failed to open file channel: Content[ url=file://2005\8\31\aa1f3ce4-1a3a-11da-ac62-f17d33e50603.bin, mimetype=text/html, encoding=null]
        at org.alfresco.repo.content.filestore.FileContentReader.getDirectReadableChannel(FileContentReader.java:149)
        at org.alfresco.repo.content.AbstractContentReader.getReadableChannel(AbstractContentReader.java:185)
        at org.alfresco.repo.content.AbstractContentReader.getContentInputStream(AbstractContentReader.java:202)
        … 60 more
Caused by: java.io.IOException: File does not exist
        at org.alfresco.repo.content.filestore.FileContentReader.getDirectReadableChannel(FileContentReader.java:135)
        … 62 more

How can I get to the core of this issue.  Any guidance is much appreciated.

Andreas
17 REPLIES 17

lucille_arkenst
Champ in-the-making
Champ in-the-making
Hello Derek,

Thanks for the quick response.  I am already using an absolute path (The Alfresco root data directory ('dir.root') is: /opt/Alfresco/alf_data).

What do you mean by "locate any previously-used content stores and merge them together"?  The only content store I know of is /opt/Alfresco/alf_data/contentstore.  I'll re-index if I knew there was another one somewhere.  Where should I look?

Merging the content stores should be done instead of dropping and recreating the database, right?

Thanks!

derek
Star Contributor
Star Contributor
You could copy the content from the contentstore.deleted, for example.  But if you know which URLs are missing, then you could search for it.  At any rate, I'm just going on the later analysis indicating that some content was missing.

lucille_arkenst
Champ in-the-making
Champ in-the-making
OK now I truly need your help.
There was nothing in contentstore.deleted, and I wanted to retrace my steps so I could say, "OK, if I dump contentstore.deleted into content store, that works."  But now I cannot log in to Alfresco.

The error was:

Schema auto-update failed
Duplicate key name 'FK_BYTEBLOCK_FILE'

Statement execution failed:
   SQL:     alter table JBPM_BYTEBLOCK
        add index FK_BYTEBLOCK_FILE (PROCESSFILE_),
        add constraint FK_BYTEBLOCK_FILE
        foreign key (PROCESSFILE_)
        references JBPM_BYTEARRAY (ID_)
   Error: Duplicate key name 'FK_BYTEBLOCK_FILE'
   File: /opt/Alfresco/tomcat/temp/Alfresco/AlfrescoSchema-MySQLInnoDBDialect-Update-61387559573437534.sql

Here's what I did:

$ mysql -u root -p

mysql> drop database alfresco;
Query OK, 88 rows affected (0.10 sec)

mysql> create database alfresco default character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;
Query OK, 0 rows affected (0.00 sec)

mysql> grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
Query OK, 0 rows affected (0.00 sec)

Help!

derek
Star Contributor
Star Contributor
Are we drifting from the original issue?  You dropped your MySQL database after a failed upgrade?  Did you try to upgrade an existing installation (from what to what) and then dropped the DB?
I am confused.

lucille_arkenst
Champ in-the-making
Champ in-the-making
Yes, sorry.  We indeed drifted a bit because the fix that was originally advised did not work, plus I couldn't get Alfresco running again.
To fix your issue:
You could (a) drop and recreate the database schema…
After Googling, I am now back up and running.
So sorry for the confusion.  Back to our discussion…
…(b) copy all your many content stores and index file into one location and modify the repository.properties to refer to that location.
I modified repository.properties such that dir.root now points to 1) an absolute path 2) alf_data, the location the content stores are in.
But I still got the error after doing that.  So finally you and I were exploring "locate any previously-used content stores and merge them together", and I checked contentstore.deleted and there was nothing in that folder.  I lost two sites that I created, plus all content.

Did I do something wrong in step (b)?
I just want to successfully apply a fix where my users can change the name of a space without getting any errors, and without taking away any of their functionality (i.e. content rule), and without losing their data.  :wink:

derek
Star Contributor
Star Contributor
Have you found this content? file://2005\8\31\aa1f3ce4-1a3a-11da-ac62-f17d33e50603.bin

lucille_arkenst
Champ in-the-making
Champ in-the-making
All that kind of content is located in /opt/Alfresco/alf_data/contentstore/, only.

derek
Star Contributor
Star Contributor
OK.  Is that specific file there (it was the one that was missing before)?