You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by abhilashb <ab...@in.bosch.com> on 2015/08/19 06:19:30 UTC

Karaf issue - http-client related

Hi All,

I have a small issue.



I have used Http-Client in my code. My Manifest file looks like below


Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: DNGService
Created-By: 1.7.0_40 (Oracle Corporation)
Bundle-SymbolicName: com.bosch.dng
Bundle-Version: 1.0.3
Bundle-Activator: com.bosch.dng.Activator
Bundle-Vendor: Abhilash
Bundle-Localization: plugin
Import-Package: org.osgi.framework,org.apache.camel,
org.apache.camel.impl,org.apache.camel.builder,org.apache.camel.builder.xml,
org.apache.camel.model,org.apache.camel.component,org.apache.camel.component.http,org.apache.camel.core.osgi,org.apache.camel.spi,org.w3c.dom,org.apache.http

Error Log :

015-08-18 15:18:23,984 | WARN  | raf-3.0.1/deploy | fileinstall                     
| 11 - org.apache.felix.fileinstall - 3.2.8 | Error while starting bundle:
file:/D:/DXA%20Middleware%20Softwares/dexterlabs-dxa_deploy-4250f2d012b0/windows/monitor/karaf/apache-karaf-3.0.1/deploy/com.bosch.dng.jar
org.osgi.framework.BundleException: Unresolved constraint in bundle
com.bosch.dng [608]: Unable to resolve 608.0: missing requirement [608.0]
osgi.wiring.package; (osgi.wiring.package=org.apache.http)
        at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)[org.apache.felix.framework-4.2.1.jar:]
        at
org.apache.felix.framework.Felix.startBundle(Felix.java:2037)[org.apache.felix.framework-4.2.1.jar:]
        at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)[org.apache.felix.framework-4.2.1.jar:]
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1263)[11:org.apache.felix.fileinstall:3.2.8]
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1235)[11:org.apache.felix.fileinstall:3.2.8]
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:524)[11:org.apache.felix.fileinstall:3.2.8]
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:308)[11:org.apache.felix.fileinstall:3.2.8]


Please provide me the solution 

Regards,
Abhilash B. 



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

Posted by abhilashb <ab...@in.bosch.com>.
My code goes below :

try {
		   			
		   			method.addRequestHeader("Accept", "application/json");
		   			method.addRequestHeader("OSLC-Core-Version", "2.0");
		   			
		   			System.out.println("CAlling execute method...");
		   			
		   			httpClient.executeMethod(method);
		   			
		   			System.out.println("After exec method...");
		   			
		   			String response = method.getResponseBodyAsString();
		   			
		   			System.out.println("============Files List================");
		   			
		   			System.out.println("Response ::: " + response);

		   			System.out.println("============Files List================");
}
		   		

After executing "httpClient.executeMethod(method);"

the control comes out of the method.
		   		

Regards,
Abhilash B.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4042064.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

Posted by abhilashb <ab...@in.bosch.com>.
Hello,

No there is nothing in the logs.

the control goes to the below line - 
httpClient.executeMethod(method); 

and after that we wont get any response.

When I run the code locally it works well but when I deploy this into karaf
I wont get any response after executing 
httpClient.executeMethod(method); 

Anything I am missing some where?

Regards,
Abhilash B.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4042063.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Do you have something in the log or did you instrument your code to know 
where you are in the statement ?

Regards
JB

On 08/26/2015 07:44 AM, abhilashb wrote:
> Hello,
>
> I am trying to connect eASEE SDOM repository using httpClient.
>
> HttpMethod method = new GetMethod(url.toString());
>
> method.addRequestHeader("Accept", "application/json");
> method.addRequestHeader("OSLC-Core-Version", "2.0");
>    			
> httpClient.executeMethod(method);
>
> String response = method.getResponseBodyAsString();
>
> Note : url contains username/password, server url
>
> But in Karaf, I wont get the response back after executing -
> httpClient.executeMethod(method);
>
> Please could anybody guide me whats going wrong here?
>
> Regards,
> Abhilash B.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4042061.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

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

