You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Stephen Winnall <st...@winnall.ch> on 2017/04/10 09:40:09 UTC

Karaf 4.1.x / httplite incompatibility

I am trying to build a Karaf assembly using Karaf 4.1.1, Java 1.8.0_76-ea-b04, Maven 3.3.9, Netbeans 8.2 and macOS 10.12.4. I am getting an error message, even if I omit all my own features from the build (i.e. I build an empty Karaf): 

    java.lang.ClassCastException: org.apache.felix.httplite.osgi.HttpServiceImpl cannot be cast to org.osgi.service.http.HttpService 

The problem seems to be that the latest version of org.apache.felix.httplite.complete, which provides org.apache.felix.httplite.osgi.HttpServiceImpl, i.e. 0.1.5, requires a version of java.servlet that is incompatible with the rest of Karaf 4.1.1, which - I think - expects 3.1.0. The following comes from the MANIFEST.MF of org.apache.felix.httplite.complete-0.1.5.jar: 

    Import-Package: javax.servlet;version="[2.4,3)" 

So, any hints on how to stop Karaf trying to httplite? Or is there another way of avoiding this error? The following is an extract from the effective POM: 

      <plugin>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>karaf-maven-plugin</artifactId>
        <version>4.1.1</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>default-archive</id>
            <phase>package</phase>
            <goals>
              <goal>archive</goal>
            </goals>
            <configuration>
              <installedFeatures>
                <feature>wrapper</feature>
              </installedFeatures>
              <bootFeatures>
                <feature>minimal</feature>
              </bootFeatures>
              <javase>1.8</javase>
            </configuration>
          </execution>
          <execution>
            <id>default-assembly</id>
            <phase>process-resources</phase>
            <goals>
              <goal>assembly</goal>
            </goals>
            <configuration>
              <installedFeatures>
                <feature>wrapper</feature>
              </installedFeatures>
              <bootFeatures>
                <feature>minimal</feature>
              </bootFeatures>
              <javase>1.8</javase>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <installedFeatures>
            <feature>wrapper</feature>
          </installedFeatures>
          <bootFeatures>
            <feature>minimal</feature>
          </bootFeatures>
          <javase>1.8</javase>
        </configuration>
      </plugin>

Steve


P.S. Apologies if this turns up twice. I tried to submit it via Nabble, but got a failure notice from the MAILER-DAEMON@apache.org, so I submitted it again via e-mail.

Re: Karaf 4.1.x / httplite incompatibility

Posted by Guillaume Nodet <gn...@apache.org>.
I've fixed the httplite headers.

We should still investigate why httplite is involved in the problem at all,
as it should not be installed unless explicitely required.

2017-04-27 8:52 GMT+02:00 Guillaume Nodet <gn...@apache.org>:

> I suppose it's mostly a matter of having a new release of httplite which
> could support the servlet api 3.1 in the range.
>
> 2017-04-27 6:25 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
>> Hi,
>>
>> do you have a test case to reproduce it ? I will take a look.
>>
>> Regards
>> JB
>>
>>
>> On 04/26/2017 01:24 PM, Stephen Winnall wrote:
>>
>>> I haven’t resolved this, but it isn’t actually causing me any problems
>>> at the moment (i.e. I’m ignoring it). It just makes the log files look
>>> untidy.
>>>
>>> I’m a bit surprised no-one else commented on it, though.
>>>
>>> Steve
>>>
>>> On 26 Apr 2017, at 05:36, Mark Derricutt <ma...@talios.com> wrote:
>>>>
>>>> On 10 Apr 2017, at 21:40, Stephen Winnall wrote:
>>>>
>>>> I am trying to build a Karaf assembly using Karaf 4.1.1, Java
>>>>> 1.8.0_76-ea-b04, Maven 3.3.9, Netbeans 8.2 and macOS 10.12.4. I am getting
>>>>> an error message, even if I omit all my own features from the build (i.e. I
>>>>> build an empty Karaf):
>>>>>
>>>>
>>>> Stephen - Did you ever resolve this? I was hit with the same thing
>>>> updating from 4.0.8 straight to 4.1.1, opted to just migrate to 4.0.9
>>>> instead for now.
>>>>
>>>> --
>>>> Mark Derricutt
>>>> http://www.theoryinpractice.net
>>>> http://www.chaliceofblood.net
>>>> http://plus.google.com/+MarkDerricutt
>>>> http://twitter.com/talios
>>>> http://facebook.com/mderricutt
>>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>
> --
> ------------------------
> Guillaume Nodet
>
>


-- 
------------------------
Guillaume Nodet

Re: Karaf 4.1.x / httplite incompatibility

Posted by Guillaume Nodet <gn...@apache.org>.
I suppose it's mostly a matter of having a new release of httplite which
could support the servlet api 3.1 in the range.

