Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Difficulty creating a solution using the ESH bundles(Trying to build a solution on top of Apache Karaf with no success)
Difficulty creating a solution using the ESH bundles [message #1751481] Tue, 10 January 2017 16:48 Go to next message
Yuv Mendel is currently offline Yuv MendelFriend
Messages: 2
Registered: December 2016
Junior Member
Hello all,

I am trying to build a smarthome solution using the ESH bundles on top of Apache Karaf with no success. My goal is to build something which is parallel to openHAB but I dont want to take anything from the openHAB project for legal issues.

First of all I tried to compile the ESH project from git to output the bundles which are the product of the project but that just flat out does not work out of the box. The maven build fails.
I ended up taking bundles from the sample packing using concierge :
https://github.com/eclipse/smarthome-packaging-sample

You would expect this to work with no issues, the bundles are the same bundles, the only thing that changed is the underlying framework, Felix instead of Concierge, but alas it does not. The only errors I see are:

java.lang.Exception: Problem writing resource org.eclipse.smarthome.automation.api-0.9.0.b1.jar
at aQute.bnd.osgi.Jar.writeResource(Jar.java:562)[51:org.ops4j.pax.url.wrap:2.5.2]
at aQute.bnd.osgi.Jar.write(Jar.java:318)[51:org.ops4j.pax.url.wrap:2.5.2]
at org.ops4j.pax.swissbox.bnd.BndUtils$1.run(BndUtils.java:196)[51:org.ops4j.pax.url.wrap:2.5.2]
Caused by: java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:260)[:1.8.0_111]
at java.io.PipedInputStream.receive(PipedInputStream.java:226)[:1.8.0_111]
at java.io.PipedOutputStream.write(PipedOutputStream.java:149)[:1.8.0_111]
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)[:1.8.0_111]
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:255)[:1.8.0_111]
at aQute.bnd.osgi.Jar.writeResource(Jar.java:559)[51:org.ops4j.pax.url.wrap:2.5.2]
... 2 more
2017-01-10 18:19:52,724 | DEBUG | Thread-20 | BndUtils | 51 - org.ops4j.pax.url.wrap - 2.5.2 | Bundle cannot be generated, pipe closed by reader
java.lang.Exception: Problem writing resource jetty-client-9.3.10.M0.jar
at aQute.bnd.osgi.Jar.writeResource(Jar.java:562)[51:org.ops4j.pax.url.wrap:2.5.2]
at aQute.bnd.osgi.Jar.write(Jar.java:318)[51:org.ops4j.pax.url.wrap:2.5.2]
at org.ops4j.pax.swissbox.bnd.BndUtils$1.run(BndUtils.java:196)[51:org.ops4j.pax.url.wrap:2.5.2]
Caused by: java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:260)[:1.8.0_111]
at java.io.PipedInputStream.receive(PipedInputStream.java:226)[:1.8.0_111]
at java.io.PipedOutputStream.write(PipedOutputStream.java:149)[:1.8.0_111]
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)[:1.8.0_111]
at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:211)[:1.8.0_111]
at java.util.zip.ZipOutputStream.write(ZipOutputStream.java:331)[:1.8.0_111]
at java.io.FilterOutputStream.write(FilterOutputStream.java:97)[:1.8.0_111]
at aQute.bnd.osgi.EmbeddedResource.write(EmbeddedResource.java:23)[51:org.ops4j.pax.url.wrap:2.5.2]
at aQute.bnd.osgi.Jar.writeResource(Jar.java:558)[51:org.ops4j.pax.url.wrap:2.5.2]
... 2 more

Other bundles seem to start fine but the REST API does not respond. This IOException: Pipe closed is mysterious but I'm not sure the jetty-client is supposed to affect the REST API.
I tried changing the framework Karaf uses to equinox but the same thing happens again.

Does anyone have any experience getting this to work on Karaf? Am I missing some critical config files I need to add like openHAB has?

TLDR: Any help regarding the steps needed to create a standalone runtime solution using ESH ( but not on concierge) would be highly appreciated!


Re: Difficulty creating a solution using the ESH bundles [message #1751868 is a reply to message #1751481] Mon, 16 January 2017 10:50 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Hi Yuv,

Note that there was recently a discussion on the mailing list about such a sample packaging for Karaf: https://dev.eclipse.org/mhonarc/lists/smarthome-dev/msg00116.html
It sounded as if Markus might have something like that available, maybe he can help you out there.

Regards,
Kai
Re: Difficulty creating a solution using the ESH bundles [message #1751876 is a reply to message #1751868] Mon, 16 January 2017 12:11 Go to previous messageGo to next message
Markus Rathgeb is currently offline Markus RathgebFriend
Messages: 105
Registered: August 2014
Senior Member

Hi Yuv Mendel,
sorry for the late response.

You can have a look at:
https://github.com/maggu2810/smarthome-packaging-sample-karaf
Re: Difficulty creating a solution using the ESH bundles [message #1763269 is a reply to message #1751481] Fri, 12 May 2017 09:45 Go to previous message
Kiran Patil is currently offline Kiran PatilFriend
Messages: 27
Registered: October 2015
Junior Member
Hi Yuv Mendel,

May I know, what is the progress of creating solution using ESH ?

Could you please share your steps in detail ?

I believe as a community, other people are also in need of it as a starting point.

If you have captured it in wiki of gitlab or github, that would be great to share.

Regards,
Kiran.
Previous Topic:How to use smarthome-packaging-sample-karaf
Next Topic:How to packaging Eclipse smart home with karaf integration
Goto Forum:
  


Current Time: Thu Dec 05 10:24:16 GMT 2024

Powered by FUDForum. Page generated in 0.04124 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top