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

gavinc
Champ in-the-making
Champ in-the-making
From the stack trace it looks like you have a transform rule setup on the parent space you are trying to create the new one in.

Did you define a rule to transform content on any of your spaces? If so, try removing the rule and attempt the create space action again.

leoditor
Champ in-the-making
Champ in-the-making
I have the same problem.
I follow the tutorial, so i define no rule.
But in step 2 (Spaces options) I don't have "copy existing space" option like the tutorial.
I have this message:

Note: Any content rules for spaces will also be copied.

leoditor
Champ in-the-making
Champ in-the-making
the same problem with transaction when using clipboard cpy/paste:

Unable to paste item due to system error: The transaction was not committed - Content conversion failed: reader: Content writer: Contentfile://2005%5C9%5C2%5C4f04d8ae-1bbc-11da-9afd-e9a994954d07.bin,

a5sk4s
Champ in-the-making
Champ in-the-making
Gavin:

Thanks for the quick response.

To my knowledge, I haven't set up any rules in any of the spaces created so far (Users with one subspace for a user and Projects as suggested in the tutorial).  I double-checked those spaces using the UI and there are indeed none.

Is there anything else that I could do to track down the error?

Andreas

a5sk4s
Champ in-the-making
Champ in-the-making
I've tracked it down to some inconsistencies with the contentstore under %TOMCAT_HOME%/bin/alfresco.  Not sure what caused those inconsistencies in the first place, but copying a document into the location of the reader's URL got me passed the original error.  I am uncertain which document was actually supposed to be in that location and probably will redo the alfresco deployment.

davidc
Star Contributor
Star Contributor
From the stack trace, the transformation is a result of the indexing process (which transforms content to text) and not rules.

It's unclear why there wasn't any content at the URL.  I notice you've run the unit tests, which will also use the same database schema (alfresco by default) and it's possible that something in the tests have left things in an inconsistent state.  I'd either run tests in their own schema or clean out the schema (ant reset-database) after running the tests and before starting the application server.

Even so, it's still odd that a couple of you have seen this issue, so I'll perform the same tutorial steps and see what happens.

derek
Star Contributor
Star Contributor
Hi, All

This is fairly common when switching between the test environment and the live environment.

The file 'repository.properties' has a relative directory for storing indexes and content.  But the database details are NOT relative.  So, when you run some tests, you will get content created at a location A/…/alfresco/content but when you run under Tomcat, you will get content in B/…/alfresco/content.

But both the tests and the Tomcat will probably refer to the same database.  Therefore, after running the tests and switching to Tomcat, you will effectively have URLs in the database that refer to non-existent content.  This is exactly what has happened here.

When indexing attempted to do some indexing on the nodes, the content could not be found - definitely a very serious error.

To solve this (if you want to run unit tests):
After you unzip the code, and before you run anything, modify the repository.properties to point to an absolute location on your system.  In that way, you will have both a common database and common content and index stores regardless of which tests you run or if you run Tomcat, JBoss, etc.

To fix your issue:
You could (a) drop and recreate the database schema or (b) copy all your many content stores and index file into one location and modify the repository.properties to refer to that location.

Regards

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

I changed repository.properties to point to absolute path: dir.root=/opt/Alfresco/alf_data and I still got the error.
Version: Community - v3.3.0.
This happens on spaces where a content rule is applied, and to sub-spaces. 
I went ahead and dropped/recreated the database schema and this solved the issue.  (In Test.)  However, you lose all your stuff when you do that.  Do you create an acp file first and then import it after the drop/recreate or is there another way?

I have two sites with MUCH information… dropping and recreating in Production is probably not the best option.  Unless there is a safe way to do it.  Suggestions?

Anything you can do to help will be greatly appreciated!

derek
Star Contributor
Star Contributor
Hi,
Your alfresco.log will say which dir.root is being used by the server.  Locate it and set your dir.root to reference it using an absolute path.  Locate any previously-used content stores (caused by the server using different relative locations) and merge them together.  If you had some of those, you should probably reindex.