Trying to debug some client/designer scope module stuff, and I've been working on getting Intellij set up for a bit but i've gotten stuck with this pesky error when trying to run the configuration as it is on the SDK dev guide:
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null
at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1778)
at java.base/java.util.regex.Matcher.reset(Matcher.java:435)
at java.base/java.util.regex.Matcher.(Matcher.java:255)
at java.base/java.util.regex.Pattern.matcher(Pattern.java:1156)
at com.inductiveautomation.ignition.client.launch.GatewayAddress.parse(GatewayAddress.java:57)
at com.inductiveautomation.ignition.designer.DesignerStartupHook.main(DesignerStartupHook.java:77)
It seems to be something with parsing the Gateway address from one of the JVM arguments. I've got the same ones as on the SDK guide, I've tried fiddling with it yet cant get anything to work, always the same error.
Anyone have experience with this issue?
Can you screenshot your launch config including those args?
Also not sure it matters, but you should be using JDK 11, not whatever newer version you have configured.
1 Like
I switched from 20 to JDK 11, didnt change anything.
Heres the config:
I realized that this was from trying some other configs from another forum post, but that was because when trying to run the config from the SDK page:
it gives the error:
Launch parameter "javaws.sr.main" missing.
Try these:
-Dscadarail.version=dev
-Dsr.gateway=localhost:8088
-Djavaws.ignition.debug=true
-Djavaws.ignition.loglevel=INFO
same error on both, also the target VM address seems to be wrong? not sure if thats related. my local gateway is at http://localhost:8088/
Hmm, this NPE is happening because the sr.gateway
property isn't being found. If you copied my args and put them into the correct spot in the launch dialog I'm not sure why else that would happen.
Are you sure you're putting them into the JVM Args (VM Options) section and not the Program Arguments section?
oh, yep, that might be it
whoops
ah, its because intellij hid the VM arguments since they were blank that I couldnt even see the option
Yeah, IntelliJ's refactor of the run configuration dialog is a big miss in my opinion.
1 Like
yeah big miss.
I did try putting arguments there, and have tried a whole bunch of different configurations and everything from this thread: Ignition 8 Designer Debugging not working - Module Development - Inductive Automation Forum. Still getting version mismatch
Can you show the full details of whatever error you're getting? The version=dev should prevent a version mismatch.
Ah yes that was the missing piece, sorry about that. Finally it works somewhat. Thank you so much for the help!
Its able to open, but missing the Perspective module and the module im trying to use, I think that is a dependency issue in the pom of the designer-launcher
Hopefully that wont be too hard to fix