JPMS Module Issues?

Recently I got back into module development, and I have a module being developed with Maven for dependencies that hasn't been updated for a few months. I'm trying to get the module to debug using https://docs.inductiveautomation.com/display/SE/Debugging+in+IntelliJ, which is missing now (thankfully archived) but I couldn't find any current version. And I get this error I have never seen before. What is this even saying? Where do I put these? Which packages are correct?

Here are my arguments:

-Djavaws.sr.gateway.addr.0=localhost:8088/main
-Djavaws.sr.main=com.inductiveautomation.ignition.designer.DesignerStartupHook
-Djavaws.ignition.debug=true
-Dautologin.username=***
-Dautologin.password=***
-Dproject.name=***
-Djavaws.sr.runtimeOverride=true

The error:

Jul 02, 2024 8:55:41 AM com.inductiveautomation.ignition.client.launch.util.JpmsModuleUtilities allModuleConditionsMet
WARNING: JPMS Module java.desktop Does not open the correct packages to ALL-UNNAMED.
com.inductiveautomation.ignition.client.launch.steps.ValidationException: JPMS Module opens/export check failed! check your --add-opens and --add-exports clauses
	at com.inductiveautomation.ignition.client.launch.steps.CheckJpmsRequirementsStep.run(CheckJpmsRequirementsStep.java:33)
	at com.inductiveautomation.ignition.client.launch.AbstractStepRunner.run(AbstractStepRunner.java:33)
	at java.base/java.lang.Thread.run(Thread.java:1570)

Try putting this into a file called client-designer-args.txt (or whatever you want):

--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.desktop/java.awt=ALL-UNNAMED
--add-opens=java.desktop/java.awt.event=ALL-UNNAMED
--add-opens=java.desktop/javax.swing=ALL-UNNAMED
--add-opens=java.desktop/javax.swing.tree=ALL-UNNAMED
--add-opens=java.desktop/javax.swing.plaf=ALL-UNNAMED
--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED
--add-opens=java.desktop/javax.swing.plaf.synth=ALL-UNNAMED
--add-exports=java.base/sun.security.action=ALL-UNNAMED
--add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED
--add-exports=java.desktop/com.sun.awt=ALL-UNNAMED
--add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED
--add-exports=java.desktop/sun.awt=ALL-UNNAMED
--add-exports=java.desktop/sun.awt.image=ALL-UNNAMED
--add-exports=java.desktop/sun.awt.shell=ALL-UNNAMED
--add-exports=java.desktop/sun.awt.windows=ALL-UNNAMED
--add-exports=java.desktop/sun.swing=ALL-UNNAMED
--add-exports=java.desktop/sun.swing.plaf.synth=ALL-UNNAMED
--add-exports=java.desktop/sun.swing.table=ALL-UNNAMED
--add-exports=java.desktop/sun.print=ALL-UNNAMED

Then in the IDEA run configuration, under VM options where all the other -D args are, add a line like:

@D:/IA/ignition_83/.run/client-designer-args.txt

pointing to the text file. It's just @ and then the file path.

That seemed to get farther, but now I'm getting version mismatch?

I've got an 8.1.42 gateway, I've got 8.1.42 as ignition platform version and sdk version in my pom.xml and I've got -Dscadarail.version=dev in my VM arguements.

What else could cause that?

Your IDE (debugger) and your JVM need to be running the same version of java. Either tell Ignition to use your platform java17, or tell your IDE to use Ignition's java17 (not sure about that latter).

I've got my IDE using Oracle OpenJDK 17.0.10. Still giving the mismatch error. How would I point ignition to use this as well in the config file?

It's not the Java versions. I would have thought it was the -Dscadarail.version=dev missing.

What's the exact error and stack trace you're seeing? You see it when launching the Designer from your IDE, or in the Gateway logs?

Starting from the IDE

11:32:06.454 [StartupStep-Starter] DEBUG com.inductiveautomation.ignition.client.gateway_interface.GatewayConnectionManager -- Client is running in Independent mode
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Version mismatch
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:360)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:334)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:287)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:967)
	at com.inductiveautomation.ignition.designer.DesignerStartupHook.initI18N(DesignerStartupHook.java:379)
	at com.inductiveautomation.ignition.designer.DesignerStartupHook.startup(DesignerStartupHook.java:319)
	at com.inductiveautomation.ignition.client.launch.steps.StartupStep$Starter.run(StartupStep.java:126)
	at java.base/java.lang.Thread.run(Thread.java:842)
11:32:06.631 [StartupStep-Starter] INFO com.inductiveautomation.ignition.client.util.gui.progress.ClientProgressManager -- Progress manager started.
java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Version mismatch
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
	at com.inductiveautomation.ignition.designer.DesignerStartupHook.openSplashScreen(DesignerStartupHook.java:448)
	at com.inductiveautomation.ignition.designer.DesignerStartupHook.startup(DesignerStartupHook.java:332)
	at com.inductiveautomation.ignition.client.launch.steps.StartupStep$Starter.run(StartupStep.java:126)
	at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: java.util.concurrent.ExecutionException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Version mismatch
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at java.desktop/javax.swing.SwingWorker.get(SwingWorker.java:613)
	at com.inductiveautomation.ignition.designer.DesignerStartupHook$AuthenticationStrategySwingWorker.done(DesignerStartupHook.java:425)
	at java.desktop/javax.swing.SwingWorker$5.run(SwingWorker.java:750)
	at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:848)
	at java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
	at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:858)
	at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:311)
	at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:243)
	at java.desktop/java.awt.event.InvocationEvent.dispatch$$$capture(InvocationEvent.java:318)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Version mismatch
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:360)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:334)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:287)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:967)
	at com.inductiveautomation.ignition.designer.gateway.DTGatewayInterface.getAuthenticationStrategy(DTGatewayInterface.java:174)
	at com.inductiveautomation.ignition.designer.DesignerStartupHook$AuthenticationStrategySwingWorker.doInBackground(DesignerStartupHook.java:398)
	at com.inductiveautomation.ignition.designer.DesignerStartupHook$AuthenticationStrategySwingWorker.doInBackground(DesignerStartupHook.java:388)
	at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
	at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:842)
Disconnected from the target VM, address: '127.0.0.1:50329', transport: 'socket'

Hmm, still not sure, it doesn't look scadarail.version is even read anywhere these days...

Ok, change -Dscadarail.version=dev to -Dignition.version=dev.

1 Like

That did the trick! Thank you!

Must have been a while since you last tried this, the change responsible for this was made in November 2018 and released with Ignition 8.0.0.

Yes it has. But also is there up to date documentation similar to https://docs.inductiveautomation.com/display/SE/Debugging+in+IntelliJ? Seems all the documentation was overhauled in the last year or something and I can't find things where they used to be.

For better or worse https://www.sdk-docs.inductiveautomation.com/ is what's available.

It's incomplete, and will be woefully out of date when 8.3 is released.

edit: though we are tracking and intending to update docs and SDK examples for 8.3.

1 Like

I see, thanks