Forum Discussion

ElavarasanR's avatar
ElavarasanR
Occasional Contributor
6 years ago

Loading RAML in ReadyAPI

Hi,

I am trying to load RAML file in Ready API latest version and observe below error. There is no clue on this ,could anyone be able to guide me in resolving this issue?

Tue Nov 05 16:48:36 GMT 2019: ERROR: java.lang.NullPointerException

  • java.lang.NullPointerException
  • at org.raml.v2.internal.impl.v10.type.TypeToRuleVisitor.generateRule(TypeToRuleVisitor.java:89)
  • at org.raml.v2.internal.impl.v10.type.TypeToRuleVisitor.visitArray(TypeToRuleVisitor.java:323)
  • at org.raml.v2.internal.impl.v10.type.TypeToRuleVisitor.visitArray(TypeToRuleVisitor.java:66)
  • at org.raml.v2.internal.impl.v10.type.ArrayResolvedType.visit(ArrayResolvedType.java:149)
  • at org.raml.v2.internal.impl.v10.type.TypeToRuleVisitor.generateRule(TypeToRuleVisitor.java:89)
  • at org.raml.v2.internal.impl.v10.type.TypeToRuleVisitor.visitObject(TypeToRuleVisitor.java:158)
  • at org.raml.v2.internal.impl.v10.type.TypeToRuleVisitor.visitObject(TypeToRuleVisitor.java:66)
  • at org.raml.v2.internal.impl.v10.type.ObjectResolvedType.visit(ObjectResolvedType.java:275)
  • at org.raml.v2.internal.impl.v10.phase.ExampleValidationPhase.validateJson(ExampleValidationPhase.java:134)
  • at org.raml.v2.internal.impl.v10.phase.ExampleValidationPhase.validate(ExampleValidationPhase.java:121)
  • at org.raml.v2.internal.impl.v10.phase.ExampleValidationPhase.apply(ExampleValidationPhase.java:81)
  • at org.raml.v2.internal.impl.v10.Raml10Builder.runPhases(Raml10Builder.java:114)
  • at org.raml.v2.internal.impl.v10.Raml10Builder.build(Raml10Builder.java:93)
  • at org.raml.v2.internal.impl.v10.phase.LibraryLinkingTransformation.transform(LibraryLinkingTransformation.java:69)
  • at org.raml.yagi.framework.phase.TransformationPhase.apply(TransformationPhase.java:45)
  • at org.raml.yagi.framework.phase.TransformationPhase.apply(TransformationPhase.java:54)
  • at org.raml.yagi.framework.phase.TransformationPhase.apply(TransformationPhase.java:54)
  • at org.raml.yagi.framework.phase.TransformationPhase.apply(TransformationPhase.java:54)
  • at org.raml.yagi.framework.phase.TransformationPhase.apply(TransformationPhase.java:54)
  • at org.raml.v2.internal.impl.v10.Raml10Builder.runPhases(Raml10Builder.java:114)
  • at org.raml.v2.internal.impl.v10.Raml10Builder.build(Raml10Builder.java:93)
  • at org.raml.v2.internal.impl.RamlBuilder.build(RamlBuilder.java:110)
  • at org.raml.v2.internal.impl.RamlBuilder.build(RamlBuilder.java:98)
  • at org.raml.v2.api.RamlModelBuilder.buildApi(RamlModelBuilder.java:124)
  • at org.raml.v2.api.RamlModelBuilder.buildApi(RamlModelBuilder.java:92)
  • at org.raml.v2.api.RamlModelBuilder$buildApi.call(Unknown Source)
  • at com.smartbear.soapui.raml.RamlV10Importer.importRaml(RamlV10Importer.groovy:48)
  • at com.smartbear.soapui.raml.actions.RamlImporterWorker.construct(RamlImporterWorker.java:55)
  • at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:47)
  • at com.eviware.soapui.support.swing.SwingWorker.run(SwingWorker.java:88)
  • Hi ElavarasanR 

     

    I've never tried creating a project via a .raml file before - so I installed the plugin and downloaded a small example .raml from git - but when it tried expanding when creating the new project I got a nullpointer exception too - a different one - but still...

     

    I'd raise a service request (unless anyone else has any better ideas) as it sounds like there are issues with plugin - the link to do so is here

     

    Sorry I can't be of more help!

     

    cheers.

     

    rich

     

  • richie's avatar
    richie
    Community Hero

    Hi ElavarasanR 

     

    I've never tried creating a project via a .raml file before - so I installed the plugin and downloaded a small example .raml from git - but when it tried expanding when creating the new project I got a nullpointer exception too - a different one - but still...

     

    I'd raise a service request (unless anyone else has any better ideas) as it sounds like there are issues with plugin - the link to do so is here

     

    Sorry I can't be of more help!

     

    cheers.

     

    rich

     

    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Thank you for the investigation, richie. 

       

      Hi ElavarasanR! It is sad to hear that you are facing this issue. To understand the situation better, could you confirm that you have the SoapUI RAML Plugin installed?

       

      • ElavarasanR's avatar
        ElavarasanR
        Occasional Contributor

        Hi Sonya,

        Thanks a lot for looking into this, i have installed the RAML plugin (latest version) in ready api 2.8.2 version. There are many raml projects, which are getting loaded successfully. Only couple of projects are throwing error and this error is one of among them.

         

        Thanks

        Ela

    • ElavarasanR's avatar
      ElavarasanR
      Occasional Contributor

      richie sonya_m 

      The issue has been bottomed out.

      The problem was in the raml file example declaration where ( items: string) was missing. After adding that raml is loading successfully.
      type: array
      items: string