[overlord-issues] [JBoss JIRA] (SRAMP-606) Unable to use update custom metadata using REST call

Brett Meyer (JIRA) issues at jboss.org
Fri Oct 31 12:47:35 EDT 2014


    [ https://issues.jboss.org/browse/SRAMP-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016503#comment-13016503 ] 

Brett Meyer commented on SRAMP-606:
-----------------------------------

[~giorgimode], here's the issue.  RESTEasy was pulling in NamespacePrefixMapper from 2 different ClassLoaders: 1.) the com.sun.xml.bind EAP module and 2.) your app.  #2 is transitive, included by the s-ramp-client dependency.  The quick fix:

{code}
        <dependency>
          <groupId>org.overlord.sramp</groupId>
          <artifactId>s-ramp-client</artifactId>
          <version>0.7.0-SNAPSHOT</version>
          
          <exclusions>
            <exclusion>
              <groupId>com.sun.xml.bind</groupId>
              <artifactId>jaxb-impl</artifactId>
            </exclusion>
          </exclusions>
        </dependency>

...

            <manifestEntries>
               <Dependencies>com.sun.xml.bind,org.jboss.resteasy.resteasy-jaxrs,org.apache.httpcomponents</Dependencies>
            </manifestEntries>
{code}

Note the addition of the com.sun.xml.bind module in the manifestEntries.

After I did that, it worked perfectly.

For now, I think the "fix" is going to be mentioning this caveat in our docs.  Having to do platform-specific builds of s-ramp-client isn't really something I think we should spend time on, nor is it worth the maintenance.

Hopefully that helps!

> Unable to use update custom metadata using REST call
> ----------------------------------------------------
>
>                 Key: SRAMP-606
>                 URL: https://issues.jboss.org/browse/SRAMP-606
>             Project: S-RAMP
>          Issue Type: Bug
>          Components: Atom Binding, S-RAMP API
>    Affects Versions: 0.6.0.Final
>            Reporter: Giorgi Modebadze
>            Assignee: Brett Meyer
>
>  I created my own work item handler and deployed it on EAP. My modified UpdateMetaDataResource adds custom properties to artifact on S-RAMP according to some key value. 
> E.g. PUT call to Rest Service:
> http://localhost:8080/s-ramp-adapter/rest/update/property/key/Testvalue/d6df0626-0a70-48a6-bb34-fc0f478b81bd
> As a result, artifact with the given UUID will have property with name key and value Testvalue.
> Here is the simple code that accepts REST calls: 
> https://gist.github.com/anonymous/469be08cc2610e727517
> Here's the pom.xml
> https://gist.github.com/anonymous/08a3c91163c682cc6cd0
> The error from EAP:
> https://gist.github.com/anonymous/b6422e498a3a90f4c28c
> Predefined URLs for updating metadata work alright on EAP. E.g.
> http://localhost:8080/dtgov/rest/update/name/value/uuid
> Problem is produced on custom Rest calls only.
> Everything works fine on Jetty, error is produced on EAP. 



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the overlord-issues mailing list