Execute DDL Commands Error

3
Hi I am working to a deadline and have got this error when trying to run the application. Nothing is running anymore. Can you help please ? This is for a university course and I have been working on it for most of the night. Please can you fix it or have I lost the whole lot ? Request action: executeddlcommands Message: Executing DDL commands failed. Cause: Error (SQL State: 42581, Error Code: -5581) on executing: ALTER TABLE "icaexpotees$student2" ALTER "id" INT GENERATED BY DEFAULT AS IDENTITY (START WITH 1); All changes are rolled back. Stack trace: com.mendix.m2ee.api.AdminException: Executing DDL commands failed. at com.mendix.core.MxRuntime.c(SourceFile:499) Caused by: ac: Error (SQL State: 42581, Error Code: -5581) on executing: ALTER TABLE "icaexpotees$student2" ALTER "id" INT GENERATED BY DEFAULT AS IDENTITY (START WITH 1); All changes are rolled back. at z.a(SourceFile:88) Caused by: java.sql.SQLException: unexpected token: GENERATED at org.hsqldb.jdbc.Util.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source) at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) at z.a(SourceFile:171) at z.a(SourceFile:46) at jm.a(SourceFile:164) at jm.d(SourceFile:157) at com.mendix.core.MxRuntime.c(SourceFile:495) at ei.execute(SourceFile:33) at com.mendix.m2ee.server.handler.AdminHandler.handle(AdminHandler.java:84) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:334) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:992) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:550) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:462) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Thread.java:662) Caused by: org.hsqldb.HsqlException: unexpected token: GENERATED at org.hsqldb.error.Error.parseError(Unknown Source) at org.hsqldb.ParserBase.unexpectedToken(Unknown Source) at org.hsqldb.ParserCommand.compilePart(Unknown Source) at org.hsqldb.ParserCommand.compileStatements(Unknown Source) at org.hsqldb.Session.executeDirectStatement(Unknown Source) at org.hsqldb.Session.execute(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source) at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) at z.a(SourceFile:171) at z.a(SourceFile:46) at jm.a(SourceFile:164) at jm.d(SourceFile:157) at com.mendix.core.MxRuntime.c(SourceFile:495) at ei.execute(SourceFile:33) at com.mendix.m2ee.server.handler.AdminHandler.handle(AdminHandler.java:84) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:334) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:992) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:550) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:462) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Thread.java:662)
asked
5 answers
4

This often happens when a change has been made to an Entity that the database cannot deal with. Usualy it can be fixed by just running the application again, as the previous queries have fixed it.

But in some cases you wuold have to go into the database and do some manual work.

If you aren't too concerned about the data, just go into your database and delete the table icaexpotees$student2, then run the application again.

answered
2

Are you sure you work with Mendix 2.5.4 or higher? This was an error which occur with Mendix 2.5.3 and some earlier version.

answered
1

I have just checked the link I downloaded from and my apologies it is 2.5.3 I cannot access a link for 2.5.4 anywhere. The link in my account gives me 2.5.3 because I have just clicked it after I made that post to be sure.

answered
0

I downloaded the latest version from this website about a week ago. It says 2.5.4 under help.

I have deleted and recreated it. I have decided to stay up and re-write it from scratch as it needs to be in later this week. I dont have time to mess about trying to fix it.

I have tried allsorts for a few hours. I am a web programmer fluent in SQL, ASP and the like so I know my way around a database and code. Nothing I tried got it working again so I have scrapped it.

There are a lot of issues coming up with the database. All daft little things like if you create say table 1 and table 2 with 1id and 1value in table 1 and 2id, 1id and 2_value in table 2. Then you tell it to delete table 1 when table 2 is deleted it doesnt. and vice versa.

The associations in the connector dont always pick up the data model. Sometimes you can find the data your looking for and others it wont see it till you restart the app.

Sometimes it doesnt come back at all.

I will list all the bugs I have found when I finish this project off.

answered
0

It was created in the modeller using entities and associations. The database structure was normalised to 3nf and the tables created with no conflicting attributes. There was 1 table that had 2 forign keys in and was used as to erradicate a many to many association.

The the associations were added using the modeller.I merely picked that as an example because its simpler than the one I was doing and easy to troubleshoot and test.

Anyway I am rebuilding from scratch now I have just checked my download link on my profile and its been changed to 2.5.4.1 so I am installing that and hoping I can get this in on time.

answered