Layer7 API Management

 View Only
  • 1.  (9.1) Restman MigrateIN - ClassCastException

    Posted Apr 08, 2018 12:15 PM

    Hi,

    I'm trying to do a Migrate In using Restman with /bundle against a bundle XML I exported using Restman earlier and it keeps failing with a "ClassCastException" in the ssg logs :

     

    2018-04-08T15:47:29.658+0000 WARNING 1571 com.l7tech.external.assertions.gatewaymanagement.server.ServerRESTGatewayManagementAssertion: 9050: Error processing management request: Exception encountered processing a rest message: javax.ws.rs.ProcessingException: Resource Java method invocation error. Caused by: java.lang.ClassCastException@7df584e1
    2018-04-08T15:47:29.658+0000 WARNING 1571 com.l7tech.server.MessageProcessor: 3016: Request routing failed with status 601 (Error in Assertion Processing)
    2018-04-08T15:47:29.658+0000 WARNING 1571 com.l7tech.server.message: Message was not processed: Error in Assertion Processing (601)

    As far as I can tell I am sending the request as per the Restman specs, it's the exact same XML bundle that was exported out.  The Seczones, folder Id's match (there is no conflicts as I'm not even getting to that point).

     

    Yes I know about GMU -- we use that all the time buut I am trying to come up with another option for people to migrate out/in .

     

    SOme details or insight into where I should look for resolving this would be useful.  Debugging the Restman policy in the destination env has it going through all the policy as normal and then failing on the actual restman call, so I canot see what the real error is.



  • 2.  Re: (9.1) Restman MigrateIN - ClassCastException

    Posted Aug 15, 2018 05:04 PM

    Hi Ian,

     

    I'm just running through questions that haven't been answered yet and found this one. I apologize for the delay in getting a response to you.

     

    Quick question: Have you tried putting the SSG logs into "FINEST" mode for verbose logging? This may do the trick to learn more about what error is being thrown and why.

     

    My apologies if you've well moved past this already and have no need for a response now.



  • 3.  Re: (9.1) Restman MigrateIN - ClassCastException

    Broadcom Employee
    Posted Mar 06, 2019 01:54 PM

    Good afternoon,

     

    Were you able to get passed the issue? If so what was the solution?

     

    Sincerely,

     

    Stephen Hughes

    Broadcom Support



  • 4.  Re: (9.1) Restman MigrateIN - ClassCastException
    Best Answer

    Broadcom Employee
    Posted Mar 08, 2019 11:45 AM

    Good afternoon,

     

    I was researching this further and found that you opened a case for this question. The resolution was that when the export payload from Restman it will be enveloped in an Item tag which needs to be stripped prior to import so only the bundle element branch is sent through.

     

    Example of the export payload:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <l7:Item xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
    <l7:Name>Bundle</l7:Name>
    <l7:Type>BUNDLE</l7:Type>
    <l7:TimeStamp>2019-03-08T08:39:34.738-08:00</l7:TimeStamp>
    <l7:Link rel="self" uri="https://gw.support.local:8443/restman/1.0/bundle/folder/dc3a8eb2f8cbf319d3af1fb9dff3ae06"/>
    <l7:Resource>
    <l7:Bundle>
    .......
    </l7:Bundle>
    </l7:Resource>
    </l7:Item>

     

    Modified import payload with the Item elements stripped

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <l7:Bundle xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
    .......
    </l7:Bundle>

     

    Sincerely,

     

    Stephen Hughes

    Broadcom Support