2017-04-27 6:25 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:

> Hi,
>
> do you have a test case to reproduce it ? I will take a look.
>
> Regards
> JB
>
>
> On 04/26/2017 01:24 PM, Stephen Winnall wrote:
>
>> I haven’t resolved this, but it isn’t actually causing me any problems at
>> the moment (i.e. I’m ignoring it). It just makes the log files look untidy.
>>
>> I’m a bit surprised no-one else commented on it, though.
>>
>> Steve
>>
>> On 26 Apr 2017, at 05:36, Mark Derricutt <ma...@talios.com> wrote:
>>>
>>> On 10 Apr 2017, at 21:40, Stephen Winnall wrote:
>>>
>>> I am trying to build a Karaf assembly using Karaf 4.1.1, Java
>>>> 1.8.0_76-ea-b04, Maven 3.3.9, Netbeans 8.2 and macOS 10.12.4. I am getting
>>>> an error message, even if I omit all my own features from the build (i.e. I
>>>> build an empty Karaf):
>>>>
>>>
>>> Stephen - Did you ever resolve this? I was hit with the same thing
>>> updating from 4.0.8 straight to 4.1.1, opted to just migrate to 4.0.9
>>> instead for now.
>>>
>>> --
>>> Mark Derricutt
>>> http://www.theoryinpractice.net
>>> http://www.chaliceofblood.net
>>> http://plus.google.com/+MarkDerricutt
>>> http://twitter.com/talios
>>> http://facebook.com/mderricutt
>>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
------------------------
Guillaume Nodet

Re: Karaf 4.1.x / httplite incompatibility

Posted by Achim Nierbeck <bc...@googlemail.com>.
No Problem :)


This message gave me the hint:
Port already in use: 44444;

That usually only happens if at least two instances are running

regards, Achim

2017-08-08 15:42 GMT+02:00 Stephen Winnall <st...@winnall.ch>:

> <embarassed />
>
> Yes, Achim, you were right. I had a Karaf instance left over from
> somewhere that had got detached from NetBeans… When I killed it the problem
> went away.
>
> Apologies.
>
> Steve
>
> On 8 Aug 2017, at 13:37, Achim Nierbeck <bc...@googlemail.com> wrote:
>
> Hi,
>
> looks more like you already have another instance of Karaf running, no?
>
> regards, Achim
>
> 2017-08-08 12:55 GMT+02:00 winnall <st...@winnall.ch>:
>
>> Jean-Baptiste Onofré fixed this issue for 4.1.2 and others. Thank you! So
>> -
>> with the release today of 4.1.2 - I tried it out. The original problem has
>> indeed disappeared, but I'm now seeing new behaviour that appears also to
>> have its root in httplite.
>>
>> When I start Karaf, I see
>>  and in the log I see
>>
>>
>> Is this a follow-on issue or something quite different that was hidden by
>> the previous issue?
>>
>> Steve
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.
>> com/Karaf-4-1-x-httplite-incompatibility-tp4050094p4051180.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Karaf 4.1.x / httplite incompatibility

Posted by Stephen Winnall <st...@winnall.ch>.
<embarassed />

Yes, Achim, you were right. I had a Karaf instance left over from somewhere that had got detached from NetBeans… When I killed it the problem went away.

Apologies.

Steve

> On 8 Aug 2017, at 13:37, Achim Nierbeck <bc...@googlemail.com> wrote:
> 
> Hi, 
> 
> looks more like you already have another instance of Karaf running, no? 
> 
> regards, Achim 
> 
> 2017-08-08 12:55 GMT+02:00 winnall <steve@winnall.ch <ma...@winnall.ch>>:
> Jean-Baptiste Onofré fixed this issue for 4.1.2 and others. Thank you! So -
> with the release today of 4.1.2 - I tried it out. The original problem has
> indeed disappeared, but I'm now seeing new behaviour that appears also to
> have its root in httplite.
> 
> When I start Karaf, I see
>  and in the log I see
> 
> 
> Is this a follow-on issue or something quite different that was hidden by
> the previous issue?
> 
> Steve
> 
> 
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-1-x-httplite-incompatibility-tp4050094p4051180.html <http://karaf.922171.n3.nabble.com/Karaf-4-1-x-httplite-incompatibility-tp4050094p4051180.html>
> Sent from the Karaf - User mailing list archive at Nabble.com.
> 
> 
> 
> -- 
> 
> Apache Member
> Apache Karaf <http://karaf.apache.org/ <http://karaf.apache.org/>> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/ <http://wiki.ops4j.org/display/paxweb/Pax+Web/>> Committer & Project Lead
> blog <http://notizblog.nierbeck.de/ <http://notizblog.nierbeck.de/>>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS <http://bit.ly/1ps9rkS>>
> 
> Software Architect / Project Manager / Scrum Master 
> 


Re: Karaf 4.1.x / httplite incompatibility

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

looks more like you already have another instance of Karaf running, no?

regards, Achim

2017-08-08 12:55 GMT+02:00 winnall <st...@winnall.ch>:

> Jean-Baptiste Onofré fixed this issue for 4.1.2 and others. Thank you! So -
> with the release today of 4.1.2 - I tried it out. The original problem has
> indeed disappeared, but I'm now seeing new behaviour that appears also to
> have its root in httplite.
>
> When I start Karaf, I see
>  and in the log I see
>
>
> Is this a follow-on issue or something quite different that was hidden by
> the previous issue?
>
> Steve
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Karaf-4-1-x-httplite-incompatibility-tp4050094p4051180.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Karaf 4.1.x / httplite incompatibility

Posted by winnall <st...@winnall.ch>.
Jean-Baptiste Onofré fixed this issue for 4.1.2 and others. Thank you! So -
with the release today of 4.1.2 - I tried it out. The original problem has
indeed disappeared, but I'm now seeing new behaviour that appears also to
have its root in httplite.

When I start Karaf, I see
 and in the log I see


Is this a follow-on issue or something quite different that was hidden by
the previous issue?

Steve



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-1-x-httplite-incompatibility-tp4050094p4051180.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 4.1.x / httplite incompatibility

Posted by Stephen Winnall <st...@winnall.ch>.
done that - see https://issues.apache.org/jira/browse/KARAF-5110 <https://issues.apache.org/jira/browse/KARAF-5110>

Steve

> On 27 Apr 2017, at 15:52, Guillaume Nodet <gn...@apache.org> wrote:
> 
> Could you please raise a JIRA issue and attach your project ?
> I'll try to have a look.
> 
> 2017-04-27 13:42 GMT+02:00 Stephen Winnall <steve@winnall.ch <ma...@winnall.ch>>:
> I attach the source tree of a test case. Just unpack, build and run, and log:display.
> 
> Steve
> 
> 
> > On 27 Apr 2017, at 06:25, Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
> >
> > Hi,
> >
> > do you have a test case to reproduce it ? I will take a look.
> >
> > Regards
> > JB
> >
> > On 04/26/2017 01:24 PM, Stephen Winnall wrote:
> >> I haven’t resolved this, but it isn’t actually causing me any problems at the moment (i.e. I’m ignoring it). It just makes the log files look untidy.
> >>
> >> I’m a bit surprised no-one else commented on it, though.
> >>
> >> Steve
> >>
> >>> On 26 Apr 2017, at 05:36, Mark Derricutt <mark@talios.com <ma...@talios.com>> wrote:
> >>>
> >>> On 10 Apr 2017, at 21:40, Stephen Winnall wrote:
> >>>
> >>>> I am trying to build a Karaf assembly using Karaf 4.1.1, Java 1.8.0_76-ea-b04, Maven 3.3.9, Netbeans 8.2 and macOS 10.12.4. I am getting an error message, even if I omit all my own features from the build (i.e. I build an empty Karaf):
> >>>
> >>> Stephen - Did you ever resolve this? I was hit with the same thing updating from 4.0.8 straight to 4.1.1, opted to just migrate to 4.0.9 instead for now.
> >>>
> >>> --
> >>> Mark Derricutt
> >>> http://www.theoryinpractice.net <http://www.theoryinpractice.net/>
> >>> http://www.chaliceofblood.net <http://www.chaliceofblood.net/>
> >>> http://plus.google.com/+MarkDerricutt <http://plus.google.com/+MarkDerricutt>
> >>> http://twitter.com/talios <http://twitter.com/talios>
> >>> http://facebook.com/mderricutt <http://facebook.com/mderricutt>
> >>
> >
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org <ma...@apache.org>
> > http://blog.nanthrax.net <http://blog.nanthrax.net/>
> > Talend - http://www.talend.com <http://www.talend.com/>
> 
> 
> 
> 
> 
> -- 
> ------------------------
> Guillaume Nodet
> 


Re: Karaf 4.1.x / httplite incompatibility

Posted by Guillaume Nodet <gn...@apache.org>.
Could you please raise a JIRA issue and attach your project ?
I'll try to have a look.

2017-04-27 13:42 GMT+02:00 Stephen Winnall <st...@winnall.ch>:

> I attach the source tree of a test case. Just unpack, build and run, and
> log:display.
>
> Steve
>
>
> > On 27 Apr 2017, at 06:25, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> >
> > Hi,
> >
> > do you have a test case to reproduce it ? I will take a look.
> >
> > Regards
> > JB
> >
> > On 04/26/2017 01:24 PM, Stephen Winnall wrote:
> >> I haven’t resolved this, but it isn’t actually causing me any problems
> at the moment (i.e. I’m ignoring it). It just makes the log files look
> untidy.
> >>
> >> I’m a bit surprised no-one else commented on it, though.
> >>
> >> Steve
> >>
> >>> On 26 Apr 2017, at 05:36, Mark Derricutt <ma...@talios.com> wrote:
> >>>
> >>> On 10 Apr 2017, at 21:40, Stephen Winnall wrote:
> >>>
> >>>> I am trying to build a Karaf assembly using Karaf 4.1.1, Java
> 1.8.0_76-ea-b04, Maven 3.3.9, Netbeans 8.2 and macOS 10.12.4. I am getting
> an error message, even if I omit all my own features from the build (i.e. I
> build an empty Karaf):
> >>>
> >>> Stephen - Did you ever resolve this? I was hit with the same thing
> updating from 4.0.8 straight to 4.1.1, opted to just migrate to 4.0.9
> instead for now.
> >>>
> >>> --
> >>> Mark Derricutt
> >>> http://www.theoryinpractice.net
> >>> http://www.chaliceofblood.net
> >>> http://plus.google.com/+MarkDerricutt
> >>> http://twitter.com/talios
> >>> http://facebook.com/mderricutt
> >>
> >
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
>
>
>


-- 
------------------------
Guillaume Nodet

Re: Karaf 4.1.x / httplite incompatibility

Posted by Stephen Winnall <st...@winnall.ch>.
I attach the source tree of a test case. Just unpack, build and run, and log:display.

Steve

Re: Karaf 4.1.x / httplite incompatibility

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

do you have a test case to reproduce it ? I will take a look.

Regards
JB

On 04/26/2017 01:24 PM, Stephen Winnall wrote:
> I haven\u2019t resolved this, but it isn\u2019t actually causing me any problems at the moment (i.e. I\u2019m ignoring it). It just makes the log files look untidy.
>
> I\u2019m a bit surprised no-one else commented on it, though.
>
> Steve
>
>> On 26 Apr 2017, at 05:36, Mark Derricutt <ma...@talios.com> wrote:
>>
>> On 10 Apr 2017, at 21:40, Stephen Winnall wrote:
>>
>>> I am trying to build a Karaf assembly using Karaf 4.1.1, Java 1.8.0_76-ea-b04, Maven 3.3.9, Netbeans 8.2 and macOS 10.12.4. I am getting an error message, even if I omit all my own features from the build (i.e. I build an empty Karaf):
>>
>> Stephen - Did you ever resolve this? I was hit with the same thing updating from 4.0.8 straight to 4.1.1, opted to just migrate to 4.0.9 instead for now.
>>
>> --
>> Mark Derricutt
>> http://www.theoryinpractice.net
>> http://www.chaliceofblood.net
>> http://plus.google.com/+MarkDerricutt
>> http://twitter.com/talios
>> http://facebook.com/mderricutt
>

-- 
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Karaf 4.1.x / httplite incompatibility

Posted by Stephen Winnall <st...@winnall.ch>.
I haven’t resolved this, but it isn’t actually causing me any problems at the moment (i.e. I’m ignoring it). It just makes the log files look untidy.

I’m a bit surprised no-one else commented on it, though.

Steve

> On 26 Apr 2017, at 05:36, Mark Derricutt <ma...@talios.com> wrote:
> 
> On 10 Apr 2017, at 21:40, Stephen Winnall wrote:
> 
>> I am trying to build a Karaf assembly using Karaf 4.1.1, Java 1.8.0_76-ea-b04, Maven 3.3.9, Netbeans 8.2 and macOS 10.12.4. I am getting an error message, even if I omit all my own features from the build (i.e. I build an empty Karaf): 
> 
> Stephen - Did you ever resolve this? I was hit with the same thing updating from 4.0.8 straight to 4.1.1, opted to just migrate to 4.0.9 instead for now.
> 
> -- 
> Mark Derricutt
> http://www.theoryinpractice.net
> http://www.chaliceofblood.net
> http://plus.google.com/+MarkDerricutt
> http://twitter.com/talios
> http://facebook.com/mderricutt


Re: Karaf 4.1.x / httplite incompatibility

Posted by Mark Derricutt <ma...@talios.com>.
On 10 Apr 2017, at 21:40, Stephen Winnall wrote:

> I am trying to build a Karaf assembly using Karaf 4.1.1, Java 1.8.0_76-ea-b04, Maven 3.3.9, Netbeans 8.2 and macOS 10.12.4. I am getting an error message, even if I omit all my own features from the build (i.e. I build an empty Karaf): 

Stephen - Did you ever resolve this? I was hit with the same thing updating from 4.0.8 straight to 4.1.1, opted to just migrate to 4.0.9 instead for now.

-- 
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt