User-Defined Types in Java
Posted: Wed Nov 25, 2009 8:57 pm
The old Rel web site had substantial information on Rel's capability to accept user-defined type definitions written in Java, but I can no longer find this information any more.
We have a student that wants to use the Date type defined in the provided TypeDate.d script, but an error message appears.
VAR TEST BASE RELATION{X Date} KEY{X};
ERROR: RelDatabase: openRelvar failed: ca.mb.armchair.rel3.exceptions.ExceptionFatal: Failed loading heading {X Date(0)}: ca.mb.armchair.rel3.languages.tutoriald.parser.ParseException: Encountered " "(" "( "" at line 1, column 8.
Was expecting one of: "}" ... "," ... Line 1 ca.mb.armchair.rel3.exceptions.ExceptionFatal: RelDatabase: openRelvar failed: ca.mb.armchair.rel3.exceptions.ExceptionFatal: Failed loading heading {X Date(0)}: ca.mb.armchair.rel3.languages.tutoriald.parser.ParseException: Encountered " "(" "( "" at line 1, column 8. Was expecting one of: "}" ... "," ... Line 1 at ca.mb.armchair.rel3.interpreter.Interpreter.run(Interpreter.java:71) at ca.mb.armchair.rel3.interpreter.Interpreter.interpret(Interpreter.java:203) at ca.mb.armchair.rel3.interpreter.Interpreter.interpret(Interpreter.java:213) at ca.mb.armchair.rel3.interpreter.Interpreter.interpret(Interpreter.java:217) at ca.mb.armchair.rel3.client.stream.ClientLocalConnection$2.execute(ClientLocalConnection.java:78) at ca.mb.armchair.rel3.client.stream.ClientLocalConnection.send(ClientLocalConnection.java:42) at ca.mb.armchair.rel3.client.stream.ClientLocalConnection.sendExecute(ClientLocalConnection.java:76) at ca.mb.armchair.rel3.client.string.ClientLocal.sendExecute(ClientLocal.java:56) at ca.mb.armchair.rel3.dbrowser.ui.PanelCommandline$36.doInBackground(PanelCommandline.java:1132) at javax.swing.SwingWorker$1.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at javax.swing.SwingWorker.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Wondered if we're doing anything wrong?
Thanks.
Adrian
We have a student that wants to use the Date type defined in the provided TypeDate.d script, but an error message appears.
VAR TEST BASE RELATION{X Date} KEY{X};
ERROR: RelDatabase: openRelvar failed: ca.mb.armchair.rel3.exceptions.ExceptionFatal: Failed loading heading {X Date(0)}: ca.mb.armchair.rel3.languages.tutoriald.parser.ParseException: Encountered " "(" "( "" at line 1, column 8.
Was expecting one of: "}" ... "," ... Line 1 ca.mb.armchair.rel3.exceptions.ExceptionFatal: RelDatabase: openRelvar failed: ca.mb.armchair.rel3.exceptions.ExceptionFatal: Failed loading heading {X Date(0)}: ca.mb.armchair.rel3.languages.tutoriald.parser.ParseException: Encountered " "(" "( "" at line 1, column 8. Was expecting one of: "}" ... "," ... Line 1 at ca.mb.armchair.rel3.interpreter.Interpreter.run(Interpreter.java:71) at ca.mb.armchair.rel3.interpreter.Interpreter.interpret(Interpreter.java:203) at ca.mb.armchair.rel3.interpreter.Interpreter.interpret(Interpreter.java:213) at ca.mb.armchair.rel3.interpreter.Interpreter.interpret(Interpreter.java:217) at ca.mb.armchair.rel3.client.stream.ClientLocalConnection$2.execute(ClientLocalConnection.java:78) at ca.mb.armchair.rel3.client.stream.ClientLocalConnection.send(ClientLocalConnection.java:42) at ca.mb.armchair.rel3.client.stream.ClientLocalConnection.sendExecute(ClientLocalConnection.java:76) at ca.mb.armchair.rel3.client.string.ClientLocal.sendExecute(ClientLocal.java:56) at ca.mb.armchair.rel3.dbrowser.ui.PanelCommandline$36.doInBackground(PanelCommandline.java:1132) at javax.swing.SwingWorker$1.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at javax.swing.SwingWorker.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Wondered if we're doing anything wrong?
Thanks.
Adrian