You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys, I'm trying to load a tab-separated roster as described in the wiki, and I got a MySQLSyntaxErrorException. Here's the transcript:
$ java -jar cloudcoderApp-v0.0.7.1.jar registerstudents
For which course would you like to register students?
0 - CCDemo - CloudCoder demo course
1 - CS102 - Programming 1
[Enter value in range 0..1] 1
Enter the name of the file containing a tab-separated list student registration entries in this format:
username firstname lastname email password section
Usernames in the datbase will be re-used, but the names/email/password will not be updated,and users will not be registered for a course if they are already registered
[default: ] ==> /home/ubuntu/cloudcoder-accounts.csv
Note that this may be a slow operation
Some logging results will be appended to logs/cloudcoder.log rather than echoed to stdout
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'courseId' in 'where clause'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2281)
at org.cloudcoder.app.server.persist.ConfigurationUtil.getUsersInCourse(Unknown Source)
at org.cloudcoder.app.server.persist.ConfigurationUtil.registerStudentsForCourseId2(Unknown Source)
at org.cloudcoder.app.server.persist.RegisterStudents.registerStudents(Unknown Source)
at org.cloudcoder.app.server.persist.RegisterStudents.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.cloudcoder.jetty.NestedJarClassLoader.runMain(Unknown Source)
at org.cloudcoder.jetty.WebServer.runAdminCommand(Unknown Source)
at org.cloudcoder.jetty.WebServer.handleCommand(Unknown Source)
at org.cloudcoder.webserver.CloudCoderWebServer.main(CloudCoderWebServer.java:61)
Database error: Unknown column 'courseId' in 'where clause'
I checked out the schema in MySQL to see how the column was specified there, and it seems to be course_id:
mysql> describe cc_course_registrations;
+-------------------+---------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+---------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| course_id | int(11) | NO | | NULL | |
| user_id | int(11) | NO | | NULL | |
| registration_type | int(11) | NO | | NULL | |
| section | int(11) | NO | | NULL | |
+-------------------+---------+------+-----+---------+----------------+
5 rows in set (0.00 sec)
I'm probably going to set up a dev environment shortly, so I can occasionally push patches into my live environment. Thanks for the help!
The text was updated successfully, but these errors were encountered:
Hey guys, I'm trying to load a tab-separated roster as described in the wiki, and I got a
MySQLSyntaxErrorException
. Here's the transcript:I checked out the schema in MySQL to see how the column was specified there, and it seems to be
course_id
:I'm probably going to set up a dev environment shortly, so I can occasionally push patches into my live environment. Thanks for the help!
The text was updated successfully, but these errors were encountered: