Build a firmware from scratch

Hello,

I just started using MicroEJ, first tried to make the “hello world” using a virtual device and it worked well, but then as soon as i import the Architecture, this error shows up.

I tried reinstalling, deleting the workspace and repository but same error show’s when i import the architecture “flopi0G22-7.14.0-eval.xpf”.

If anyone had this problem, or anything that can help me would be good.

Thanks.

Hello,

Can you check the version of the JDK used to run the MicroEJ SDK please? You must use a JDK 8, and the error you get is a typical error when using Java 11+.

Hope this helps,
Thomas

Hello,

Yes of course, i already installed Java 8 kit (311)

Thanks,
Hamza

ok. Can you share the logs located in the file .metadata/.log in your workspace please ? Is there any error ?

This is all that this file has, and yes it shows some SonarLint errors and more.

1)
java.lang.IllegalStateException: Unable to load component class org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor
at org.sonarsource.sonarlint.core.container.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:60)
at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
at org.sonarsource.sonarlint.core.container.ComponentContainer.getComponentByType(ComponentContainer.java:251)
at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:134)
at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:126)
at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:111)
at org.sonarsource.sonarlint.core.container.standalone.StandaloneGlobalContainer.analyze(StandaloneGlobalContainer.java:155)
at org.sonarsource.sonarlint.core.StandaloneSonarLintEngineImpl.analyze(StandaloneSonarLintEngineImpl.java:91)
at org.sonarlint.eclipse.core.internal.engine.StandaloneEngineFacade.runAnalysis(StandaloneEngineFacade.java:84)
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeStandaloneProjectJob.runAnalysis(AnalyzeStandaloneProjectJob.java:65)
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeStandaloneProjectJob.runAnalysis(AnalyzeStandaloneProjectJob.java:1)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.run(AbstractAnalyzeProjectJob.java:396)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.runAnalysisAndUpdateMarkers(AbstractAnalyzeProjectJob.java:199)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.doRun(AbstractAnalyzeProjectJob.java:161)
at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarProjectJob.run(AbstractSonarProjectJob.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

2)

!ENTRY com.is2t.eclipse.plugin.easyant4e 1 0 2021-11-06 13:33:14.935
!MESSAGE Workspace already created - Ivy settings file preference already set at C:\Users\Jashari.microej\microej-ivysettings-5.4.xml

3)

!ENTRY com.is2t.microej.workbench.std 4 0 2021-11-08 17:29:49.295
!MESSAGE Error logged from com.is2t.microej.workbench.std
!STACK 0
java.lang.NullPointerException: hardwarePartNumber
at com.is2t.microej.workbench.std.infos.Infos.checkAttribute(Infos.java:255)
at com.is2t.microej.workbench.std.infos.Infos.checkProperty(Infos.java:262)
at com.is2t.microej.workbench.std.infos.PlatformInfos.check(PlatformInfos.java:71)
at com.is2t.microej.workbench.std.infos.PlatformInfos.(PlatformInfos.java:121)
at com.is2t.microej.workbench.std.launch.MicroEJLaunchHelper.getPlatformInfos(MicroEJLaunchHelper.java:68)
at com.is2t.microej.workbench.std.launch.AbstractMicroEJTabGroup.initializeFrom(AbstractMicroEJTabGroup.java:86)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupWrapper.initializeFrom(LaunchConfigurationTabGroupWrapper.java:182)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.displayInstanceTabs(LaunchConfigurationTabGroupViewer.java:868)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.lambda$4(LaunchConfigurationTabGroupViewer.java:729)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.inputChanged(LaunchConfigurationTabGroupViewer.java:744)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput0(LaunchConfigurationTabGroupViewer.java:676)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput(LaunchConfigurationTabGroupViewer.java:656)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.handleLaunchConfigurationSelectionChanged(LaunchConfigurationsDialog.java:1050)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$4.selectionChanged(LaunchConfigurationsDialog.java:616)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:823)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:820)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1663)
at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1084)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationView.handleConfigurationAdded(LaunchConfigurationView.java:332)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationView.lambda$0(LaunchConfigurationView.java:307)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4005)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3633)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1239)
at org.eclipse.debug.ui.DebugUITools.lambda$1(DebugUITools.java:627)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:633)
at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:571)
at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:85)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:579)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:413)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4213)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4030)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3630)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
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:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1447)

These errors do not seem related to your issue.
Do you confirm you use the version 21.03 of the SDK ?
I tried to reproduce with a fresh install, on Windows, with a JDK 8, I was able to import the architecture flopi0G22-7.14.0-eval.xpf.
By default the SDK uses the following folder as the MicroEJ repository : <user.home>.microej\repositories\MicroEJ-SDK-Dist-21.03 but I see your path is set to <user.home>.microej\repositories in your screenshot. Did you change it ? Was it an empty directory when you started from scratch ?
Also can you attach the full logs file please ?

Yes im using version 21.03.

My default folder for repository was <user.home>.microej\repositories\MicroEJ-SDK-Dist-21.03 it didnt work so i tried to change it. But it was not empty.

This is the link of .log file
https://drive.google.com/file/d/1NM1rZBh-19n3gvkgGKYq38JPF1Wg-2Nl/view?usp=sharing

According to the logs, the SDK uses a JDK 17:

eclipse.buildId=4.16.0.I20200604-0540
java.version=17
java.vendor=Oracle Corporation

You can change the JDK used by the SDK by editing the file MicroEJ-SDK.ini and adding the following lines:

-vm
/path/to/your/jdk8

See eclipse.ini - Eclipsepedia for more details on this option.

Regards

I removed the JDK 17 and installed version 8 but again it doesnt work, also did
-vm
/path/to/your/jdk8
But thanks a lot for the help. I will try again till i solve it

Do you still have the same error ?
To be sure your SDK runs on a JDK8, you can check in Help > About MicroEJ SDK > Installation Details > Configuration and search for java.version.

Regards.

Hello, yes it was the problem with JDK kit, i usully did delete the 17kit from microEJ but somehow it didnt got deleted from it configuration. When i did this last step i saw that 17 was all the time running. I downloaded 8Kit 202 and did the step with
-vm
/path/to/your/jdk8/bin/javaw.exe
as mention on the link https://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM
Then all worked fluently.

Thanks to you, hope i can help u sometimes too.
Have a good day.