[Coldbox 4.3.0] [Coldfusion 10] 'table' is not BASE TABLE

Hello,

I have been working on a cold box project using Lucee server. Now we transfer to Coldfusion 10. When I goes to the index.cfm The error is ‘table’ is not BASE TABLE. In mysql database setting, this ‘table’ is in view section(read-only), which is created based on the some of the tables in the table section. I wonder how to deal with this error.

Thanks a lot for your help.

Icy LI

Could you post the error details?

The error stack is as followed, thank you.

The web site you are accessing has experienced an unexpected error.
Please contact the website administrator.

The following information is meant for the website developer for debugging purposes.

Error Occurred While Processing Request

Error in executing the DDL.

‘jldp_latest.programmesjldp’ is not BASE TABLE

Resources:

Browser Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Remote Address 172.31.10.156
Referrer
Date/Time 14-Nov-17 02:37 PM

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:575)
	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.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:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	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:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:466)
	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:197)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.sql.SQLException: 'jldp_latest.programmesjldp' is not BASE TABLE
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1062)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2793)
	at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1795)
	at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1709)
	at coldfusion.server.j2ee.sql.JRunStatement.executeUpdate(JRunStatement.java:193)
	at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:204)
	... 43 more

My experience in ORM is novice. I believe the Data Definition Language (DDL) was generated by ORM. You probably could find a clue by examining the generated DDL from log files; and then fix your ColdFusion ORM code accordingly. If you have Fusion Reactor, you could find the error details under JDBC.

Yes, I have been looking through the orm stuff. And some said just turn off ddl function. I am confused whether it works on lucee but fail on cold fusion 10.

I am not sure how to find the ddl log. I am trying to install fusion reactor and see what’s going one. Thank you so much.

A few notes:

Thanks a lot for your reply and the addition suggestion. It is really helpful.
It seems there is no “base table” in my code.I tried to write a simple version with one view and one table. And I am developing this on cf10 using cb 4.3.
I think the possible issue might be some inconsistency between the view table attributes and my ormentity.cfc.

Take a look at these.

http://therealdanvega.com/blog/2009/08/25/coldfusion-9-debugging-hibernate-schema-exports

They might help.

I have found the reason is most likely because the view tables I created does not have a primary key. However, it seems the norm component requires one.