KNIME 4.6 SDK question

Hello,
I wanted to set up the KNIME SDK for 4.6. I managed to launch KNIME but I realized that I was not able to get the example workflows with right click and “Show examples”. (though it works with a ready KNIME 4.6 installation)

Screen Shot 2022-06-20 at 09.28.20

Nothing happend and I got the following error on the Eclipse console:

!ENTRY org.eclipse.ui 4 0 2022-06-20 09:18:30.848
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NoClassDefFoundError: Could not initialize class org.knime.core.util.ThreadLocalHTTPAuthenticator
	at com.knime.enterprise.server.rest.client.info.ServerInformationClient.getServerInformation(ServerInformationClient.java:70)
	at com.knime.explorer.server.ExplorerServerContentProvider.fetchServerInformation(ExplorerServerContentProvider.java:1121)
	at com.knime.explorer.server.ExplorerServerContentProvider.fetchServerInformation(ExplorerServerContentProvider.java:1109)
	at com.knime.explorer.server.ExplorerServerContentProvider.login(ExplorerServerContentProvider.java:891)
	at com.knime.explorer.server.internal.WorkflowHubContentProvider.login(WorkflowHubContentProvider.java:587)
	at com.knime.explorer.server.internal.ExampleServerContentProvider.login(ExampleServerContentProvider.java:111)
	at com.knime.explorer.server.ExplorerServerContentProvider.connect(ExplorerServerContentProvider.java:1833)
	at com.knime.explorer.server.internal.view.actions.ExplorerServerLoginAction.run(ExplorerServerLoginAction.java:69)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
	at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4479)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4265)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3878)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.knime.product.rcp.KNIMEApplication.start(KNIMEApplication.java:183)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1461)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1434)

I was wondering whether my setup is not correct.

These are the steps, I followed:

  • installing Temurin 17.0.3+7
  • checkout KNIME SDK branch “releases/2022-06”
  • set Target Platform as active
  • importing configuration and adapt JRE settings to work with java 17

Everything is running on MacOS 10.13.

Antje

Hi @niederle,

This is caused by your Launch configuration. Can you make sure the VM arguments specified in the “Arguments” tab contain the same --add-opens lines as the knime.ini of a standalone AP 4.6 installation?
It should be at least:

--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.base/java.nio.channels=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.base/sun.nio=ALL-UNNAMED
--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED
--add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED

best,
Gabriel

Thank you Garbiel,

I used the VM arguments provided by the SDK-launch-configuration:

-server
-Dsun.java2d.d3d=false
-Dosgi.classloader.lock=classname
-XX:+UnlockDiagnosticVMOptions
-XX:+UseG1GC
-Dknime.enable.fastload=true
-ea
-Dorg.eclipse.swt.internal.gtk.cairoGraphics=false
-Dorg.eclipse.swt.internal.gtk.useCairo=false
-Dorg.eclipse.swt.browser.IEVersion=11001
-Dsun.awt.noerasebackground=true
-Dorg.eclipse.swt.internal.gtk.disablePrinting
-Xmx2G

Adding the lines you mentioned resolves he issue.
Looking at the knime.ini of a fresh KNIME 4.6 shows that there are some differences for the VM arguments (see below). How would I know which set of VM arguments is sufficient? Is there anything else, I should include?

-server
-Dsun.java2d.d3d=false
-Dosgi.classloader.lock=classname
-XX:+UnlockDiagnosticVMOptions
-XX:+UseG1GC
-Dsun.net.client.defaultReadTimeout=0
-XX:CompileCommand=exclude,javax/swing/text/GlyphView,getBreakSpot
-Dknime.xml.disable_external_entities=true
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.base/java.nio.channels=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.base/sun.nio=ALL-UNNAMED
--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED
--add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED
-Xmx2048m
-XstartOnFirstThread
-Xdock:icon=../Resources/knime_mac.icns
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Darrow.enable_unsafe_memory_access=true
-Darrow.memory.debug.allocator=false
-Darrow.enable_null_check_for_get=false
--add-opens=java.security.jgss/sun.security.jgss.krb5=ALL-UNNAMED
--add-exports=java.security.jgss/sun.security.jgss=ALL-UNNAMED
--add-exports=java.security.jgss/sun.security.jgss.spi=ALL-UNNAMED
--add-exports=java.security.jgss/sun.security.krb5.internal=ALL-UNNAMED
--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED

Best,
Antje

Hi Antje,

Plugins can define lines to be added to the knime.ini on installation via a p2 action. This is what you see here as well, the five lines at the bottom of the file are defined by the kerberos extension. Bitbucket

best,
Gabriel

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.