Re: Karaf issue - http-client related

Posted by abhilashb <ab...@in.bosch.com>.
Hello,

I am trying to connect eASEE SDOM repository using httpClient.

HttpMethod method = new GetMethod(url.toString());

method.addRequestHeader("Accept", "application/json");
method.addRequestHeader("OSLC-Core-Version", "2.0");
  			
httpClient.executeMethod(method);

String response = method.getResponseBodyAsString();

Note : url contains username/password, server url

But in Karaf, I wont get the response back after executing -
httpClient.executeMethod(method);

Please could anybody guide me whats going wrong here?

Regards,
Abhilash B.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4042061.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
You should install Camel using feature (and not bundle):

feature:repo-add camel 2.13.2
feature:install camel

Regards
JB

On 08/20/2015 05:35 PM, abhilashb wrote:
> Hello JB,
>
> Yes, I have installed apache camel before and it worked fine..
>
> bundle:install -s mvn:org.apache.camel/camel-core-osgi/2.13.2
>
> Regards,
> Abhilash B.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041989.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

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

Re: Karaf issue - http-client related

Posted by abhilashb <ab...@in.bosch.com>.
Hello JB,

Yes, I have installed apache camel before and it worked fine..

bundle:install -s mvn:org.apache.camel/camel-core-osgi/2.13.2

Regards,
Abhilash B.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041989.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Did you install other features/bundles before http* bundles ?

Regards
JB

On 08/20/2015 05:23 PM, abhilashb wrote:
> Yes it worked before restart. Bundles got installed.
>
> I Restarted the karaf and its throwing the aboev error.
>
> Let me try installing javax.crypto package and check what happens
>
> Regards,
> Abhilash B.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041987.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

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

Re: Karaf issue - http-client related

Posted by abhilashb <ab...@in.bosch.com>.
Yes it worked before restart. Bundles got installed.

I Restarted the karaf and its throwing the aboev error.

Let me try installing javax.crypto package and check what happens

Regards,
Abhilash B.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041987.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Did it work after install (before the restart) ?

It looks like javax.crypto package is not there.

Regards
JB

On 08/20/2015 05:17 PM, abhilashb wrote:
> Hello JB,
>
> But now when i restart the karaf, Its thrwing this error -
>
> ERROR: Bundle org.apache.httpcomponents.httpcore [637] Error starting
> mvn:org.apache.httpcomponents/httpco
> re-osgi/4.4.1 (org.osgi.framework.BundleException: Unresolved constraint in
> bundle org.apache.httpcomponents.httpcore [6
> 37]: Unable to resolve 637.0: missing requirement [637.0]
> osgi.wiring.package; (osgi.wiring.package=javax.net))
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.httpcomponents.httpcore [637]: Unable to
> resolve 637.0: missing requirement [637.0] osgi.wiring.package;
> (osgi.wiring.package=javax.net)
>          at
> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
>          at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
>          at
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
>          at
> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
>          at java.lang.Thread.run(Thread.java:745)
> ERROR: Bundle org.apache.httpcomponents.httpclient [638] Error starting
> mvn:org.apache.httpcomponents/httpclient-osgi/4.
> 4.1 (org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.httpcomponents.httpclient [638]: Una
> ble to resolve 638.0: missing requirement [638.0] osgi.wiring.package;
> (osgi.wiring.package=javax.crypto))
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.httpcomponents.httpclient [638]: Unable t
> o resolve 638.0: missing requirement [638.0] osgi.wiring.package;
> (osgi.wiring.package=javax.crypto)
>          at
> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
>          at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
>          at
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
>          at
> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
>          at java.lang.Thread.run(Thread.java:745)
>
>
> Are there any other dependency packages that i need to install?
>
> Regards,
> Abhilash B.
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041985.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

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

Re: Karaf issue - http-client related

Posted by abhilashb <ab...@in.bosch.com>.
Hello JB,

But now when i restart the karaf, Its thrwing this error - 

