AnsweredAssumed Answered

Unable to Run JCR Samples

Question asked by deepali on Nov 19, 2009
Latest reply on Nov 20, 2009 by deepali
Hi,

I am unable to run JCR Samples given in Alfresco SDK . I got this error during execution of SimpleExample.java
ApplicationContext context = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");

10:57:44,603 User:System ERROR [transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to perform ImageMagick transformation:
Execution result:
   os:         Windows XP
   command:    imconvert "C:\DOCUME~1\ANKITS~1\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_source_2033700973636707167.gif"  "C:\DOCUME~1\ANKITS~1\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_target_951176847023834192.png"
   succeeded:  false
   exit code:  1
   out:       
   err:        Cannot run program "imconvert": CreateProcess error=2, The system cannot find the file specified
10:57:46,916 User:System WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
10:57:50,103 User:System INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
10:58:05,541 User:System INFO  [domain.schema.SchemaBootstrap] Executing database script C:\DOCUME~1\ANKITS~1\LOCALS~1\Temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-5450493072137834821.sql (Generated).
10:58:05,744 User:System ERROR [domain.schema.SchemaBootstrap] Statement execution failed:
   SQL:  alter table alf_access_control_entry add index FKFFF41F99B25A50BF (authority_id), add constraint FKFFF41F99B25A50BF foreign key (authority_id) references alf_authority (recipient)
   Error: Can't create table '.\alfresco_create\#sql-4a8_111.frm' (errno: 150)
   File: C:\DOCUME~1\ANKITS~1\LOCALS~1\Temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-5450493072137834821.sql
   Line: 1
10:58:05,744 User:System ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
java.sql.SQLException: Can't create table '.\alfresco_create\#sql-4a8_111.frm' (errno: 150)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
   at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:734)
   at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:261)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:700)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:675)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:485)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:767)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   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)
Exception in thread "main" org.alfresco.error.AlfrescoRuntimeException: Schema auto-update failed
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:815)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   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.sql.SQLException: Can't create table '.\alfresco_create\#sql-4a8_111.frm' (errno: 150)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
   at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:734)
   at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:261)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:700)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:675)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:485)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:767)
   … 10 more

Can anyone tell me what is the problem. Please resolve the problem.
Thanks.

Outcomes