simpleFPL command copytable String index out of range: -8

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

tonym
Ebase User
Posts: 12
Joined: Fri Jul 21, 2017 1:49 pm

simpleFPL command copytable String index out of range: -8

#1

Postby tonym » Fri Jul 21, 2017 2:52 pm

Hi all,
hope you can help.

Copy and pasted a table in the Tables area and really nothing else.
No changes made

I want to copy "table a" contents to "table b" using the
copytable command.

And running the script gives above error ?


ebase version 4.5.1.

thank you !
0 x

tonym
Ebase User
Posts: 12
Joined: Fri Jul 21, 2017 1:49 pm

#2

Postby tonym » Fri Jul 21, 2017 3:45 pm

I notice that it doesnt matter what the destination table is, with different combinations and troubleshooting, this copytable command is giving the same error for me all the time. Tried different Source table as well.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#3

Postby Jon » Fri Jul 21, 2017 3:55 pm

I tried this on a V4.5.1 system and it worked fine. I think it might have to do with the columns inside your source table.

What columns and types do you have in the source table?
Is there any data in your table when you copy it?
0 x

tonym
Ebase User
Posts: 12
Joined: Fri Jul 21, 2017 1:49 pm

#4

Postby tonym » Fri Jul 21, 2017 10:00 pm

thanks for trying 4.5.1

yes there is data in source
pretty regular column data types and working stable and Live for several years.

if the destination is a direct clone of it, does this matter ? any ideas what this error implies ?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#5

Postby Jon » Mon Jul 24, 2017 7:17 am

Do you have a Java stacktrace - there should be one on the server log at the time of the error. I'm guessing that the problem is caused by a reference to an unhandled column type. Do you have any old (V3) button columns in the table? I don't think copy/paste is relevant. If you can't fix it, you can export the form and send it to support@ebasetech.com and we'll have a look.
0 x

tonym
Ebase User
Posts: 12
Joined: Fri Jul 21, 2017 1:49 pm

#6

Postby tonym » Mon Jul 24, 2017 10:16 am

ok many thanks Jon


An extract from the server log is below.

*Observation*: when you copytable and there is a resource on the table I am having this problem. when you create the table to use as the copytable destination for copytable (simply using mouse copy and paste in the tables window), I notice the Resource property is *not* Copied and then when you try to set the Resource property to match the soruce table, it is not on the list or available. If you troubleshoot this and do a copytable of the copy above by clearing its Resource property and then copy/paste and then copytable using that, it works. Is the Resource property possibly related to this error ?

I can send Form export maybe after you look at this if needed, thanks again.

Log extract:

