Knime Export Product

Hi ,

I am using Knime 4.1, I want to do some customization in workbench.
Till now i have done below -

Setup knime SDK in eclipse - Done
Run Knime Application using active Target Platform (in eclipse) - Done
Changes in Workbench code - Done
Tested workbench changes by running Knime Application using active Target Platform (in eclipse) - done
I am able to repack existing Knime binary by making changes in JAR/Plugin (workbench code), But this needs manual effort.

Also import Knime Product code and desktop product - run using active target platform with workbench changes - Done

I am trying export Knime product from eclipse (unticking P2 Repo) - Export is successful but while launching i face below 2 errors -
Error 1:
org.osgi.framework.BundleException: Could not resolve module:com.knime.customizations ā€¦(big stack trace)

Error 2:
java.lang.RuntimeException: Application ā€œorg.knime.product.KNIME_APPLICATIONā€ could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.ant.ui.antRunner, org.eclipse.birt.report.debug.core.ReportDebugger, org.eclipse.birt.report.engine.ReportExecutor, org.eclipse.buckminster.cmdline.headless, org.eclipse.datatools.connectivity.console.profile.StorageFileEditor, org.eclipse.e4.ui.workbench.swt.E4Application, org.eclipse.e4.ui.workbench.swt.GenTopic, org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.importer.ecore.Ecore2GenModel, org.eclipse.emf.importer.java.Java2GenModel, org.eclipse.emf.importer.rose.Rose2GenModel, org.eclipse.equinox.app.error, org.eclipse.equinox.p2.director, org.eclipse.equinox.p2.garbagecollector.application, org.eclipse.equinox.p2.publisher.InstallPublisher, org.eclipse.equinox.p2.publisher.EclipseGenerator, org.eclipse.equinox.p2.publisher.ProductPublisher, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, org.eclipse.equinox.p2.reconciler.application, org.eclipse.equinox.p2.repository.repo2runnable, org.eclipse.equinox.p2.repository.metadataverifier, org.eclipse.equinox.p2.artifact.repository.mirrorApplication, org.eclipse.equinox.p2.metadata.repository.mirrorApplication, org.eclipse.equinox.p2.touchpoint.natives.nativePackageExtractor, org.eclipse.equinox.p2.updatesite.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.CategoryPublisher, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool, org.eclipse.jdt.apt.core.aptBuild, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer, org.eclipse.pde.build.Build, org.eclipse.pde.junit.runtime.uitestapplication, org.eclipse.pde.junit.runtime.legacytestapplication, org.eclipse.pde.junit.runtime.coretestapplication, org.eclipse.pde.junit.runtime.coretestapplicationnonmain, org.eclipse.pde.junit.runtime.nonuithreadtestapplication, org.eclipse.ui.ide.workbench.

Can someone suggest, am i going on wrong path? if yes, how to make Knime binary. If not then what is missing from my side.

Can anyone please help on this?

Hi @manasdabir,

please excuse the late answer, I just returned from my vacation. For a custom build of KNIME AP you most definetly need to modify the product definition file and remove plugins / features that are causing you issues. We are currently working on a new build system which makes this all easier.

best,
Gabriel

2 Likes

Hi, I have same problems.
I can successfully build the source code with its base line target, and run the application. But when i try to export the application by the desktop .product file to an .exe . I met several problems:
1 If i export the project directly by its original .product file,firstly a problem that "Unable to find feature: org.knime.binary.jreā€˜ comes. So I add this feature to the target file and problem solved. But another problem comes : ā€˜JSON related functionality for KNIME 3.7.1.v201901281201 (org.knime.json 3.7.1.v201901281201) requires ā€˜bundle com.fifesoft.autocomplete [2.5.7,3.0.0)ā€™ but it could not be foundā€™ while this com.fifesoft.autocomplete 2.6.0 is clearly in my work space.
2 Then I try to change the .product file by add required features in its contents label and export. Problem ā€˜Unable to find feature ā€œorg.knime.features.baseā€ with version in range [3.7.2.v201904171038,3.7.2.v201904171038]ā€™ comes. And this feature 3.7.2.v201904171038 is clearly in my work space and baseline.
3 Then I try to change the .product file by changing the product configuration ā€˜based on plug-insā€™ , and add required plug-ins and export, and meet the completely consistent error shown by manasdabir.
So what is wrong of my work . Please help me ! Thanks!

Hi @landsat,

You should probably look into cloning knime-base and modifying the contained org.knime.features.base feature. It used to reference a lot of other projects and this lead to confusing behavior during builds. If you take a look at it on the master branch: https://github.com/knime/knime-base/tree/master/org.knime.features.base you can see the slimmed down version.

Regarding the different plugin versions, every plugin/feature can only depend on only one version of a plugin. But different features/plugins can require different versions of plugins. However, all plugins in all required versions should be provided by the target platform. Can you post which plugins require the different versions of batik ?

best,
Gabriel

Hi @landsat,

are you adding the batik plugin in the product definition? I think this is why that is not working, you are forcing a specific version of that plugin to be installed at root level of the created AP.
I donā€™t think this is necessary at all.

Try to only reference features in your product definition, then define required plugins there. This creates seperation which is much needed in some cases.

best,
Gabriel

Hi have you solve these problems?
@manasdabir

Thanks for your help. I made some progress and now i can ran an application by my product file, and export it as an exe file. While i still have some problems. afteri click exe file, the dialog comes


then i chose an empty work space and click lanuch
image
it crashed.
!SESSION 2020-02-28 22:15:05.671 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_152
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
Command-line arguments: -os win32 -ws win32 -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2020-02-28 22:15:14.737
!MESSAGE Application error
!STACK 1
java.lang.Error: Unresolved compilation problem:
at org.knime.product.profiles.ProfileManager.getInstance(ProfileManager.java:118)
at org.knime.product.rcp.KNIMEApplication.start(KNIMEApplication.java:118)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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:1499)

So what is this problem? Thanks again for your help.
my environment is jre-1.8 with eclipse 4.7 and source code 2018-7 release and i have checked the knime.ini. It is the same as the knime.ini contains in the knime 3.7 software.

Hi @landsat,
it looks like you are having some classpath issues. First try cleaning your workspace and re-exporting.
If that doesnā€™t work, investigate the code referenced in the error message, is it trying to load some library that is not available?

best,
Gabriel

I tryed again and again and failed. To solve the problems "ƗƗ.jar cannot be founded " i described several days before and make the product ran correctly, I add three plugins which are out of my workspace and add them to the target file(including org.eclipse.jdt.doc.isv.jar org.eclipse.application.doc.isv and knime.binary.jre).
I think this may be a reason of classpass problems. So i add their file path to the class path window(I even try to directly copy these plugins to my current workspace and add to my target file to avoid these plugins is not available) . But all of this did not work.
Any suggestions?
ps: Flowing your suggestions to @manasdabir, i am trying to cut down the features in my product file, while if i just click add required button,there are a lot of errors.
image
and i have to add target platform feature for this commons lang plugin
image
Then i click add required button again,almost all features are added. And some jar file are still lost, so i create a new feature to add these plugins


and at last, i can ran the application and export sucessfully.
But the exe fails after it trys to open an empty workspace.

Hi @landsat,

you seem to be using an older version of the target platform (3.7.1) did you try with the latest release 4.1? You can get that if you switch your knime-sdk-setup to the branch releases/2019-12.
The target platform should contain all necessary plugins, so maybe you are running into a versioning clash.

best,
Gabriel

Thanks so much for your help. I can export it correctly now.

2 Likes

I am glad to hear that :smiley:

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