Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    v 12.0 Data source is not working with following error

    XRP2:WARN:RestDataSource:isc_TestDS_0:DataSource specifies jsonPrefix, but not present in response returned from server. Processing response anyway. SC_Core.js:1223

    #2
    This is SmartGWT v 12 and GWT 2.6.0

    Comment


      #3
      Here is the error in console Click image for larger version

Name:	Screen Shot 2018-04-18 at 2.10.17 PM.png
Views:	187
Size:	1.25 MB
ID:	252850

      Comment


        #4
        Read the error message, it explicitly tells you what you are doing wrong.

        Comment


          #5
          Before explicitly setting setJsonPrefix , setJsonSuffix , I checked the JsonSuffix and JsonPrefix , those are default value

          isc_AppStartupDS_0.jsonPrefix
          06:52:53.172 "<SCRIPT>//'"]]>>isc_JSONResponseStart>>"
          06:53:04.576 isc_AppStartupDS_0.jsonSuffix
          06:53:04.577 "//isc_JSONResponseEnd"

          I specified the as follows in this method "protected void transformResponse(DSResponse response, DSRequest request, Object jsonData) "

          this.setJsonPrefix("ABC"); this.setJsonSuffix("XYZ"); super.transformResponse(response, request, jsonData); Nothing change same error , what type of value do i need to set

          Thanks for your support

          Comment


            #6
            Please read the docs for these properties. This is a security measure for JSON transports (as the docs explain). What you are doing makes no sense as a security measure, nor is there any reason why you would set these prefixes dynamically.

            Comment


              #7
              Thanks for your reply

              I change the Struts2 server Prefix and Suffix

              <param name="wrapPrefix"><![CDATA[<SCRIPT>//'"]]]]><![CDATA[>>isc_JSONResponseStart>>]]></param>
              <param name="wrapSuffix"><![CDATA[//isc_JSONResponseEnd ]]></param>

              here is a sample JSON output <SCRIPT>//'"]]>>isc_JSONResponseStart>>{"access":"Y", "firstName":"Car","infoMessage":"Car"}//isc_JSONResponseEnd

              Here is the error message


              Click image for larger version  Name:	Screen Shot 2018-04-19 at 3.30.23 PM.png Views:	1 Size:	654.1 KB ID:	252877
              Last edited by samannil; 19 Apr 2018, 02:10.

              Comment


                #8
                Looks as if the response is probably malformed in some other way, but you've made basically no attempt to provide any information that would allow others to help you.

                Let us know if you find any evidence of a framework issue, by providing a minimal, ready-to-run test case demonstrating the problem.

                Comment


                  #9
                  Again thanks for your answer , I have an app it is working properly with SmartGWT 4.0 , when I upgrade to V 12.0 it gave these errors , I just added the V 12.0 smartgwt.jar smartgwt-skins.jar and change some theams and index page stuff

                  Comment


                    #10
                    Yes, a botched upgrade could cause issues like this. As far as next steps, see previous post.

                    Comment


                      #11
                      After correting Data binding issue i have come across following error , how to aviod or correct setShortDisplayFormat

                      Click image for larger version

Name:	Screen Shot 2018-07-16 at 3.39.46 PM.png
Views:	322
Size:	438.8 KB
ID:	254094
                      Thanks

                      Comment


                        #12
                        Hi,

                        I'd check the duplicate loads before (in gwt.xml and in main html?). Perhaps this is connected. Also, your detailed build version is missing.

                        Best regards
                        Blama

                        Comment


                          #13
                          Thanks Blama

                          Now it is giving following error in V12

                          Click image for larger version

Name:	Screen Shot 2018-07-16 at 5.49.33 PM.png
Views:	213
Size:	303.5 KB
ID:	254100
                          Thanks for helping this

                          Comment


                            #14
                            Hi All

                            After adding following code segment into Datasouce class constructor which extend RestDataSource it works fine , thanks for every ones support

                            super(); setJsonPrefix(""); setJsonSuffix("");

                            Comment

                            Working...
                            X