ERROR: Bundle org.apache.httpcomponents.httpcore [637] Error starting
mvn:org.apache.httpcomponents/httpco
re-osgi/4.4.1 (org.osgi.framework.BundleException: Unresolved constraint in
bundle org.apache.httpcomponents.httpcore [6
37]: Unable to resolve 637.0: missing requirement [637.0]
osgi.wiring.package; (osgi.wiring.package=javax.net))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.httpcomponents.httpcore [637]: Unable to
resolve 637.0: missing requirement [637.0] osgi.wiring.package;
(osgi.wiring.package=javax.net)
        at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
        at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
        at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
        at java.lang.Thread.run(Thread.java:745)
ERROR: Bundle org.apache.httpcomponents.httpclient [638] Error starting
mvn:org.apache.httpcomponents/httpclient-osgi/4.
4.1 (org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.httpcomponents.httpclient [638]: Una
ble to resolve 638.0: missing requirement [638.0] osgi.wiring.package;
(osgi.wiring.package=javax.crypto))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.httpcomponents.httpclient [638]: Unable t
o resolve 638.0: missing requirement [638.0] osgi.wiring.package;
(osgi.wiring.package=javax.crypto)
        at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
        at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
        at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
        at java.lang.Thread.run(Thread.java:745)


Are there any other dependency packages that i need to install?

Regards,
Abhilash B.




--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041985.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
You are very welcome ;)

Regards
JB

On 08/20/2015 04:37 PM, abhilashb wrote:
> Hello,
>
> I am able to install httpclient now.
> Thanks a lot for all the guidance. :)
>
> I installed maven. and changed below file in karaf.
> etc/org.ops4j.pax.url.mvn.cfg to point to maven settings.xml.
>
> Thanks once again. :) :) :)
>
> Regards,
> Abhilash B.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041977.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

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

Re: Karaf issue - http-client related

Posted by abhilashb <ab...@in.bosch.com>.
Hello,

I am able to install httpclient now.
Thanks a lot for all the guidance. :)

I installed maven. and changed below file in karaf.
etc/org.ops4j.pax.url.mvn.cfg to point to maven settings.xml. 

Thanks once again. :) :) :)

Regards,
Abhilash B.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041977.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

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

if it's a http proxy, Karaf can leverage the regular jvm option 
(-Dhttp.proxy*).
If it's a Maven proxy, you can setup in your settings.xml and provide 
the location of this settings.xml in etc/org.ops4j.pax.url.mvn.cfg.

Regards
JB

On 08/20/2015 11:16 AM, abhilashb wrote:
> Hello JB,
>
> Yes I guess that's the problem.
>
> Do you know where to change the proxy settings in karaf?
>
>
> Regards,
> Abhilash B.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041967.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

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

Re: Karaf issue - http-client related

Posted by abhilashb <ab...@in.bosch.com>.
Hello JB,

Yes I guess that's the problem.

Do you know where to change the proxy settings in karaf?


Regards,
Abhilash B.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041967.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
It's correct.

Central is already configured in etc/org.ops4j.pax.url.mvn.cfg.

Maybe you use a proxy to access to central ?

Regards
JB

On 08/20/2015 10:47 AM, abhilashb wrote:
>
> I tried installing
> install -s mvn:org.apache.httpcomponents/httpcore-osgi/4.4.1
>
> Please let me know how to do central.
>
> I am bit confused here.
>
> Regards,
> Abhilash B.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041964.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

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

Re: Karaf issue - http-client related

Posted by abhilashb <ab...@in.bosch.com>.
I tried installing 
install -s mvn:org.apache.httpcomponents/httpcore-osgi/4.4.1

Please let me know how to do central.

I am bit confused here.

Regards,
Abhilash B.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041964.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

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

you have to use:

mvn:org.apache.httpcomponents/httpcore-osgi/4.4.1

and

mvn:org.apache.httpcomponents/httpclient-osgi/4.4.1

both on central.

Regards
JB

