Errors using native SQL Anywhere 17 driver

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

Errors using native SQL Anywhere 17 driver

Postby huber » Mon Mar 23, 2020 6:29 pm

I am using the latest native driver (sajdbc4.jar) with SAP SQL Anywhere 17 (17.0.10.5853), Servoy Developer 8.3.3 and Java 1.8.0_221.

I am getting on some menus in our application an error. There seem to be 2 types of errors. One is always showing a table '#TMP_<number>' not found (error) and the other saying invalid statement. Both types of errors say: Unknown errorCode 100. Looking at http://dcx.sap.com/sqla170/en/html/8113 ... 88d75.html
there is an error code 100, meaning: Row not found.

These errors do not occur with the Java jconn3.jar driver.

Any idea what this could be?

Code: Select all
StaProbation setFoundsetForClassCourse: periodFractionName = HS
StaProbation setFoundsetForClassCourse: periodSchoolYear = 2019
StaProbation setFoundsetForClassCourse: level = 1
StaProbation setFoundsetForClassCourse: classSign = fa
StaProbation setFoundsetForClassCourse: subjectCode = D
JavaException: com.servoy.j2db.dataprocessing.DataException: Unknown errorCode 100
[SAP][JDBC Driver][SQL Anywhere]Table '#TMP_4971128484' not found
   at Hades/forms/StaProbation/setFoundsetForClassCourse:909 (setFoundsetForClassCourse)
   at Hades/forms/StaProbation/getClassCoursesBoxPlotChartDefinition:261 (getClassCoursesBoxPlotChartDefinition)
   at Hades/forms/StaProbation/showChart:148 (showChart)
   at Hades/forms/StaProbation/onShow:135 (onShow)


Other type of error:

Code: Select all
Mar 23, 2020 3:17:39 PM com.servoy.j2db.util.Debug error
SEVERE: There is a problem with an aggregate
   at HadesTeachingAllotments/forms/TeaExperts/refresh:108 (refresh)
   at HadesTeachingAllotments/forms/TeaExperts/onShow:58 (onShow)

Context: FoundSet[Table:persons,Size: 241,CachedRecords: 1,SELECTED INDEX: 0]
com.servoy.j2db.dataprocessing.DataException: Unknown errorCode 100
[SAP][JDBC Driver][SQL Anywhere]Invalid statement
NextException: SQL Error: -130, SQLState: HY000, Message: [SAP][JDBC Driver][SQL Anywhere]Invalid statement
NextException: SQL Error: -130, SQLState: HY000, Message: [SAP][JDBC Driver][SQL Anywhere]Invalid statement
NextException: SQL Error: -130, SQLState: HY000, Message: [SAP][JDBC Driver][SQL Anywhere]Invalid statement

