cancel
Showing results for 
Search instead for 
Did you mean: 

Problem running Alfresco SDK : No transaction rule is active

dcram
Champ in-the-making
Champ in-the-making
Hi,

I am new to alfresco and I try to run the examples of Alfresco SDK. When I run "SimpleExample" of the JCR Samples, I have the followings appearing in the console :
15:45:39,015 ERROR [transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to perform ImageMagick transformation:
Execution result:
   os:         Windows XP
   command:    imconvert "C:\DOCUME~1\Damien\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_source_44264.gif"  "C:\DOCUME~1\Damien\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_target_44265.png"
   succeeded:  false
   exit code:  1
   out:       
   err:        Cannot run program "imconvert": CreateProcess error=2, Le fichier spécifié est introuvable
15:45:41,546 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryRepositoryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: Failure during rollback: org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap$1@1787005
Caused by: org.alfresco.error.AlfrescoRuntimeException: Failure during rollback: org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap$1@1787005
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:281)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
   at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.bootstrap(DictionaryRepositoryBootstrap.java:134)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1160)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1122)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1085)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
   at org.alfresco.sample.jcr.SimpleExample.main(SimpleExample.java:53)
Caused by: java.lang.IllegalStateException: No user transaction is active
   at org.alfresco.util.transaction.SpringAwareUserTransaction.rollback(SpringAwareUserTransaction.java:479)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:276)
   … 20 more

while the log only contains:
15:45:39,015 ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to perform ImageMagick transformation:
Execution result:
   os:         Windows XP
   command:    imconvert "C:\DOCUME~1\Damien\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_source_44264.gif"  "C:\DOCUME~1\Damien\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_target_44265.png"
   succeeded:  false
   exit code:  1
   out:       
   err:        Cannot run program "imconvert": CreateProcess error=2, Le fichier spécifié est introuvable
15:45:41,546 WARN  [org.springframework.remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one

I have found a similar issue in the forum, but with no given solution :
http://forums.alfresco.com/viewtopic.php?t=8313

In case it matters, I am using alfresco SDK v2.1, with MySQL 5.0.45 on JDK1.5, OS : Windows XP SP 2

Thanks for any help,
Damien
1 REPLY 1

janv
Employee
Employee
Two things here:

1. ImageMagik transformation …

Refer to: http://forums.alfresco.com/viewtopic.php?t=7407

2. DB setup issue …

Refer to: http://forums.alfresco.com/viewtopic.php?t=8587

Please double check your DB setup & properties. It may help to explicitly override the DB setup for your SDK installation to make sure it points at your MySQL database:

http://wiki.alfresco.com/wiki/Database_Configuration

You can also update the RetryingTransactionHelper.java in your SDK to see the underlying cause of the rollback. Replace:



                lastException = (e instanceof RuntimeException) ?
                        (RuntimeException)e : new AlfrescoRuntimeException("Unknown Exception in Transaction.", e);



with:



                if (e instanceof RollbackException)
                {
                    lastException = (e.getCause() instanceof RuntimeException) ?
                         (RuntimeException)e.getCause() : new AlfrescoRuntimeException("Exception in Transaction.", e.getCause());
                }
                else
                {
                    lastException = (e instanceof RuntimeException) ?
                         (RuntimeException)e : new AlfrescoRuntimeException("Exception in Transaction.", e);
                }


Thanks,
Jan