Mon Jul 24 10:51:10: ERROR Unexpected error occurred
java.lang.StringIndexOutOfBoundsException: String index out of range: -8
at java.lang.String.substring(Unknown Source)
at com.ebasetech.ufs.runtime.RuntimeTableHelper.getColumnsByName(RuntimeTableHelper.java:71)
at com.ebasetech.ufs.runtime.RuntimeTableHelper.copyTableData(RuntimeTableHelper.java:16)
at com.ebasetech.ufs.validation.CopyTableCommand.execute(CopyTableCommand.java:45)
at com.ebasetech.ufs.validation.CommandProcessor.process(CommandProcessor.java:2924)
at com.ebasetech.ufs.runtime.events.CommandTextNode.execute(CommandTextNode.java:107)
at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
at com.ebasetech.ufs.validation.Node.execute(Node.java:623)
at com.ebasetech.ufs.validation.Root.execute(Root.java:44)
at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
at com.ebasetech.ufs.runtime.events.ScriptNode.execute(ScriptNode.java:30)
at com.ebasetech.ufs.runtime.events.EventScriptNode.execute(EventScriptNode.java:35)
at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
at com.ebasetech.ufs.runtime.events.BaseEventNode.execute(BaseEventNode.java:32)
at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
at com.ebasetech.ufs.runtime.Request.execute(Request.java:436)
at com.ebasetech.ufs.runtime.Request.execute(Request.java:405)
at com.ebasetech.ufs.runtime.Request._execute(Request.java:343)
at com.ebasetech.ufs.runtime.Request.execute(Request.java:308)
at formservlets.FormProcessingUtil.executeRequest(FormProcessingUtil.java:480)
at formservlets.FormProcessor.performExecution(FormProcessor.java:160)
at formservlets.FormProcessor.processRequest(FormProcessor.java:147)
at formservlets.FormProcessor.runForm(FormProcessor.java:45)
at formservlets.FormClient.process(FormClient.java:112)
at formservlets.FormClient.doGet(FormClient.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at formservlets.EbaseFilter.processHtmlRequest(EbaseFilter.java:291)
at formservlets.EbaseFilter.processRequest(EbaseFilter.java:197)
at formservlets.EbaseFilter.performFilter(EbaseFilter.java:141)
at formservlets.EbaseFilter.doFilter(EbaseFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
0 x

tonym
Ebase User
Posts: 12
Joined: Fri Jul 21, 2017 1:49 pm

#7

Postby tonym » Mon Jul 24, 2017 2:31 pm

Jon, sent an xml export of Form to the support address.

There could be old V3 items.

I have just inherited this..the table
I refer to in the email has been Live for many years....

thank you.
0 x

tonym
Ebase User
Posts: 12
Joined: Fri Jul 21, 2017 1:49 pm

#8

Postby tonym » Mon Jul 24, 2017 2:36 pm

copytable command has never been used up to now in the project...
0 x

tonym
Ebase User
Posts: 12
Joined: Fri Jul 21, 2017 1:49 pm

#9

Postby tonym » Mon Jul 24, 2017 2:45 pm

same with using "table" command (in script contect in memory)
instead of pasting the table.

and then copytable from the origin to this in memory table gives the same error so nothing to do with the destination anyway.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#10

Postby Jon » Mon Jul 24, 2017 3:10 pm

Is it table ADD_ENTITY_BO_DETAILS in form INCORPORATION_FORM ?
0 x

tonym
Ebase User
Posts: 12
Joined: Fri Jul 21, 2017 1:49 pm

#11

Postby tonym » Mon Jul 24, 2017 3:11 pm

no Director_Detail
0 x

tonym
Ebase User
Posts: 12
Joined: Fri Jul 21, 2017 1:49 pm

#12

Postby tonym » Mon Jul 24, 2017 3:12 pm

sounds like you picked up the email with the export
0 x

tonym
Ebase User
Posts: 12
Joined: Fri Jul 21, 2017 1:49 pm

#13

Postby tonym » Mon Jul 24, 2017 3:16 pm

a copytable on add_entity_bo_details table works fine.

the director_details table has been in place for years Live but the one
above is quite recently created.

As you said has older version/columns something to do with this ?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#14

Postby Jon » Mon Jul 24, 2017 4:08 pm

Yes I can reproduce your problem, more news later.
0 x

tonym
Ebase User
Posts: 12
Joined: Fri Jul 21, 2017 1:49 pm

#15

Postby tonym » Mon Jul 24, 2017 4:09 pm

thank you cheers
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#16

Postby Jon » Mon Jul 24, 2017 4:40 pm

The problem is caused by on old V3 button column named BUTTON90 - you can see this on page_2 of the form. I think there is also an invisible column in the table representing this button - you can't see this listed in the tables tab.

I'm afraid there isn't a direct solution for this. You could replace this button column with a Button Column Control but you would probably have to change the form to achieve this.

The other solution is to copy the table in code i.e. loop through the rows of the source table and copy each column value across.

Sorry about this.
0 x

tonym
Ebase User
Posts: 12
Joined: Fri Jul 21, 2017 1:49 pm

#17

Postby tonym » Mon Jul 24, 2017 5:39 pm

hey Jon

thanks for analysing and confirming. I will probably go for the latter option
and not upset live code.

I will continue onwards....cheers.
0 x


Who is online

Users browsing this forum: No registered users and 10 guests