for the past few weeks, I’ve been getting this strange error that
I haven’t seen before:
“java.lang.StringIndexOutOfBoundsException: String index out of range: -2”
it happens at startup, and only when connecting to the server as a client
(not when running in developer).
here’s the entire trace from the java web start console:
at java.lang.StringBuffer.charAt(StringBuffer.java:283)
at com.servoy.j2db.dataprocessing.r.a(Unknown Source)
at com.servoy.j2db.dataprocessing.r.a(Unknown Source)
at com.servoy.j2db.dataprocessing.r.if(Unknown Source)
at com.servoy.j2db.dataprocessing.ag.getSharedFoundSet(Unknown Source)
at com.servoy.j2db.dataprocessing.ag.do(Unknown Source)
at com.servoy.j2db.dataprocessing.ag.if(Unknown Source)
at com.servoy.j2db.FormPanel.byte(Unknown Source)
at com.servoy.j2db.FormPanel.cK(Unknown Source)
at com.servoy.j2db.FormManager.if(Unknown Source)
at com.servoy.j2db.scripting.CreationalPrototype.get(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.getProp(ScriptRuntime.java:726)
at org.mozilla.javascript.gen.c1.call(SolutionStartup:15)
at com.servoy.j2db.scripting.f.executeFunction(Unknown Source)
at com.servoy.j2db.FormManager.do(Unknown Source)
at com.servoy.j2db.FormManager$3.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:189)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:478)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
I’ve searched the forum, but haven’t found any reference to this error.
I can’t tell you where it happens (probably somewhere in your startup stuff) but you try to do something with a string that is empty.
In most cases that would be performing a regex of some sort so a replace or substring or something like that…
for some unknown reason, the sequence type on the primary
key field (for the first table that get’s displayed on solution startup)
had been changed from db sequence to servoy sequence!
that’s really strange, since I never use the servoy sequencing
mode; I always let mysql do auto_increment on my primary keys.
once I changed this back to db sequence, everything was ok.
anybody have any ideas on how this could have changed?
no one else works on this project other than me.
hmmm…
Did you happen to imported the solution in this repository for the first time?
In my experience Servoy will revert to Servoy sequences unless you explicitly tell it not to.
(with the “Override sequence types to the sequence types contained in the import version.” option in the admin pages)
This is only when you import it for the first time.
ROCLASI:
Did you happen to imported the solution in this repository for the first time?
Robert:
I believe that’s what happened; I receintly moved the repository
on my development system into mysql, which required me to
export then import all my servoy solutions.