Announcement Announcement Module
No announcement yet.
Spring 3's RestTemplate can't find Jackson Mapping class in dm Server 2.0.0.RC1 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 3's RestTemplate can't find Jackson Mapping class in dm Server 2.0.0.RC1

    I'm trying to use RestTemplate.getForObject in my bundle, but I'm getting the following exception:

    Caused by: java.lang.NoClassDefFoundError: org/codehaus/jackson/map/type/TypeFactory
    	at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.canRead(
    	at org.springframework.web.client.RestTemplate$AcceptHeaderRequestCallback.doWithRequest(
    	at org.springframework.web.client.RestTemplate.doExecute(
    	at org.springframework.web.client.RestTemplate.execute(
    	at org.springframework.web.client.RestTemplate.getForObject(
    My manifest has
    Import-Bundle:;version="[1.0.0,1.0.0]",;versi on="[1.0.0,1.0.0]"

    but it looks like org/codehaus/jackson/map/type isn't being exported from

    I'm also getting errors if I don't include the jackson bundles or I include the jaxb bundle.

  • #2
    If is not exported, then presumably is not present in the bundle.

    Try cracking open the bundle and see what classes are inside. If the class is present but its package is not exported, that's an issue with the way the bundle manifest was built. If the class is not present, then perhaps you need to look elsewhere.


    • #3
      The class is present; I'll try modifying the bundle's manifest and add the package export to see if that fixes it.


      • #4
        Adding the export package for "" worked.


        • #5
          Good, but I'm puzzled that this package was not exported by the original manifest. I wonder if there's something about this class that would stop bundlor picking up the package. Anyway please would you raise an issue against the Enterprise Bundle Repository if you would like this fixed and then someone can investigate further.