NextException: SQL Error: -130, SQLState: HY000, Message: [SAP][JDBC Driver][SQL Anywhere]Invalid statement
   at com.servoy.j2db.dblayer.Zb.Za(Zb.java:335)
   at com.servoy.j2db.server.Za.Zo.Za(Zo.java:135)
   at com.servoy.j2db.server.dataprocessing.Zx.Za(Zx.java:1102)
   at com.servoy.j2db.server.dataprocessing.Zx.Za(Zx.java:1064)
   at com.servoy.j2db.server.dataprocessing.Zx.performQuery(Zx.java:919)
   at sun.reflect.GeneratedMethodAccessor432.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:498)
   at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
   at sun.rmi.transport.Transport$1.run(Transport.java:200)
   at sun.rmi.transport.Transport$1.run(Transport.java:197)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
   at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   at java.lang.Thread.run(Thread.java:748)
   at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:283)
   at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:260)
   at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
   at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
   at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
   at com.sun.proxy.$Proxy18.performQuery(Unknown Source)
   at com.servoy.j2db.dataprocessing.FoundSet.performQuery(FoundSet.java:6995)
   at com.servoy.j2db.dataprocessing.FoundSet.queryForAggregate(FoundSet.java:4015)
   at com.servoy.j2db.dataprocessing.FoundSet.getAggregateValue(FoundSet.java:3920)
   at com.servoy.j2db.dataprocessing.FoundSet.getDataProviderValue(FoundSet.java:3910)
   at com.servoy.j2db.dataprocessing.Record.getValue(Record.java:244)
   at com.servoy.j2db.dataprocessing.Record.getValue(Record.java:185)
   at com.servoy.j2db.dataprocessing.DataAdapterList.getValueObject(DataAdapterList.java:900)
   at com.servoy.j2db.dataprocessing.DataAdapterList.getValueObject(DataAdapterList.java:877)
   at com.servoy.j2db.dataprocessing.DataAdapterList.getStringValue(DataAdapterList.java:838)
   at com.servoy.base.util.TagParser.processTags(TagParser.java:86)
   at com.servoy.j2db.util.Text.processTags(Text.java:35)
   at com.servoy.j2db.smart.dataui.DataLabel.setValueObject(DataLabel.java:193)
   at com.servoy.j2db.dataprocessing.DisplaysAdapter.setValueToDisplays(DisplaysAdapter.java:230)
   at com.servoy.j2db.dataprocessing.DisplaysAdapter.setRecord(DisplaysAdapter.java:134)
   at com.servoy.j2db.dataprocessing.DataAdapterList.setRecord(DataAdapterList.java:410)
   at com.servoy.j2db.smart.dataui.DataRenderer.refreshRecord(DataRenderer.java:667)
   at com.servoy.j2db.FormController.refreshAllPartRenderers(FormController.java:715)
   at com.servoy.j2db.BasicFormController.valueChanged(BasicFormController.java:507)
   at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
   at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.fireValueChanged(AlwaysRowSelectedSelectionModel.java:260)
   at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:154)
   at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.setSelectedRows(AlwaysRowSelectedSelectionModel.java:243)
   at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.setSelectedRow(AlwaysRowSelectedSelectionModel.java:208)
   at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.setSelectedRow(AlwaysRowSelectedSelectionModel.java:176)
   at com.servoy.j2db.dataprocessing.SwingFoundSet.setSelectedIndex(SwingFoundSet.java:134)
   at com.servoy.j2db.dataprocessing.TableAndListEventDelegate$1.run(TableAndListEventDelegate.java:153)
   at com.servoy.j2db.dataprocessing.TableAndListEventDelegate.fireTableAndListEvent(TableAndListEventDelegate.java:180)
   at com.servoy.j2db.dataprocessing.SwingFoundSet.fireFoundSetEvent(SwingFoundSet.java:152)
   at com.servoy.j2db.dataprocessing.FoundSet.fireFoundSetEvent(FoundSet.java:5535)
   at com.servoy.j2db.dataprocessing.FoundSet.fireDifference(FoundSet.java:5270)
   at com.servoy.j2db.dataprocessing.FoundSet.loadExternalPKList(FoundSet.java:2422)
   at com.servoy.j2db.dataprocessing.FoundSet.js_loadRecords(FoundSet.java:1304)
   at sun.reflect.GeneratedMethodAccessor206.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:498)
   at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138)
   at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:292)
   at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
   at org.mozilla.javascript.gen.HadesTeachingAllotments_forms_TeaExperts_refresh_1263._c_refresh_0(HadesTeachingAllotments/forms/TeaExperts/refresh:108)
   at org.mozilla.javascript.gen.HadesTeachingAllotments_forms_TeaExperts_refresh_1263.call(HadesTeachingAllotments/forms/TeaExperts/refresh)
   at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:74)
   at org.mozilla.javascript.gen.HadesTeachingAllotments_forms_TeaExperts_onShow_1262._c_onShow_0(HadesTeachingAllotments/forms/TeaExperts/onShow:58)
   at org.mozilla.javascript.gen.HadesTeachingAllotments_forms_TeaExperts_onShow_1262.call(HadesTeachingAllotments/forms/TeaExperts/onShow)
   at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:399)
   at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3534)
   at org.mozilla.javascript.gen.HadesTeachingAllotments_forms_TeaExperts_onShow_1262.call(HadesTeachingAllotments/forms/TeaExperts/onShow)
   at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:665)
   at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:1067)
   at com.servoy.j2db.BasicFormController.executeFormMethod(BasicFormController.java:786)
   at com.servoy.j2db.BasicFormController.executeOnShowMethod(BasicFormController.java:655)
   at com.servoy.j2db.BasicFormController.access$2(BasicFormController.java:649)
   at com.servoy.j2db.BasicFormController$1.run(BasicFormController.java:386)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Last edited by huber on Mon Mar 23, 2020 8:05 pm, edited 1 time in total.
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 374
Joined: Mon May 14, 2012 11:31 pm

Re: Errors using native SQL Anywhere 17 driver

Postby kwpsd » Mon Mar 23, 2020 7:58 pm

Hi, Robert.

We no longer use SQL Anywhere (since 2012), but I vaguely seem to recall from days of yore that error #100 had something to do with the primary key not being defined (in the dbi file, I think). if you follow your SAP link by clicking on the error #100 in their table:

http://dcx.sap.com/sqla170/en/html/80c0bc8b6ce210148caff078e1c4aceb.html

the following is stated:

You positioned a cursor beyond the beginning or past the end of the query. There is no row at that position.


which, I believe, further substantiates my recollection. Keep in mind that you getting advice from a septuagenarian. :D

I hope this helps!
Kim W. Premuda
San Diego, CA USA
User avatar
kwpsd
 
Posts: 643
Joined: Sat Jul 28, 2007 6:59 pm
Location: San Diego, CA USA

Re: Errors using native SQL Anywhere 17 driver

Postby huber » Tue Mar 24, 2020 9:13 am

Hi Kim

Many thanks for your tip, will debug and see if I find the problem. I am going to check for the primary keys in the dpi file. Also thanks for the link. Your memory is still extremely well if you remember by heart errors that happened eight years ago :-))

Best regards,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 374
Joined: Mon May 14, 2012 11:31 pm

Re: Errors using native SQL Anywhere 17 driver

Postby huber » Wed Jul 15, 2020 3:14 pm

I could not find any problem with the primary key (not being defined) in the dpi file. The log states invalid SQL statement, but the insert statement shown in the Server Log is correct and can be successful executed, except the #TMP_<number> table does NOT seem to be there? I also don't know what's going on with this #TMP table?

Servoy, any help what this #TMP table is and a hint where to look at?

Thanks and regards,
Attachments
insert into #tmp_ table.png
insert into #tmp_ table.png (358.18 KiB) Viewed 276 times
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 374
Joined: Mon May 14, 2012 11:31 pm


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 3 guests

cron