On 08/20/2015 07:11 AM, abhilashb wrote:
> Hello,
>
> When tried to install httocore getting below error -
>
> Please help me.
>
> Caused by: org.osgi.framework.BundleException: Unable to cache bundle:
> mvn:org.apache.httpcomponents/httpcore/4.4.1
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2870)
> 	at
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
> 	at org.apache.karaf.bundle.command.Install.doExecute(Install.java:43)
> 	... 30 more
> Caused by: java.io.IOException: Error resolving artifact
> org.apache.httpcomponents:httpcore:jar:4.4.1: Could not transfer artifact
> org.apache.httpcomponents:httpcore:jar:4.4.1 from/to central
> (http://repo1.maven.org/maven2/): Error transferring file: repo1.maven.org
> 	at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:258)
> 	at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolveFile(AetherBasedResolver.java:239)
> 	at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:223)
> 	at
> org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:122)
> 	at
> org.apache.felix.framework.util.SecureAction.getURLConnectionInputStream(SecureAction.java:524)
> 	at
> org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:165)
> 	at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:77)
> 	at
> org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)
> 	at
> org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
> 	at
> org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)
> 	at
> org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2866)
> 	... 32 more
>
> Regards,
> Abhilash B.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041960.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

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

Re: Karaf issue - http-client related

Posted by abhilashb <ab...@in.bosch.com>.
Hello, 

When tried to install httocore getting below error - 

Please help me.

Caused by: org.osgi.framework.BundleException: Unable to cache bundle:
mvn:org.apache.httpcomponents/httpcore/4.4.1
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2870)
	at
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
	at org.apache.karaf.bundle.command.Install.doExecute(Install.java:43)
	... 30 more
Caused by: java.io.IOException: Error resolving artifact
org.apache.httpcomponents:httpcore:jar:4.4.1: Could not transfer artifact
org.apache.httpcomponents:httpcore:jar:4.4.1 from/to central
(http://repo1.maven.org/maven2/): Error transferring file: repo1.maven.org
	at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:258)
	at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolveFile(AetherBasedResolver.java:239)
	at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:223)
	at
org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:122)
	at
org.apache.felix.framework.util.SecureAction.getURLConnectionInputStream(SecureAction.java:524)
	at
org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:165)
	at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:77)
	at
org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)
	at
org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
	at
org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)
	at
org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2866)
	... 32 more

Regards,
Abhilash B.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041960.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

Posted by Morgan Hautman <mo...@gmail.com>.
Hi,

I said "httpcore" not httpclient.
That is probably the problem.

Regards,
Morgan
<http://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore>

2015-08-19 14:14 GMT+02:00 <de...@mobigov.com>:

