You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by David Roldan Puig <da...@i2cat.net> on 2014/10/16 11:59:23 UTC

CFX issue with GWT

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 has thrown exception,
unwinding now
org.apache.cxf.interceptor.Fault: No conduit initiator was found for the
namespace 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.
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

Re: CFX issue with GWT

Posted by David Roldan Puig <da...@i2cat.net>.
Hello Daniel.

Always the same error, it doesn't depend on the jars I have in the project.
So, the error is form another thing, that it is impossible to find. Maybe
it is because classpath configuration, etc. I'm not GWT expert so it is
possible that the problem is in the project configuration.

Attached you could find maven depency tree of the project with all the jars
and versions.

If you see something, tell me, please.

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

2014-10-21 22:37 GMT+02:00 Daniel Kulp <dk...@apache.org>:

>
> > On Oct 21, 2014, at 12:43 PM, David Roldan Puig <da...@i2cat.net>
> wrote:
> >
> > Hello Daniel.
> >
> > Thanks for the answer.
> >
> > Executing the sentence;:
> >
> System.out.println(Collections.list(Thread.currentThread().getContextClassLoader().getResources("META-INF/cxf/bus-extensions.txt")));
> > the
> > result is an empty []
> >
> > However in the list of jars within /lib folder we could find all the
> needed
> > jars as for exemple cxf-rt-trasnports-http-2.2.3 and ....
> http-jetty-2.2.3
> >
> > If I generate the file "bus-extensions.txt" in the folder META-INF/cxf/
> the
> > result of the sentence is:
> >
> [jar:file:/C:/Users/i2Cat/.m2/repository/org/apache/cxf/cxf-core/3.0.1/cxf-core-3.0.1.jar!/META-INF/cxf/bus-extensions.txt]
>
> Wait….  you have a mix of CXF 3.0.1 and 2.2.3?    That would certainly be
> problematic.
>
> Dan
>
>
>
>
> >
> > I d0n't know exactly who generate this file and what is the content
> inside
> > it.
> >
> > the code is the following:
> > _________________________________________________________________________
> >
> >
> *System.out.println(Collections.list(Thread.currentThread().getContextClassLoader().getResources("META-INF/cxf/bus-extensions.txt")));
> > *
> > *DomainsAPI resource =
> > JAXRSClientFactory.create("http://localhost:9998/api/v1/
> > <http://localhost:9998/api/v1/>", DomainsAPI.class);*
> > *WebClient.client(resource).header("X-USER",
> > "super_admin_key").accept(MediaType.APPLICATION_JSON);        *
> > *List<Domain> response = resource.getDomains();  *
> > _________________________________________________________________________
> >
> >
> > I don't understand where is tehe problem. Maybe GWT configuratin is not
> > correct.. or something similar.
> >
> > I need your help.
> > 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
> >
> > 2014-10-20 20:33 GMT+02:00 Daniel Kulp <dk...@apache.org>:
> >
> >>
> >> You aren’t doing something silly like creating some sort of uber-jar or
> >> combining jars together or similar, are you?   That would certainly
> cause
> >> this.
> >>
> >> In your code someplace, try doing something like:
> >>
> >> System.out.println(Collections.list(getClass().getClassLoader()
> >>
> >> .getResources("META-INF/cxf/bus-extensions.txt")));
> >>
> >>
> >> (possibly with the Thread.contextClassloader() instead of the
> >> getClass().getClassLoader() call)
> >>
> >> and make sure it’s printing out a bunch of locations and not one.   More
> >> importantly, make sure the one in cxf-rt-transports-http is in the list.
> >>
> >>
> >> Dan
> >>
> >>
> >>
> >>> On Oct 16, 2014, at 5:59 AM, David Roldan Puig <david.roldan@i2cat.net
> >
> >> 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 has thrown
> >> exception,
> >>> unwinding now
> >>> org.apache.cxf.interceptor.Fault: No conduit initiator was found for
> the
> >>> namespace 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.
> >>> 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
> >>
> >> --
> >> Daniel Kulp
> >> dkulp@apache.org - http://dankulp.com/blog
> >> Talend Community Coder - http://coders.talend.com
> >>
> >>
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>

Re: CFX issue with GWT

Posted by Daniel Kulp <dk...@apache.org>.
> On Oct 21, 2014, at 12:43 PM, David Roldan Puig <da...@i2cat.net> wrote:
> 
> Hello Daniel.
> 
> Thanks for the answer.
> 
> Executing the sentence;:
> System.out.println(Collections.list(Thread.currentThread().getContextClassLoader().getResources("META-INF/cxf/bus-extensions.txt")));
> the
> result is an empty []
> 
> However in the list of jars within /lib folder we could find all the needed
> jars as for exemple cxf-rt-trasnports-http-2.2.3 and .... http-jetty-2.2.3
> 
> If I generate the file "bus-extensions.txt" in the folder META-INF/cxf/ the
> result of the sentence is:
> [jar:file:/C:/Users/i2Cat/.m2/repository/org/apache/cxf/cxf-core/3.0.1/cxf-core-3.0.1.jar!/META-INF/cxf/bus-extensions.txt]

Wait….  you have a mix of CXF 3.0.1 and 2.2.3?    That would certainly be problematic.

Dan




> 
> I d0n't know exactly who generate this file and what is the content inside
> it.
> 
> the code is the following:
> _________________________________________________________________________
> 
> *System.out.println(Collections.list(Thread.currentThread().getContextClassLoader().getResources("META-INF/cxf/bus-extensions.txt")));
> *
> *DomainsAPI resource =
> JAXRSClientFactory.create("http://localhost:9998/api/v1/
> <http://localhost:9998/api/v1/>", DomainsAPI.class);*
> *WebClient.client(resource).header("X-USER",
> "super_admin_key").accept(MediaType.APPLICATION_JSON);        *
> *List<Domain> response = resource.getDomains();  *
> _________________________________________________________________________
> 
> 
> I don't understand where is tehe problem. Maybe GWT configuratin is not
> correct.. or something similar.
> 
> I need your help.
> 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
> 
> 2014-10-20 20:33 GMT+02:00 Daniel Kulp <dk...@apache.org>:
> 
>> 
>> You aren’t doing something silly like creating some sort of uber-jar or
>> combining jars together or similar, are you?   That would certainly cause
>> this.
>> 
>> In your code someplace, try doing something like:
>> 
>> System.out.println(Collections.list(getClass().getClassLoader()
>> 
>> .getResources("META-INF/cxf/bus-extensions.txt")));
>> 
>> 
>> (possibly with the Thread.contextClassloader() instead of the
>> getClass().getClassLoader() call)
>> 
>> and make sure it’s printing out a bunch of locations and not one.   More
>> importantly, make sure the one in cxf-rt-transports-http is in the list.
>> 
>> 
>> Dan
>> 
>> 
>> 
>>> On Oct 16, 2014, at 5:59 AM, David Roldan Puig <da...@i2cat.net>
>> 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 has thrown
>> exception,
>>> unwinding now
>>> org.apache.cxf.interceptor.Fault: No conduit initiator was found for the
>>> namespace 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.
>>> 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
>> 
>> --
>> Daniel Kulp
>> dkulp@apache.org - http://dankulp.com/blog
>> Talend Community Coder - http://coders.talend.com
>> 
>> 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: CFX issue with GWT

Posted by David Roldan Puig <da...@i2cat.net>.
Hello Daniel.

Thanks for the answer.

Executing the sentence;:
System.out.println(Collections.list(Thread.currentThread().getContextClassLoader().getResources("META-INF/cxf/bus-extensions.txt")));
the
result is an empty []

However in the list of jars within /lib folder we could find all the needed
jars as for exemple cxf-rt-trasnports-http-2.2.3 and .... http-jetty-2.2.3

If I generate the file "bus-extensions.txt" in the folder META-INF/cxf/ the
result of the sentence is:
[jar:file:/C:/Users/i2Cat/.m2/repository/org/apache/cxf/cxf-core/3.0.1/cxf-core-3.0.1.jar!/META-INF/cxf/bus-extensions.txt]

I d0n't know exactly who generate this file and what is the content inside
it.

the code is the following:
_________________________________________________________________________

*System.out.println(Collections.list(Thread.currentThread().getContextClassLoader().getResources("META-INF/cxf/bus-extensions.txt")));
*
*DomainsAPI resource =
JAXRSClientFactory.create("http://localhost:9998/api/v1/
<http://localhost:9998/api/v1/>", DomainsAPI.class);*
*WebClient.client(resource).header("X-USER",
"super_admin_key").accept(MediaType.APPLICATION_JSON);        *
*List<Domain> response = resource.getDomains();  *
_________________________________________________________________________


I don't understand where is tehe problem. Maybe GWT configuratin is not
correct.. or something similar.

I need your help.
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

2014-10-20 20:33 GMT+02:00 Daniel Kulp <dk...@apache.org>:

>
> You aren’t doing something silly like creating some sort of uber-jar or
> combining jars together or similar, are you?   That would certainly cause
> this.
>
> In your code someplace, try doing something like:
>
> System.out.println(Collections.list(getClass().getClassLoader()
>
> .getResources("META-INF/cxf/bus-extensions.txt")));
>
>
> (possibly with the Thread.contextClassloader() instead of the
> getClass().getClassLoader() call)
>
> and make sure it’s printing out a bunch of locations and not one.   More
> importantly, make sure the one in cxf-rt-transports-http is in the list.
>
>
> Dan
>
>
>
> > On Oct 16, 2014, at 5:59 AM, David Roldan Puig <da...@i2cat.net>
> 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 has thrown
> exception,
> > unwinding now
> > org.apache.cxf.interceptor.Fault: No conduit initiator was found for the
> > namespace 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.
> > 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
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>

Re: CFX issue with GWT

Posted by Daniel Kulp <dk...@apache.org>.
You aren’t doing something silly like creating some sort of uber-jar or combining jars together or similar, are you?   That would certainly cause this.  

In your code someplace, try doing something like:

System.out.println(Collections.list(getClass().getClassLoader()
                                            .getResources("META-INF/cxf/bus-extensions.txt")));


(possibly with the Thread.contextClassloader() instead of the getClass().getClassLoader() call)

and make sure it’s printing out a bunch of locations and not one.   More importantly, make sure the one in cxf-rt-transports-http is in the list.


Dan



> On Oct 16, 2014, at 5:59 AM, David Roldan Puig <da...@i2cat.net> 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 has thrown exception,
> unwinding now
> org.apache.cxf.interceptor.Fault: No conduit initiator was found for the
> namespace 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.
> 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

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: CFX issue with GWT

Posted by Jose María Zaragoza <de...@gmail.com>.
2014-10-16 15:43 GMT+02:00 David Roldan Puig <da...@i2cat.net>:

> Hello Sergey.
> Thanks for the answer.
>
> Has GWT the same classpath for client and server packages?
> Maybe, it is necessary ot add   <source path='server' /> in the .gwt.xml
> file in order to have the same classpath?
>
> Thanks.
>
>
>

Hi David:

I'm using CXF and GWT  ( server side, obviously ) without any issue.
I'm afraid that GWT  ( server side, obviously) hasn't to do with your
problem

Indeed, probably your server side is implemented with a servlet ( for
example, I use Spring MVC )


It could be a problem with your CLASSPATH. In a web application, the best
place is WEB-INF/lib




>
>
>
> *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 15:09 GMT+02:00 Sergey Beryozkin <sb...@gmail.com>:
>
> > 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 <v.virvilis@biovista.com
> >> <ma...@biovista.com>>:
> >>
> >>     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
> >>         <v.virvilis@biovista.com <ma...@biovista.com>>:
> >>
> >>             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://us2p.uitu.com/%7DDomainsAPI>
> >>                 <
> 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.
> >>
> >>
> >>
> >>
> >
>

Re: CFX issue with GWT

Posted by David Roldan Puig <da...@i2cat.net>.
Hello Sergey.

Answering your request, say that in the GWT project conduit is null in the
class UpfrontConduitSelector.class line 76 so the code goes to
getSelecteConduit with a {} message in AbstractConduitSelector.class line
101.

Here I have the Fault() : org.apache.cxf.BusException: No conduit initiator
was found for the namespace http://cxf.apache.org/transports/http.


If I work with the project without GWT, message is not {}. the object is
correct.

I will chexk where the message object is created.

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

2014-10-16 15:43 GMT+02:00 David Roldan Puig <da...@i2cat.net>:

> Hello Sergey.
> Thanks for the answer.
>
> Has GWT the same classpath for client and server packages?
> Maybe, it is necessary ot add   <source path='server' /> in the .gwt.xml
> file in order to have the same classpath?
>
> 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
>
> 2014-10-16 15:09 GMT+02:00 Sergey Beryozkin <sb...@gmail.com>:
>
>> 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 <v.virvilis@biovista.com
>>> <ma...@biovista.com>>:
>>>
>>>     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
>>>         <v.virvilis@biovista.com <ma...@biovista.com>>:
>>>
>>>             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://us2p.uitu.com/%7DDomainsAPI>
>>>                 <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.
>>>
>>>
>>>
>>>
>>
>

Re: CFX issue with GWT

Posted by David Roldan Puig <da...@i2cat.net>.
Hello Sergey.
Thanks for the answer.

Has GWT the same classpath for client and server packages?
Maybe, it is necessary ot add   <source path='server' /> in the .gwt.xml
file in order to have the same classpath?

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

2014-10-16 15:09 GMT+02:00 Sergey Beryozkin <sb...@gmail.com>:

> 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 <v.virvilis@biovista.com
>> <ma...@biovista.com>>:
>>
>>     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
>>         <v.virvilis@biovista.com <ma...@biovista.com>>:
>>
>>             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://us2p.uitu.com/%7DDomainsAPI>
>>                 <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.
>>
>>
>>
>>
>

Re: CFX issue with GWT

Posted by Sergey Beryozkin <sb...@gmail.com>.
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 <v.virvilis@biovista.com
> <ma...@biovista.com>>:
>
>     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
>         <v.virvilis@biovista.com <ma...@biovista.com>>:
>
>             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.
>
>
>


Re: CFX issue with GWT

Posted by David Roldan Puig <da...@i2cat.net>.
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 <v....@biovista.com>:

> 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
>>
>> 2014-10-16 12:05 GMT+02:00 Vassilis Virvilis <v....@biovista.com>:
>>
>>  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 has thrown
>>>> exception,
>>>> unwinding now
>>>> org.apache.cxf.interceptor.Fault: No conduit initiator was found for
>>>> the
>>>> namespace 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.
>>>> 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
>>>>
>>>>
>>>>  --
>>>
>>> __________________________________
>>>
>>> Vassilis Virvilis Ph.D.
>>> Head of IT
>>> Biovista Inc.
>>>
>>> US Offices
>>> 2421 Ivy Road
>>> Charlottesville, VA 22903
>>> USA
>>> T: +1.434.971.1141
>>> F: +1.434.971.1144
>>>
>>> European Offices
>>> 34 Rodopoleos Street
>>> Ellinikon, Athens 16777
>>> GREECE
>>> T: +30.210.9629848
>>> F: +30.210.9647606
>>>
>>> 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
> F: +1.434.971.1144
>
> European Offices
> 34 Rodopoleos Street
> Ellinikon, Athens 16777
> GREECE
> T: +30.210.9629848
> F: +30.210.9647606
>
> 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.
>
>
>

Re: CFX issue with GWT

Posted by Vassilis Virvilis <v....@biovista.com>.
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
>
> 2014-10-16 12:05 GMT+02:00 Vassilis Virvilis <v....@biovista.com>:
>
>> 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 has thrown
>>> exception,
>>> unwinding now
>>> org.apache.cxf.interceptor.Fault: No conduit initiator was found for the
>>> namespace 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.
>>> 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
>>>
>>>
>> --
>>
>> __________________________________
>>
>> Vassilis Virvilis Ph.D.
>> Head of IT
>> Biovista Inc.
>>
>> US Offices
>> 2421 Ivy Road
>> Charlottesville, VA 22903
>> USA
>> T: +1.434.971.1141
>> F: +1.434.971.1144
>>
>> European Offices
>> 34 Rodopoleos Street
>> Ellinikon, Athens 16777
>> GREECE
>> T: +30.210.9629848
>> F: +30.210.9647606
>>
>> 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
F: +1.434.971.1144

European Offices
34 Rodopoleos Street
Ellinikon, Athens 16777
GREECE
T: +30.210.9629848
F: +30.210.9647606

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.



Re: CFX issue with GWT

Posted by David Roldan Puig <da...@i2cat.net>.
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

2014-10-16 12:05 GMT+02:00 Vassilis Virvilis <v....@biovista.com>:

> 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 has thrown
>> exception,
>> unwinding now
>> org.apache.cxf.interceptor.Fault: No conduit initiator was found for the
>> namespace 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.
>> 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
>>
>>
> --
>
> __________________________________
>
> Vassilis Virvilis Ph.D.
> Head of IT
> Biovista Inc.
>
> US Offices
> 2421 Ivy Road
> Charlottesville, VA 22903
> USA
> T: +1.434.971.1141
> F: +1.434.971.1144
>
> European Offices
> 34 Rodopoleos Street
> Ellinikon, Athens 16777
> GREECE
> T: +30.210.9629848
> F: +30.210.9647606
>
> 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.
>
>
>

Re: CFX issue with GWT

Posted by Vassilis Virvilis <v....@biovista.com>.
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 has thrown exception,
> unwinding now
> org.apache.cxf.interceptor.Fault: No conduit initiator was found for the
> namespace 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.
> 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
>

-- 

__________________________________

Vassilis Virvilis Ph.D.
Head of IT
Biovista Inc.

US Offices
2421 Ivy Road
Charlottesville, VA 22903
USA
T: +1.434.971.1141
F: +1.434.971.1144

European Offices
34 Rodopoleos Street
Ellinikon, Athens 16777
GREECE
T: +30.210.9629848
F: +30.210.9647606

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.