You select a point for a server-side graphical component and the panel shows only Error:. The same point works in an analog graphic or another component, while catalina.out records java.lang.NullPointerException at com.serotonin.mango.view.component.ScriptComponent.addDataToModel(ScriptComponent.java:75). Start with the server-side script path. Replacing working points or changing browsers attacks the wrong layer.
Start at the failure boundary
Reproduce the fault once, then read the matching Tomcat log entry. Use the exception location to decide which branch to follow.
| Reading or symptom | Meaning | Next check |
|---|---|---|
NullPointerException at ScriptComponent.addDataToModel
|
The request reached the server-side component and failed while its model was being populated. | Test the same point in a non-scripted component. |
| The same point works in an analog graphic | The point exists and can supply a value through another rendering path. That is not a general point failure. | Test server-side JavaScript execution with a Meta point. |
| Several unrelated points fail only in the server-side component | The shared component or scripting environment is the likely failure domain. | Inspect the runtime and installed Mango build. |
| Only one point fails across multiple component types | The fault follows that point rather than ScriptComponent. |
Check that point's configuration, value state, and access separately. |
The browser receives the short DWR failure response, but the exception originates inside Tomcat. Switching among Internet Explorer, Safari, or Firefox does not repair a server-side null reference.
Prove the point path first
Select one failing point and place it in an analog graphic or another known-working component. Record whether the component displays a current value.
- If it works, keep that point as the control sample. Its successful rendering proves that Mango can resolve it through at least one component path.
- If it fails everywhere, stop this decision tree and diagnose the point itself. Check whether it is enabled, currently valued, and readable by the active user.
- If one point works but several others do not, compare their types and current value states before treating the problem as a global JavaScript failure.
Testing numerous points inside the same failing server-side component adds little information. A common exception at the same method and line shows that the component path, not point selection alone, is the useful boundary.
Test the JavaScript engine with a Meta point
Create a temporary Meta data source, add one point, and assign a minimal script that returns a value. This is the first discriminating runtime test because the suspected failure is JavaScript engine creation or execution inside the JVM.
- Create the Meta data source without modifying the production point hierarchy.
- Add a temporary Meta point.
- Give the point a minimal script that produces a predictable value.
- Run the point and inspect both its value and
catalina.out. - Delete or disable the temporary diagnostic objects after testing.
If the Meta point evaluates correctly, the JVM can execute JavaScript. Move next to the installed Mango version and the server-side component configuration. If the Meta point cannot evaluate, work on the Java runtime and its JavaScript execution capability before rebuilding graphical components.
A Meta-point failure is more useful than another browser test. Both Meta calculation and the failing component depend on server-side script execution, while browser choice does not change the JVM engine loaded by Tomcat.
Verify the deployed build and runtime
Record exact values from the running server. Do not rely on a label such as “latest stable.” The affected installation reported Linux, Java 1.6, and Tomcat 6; Mango 1.6.4 was identified as the current Mango release for this case.
- Read the deployed Mango version from the running application or its startup information.
- Compare it with
1.6.4. If it is older, treat application version as an unresolved branch. - Confirm which Java executable actually launches Tomcat. A separate interactive Java installation does not prove which JVM the service uses.
- Capture the complete exception, including every
Caused bysection and the first application frames. - Search the startup log for script-engine initialization errors that occurred before the DWR request.
The visible DWR warning is the transport-level report of the failed method call. The actionable frame is ScriptComponent.addDataToModel(ScriptComponent.java:75). Reconfiguring DWR or repeatedly restarting Tomcat wastes time when every request fails deterministically at that same frame.
Apply the resolving branch
Choose the correction from the Meta-point result and the version check.
- If Meta scripting fails, correct the JavaScript execution environment used by the Tomcat service. Verify the service JVM selection and review its startup diagnostics for engine creation failures.
- Restart Tomcat after changing the runtime so the web application creates its scripting resources under the corrected JVM.
- Run the Meta point again before opening the graphical view. Do not proceed until it returns its predictable value without a scripting exception.
- If Meta scripting works but the deployed Mango build predates
1.6.4, move to the cited current build using the product's supported upgrade procedure and preserve the existing configuration first. - If Meta scripting works on
1.6.4, recreate only the affected server-side component and select the known-good control point. If the exception remains at line75, retain the component definition and full trace for escalation.
Do not rebuild all points, flatten the point hierarchy, or change client browsers before completing these branches. Those changes add variables without testing the server-side object that is null.
Verify the repair under the same request
Repeat the original action, not merely a login or page load.
- Open the same graphical view.
- Add the same server-side component.
- Select the control point that previously produced
Error:. - Confirm that the component accepts the point and renders its value.
- Test at least one additional point that failed before the correction.
- Inspect
catalina.outfor a newNullPointerException, DWR method-execution failure, or JavaScript initialization error.
The repair passes only when the original server-side selection succeeds and no matching exception is generated. A working analog graphic alone remains a control test, not proof that ScriptComponent recovered.
FAQ
What happens if the point works in an analog graphic?
The point and a non-scripted rendering path are functioning. Test a temporary Meta point next because the remaining failure domain is the server-side component or JavaScript environment.
What happens if a Meta point cannot run its script?
Treat server-side JavaScript execution as the primary fault. Check the JVM actually launching Tomcat 6, review startup diagnostics, correct the runtime, and retest the Meta point before editing the view.
What happens if changing browsers does not clear the error?
That result is expected for an exception at ScriptComponent.addDataToModel. The browser is only displaying the failed DWR response; diagnose the Tomcat-side Java exception.
When should I stop and escalate the Mango null pointer error?
Stop after Meta scripting works, the deployed build has been checked against Mango 1.6.4, and the original request still fails at ScriptComponent.java:75. Escalate through the official support channel with the exact Mango, Java, Tomcat, and operating-system versions, the complete stack trace, the Meta-point result, and a minimal component that reproduces the fault.