Ask Your Question
0

Can't install feature XXX , Reason: Missing Constraint: Import-Package: org.apache.log; version="0.0.0"

asked 2015-07-29 06:19:31 -0700

hjdeore gravatar image

updated 2015-07-30 01:29:42 -0700

Hi Guys i am getting error while installing feature in karaf mentioned in subject

i have added dependencies in xml file

<dependency> <groupid>org.apache.httpcomponents</groupid> <artifactid>httpcore</artifactid> <version>4.4.1</version> </dependency> <dependency> <groupid>org.apache.httpcomponents</groupid> <artifactid>httpclient</artifactid> <version>4.5</version> </dependency> <dependency> <groupid>commons-logging</groupid> <artifactid>commons-logging</artifactid> <version>1.2</version> </dependency>

& i have manually imported package also

org.apache.*,

To be precise , i am trying to call PATCH method of http through ODL.

JAVA class URLConnection has a bug so it can't access PATCH method. So i used one more option which is by using Apache Http-Components Client 4.2+ . which has HttpPatch class. I am getting subjected error whenever i am using this class in my java program.

if anybody knows please share you idea.

Thanks, Harish

edit retag flag offensive close merge delete

Comments

As you say, that the error is thrown in karaf, be sure, that you specified the bundle in your features.xml, so that apache karaf is able to resolve dependencies

luna ( 2015-07-29 06:43:14 -0700 )edit

i have mentioned import package manually in xml file -- org.apache.*, Though i am getting error.

hjdeore ( 2015-07-30 01:25:39 -0700 )edit

try following in your features.xml <bundle>mvn:org.apache.httpcomponents/httpclient-osgi/<version></bundle> <bundle>mvn:org.apache.httpcomponents/httpcore-osgi/<version></bundle> replace version with the concrete version number, installed in maven repository. Comment, if it works pls.

luna ( 2015-07-30 02:09:40 -0700 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-11-01 19:28:30 -0700

icehong gravatar image

Resolved by @luna is comments .

try following in your features.xml <bundle>mvn:org.apache.httpcomponents/httpclient-osgi/<version></bundle> <bundle>mvn:org.apache.httpcomponents/httpcore-osgi/<version></bundle> replace version with the concrete version number, installed in maven repository.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Follow
1 follower

Stats

Asked: 2015-07-29 06:19:31 -0700

Seen: 698 times

Last updated: Nov 01 '16