AnsweredAssumed Answered

Errors by compiling the FirstFoundationClient from SDK 3.0

Question asked by john84 on Feb 28, 2009
Latest reply on Jun 11, 2009 by ajaiking
Hello alfresco Community,
I am a newbie on alfresco after playing with the Webclient a little bit I got interesting in doing more Enterprise stuff on alfresco, even if I don't know very much about Java I thought for first steps it should be enough, well that's the theory  :oops:.
Alfter installing Eclipse 3.4.1 on my Win XP Machine and walking through the Wiki Entry about Alfresco SDK I've tried to compile the FirstFoundationClient but everytime I get error messages. I've seen many have similar problems but I could not find a solution.

The first Lines are:
16:44:38,597  ERROR [transform.swf.PDFToSWFContentTransformer] Failed to start SWF2PDF transformer: 
Execution result:
   os:         Windows Vista
   command:    pdf2swf -V
   succeeded:  false
   exit code:  1
   out:       
   err:        Cannot run program "pdf2swf": CreateProcess error=2, The system cannot find the file specified

I installed the swf2pdf tools, must I change some paths there?

And then will follow some Database Errors, by reading line three I've seen that the system tries to make a upgrade on 2.2 (it would be a downgrade  :? ) of course these statements will crash but why does this sample try to execute this statement? I am using the SDK 3.0. After this Statements I get errors on starting alfresco while starting, so get it working again I need to recreate the Database and delete contents of the alf_data folder.

16:44:38,873  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
16:44:38,927  INFO  [domain.schema.SchemaBootstrap] Executing database script C:\Users\Johannes\AppData\Local\Temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-56535.sql (Copied from classpath:alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/upgrade-1-drop-indexes-and-constraints.sql).
16:44:39,063  ERROR [domain.schema.SchemaBootstrap] Statement execution failed:
   SQL:  ALTER TABLE alf_audit_fact DROP INDEX FKEAD18174A0F9B8D9, DROP FOREIGN KEY FKEAD18174A0F9B8D9
   Error: Can't DROP 'FKEAD18174A0F9B8D9'; check that column/key exists
   File: C:\Users\Johannes\AppData\Local\Temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-56535.sql
   Line: 51
16:44:39,064  ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Can't DROP 'FKEAD18174A0F9B8D9'; check that column/key exists
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
   at com.mysql.jdbc.Connection.execSQL(Connection.java:3118)
   at com.mysql.jdbc.Connection.execSQL(Connection.java:3047)
   at com.mysql.jdbc.Statement.execute(Statement.java:692)
   at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:261)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:872)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:841)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptUrl(SchemaBootstrap.java:707)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.checkSchemaPatchScripts(SchemaBootstrap.java:678)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:600)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1005)
   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.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:55)
   at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:69)
Exception in thread "main" org.alfresco.error.AlfrescoRuntimeException: Schema auto-update failed
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1074)
   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.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:55)
   at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:69)
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Can't DROP 'FKEAD18174A0F9B8D9'; check that column/key exists
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
   at com.mysql.jdbc.Connection.execSQL(Connection.java:3118)
   at com.mysql.jdbc.Connection.execSQL(Connection.java:3047)
   at com.mysql.jdbc.Statement.execute(Statement.java:692)
   at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:261)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:872)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:841)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptUrl(SchemaBootstrap.java:707)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.checkSchemaPatchScripts(SchemaBootstrap.java:678)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:600)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1005)
   … 10 more

What did I wrong? Any idea??

Thanks a lot in advance
Johannes

Outcomes