1

some below error is showing afterthe jar was deploy in karaf and this bundle was not able to start.

Exported Packages   org.apache.karaf.examples.command,version=1.0.0
Imported Packages   org.apache.karaf.examples.command.api,version=[1.0,2) from org.custom.command.custom-command-api (103)
org.osgi.framework,version=[1.8,2) from org.apache.felix.framework (0)
org.slf4j,version=[1.7,2) from org.ops4j.pax.logging.pax-logging-api (6)
**org.springframework.http -- Cannot be resolved
org.springframework.util -- Cannot be resolved
org.springframework.web.client -- Cannot be resolved**

The required dependency was added for spring-web. Refer below snippet

<dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>5.1.9.RELEASE</version>
        </dependency>

from the error i can see most of the time it is failing at imported package while i dont have anything to specify in imported-package tag.

<Import-Package>
                            *
                        </Import-Package>

any help is truly appreciated !

zz10
  • 67
  • 1
  • 10
  • Possible duplicate of [Can i place third party jars in karaf (any specific folder) to resolve transitive dependencies?](https://stackoverflow.com/questions/34634109/can-i-place-third-party-jars-in-karaf-any-specific-folder-to-resolve-transitiv) – mentallurg Aug 31 '19 at 14:20
  • hi, the whole idea i can get from that incident, but maybe if i can have some simple step to elaborate all the solution stated ? – zz10 Aug 31 '19 at 14:33
  • Please explain what is not simple there. "drop all your dependency bundles into ..." - what can be simpler? What is not simple here? – mentallurg Aug 31 '19 at 20:34

1 Answers1

0

Karaf won't have Spring libs unless you install them as a feature.

Login to your karaf, and try:

features:install spring-web
djb
  • 1,635
  • 3
  • 26
  • 49