Looks like is is caused by some subtle class loading issue.
The only I can recommend is to debug a call done by the client in a
non-GWT environment, check how it find the conduit initiator (it is at
the top of the call chain, easy to debug), and then repeat the process
in a GWT context and see what is going wrong...
Cheers, Sergey
On 16/10/14 11:51, David Roldan Puig wrote:
The mailing list is the last option I had.
I send attached the jars dependencies in my project and also I paste the
stacktrace if you find more info than me.
oct 16, 2014 12:48:24 PM org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
Advertencia: Interceptor for
{http://clientAPIRest.shared.us2p.uitu.com/}DomainsAPI has thrown
exception, unwinding now
org.apache.cxf.interceptor.Fault: No conduit initiator was found for the
namespace http://cxf.apache.org/transports/http.
at
org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:116)
at
org.apache.cxf.endpoint.UpfrontConduitSelector.selectConduit(UpfrontConduitSelector.java:77)
at org.apache.cxf.message.ExchangeImpl.getConduit(ExchangeImpl.java:148)
at
org.apache.cxf.interceptor.MessageSenderInterceptor.getConduit(MessageSenderInterceptor.java:71)
at
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
....
What is the best option? What can I do?
Thanks
Regards
*David Roldán*
*
*
*UITU: Ubiquitous Internet Technologies Unit *
http://fi2.cat/uitudesc
*i2CAT FOUNDATION*
Gran Capità 2-4 (Nexus I building)
2nd Floor, office 203; 08034 Barcelona
+34 93 553 26 33
2014-10-16 12:39 GMT+02:00 Vassilis Virvilis <[email protected]
<mailto:[email protected]>>:
Hi David,
You don't have to use Resty-GWT. I misunderstood your setup. I
thought you were trying to reach CXF from the GWT client side.
Unfortunately I don't know why it doesn't work from GWT server side.
It should work... Maybe check dependencies - GWT jars bundle some
dependencies inline...
Vassilis
On 10/16/2014 01:28 PM, David Roldan Puig wrote:
Hello Vassilis.
Yes I know it, My client is in the server side of GWT (2.6.1)
I have a service that is called in a Async way and the code is
inside it,
just in the server part of the project
The error is generated when the thread executes the line: Response
response = resource.getDomains();
But is it necessary to import resty-gwt jar to the project?
Is it necessary to define<inherits
name="org.fusesource.restygwt.__RestyGWT"/>
in my gwt.xml?
thanks
*David Roldán*
*UITU: Ubiquitous Internet Technologies Unit *
http://fi2.cat/uitudesc
*i2CAT FOUNDATION*
Gran Capità 2-4 (Nexus I building)
2nd Floor, office 203; 08034 Barcelona
+34 93 553 26 33 <tel:%2B34%2093%20553%2026%2033>
2014-10-16 12:05 GMT+02:00 Vassilis Virvilis
<[email protected] <mailto:[email protected]>>:
Hi David,
I am not 100% sure but looks like that you try to use cxf
jax-rs client in
GWT client side. I am afraid this is not possible. GWT is a
java to
javascript compiler and only certain - blessed/specially
crafted GWT
specific jars are allowed client side.
I have used Resty-GWT http://resty-gwt.github.io/ as a
client for CXF
services with great success.
Vassilis
On 10/16/2014 12:59 PM, David Roldan Puig wrote:
Hello,
I would like to create an APIRest Client in a WebProject
with Google Web
toolkit (GWT 2.6.1). I am using CXF in order to use my
interfaces to get
the client.
I use this code to obtain the client in the
serviceImplementation class
inside a package in the server of GWT project:
DomainsAPI resource = JAXRSClientFactory.create("
http://localhost:9998/api/v1/"__, DomainsAPI.class,
providers);
WebClient.client(resource).__header("X-USER",
userKey).accept(MediaType.__APPLICATION_JSON);
ObjectMapper mapper = new ObjectMapper();
Response response = resource.getDomains();
String hp = response.readEntity(String.__class);
Domain[] dd = mapper.readValue(hp, Domain[].class);
...
POM configuration:
<dependencies>
<dependency>
<groupId>com.google.gwt</__groupId>
<artifactId>gwt-servlet</__artifactId>
<version>2.6.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</__groupId>
<artifactId>gwt-user</__artifactId>
<version>2.6.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</__groupId>
<artifactId>cxf-rt-transports-__http</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</__groupId>
<artifactId>cxf-rt-rs-client</__artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson<__/groupId>
<artifactId>jackson-jaxrs</__artifactId>
<version>1.9.13</version>
</dependency>
</dependencies>
This code is processed but when resource.getDomains() is
called, I obtain
the typical error with GWT and CXF:
Advertencia: Interceptor for {
http://clientAPIRest.shared.__us2p.uitu.com/}DomainsAPI
<http://clientAPIRest.shared.us2p.uitu.com/%7DDomainsAPI> has
thrown
exception,
unwinding now
org.apache.cxf.interceptor.__Fault: No conduit initiator
was found for the
namespace http://cxf.apache.org/__transports/http
<http://cxf.apache.org/transports/http>.
....
Caused by: org.apache.cxf.BusException: No conduit
initiator was found for
the namespace http://cxf.apache.org/__transports/http
<http://cxf.apache.org/transports/http>.
at
org.apache.cxf.bus.managers.__ConduitInitiatorManagerImpl.
getConduitInitiator(__ConduitInitiatorManagerImpl.__java:110)
at
org.apache.cxf.endpoint.__AbstractConduitSelector.__getSelectedConduit(
AbstractConduitSelector.java:__104)
....
But, if I try this code in a stand alone maven project
with its
dependencies works properly. The sample code is the same
as above and the
dependencies in POM maven are the following:
<dependencies>
<dependency>
<groupId>org.apache.cxf</__groupId>
<artifactId>cxf-rt-transports-__http</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</__groupId>
<artifactId>cxf-rt-rs-client</__artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
I don't know exactly where is the problem. I saw lots of
comments about
CXF
dependencies but no one is the solution I amb looking for.
The project works without GWT so the problem is in the
integration between
them, I don't know exactly.
I hope your help.
Thanks a lot.
Regards
*David Roldán*
*UITU: Ubiquitous Internet Technologies Unit *
http://fi2.cat/uitudesc
*i2CAT FOUNDATION*
Gran Capità 2-4 (Nexus I building)
2nd Floor, office 203; 08034 Barcelona
+34 93 553 26 33 <tel:%2B34%2093%20553%2026%2033>
--
____________________________________
Vassilis Virvilis Ph.D.
Head of IT
Biovista Inc.
US Offices
2421 Ivy Road
Charlottesville, VA 22903
USA
T: +1.434.971.1141 <tel:%2B1.434.971.1141>
F: +1.434.971.1144 <tel:%2B1.434.971.1144>
European Offices
34 Rodopoleos Street
Ellinikon, Athens 16777
GREECE
T: +30.210.9629848 <tel:%2B30.210.9629848>
F: +30.210.9647606 <tel:%2B30.210.9647606>
www.biovista.com <http://www.biovista.com>
Biovista is a privately held biotechnology company that
finds novel uses
for existing drugs, and profiles their side effects using
their mechanism
of action. Biovista develops its own pipeline of drugs in
CNS, oncology,
auto-immune and rare diseases. Biovista is collaborating with
biopharmaceutical companies on indication expansion and
de-risking of their
portfolios and with the FDA on adverse event prediction.
--
____________________________________
Vassilis Virvilis Ph.D.
Head of IT
Biovista Inc.
US Offices
2421 Ivy Road
Charlottesville, VA 22903
USA
T: +1.434.971.1141 <tel:%2B1.434.971.1141>
F: +1.434.971.1144 <tel:%2B1.434.971.1144>
European Offices
34 Rodopoleos Street
Ellinikon, Athens 16777
GREECE
T: +30.210.9629848 <tel:%2B30.210.9629848>
F: +30.210.9647606 <tel:%2B30.210.9647606>
www.biovista.com <http://www.biovista.com>
Biovista is a privately held biotechnology company that finds novel
uses for existing drugs, and profiles their side effects using their
mechanism of action. Biovista develops its own pipeline of drugs in
CNS, oncology, auto-immune and rare diseases. Biovista is
collaborating with biopharmaceutical companies on indication
expansion and de-risking of their portfolios and with the FDA on
adverse event prediction.