>
>
> did you include core as well for its dependency. This is from my feature
> that has httpclient.
>
>  <bundle>mvn:org.apache.httpcomponents/httpclient-osgi/4.5</bundle>
>  <bundle>mvn:org.apache.httpcomponents/httpcore-osgi/4.4.1</bundle>
>
> On 2015-08-19 08:02, abhilashb wrote:
>
> > Hello,
> >
> > I tried the cmd given by you. But it fails again :(
> >
> > install -s mvn:org.apache.httpcomponents/httpclient-osgi/4.0.1
> >
> > Error - Error executing command: Error installing bundles:
> > Unable to install bundle
> > mvn:org.apache.httpcomponents/httpclient-osgi/4.0.1
> >
> > --
> > View this message in context:
> http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041931.html
> [1]
> > Sent from the Karaf - Dev mailing list archive at Nabble.com.
>
>
> Links:
> ------
> [1]
>
> http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041931.html

Re: Karaf issue - http-client related

Posted by de...@mobigov.com.
 

did you include core as well for its dependency. This is from my feature
that has httpclient. 

 <bundle>mvn:org.apache.httpcomponents/httpclient-osgi/4.5</bundle>
 <bundle>mvn:org.apache.httpcomponents/httpcore-osgi/4.4.1</bundle> 

On 2015-08-19 08:02, abhilashb wrote: 

> Hello,
> 
> I tried the cmd given by you. But it fails again :(
> 
> install -s mvn:org.apache.httpcomponents/httpclient-osgi/4.0.1 
> 
> Error - Error executing command: Error installing bundles:
> Unable to install bundle
> mvn:org.apache.httpcomponents/httpclient-osgi/4.0.1
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041931.html [1]
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
 

Links:
------
[1]
http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041931.html

Re: Karaf issue - http-client related

Posted by abhilashb <ab...@in.bosch.com>.
Hello,

I tried the cmd given by you. But it fails again :(

install -s mvn:org.apache.httpcomponents/httpclient-osgi/4.0.1 

Error - Error executing command: Error installing bundles:
        Unable to install bundle
mvn:org.apache.httpcomponents/httpclient-osgi/4.0.1



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041931.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

Posted by Christian Schneider <ch...@die-schneider.net>.
There are two things wrong here:
1. You used the wrong command
2. From the name I suspect this already is a bundle. So do not wrap it.

install -s mvn:org.apache.httpcomponents/httpclient-osgi/4.0.1

Christian

On 19.08.2015 13:52, abhilashb wrote:
> Hello,
>
> Yes I tried installing the below package by using below cmg -
>
> feature:repo-add wrap:mvn:org.apache.httpcomponents/httpclient-osgi/4.0.1
>
> But it is not allowing me to install. Its throwing below error -
>
> Error executing command: Error resolving artifact
> org.apache.httpcomponents:httpclient-osgi:jar:4.0.1: Could not transfe
> r artifact org.apache.httpcomponents:httpclient-osgi:jar:4.0.1 from/to
> central (http://repo1.maven.org/maven2/): Error t
> ransferring file: repo1.maven.org
>
> Am I not using correct cmd to install the package?
>
> Please guide me to install it. :)
>
> Regards,
> Abhilash B.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041929.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: Karaf issue - http-client related

Posted by abhilashb <ab...@in.bosch.com>.
Hello,

Yes I tried installing the below package by using below cmg -

feature:repo-add wrap:mvn:org.apache.httpcomponents/httpclient-osgi/4.0.1

But it is not allowing me to install. Its throwing below error - 

Error executing command: Error resolving artifact
org.apache.httpcomponents:httpclient-osgi:jar:4.0.1: Could not transfe
r artifact org.apache.httpcomponents:httpclient-osgi:jar:4.0.1 from/to
central (http://repo1.maven.org/maven2/): Error t
ransferring file: repo1.maven.org

Am I not using correct cmd to install the package?

Please guide me to install it. :)

Regards,
Abhilash B.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922p4041929.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue - http-client related

Posted by Morgan Hautman <mo...@gmail.com>.
Ah! My mail went out without noticing :)

so I continue:

It seems like this jar exposes the org.apache.http package:
org.apache.httpcomponents
<http://mvnrepository.com/artifact/org.apache.httpcomponents> » httpcore
<http://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore>
So you need to install that one.

Regards,
Morgan

2015-08-19 13:36 GMT+02:00 Morgan Hautman <mo...@gmail.com>:

> Hi,
>
> I gonna help you understand your problem.
> The problem is you're missing the package "org.apache.http" in karaf.
> So you need to find a bundle/jar who export's that package.
>
>
>
> 2015-08-19 6:19 GMT+02:00 abhilashb <ab...@in.bosch.com>:
>
>> Hi All,
>>
>> I have a small issue.
>>
>>
>>
>> I have used Http-Client in my code. My Manifest file looks like below
>>
>>
>> Manifest-Version: 1.0
>> Bundle-ManifestVersion: 2
>> Bundle-Name: DNGService
>> Created-By: 1.7.0_40 (Oracle Corporation)
>> Bundle-SymbolicName: com.bosch.dng
>> Bundle-Version: 1.0.3
>> Bundle-Activator: com.bosch.dng.Activator
>> Bundle-Vendor: Abhilash
>> Bundle-Localization: plugin
>> Import-Package: org.osgi.framework,org.apache.camel,
>>
>> org.apache.camel.impl,org.apache.camel.builder,org.apache.camel.builder.xml,
>>
>> org.apache.camel.model,org.apache.camel.component,org.apache.camel.component.http,org.apache.camel.core.osgi,org.apache.camel.spi,org.w3c.dom,org.apache.http
>>
>> Error Log :
>>
>> 015-08-18 15:18:23,984 | WARN  | raf-3.0.1/deploy | fileinstall
>> | 11 - org.apache.felix.fileinstall - 3.2.8 | Error while starting bundle:
>>
>> file:/D:/DXA%20Middleware%20Softwares/dexterlabs-dxa_deploy-4250f2d012b0/windows/monitor/karaf/apache-karaf-3.0.1/deploy/com.bosch.dng.jar
>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>> com.bosch.dng [608]: Unable to resolve 608.0: missing requirement [608.0]
>> osgi.wiring.package; (osgi.wiring.package=org.apache.http)
>>         at
>>
>> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)[org.apache.felix.framework-4.2.1.jar:]
>>         at
>>
>> org.apache.felix.framework.Felix.startBundle(Felix.java:2037)[org.apache.felix.framework-4.2.1.jar:]
>>         at
>>
>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)[org.apache.felix.framework-4.2.1.jar:]
>>         at
>>
>> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1263)[11:org.apache.felix.fileinstall:3.2.8]
>>         at
>>
>> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1235)[11:org.apache.felix.fileinstall:3.2.8]
>>         at
>>
>> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:524)[11:org.apache.felix.fileinstall:3.2.8]
>>         at
>>
>> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:308)[11:org.apache.felix.fileinstall:3.2.8]
>>
>>
>> Please provide me the solution 
>>
>> Regards,
>> Abhilash B.
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922.html
>> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>>
>
>

