Status/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Sam Farmer / Sam Farmer (sam.farmer.cfm)
Created: 06/30/2009
Components: ORM Support
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,240375 /
Priority/Frequency: Major / Unknown
Locale/System: English / Mac 10 All
Vote Count: 0
Problem:
Hi,
I am getting a DDL generation error with the code below. Connecting to a MySQL 5.1 community database on Mac OS 10.5.7.
Thanks,
Sam
Method:
App.cfc:
Component Application {
this.name = "trackrApp";
this.ormenabled = true;
this.datasource = "trackrMySQL";
this.ormsettings = {dbcreate="update", dialect="MySQL"};
function onRequestStart() {
ormReload();
}
}
UserType.cfc:
/**
* @persistent true
*/
Component UserType
{
property name="userTypeID" fieldtype="id" datatype="integer" generator="identity" sqltype="integer" column="userTypeID" length="9"; [I've tried different combinations of attributes but the same result]
property name="type" datatype="string" notnull="true" sqltype="varchar" length="50";
}
Result:
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 during DDL export
Resources:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17
Remote Address 127.0.0.1
Referrer
Date/Time 30-Jun-09 08:48 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:355)
at coldfusion.orm.hibernate.HibernateConfiguration.initHibernateConfiguration(HibernateConfiguration.java:218)
at coldfusion.orm.hibernate.HibernateConfiguration.<init>(HibernateConfiguration.java:138)
at coldfusion.orm.hibernate.ConfigurationManager.initConfiguration(ConfigurationManager.java:69)
at coldfusion.orm.hibernate.HibernateProvider.InitializeORMForApplication(HibernateProvider.java:168)
at coldfusion.orm.hibernate.HibernateProvider.onPageRequestStart(HibernateProvider.java:135)
at coldfusion.filter.ApplicationFilter.firePageRequestStart(ApplicationFilter.java:444)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:298)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
at coldfusion.CfmServlet.service(CfmServlet.java:177)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null, primary key (userTypeID))' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3243)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1343)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1260)
at coldfusion.server.j2ee.sql.JRunStatement.executeUpdate(JRunStatement.java:182)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:204)
... 36 more
Debugging Information
ColdFusion Server Developer 9,0,0,240375
Template /Dropbox/b9/trackr/index.cfm
Time Stamp 30-Jun-09 08:48 PM
Locale English (US)
User Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17
Remote IP 127.0.0.1
Host Name localhost
Execution Time
No top level page was found.
Exceptions
20:48:59.059 - org.hibernate.JDBCException - in : line -1
Error during DDL export
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3039097
External Customer Info:
External Company:
External Customer Name: Sam Farmer
External Customer Email: 183F5AA44911D0AB992016B6
External Test Config: 06/30/2009
Attachments:
Comments: