Quantcast

Karaf 4.1.x / httplite incompatibility

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Karaf 4.1.x / httplite incompatibility

winnall
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 [hidden email], so I submitted it again via e-mail.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Karaf 4.1.x / httplite incompatibility

Mark Derricutt
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

signature.asc (494 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Karaf 4.1.x / httplite incompatibility

winnall
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 <[hidden email]> 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

Loading...