Exception in dispatch

We are running Servoy Server under Tomcat 9.0.12.

Server Information
Servoy version 8.2.3 -releaseNumber 3109
Port used by RMI Registry: 1099
Repository version 49 

JVM Information
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.version=1.8.0_181
java.vm.info=mixed mode
java.vm.vendor=Oracle Corporation 

Operating System Information
os.name=Windows Server 2016
os.version=10.0
os.arch=amd64 

System Information
Code Cache Non-heap memory: allocated=63104K, used=62292K, max=245760K
Metaspace Non-heap memory: allocated=67968K, used=66326K, max=unbounded
Compressed Class Space Non-heap memory: allocated=7552K, used=7158K, max=1048576K
Heap memory: allocated=219136K, used=198834K, max=257536K
Number of Processors: 4

I’m seeing some of these in the logs… what should I be looking for?

2018-10-12 12:56	Executor,uuid:a925d46c-aa99-4cd2-8fbe-aede91da1b0a	ERROR	org.sablo.eventthread.EventDispatcher	Exception in dispatch()	 	 
java.lang.StackOverflowError 
    	at java.lang.StringBuilder.append(StringBuilder.java:136) 
    	at java.lang.StringBuilder.<init>(StringBuilder.java:113) 
    	at com.servoy.j2db.scripting.JSEvent.toString(JSEvent.java:49) 
    	at java.lang.String.valueOf(String.java:2994) 
    	at java.lang.StringBuilder.append(StringBuilder.java:131) 
    	at java.util.AbstractCollection.toString(AbstractCollection.java:462) 
    	at org.sablo.specification.property.ChangeAwareList.toString(ChangeAwareList.java:761) 
    	at java.lang.String.valueOf(String.java:2994) 
    	at java.lang.StringBuilder.append(StringBuilder.java:131) 
    	at java.util.AbstractMap.toString(AbstractMap.java:559) 
    	at org.sablo.specification.property.ChangeAwareMap.toString(ChangeAwareMap.java:725) 
    	at java.lang.String.valueOf(String.java:2994) 
       (and it goes on for 100s lines)

Just to let you know, after we upped the memory on the Tomcat server these errors have disappeared, so it looks like they were caused by running Servoy with too little memory available.

Hello,

I have a very simple NG solution with three buttons to import data from text files into the database. It works fine under developer with 2022.12 but when runs on the server from the war file, the form appears and once I click on the first button I receive Internal Server Error.

In the log I see Exception in dispatch()
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.NullPointerException: Cannot load from short array because “sun.awt.FontConfiguration.head” is null

Any ideas?

swingman:
Just to let you know, after we upped the memory on the Tomcat server these errors have disappeared, so it looks like they were caused by running Servoy with too little memory available.

What did you change it to?

Hi Rafi,

Sorry, I’m not sure exactly what they did, but it seems they (Brightbox) have made a few tweaks to Tomcat memory management to ensure this specific Servoy server runs smoothly.

swingman:
Hi Rafi,
Sorry, I’m not sure exactly what they did, but it seems they (Brightbox) have made a few tweaks to Tomcat memory management to ensure this specific Servoy server runs smoothly.

No problem.
Not having the same issues, but thought it might be useful to know (I’m using BrightBox after your recommendation too, who should I contact if I need to do the same?)

Hi,

I am having that same error now.
I added a Jasper Report that works great under development with NGClient.

I generated a new war and uploaded it into the Tomcat v9 on the Linux server.
Created a folder with permisions and placed that folder into the plugin configuration.

When I run the option that runs the report, I receive
Internal Server error
There was an error at the server side
In the browser

and under Servoy Admin I see the Exception in dispatch() error that includes this: Caused by: java.lang.NullPointerException: Cannot load from short array because “sun.awt.FontConfiguration.head” is null

Any ideas?

Solved installing fontconfig and restarting Tomcat

sudo yum install fontconfig