Re: Karaf issue - http-client related

Posted by Morgan Hautman <mo...@gmail.com>.
Hi,

I gonna help you understand your problem.
The problem is you're missing the package "org.apache.http" in karaf.
So you need to find a bundle/jar who export's that package.



2015-08-19 6:19 GMT+02:00 abhilashb <ab...@in.bosch.com>:

> Hi All,
>
> I have a small issue.
>
>
>
> I have used Http-Client in my code. My Manifest file looks like below
>
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: DNGService
> Created-By: 1.7.0_40 (Oracle Corporation)
> Bundle-SymbolicName: com.bosch.dng
> Bundle-Version: 1.0.3
> Bundle-Activator: com.bosch.dng.Activator
> Bundle-Vendor: Abhilash
> Bundle-Localization: plugin
> Import-Package: org.osgi.framework,org.apache.camel,
>
> org.apache.camel.impl,org.apache.camel.builder,org.apache.camel.builder.xml,
>
> org.apache.camel.model,org.apache.camel.component,org.apache.camel.component.http,org.apache.camel.core.osgi,org.apache.camel.spi,org.w3c.dom,org.apache.http
>
> Error Log :
>
> 015-08-18 15:18:23,984 | WARN  | raf-3.0.1/deploy | fileinstall
> | 11 - org.apache.felix.fileinstall - 3.2.8 | Error while starting bundle:
>
> file:/D:/DXA%20Middleware%20Softwares/dexterlabs-dxa_deploy-4250f2d012b0/windows/monitor/karaf/apache-karaf-3.0.1/deploy/com.bosch.dng.jar
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> com.bosch.dng [608]: Unable to resolve 608.0: missing requirement [608.0]
> osgi.wiring.package; (osgi.wiring.package=org.apache.http)
>         at
>
> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)[org.apache.felix.framework-4.2.1.jar:]
>         at
>
> org.apache.felix.framework.Felix.startBundle(Felix.java:2037)[org.apache.felix.framework-4.2.1.jar:]
>         at
>
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)[org.apache.felix.framework-4.2.1.jar:]
>         at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1263)[11:org.apache.felix.fileinstall:3.2.8]
>         at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1235)[11:org.apache.felix.fileinstall:3.2.8]
>         at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:524)[11:org.apache.felix.fileinstall:3.2.8]
>         at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:308)[11:org.apache.felix.fileinstall:3.2.8]
>
>
> Please provide me the solution 
>
> Regards,
> Abhilash B.
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Karaf-issue-http-client-related-tp4041922.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>