ContentBox v1.6.0 - Error in executing the DDL

CF lovers,
I’m noob with Coldbox platform, i downloaded ContentBox from http://www.gocontentbox.org/download (Source Download) and place it in my webroot, I was able to see the wizard screen, after selected existing dsn I got below error after the submission

Error in executing the DDL.

Index ‘IDX_CREATEDDATE’ already exists in Schema ‘APP’.

Stack Trace

org.hibernate.JDBCException: Error during DDL export
	at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:209)
	at coldfusion.orm.hibernate.HibernateConfiguration.exportSchema(HibernateConfiguration.java:455)
	at coldfusion.orm.hibernate.HibernateConfiguration.exportSchema(HibernateConfiguration.java:413)
	at coldfusion.orm.hibernate.HibernateConfiguration.initHibernateConfiguration(HibernateConfiguration.java:226)
	at coldfusion.orm.hibernate.HibernateConfiguration.<init>(HibernateConfiguration.java:183)
	at coldfusion.orm.hibernate.ConfigurationManager.initConfiguration(ConfigurationManager.java:67)
	at coldfusion.orm.hibernate.HibernateProvider.InitializeORMForApplication(HibernateProvider.java:184)
	at coldfusion.orm.hibernate.HibernateProvider.beforeApplicationStart(HibernateProvider.java:80)
	at coldfusion.filter.ApplicationFilter.fireBeforeAppStartEvent(ApplicationFilter.java:572)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:306)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:112)
	at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
	at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
	at coldfusion.CfmServlet.service(CfmServlet.java:219)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414)
	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:204)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.sql.SQLException: Index 'IDX_CREATEDDATE' already exists in Schema 'APP'.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown Source)
	at coldfusion.server.j2ee.sql.JRunStatement.executeUpdate(JRunStatement.java:193)
	at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:204)
	... 43 more
Caused by: java.sql.SQLException: Index 'IDX_CREATEDDATE' already exists in Schema 'APP'.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
	... 54 more
Caused by: ERROR X0Y32: Index 'IDX_CREATEDDATE' already exists in Schema 'APP'.
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException(Unknown Source)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(Unknown Source)
	at org.apache.derby.impl.sql.execute.CreateIndexConstantAction.executeConstantAction(Unknown Source)
	at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
	... 48 more

I’m running Windows 8, IIS 8.0.9200.16384
Adobe ColdFusion 10 dev edition.
database MySQL5 also tried to connect with ColdFusion built in cfartgallery same result

I also tried on other PC windows 8.1 same result.

Any advice is appreciated
Shirak

Hi Shirak, welcome to ColdBox and ContentBox! We can help you here, but in case you didn’t know we also have a dedicated Google Group just for ContentBox as well:
https://groups.google.com/forum/?hl=en#!forum/contentbox

I can’t say I’ve seen that error before, but it appears to be happening when CF loads up and auto-creates the database based on the ORM entities. I’ve installed ContentBox many times on Windows 7 with MySQL. I can try it on Windows 8, but I’ll have to get my laptop set up.

  • Can you confirm for us if the database was empty when you started and if the username being used to log in has permissions to create tables,etc?
  • If you look in the database, were any tables created?
  • If you refresh the page, does the application load, or does it just give this error again?
  • Do you have all the CF10 updates applied?
    The stack trace appears to be from the cfartgallery database since I see “apache derby” in it. Honestly, I’m not sure if Derby is compatible with all the ORM features we use. Can you share the full stack trace from when you tried it with MySQL?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Correct me if I am wrong, but don’t indexes have to be unique?

Also as Brad suggests, check that the DB is indeed empty. If this is a database that has got previous data for something else. Try a database that has nothing, then let us know if you get the same problem.

Regards,

Brad,

This is not a Windows 8 issue, I have been running ColdFusion 10 on Windows 8 and Windows 2012 for two years without any issues. So the question if this problem continues to persist, if I know what the database is being used I can try it here with that database. I use both MS SQL and mySql for all DB work here locally and on my local servers, which I can safely say have never seen this message before.

Would like to know if this happens with a 100% newly created DB first though.

Brad/Andrew,
My first issue was with cfartgallery and yes it has data in it. when I tried existing database on MySql with data failed too. I have created new empty database using MySQL, worked. However the first run failed telling me the timeout exceed the limit for cfloop when I did refresh everything worked fine.

So looks like for cfartgaller either failed because of the data or because ColdBox ORM does not have support for Derby.

Thank you guys for your reply.

Shirak

Actually Derby is supported…

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSED380324-6CBE-47cb-9E5E-26B66ACA9E81.html