cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Run JCR Samples

deepali
Champ in-the-making
Champ in-the-making
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 UserSmiley Frustratedystem 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 UserSmiley Frustratedystem WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
10:57:50,103 UserSmiley Frustratedystem INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
10:58:05,541 UserSmiley Frustratedystem 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 UserSmiley Frustratedystem 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 UserSmiley Frustratedystem 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.
3 REPLIES 3

spynexes
Champ in-the-making
Champ in-the-making
In the error message it says:
err: Cannot run program "imconvert": CreateProcess error=2, The system cannot find the file specified
Is the program imconvert in your path? Is it installed?

deepali
Champ in-the-making
Champ in-the-making
No it is not present . From where I can downlaod it and which version. Please share information regarding this .

deepali
Champ in-the-making
Champ in-the-making
Hi,
I have installed imconvert.exe and also included it in the path. Now I am getting this error.

09:55:35,106 UserSmiley Frustratedystem 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_1697784608108323616.gif"  "C:\DOCUME~1\ANKITS~1\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_target_5633201357233812183.png"
   succeeded:  true
   exit code:  4
   out:       
   err:        Invalid Parameter - "C:\DOCUME~1\ANKITS~1\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_target_5633201357233812183.png"

09:55:37,325 UserSmiley Frustratedystem WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
09:55:40,513 UserSmiley Frustratedystem INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
09:55:41,231 UserSmiley Frustratedystem INFO  [domain.schema.SchemaBootstrap] Executing database script C:\DOCUME~1\ANKITS~1\LOCALS~1\Temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7945828281313291235.sql (Generated).
09:55:41,309 UserSmiley Frustratedystem 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_e138.frm' (errno: 150)
   File: C:\DOCUME~1\ANKITS~1\LOCALS~1\Temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7945828281313291235.sql
   Line: 1
09:55:41,309 UserSmiley Frustratedystem ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
java.sql.SQLException: Can't create table '.\alfresco_create\#sql-4a8_e138.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_e138.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
Please suggest what should I do.