Eclipse IDE failed to build Core

  • Platform information:
    • OS: MacOS
    • Java Runtime Environment: zulu8

Hi all, I followed the instructions here https://www.openhab.org/docs/developer/ide/eclipse.html to configure my eclipse IDE. I imported all openHAB working set except for Zigbee and ZWave binding. However after it finishes building automatically, many errors come out and here is the screenshot. Notice that here I only open openhab-core and Infrasturce, and leave OH2 addons and Web UIs close.


I think the problem lies mainly in org.openhab.core.model, because it lets other bundles like boot not be built. I have tried clean and re-build, but it does not work. Could anyone help me out?

I have solved this issue. I updated all bundles. But after that there are 800 errors, most with type Java Problem, come out!!! Here is the screenshot (part of):


Can anyone help me…?

I haven’t included all of openHAB core, but I think you need to generate the model classes with openhab-distro/launch/ModelGen.launch

I tried to go deeper inside an error class, and it seems that it can not find package in eclipse.smarthome.


So what happened here?

See my previous comment. Did you run the launch file?

Sometimes it can be built successfully, however sometimes it fails. Like this time it failed:

A fatal error has been detected by the Java Runtime Environment:

SIGBUS (0xa) at pc=0x00000001046dbe92, pid=24887, tid=0x0000000000002203

JRE version: OpenJDK Runtime Environment (Zulu 8.42.0.21-CA-macosx) (8.0_232-b18) (build 1.8.0_232-b18)

Java VM: OpenJDK 64-Bit Server VM (25.232-b18 mixed mode bsd-amd64 compressed oops)

Problematic frame:

C [libzip.dylib+0x2e92] newEntry+0x154
Failed to write core dump. Core dumps have been disabled. To enable core dumping, try “ulimit -c unlimited” before starting Java again

Hey Hilbrand,
I encountered a similar problem like Jony.

I downloaded the Eclipse-Installer and followed the steps described in https://www.openhab.org/docs/developer/ide/eclipse.html.

Everything installed as expected, but than I got a “Build failed” error message. After that I tried to run your recommended

but that produced even more errors.

My question / problem
Could you please help me to find a solution? Do you have any idea where I maybee missed something?

Thank you in advance for your help!

My goal and my system settings

  • My goal is to start creating my own binding.
  • I’m on a Mac (OSX 10.14.6)
  • Commandline: Java version
java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.252-b09, mixed mode)
  • Ecplipse version
Eclipse IDE for Java Developers

Version: Oxygen.3a Release (4.7.3a)
Build id: 20180405-1200

A step by step explanation:

  1. I installed Eclipse with the recommended manual (see link above)
  2. I selected all options except the options for Zigbee and ZWave
  3. Everything was downloaded successfully
  4. Then the build faild with some error messages (see attached file “Error_Build.txt”)
  5. Then I opened the file “openhab-distro/launch/ModelGen.launch” in eclipse and pressed the green run button in Eclipse and this produced some error messages (see attached file “Error_ModelGen.launch.txt”)

Attachments
Error_Build.txt (1011 Bytes)
Error_ModelGen.launch.txt (12.7 KB)

This thread missed one question I didn’t ask. Do you want to develop for core? In other words if you want to develop a binding you only should select development and openhab-addons. Don’t select core.

Thank you for pointing out the question! Regarding the main headline of this thread, would you recomand me to open a new thread or should we continue in this one?

I uninstalled everything regarding Eclipse and the selections during the Eclipse installer process. Then I re-run it and only selected development and openhab-addons. Unfortunately the build failed again. Here is the output of the build error message:

Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'org.openhab.demo.app'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:3.0.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.0.2
Plugin org.apache.maven.plugins:maven-resources-plugin:3.0.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.0.2
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:3.0.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.0.2
Plugin org.apache.maven.plugins:maven-resources-plugin:3.0.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.0.2

There can be several causes. It should work under normal circumstances. As I don’t know what versions you have, see this stackoverflow question with different suggestions:

1 Like

Thanks for your suggestion! I will try this as soon as possible and will give feedback.

As your mentioned, you don’t know the versions of the software I use - of which software do you need the version numbers?

The stackoverflow question has several possible solutions, part of those are related to versions. So it might be version related, but not necessarily. It would just makes it more guessing that I don’t know the versions and some answers are related to specific versions of maven, therefor I couldn’t give a specific answer. I think the stackoverflow answers should cover most cases and will very likely give you the answer. For openHAB development on 2.5 make sure you use Java 8.

Hi Hilbrand, I wanna ask what the normal routine if I want to develop the core? As far as I am concerned, I just build the core locally, and in the provided app.bndrun, I just set the core to my local build. Am I correct? Or should I use that Jenkins?

You can develop on core just like a binding. Just import the projects of core you want to develop on. If you want to develop for core make sure you develop on the master branch, which is for openHAB 3. And use Java 11. Because openHAB 3 requires Java 11. Jenkins is for the cloud build, not really useful for development.

Thanks a lot!