FAQ
Hi bc,

Thanks for filing the bug ticket. Using the comments on the ticket I tried updating the version of CXF to 2.7.6 to see if that corrects the problem. I cloned the git repo and made another project as a "client" that depends on the CM API (mvn dependency:tree attached). CXF starts to use XML to communicate to the CM server. I'm unsure if I'm missing an additional new dependency that I need to include to use JSON in addition to the Jackson-jaxrs-json-provider already included. I also tried using the original CXF 2.5.5 dependency and downgrading the Jackson dependency to 2.1.4 and I get a different error. The JacksonJsonProvider gets used from CXF but it has trouble unmarshalling the object. That error is also attached.

Thanks,
Eric

-----Original Message-----
From: bc Wong
Sent: Wednesday, August 21, 2013 2:45 AM
To: Eric Nagler
Cc: scm-users@cloudera.org
Subject: Re: JAX Parsing Exception when using Cloudera Manager 4.6

I did a bit of debugging. Seems to be a CXF problem. Filed https://issues.apache.org/jira/browse/CXF-5220.

Is there any chance you could switch to Jackson 2.1?

Cheers,
bc
On Tue, Aug 20, 2013 at 4:48 PM, Eric Nagler wrote:
Hi bc,

I've been playing with the dependencies that we use in our project here, based on the mvn dependency tree that you sent me. I made a new blank maven project but it inherited from our projects managed dependencies. We are using Jackson 2.2.2 in our project. We do not change the underlying provider or provide any system properties. We have also tried running it from outside of IntelliJ and we are still getting the issue. I've attached our mvn dependency:tree to this e-mail, so you can take a look at it.

Thanks,
Eric

-----Original Message-----
From: bc Wong
Sent: Tuesday, August 20, 2013 1:05 PM
To: Eric Nagler
Cc: scm-users@cloudera.org
Subject: Re: JAX Parsing Exception when using Cloudera Manager 4.6

Hi Eric,

Your code works fine in my setup (also running in intellij). One difference is that your project is using the JSONProvider for deserialization. My setup uses the JacksonJsonProvider, which is specified in the ClouderaManagerClientBuillder when constructing the client. I believe that's the problem. Do you have other weird settings that choose a different provider?

I'm attaching my pom, and the output of `mvn dependency:tree'. Hope that helps.

Cheers,
bc
On Tue, Aug 20, 2013 at 7:44 AM, Eric Nagler wrote:
I’m using Cloudera manager 4.6 and I wanted to start using the Java API.
When I set up a new blank Maven project with the 4.6.0 version of the
cloudera manager API, I receive a JAX parsing exception (dependency
is below). I think it has to do with JAX unable to unmarshal the json
objects being retrieved from the managers web service. The code I’m
trying to run is the sample code on the github project for connecting
and getting a list of the ClusterResources. I've attached the code
for reference and the error that I am receiving also.

I tried running the same python code to get a list of clusters and it
works correctly. Similarly, the hostname and user names / passwords
are correct because when I curl or enter the url in a web browser I
get the json from the server back.

Thanks,
Eric

<dependency>
<groupId>com.cloudera.api</groupId>
<artifactId>cloudera-manager-api</artifactId>
<version>4.6.0</version>
</dependency>

To unsubscribe from this group and stop receiving emails from it,
send an email to scm-users+unsubscribe@cloudera.org.
To unsubscribe from this group and stop receiving emails from it, send an email to scm-users+unsubscribe@cloudera.org.

Search Discussions

  • bc Wong at Aug 21, 2013 at 6:00 pm
    I know, I tried that. There are ways to get around the XML problem.
    But at the end of the day, CXF 2.7.6 does _not_ work with Jackson 2.2.
    It still prefers the JSONProvider to the JacksonJsonProvider.

    Cheers,
    bc
    On Wed, Aug 21, 2013 at 10:03 AM, Eric Nagler wrote:
    Hi bc,

    Thanks for filing the bug ticket. Using the comments on the ticket I tried updating the version of CXF to 2.7.6 to see if that corrects the problem. I cloned the git repo and made another project as a "client" that depends on the CM API (mvn dependency:tree attached). CXF starts to use XML to communicate to the CM server. I'm unsure if I'm missing an additional new dependency that I need to include to use JSON in addition to the Jackson-jaxrs-json-provider already included. I also tried using the original CXF 2.5.5 dependency and downgrading the Jackson dependency to 2.1.4 and I get a different error. The JacksonJsonProvider gets used from CXF but it has trouble unmarshalling the object. That error is also attached.

    Thanks,
    Eric

    -----Original Message-----
    From: bc Wong
    Sent: Wednesday, August 21, 2013 2:45 AM
    To: Eric Nagler
    Cc: scm-users@cloudera.org
    Subject: Re: JAX Parsing Exception when using Cloudera Manager 4.6

    I did a bit of debugging. Seems to be a CXF problem. Filed https://issues.apache.org/jira/browse/CXF-5220.

    Is there any chance you could switch to Jackson 2.1?

    Cheers,
    bc
    On Tue, Aug 20, 2013 at 4:48 PM, Eric Nagler wrote:
    Hi bc,

    I've been playing with the dependencies that we use in our project here, based on the mvn dependency tree that you sent me. I made a new blank maven project but it inherited from our projects managed dependencies. We are using Jackson 2.2.2 in our project. We do not change the underlying provider or provide any system properties. We have also tried running it from outside of IntelliJ and we are still getting the issue. I've attached our mvn dependency:tree to this e-mail, so you can take a look at it.

    Thanks,
    Eric

    -----Original Message-----
    From: bc Wong
    Sent: Tuesday, August 20, 2013 1:05 PM
    To: Eric Nagler
    Cc: scm-users@cloudera.org
    Subject: Re: JAX Parsing Exception when using Cloudera Manager 4.6

    Hi Eric,

    Your code works fine in my setup (also running in intellij). One difference is that your project is using the JSONProvider for deserialization. My setup uses the JacksonJsonProvider, which is specified in the ClouderaManagerClientBuillder when constructing the client. I believe that's the problem. Do you have other weird settings that choose a different provider?

    I'm attaching my pom, and the output of `mvn dependency:tree'. Hope that helps.

    Cheers,
    bc
    On Tue, Aug 20, 2013 at 7:44 AM, Eric Nagler wrote:
    I’m using Cloudera manager 4.6 and I wanted to start using the Java API.
    When I set up a new blank Maven project with the 4.6.0 version of the
    cloudera manager API, I receive a JAX parsing exception (dependency
    is below). I think it has to do with JAX unable to unmarshal the json
    objects being retrieved from the managers web service. The code I’m
    trying to run is the sample code on the github project for connecting
    and getting a list of the ClusterResources. I've attached the code
    for reference and the error that I am receiving also.

    I tried running the same python code to get a list of clusters and it
    works correctly. Similarly, the hostname and user names / passwords
    are correct because when I curl or enter the url in a web browser I
    get the json from the server back.

    Thanks,
    Eric

    <dependency>
    <groupId>com.cloudera.api</groupId>
    <artifactId>cloudera-manager-api</artifactId>
    <version>4.6.0</version>
    </dependency>

    To unsubscribe from this group and stop receiving emails from it,
    send an email to scm-users+unsubscribe@cloudera.org.
    To unsubscribe from this group and stop receiving emails from it, send an email to scm-users+unsubscribe@cloudera.org.
  • bc Wong at Aug 22, 2013 at 4:52 am
    Hi Eric,

    I followed the comment in the CXF jira and tried again. CXF 2.7.6 does
    work, but then you'd hit the XML problem. (I didn't clean my mvn
    properly.)

    I can tell you what the XML fix is. One workaround is to build your
    own client library (with that fix).
    * Start from https://github.com/cloudera/cm_api/tree/master/java
    * Add the following annotation to the ApiRootResource class
    https://github.com/cloudera/cm_api/blob/master/java/src/main/java/com/cloudera/api/ApiRootResource.java#L33

      @Path("/")
    +@Consumes({ MediaType.APPLICATION_JSON })
    +@Produces({ MediaType.APPLICATION_JSON })
      public interface ApiRootResource {


    Cheers,
    bc
    On Wed, Aug 21, 2013 at 10:59 AM, bc Wong wrote:
    I know, I tried that. There are ways to get around the XML problem.
    But at the end of the day, CXF 2.7.6 does _not_ work with Jackson 2.2.
    It still prefers the JSONProvider to the JacksonJsonProvider.

    Cheers,
    bc
    On Wed, Aug 21, 2013 at 10:03 AM, Eric Nagler wrote:
    Hi bc,

    Thanks for filing the bug ticket. Using the comments on the ticket I tried updating the version of CXF to 2.7.6 to see if that corrects the problem. I cloned the git repo and made another project as a "client" that depends on the CM API (mvn dependency:tree attached). CXF starts to use XML to communicate to the CM server. I'm unsure if I'm missing an additional new dependency that I need to include to use JSON in addition to the Jackson-jaxrs-json-provider already included. I also tried using the original CXF 2.5.5 dependency and downgrading the Jackson dependency to 2.1.4 and I get a different error. The JacksonJsonProvider gets used from CXF but it has trouble unmarshalling the object. That error is also attached.

    Thanks,
    Eric

    -----Original Message-----
    From: bc Wong
    Sent: Wednesday, August 21, 2013 2:45 AM
    To: Eric Nagler
    Cc: scm-users@cloudera.org
    Subject: Re: JAX Parsing Exception when using Cloudera Manager 4.6

    I did a bit of debugging. Seems to be a CXF problem. Filed https://issues.apache.org/jira/browse/CXF-5220.

    Is there any chance you could switch to Jackson 2.1?

    Cheers,
    bc
    On Tue, Aug 20, 2013 at 4:48 PM, Eric Nagler wrote:
    Hi bc,

    I've been playing with the dependencies that we use in our project here, based on the mvn dependency tree that you sent me. I made a new blank maven project but it inherited from our projects managed dependencies. We are using Jackson 2.2.2 in our project. We do not change the underlying provider or provide any system properties. We have also tried running it from outside of IntelliJ and we are still getting the issue. I've attached our mvn dependency:tree to this e-mail, so you can take a look at it.

    Thanks,
    Eric

    -----Original Message-----
    From: bc Wong
    Sent: Tuesday, August 20, 2013 1:05 PM
    To: Eric Nagler
    Cc: scm-users@cloudera.org
    Subject: Re: JAX Parsing Exception when using Cloudera Manager 4.6

    Hi Eric,

    Your code works fine in my setup (also running in intellij). One difference is that your project is using the JSONProvider for deserialization. My setup uses the JacksonJsonProvider, which is specified in the ClouderaManagerClientBuillder when constructing the client. I believe that's the problem. Do you have other weird settings that choose a different provider?

    I'm attaching my pom, and the output of `mvn dependency:tree'. Hope that helps.

    Cheers,
    bc
    On Tue, Aug 20, 2013 at 7:44 AM, Eric Nagler wrote:
    I’m using Cloudera manager 4.6 and I wanted to start using the Java API.
    When I set up a new blank Maven project with the 4.6.0 version of the
    cloudera manager API, I receive a JAX parsing exception (dependency
    is below). I think it has to do with JAX unable to unmarshal the json
    objects being retrieved from the managers web service. The code I’m
    trying to run is the sample code on the github project for connecting
    and getting a list of the ClusterResources. I've attached the code
    for reference and the error that I am receiving also.

    I tried running the same python code to get a list of clusters and it
    works correctly. Similarly, the hostname and user names / passwords
    are correct because when I curl or enter the url in a web browser I
    get the json from the server back.

    Thanks,
    Eric

    <dependency>
    <groupId>com.cloudera.api</groupId>
    <artifactId>cloudera-manager-api</artifactId>
    <version>4.6.0</version>
    </dependency>

    To unsubscribe from this group and stop receiving emails from it,
    send an email to scm-users+unsubscribe@cloudera.org.
    To unsubscribe from this group and stop receiving emails from it, send an email to scm-users+unsubscribe@cloudera.org.
  • bc Wong at Aug 22, 2013 at 1:54 pm
    And the XML problem is tracked by
    https://issues.apache.org/jira/browse/CXF-5065.
    On Wed, Aug 21, 2013 at 9:51 PM, bc Wong wrote:
    Hi Eric,

    I followed the comment in the CXF jira and tried again. CXF 2.7.6 does
    work, but then you'd hit the XML problem. (I didn't clean my mvn
    properly.)

    I can tell you what the XML fix is. One workaround is to build your
    own client library (with that fix).
    * Start from https://github.com/cloudera/cm_api/tree/master/java
    * Add the following annotation to the ApiRootResource class
    https://github.com/cloudera/cm_api/blob/master/java/src/main/java/com/cloudera/api/ApiRootResource.java#L33

    @Path("/")
    +@Consumes({ MediaType.APPLICATION_JSON })
    +@Produces({ MediaType.APPLICATION_JSON })
    public interface ApiRootResource {


    Cheers,
    bc
    On Wed, Aug 21, 2013 at 10:59 AM, bc Wong wrote:
    I know, I tried that. There are ways to get around the XML problem.
    But at the end of the day, CXF 2.7.6 does _not_ work with Jackson 2.2.
    It still prefers the JSONProvider to the JacksonJsonProvider.

    Cheers,
    bc
    On Wed, Aug 21, 2013 at 10:03 AM, Eric Nagler wrote:
    Hi bc,

    Thanks for filing the bug ticket. Using the comments on the ticket I tried updating the version of CXF to 2.7.6 to see if that corrects the problem. I cloned the git repo and made another project as a "client" that depends on the CM API (mvn dependency:tree attached). CXF starts to use XML to communicate to the CM server. I'm unsure if I'm missing an additional new dependency that I need to include to use JSON in addition to the Jackson-jaxrs-json-provider already included. I also tried using the original CXF 2.5.5 dependency and downgrading the Jackson dependency to 2.1.4 and I get a different error. The JacksonJsonProvider gets used from CXF but it has trouble unmarshalling the object. That error is also attached.

    Thanks,
    Eric

    -----Original Message-----
    From: bc Wong
    Sent: Wednesday, August 21, 2013 2:45 AM
    To: Eric Nagler
    Cc: scm-users@cloudera.org
    Subject: Re: JAX Parsing Exception when using Cloudera Manager 4.6

    I did a bit of debugging. Seems to be a CXF problem. Filed https://issues.apache.org/jira/browse/CXF-5220.

    Is there any chance you could switch to Jackson 2.1?

    Cheers,
    bc
    On Tue, Aug 20, 2013 at 4:48 PM, Eric Nagler wrote:
    Hi bc,

    I've been playing with the dependencies that we use in our project here, based on the mvn dependency tree that you sent me. I made a new blank maven project but it inherited from our projects managed dependencies. We are using Jackson 2.2.2 in our project. We do not change the underlying provider or provide any system properties. We have also tried running it from outside of IntelliJ and we are still getting the issue. I've attached our mvn dependency:tree to this e-mail, so you can take a look at it.

    Thanks,
    Eric

    -----Original Message-----
    From: bc Wong
    Sent: Tuesday, August 20, 2013 1:05 PM
    To: Eric Nagler
    Cc: scm-users@cloudera.org
    Subject: Re: JAX Parsing Exception when using Cloudera Manager 4.6

    Hi Eric,

    Your code works fine in my setup (also running in intellij). One difference is that your project is using the JSONProvider for deserialization. My setup uses the JacksonJsonProvider, which is specified in the ClouderaManagerClientBuillder when constructing the client. I believe that's the problem. Do you have other weird settings that choose a different provider?

    I'm attaching my pom, and the output of `mvn dependency:tree'. Hope that helps.

    Cheers,
    bc
    On Tue, Aug 20, 2013 at 7:44 AM, Eric Nagler wrote:
    I’m using Cloudera manager 4.6 and I wanted to start using the Java API.
    When I set up a new blank Maven project with the 4.6.0 version of the
    cloudera manager API, I receive a JAX parsing exception (dependency
    is below). I think it has to do with JAX unable to unmarshal the json
    objects being retrieved from the managers web service. The code I’m
    trying to run is the sample code on the github project for connecting
    and getting a list of the ClusterResources. I've attached the code
    for reference and the error that I am receiving also.

    I tried running the same python code to get a list of clusters and it
    works correctly. Similarly, the hostname and user names / passwords
    are correct because when I curl or enter the url in a web browser I
    get the json from the server back.

    Thanks,
    Eric

    <dependency>
    <groupId>com.cloudera.api</groupId>
    <artifactId>cloudera-manager-api</artifactId>
    <version>4.6.0</version>
    </dependency>

    To unsubscribe from this group and stop receiving emails from it,
    send an email to scm-users+unsubscribe@cloudera.org.
    To unsubscribe from this group and stop receiving emails from it, send an email to scm-users+unsubscribe@cloudera.org.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupscm-users @
categorieshadoop
postedAug 21, '13 at 5:03p
activeAug 22, '13 at 1:54p
posts4
users2
websitecloudera.com
irc#hadoop

2 users in discussion

bc Wong: 3 posts Eric Nagler: 1 post

People

Translate

site design / logo © 2022 Grokbase