Announcement

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

    Exception while trying to login to login to our application after upgrading to smartclient v12.1

    Hi,

    We were using smartclient v10 for our application UI. We are planning to upgrade to v12.1 and while doing initial analysis with the v12.1(SmartClient_v121p_2021-01-09_Enterprise) we saw an issue logging into our application. we are unable to login to our application when we use the v12.1 smartclient jars. Digging through the issue, we noticed an error coming from the
    smartclient class - DSResponse.
    Below was the exception we got -
    java.lang.NoSuchMethodError: com/isomorphic/datasource/DSResponse.setSuccess()Lcom/isomorphic/datasource/DSResponse; (loaded from file:/home/muralik6/SI_61_33000/platform_core/install/noapp/deploy/filegateway_exploded/webapp/WEB-INF/lib/isomorphic_core_rpc.jar by WebAppClassLoader{Filegateway}@fa28eb65)

    In our code, we call the method dsResponse.setSuccess().Code sample below -

    criteria = dsRequest.getCriteria();
    operationType = dsRequest.getOperationType();

    ErrorCode.clientLocale = this.browserLocale;
    dsResponse.setSuccess();

    The error is originating when we make a call to dsResponse.setSuccess();

    I saw 12.1 java documentation DSresponse is extending the BaseResponse. The method setSuccess is part of BaseResponse. Can you please let us know why are we seeing the NoSuchMethodError if this method is available.
    https://www.smartclient.com/smartgwt...SResponse.html

    #2
    The only way that could validly happen is if you included a class called DSResponse from some other library or from your application code.

    If that's not it, then your IDE must be corrupted in some way and probably needs a restart or re-install, because that's a nonsense error.

    If neither of the above help, please let us know if multiple developers are seeing the issue or if it's only happening on one machine.

    Comment


      #3
      If the exception is observed, it is showing the jar(isomorphic_core_rpc.jar) from where the DSResponse class is loaded.

      Below was the exception we got -
      java.lang.NoSuchMethodError: com/isomorphic/datasource/DSResponse.setSuccess()Lcom/isomorphic/datasource/DSResponse; (loaded from file:/home/muralik6/SI_61_33000/platform_core/install/noapp/deploy/filegateway_exploded/webapp/WEB-INF/lib/isomorphic_core_rpc.jar by WebAppClassLoader{Filegateway}@fa28eb65)

      And clearly its showing its been loaded from the isomorphic_core_rpc.jar, and from the location "/home/muralik6/SI_61_33000/platform_core/install/noapp/deploy/filegateway_exploded/webapp/WEB-INF/lib/isomorphic_core_rpc.jar"

      -sh-4.2$ ls -l /home/muralik6/SI_61_33000/platform_core/install/noapp/deploy/filegateway_exploded/webapp/WEB-INF/lib/
      -rw-rw-r--. 1 1523684 Jan 12 23:30 isomorphic_core_rpc.jar



      And below is the snapshot of the jars downloaded from "SmartClient_v121p_2021-01-09_Enterprise".

      -sh-4.2$ ls -l isomorphic_*
      -rw-rw-r--. 1 37016 Jan 9 19:12 isomorphic_assembly.jar
      -rw-rw-r--. 1 5641 Jan 9 19:11 isomorphic_compression.jar
      -rw-rw-r--. 1 1523684 Jan 9 19:23 isomorphic_core_rpc.jar
      -rw-rw-r--. 1 34765 Jan 9 19:12 isomorphic_js_parser.jar
      -rw-rw-r--. 1 33126 Jan 9 19:12 isomorphic_realtime_messaging.jar
      -sh-4.2$

      We can see the size of isomorphic_core_rpc.jar are same in both the locations.

      Comment


        #4
        Ok, that covers the first of 3 points we raised.

        On to the other two now.

        Comment


          #5
          There is no IDE involved here while seeing this exception. We are bundling isomorphic_core_rpc.jar in our application war file deployed. With the exception above we clearly see the DSResponse is loaded from the jar we bundled in the application war. And this exceptions are coming during logging to the application which is deployed in the web Server.
          Please let me know what else we can check as we see the jar loading the DSResponse class looks fine.

          Comment


            #6
            OK. So, you can see that the .jar that we provided has the APIs that we document, right? So you agree the software we're providing is correct?

            It's hard to even speculate how you could get this error. It sounds like the kind of misreported error that happens when a system runs out of memory or disk.

            If you need help regardless, we do have Consulting services that can come in and fix the problem. Support can't help further since this problem clearly can not be reproduced by anyone else.

            Comment


              #7
              As the error we are seeing is coming from the smartclient class, it should be further investigated.
              As specified above, we are calling the setSuccess method on DSResponse class as below -
              dsResponse.setSuccess();

              But the exception we are seeing is for DSResponse.setStatus(I)
              [java.lang.NoSuchMethodError: com/isomorphic/datasource/DSResponse.setStatus(I)Lcom/isomorphic/datasource/DSResponse

              We are unaware of what internally the DSResponse class implementation is. Also with the same infrastructure we do not see issue when used with smartclient v10 jars and have issue only when we use smartclient v12. Do we have any implementation changes internally for DSResponse class in v10 and v12 which we need to take care from application end.

              This is how we initiate the DSResponse object,
              DSResponse dsResponse = new DSResponse();

              and we are just calling the setSuccess on this as above. Not sure why we are not getting a proper analysis on why do we see such an error only when we use v12 jars and not for v10.

              Do we get the source code for isomorphic_core_rpc.jar so that we can debug from our end on this.

              Also we have enough memory where application is running.

              Comment


                #8
                So again, you can readily see that the setSuccess() method in fact exists in the classes we provide. This is not a SmartClient problem.

                Here's the mistake you probably made - you guys are mid-upgrade right? So what you probably did is compiled against one version and you are running with the other. This way, you can get a NoSuchMethod error if a method moved from a superclass to a subclass or vice versa. Basic Java coding error that happens a lot. Please let us know if that's it.

                Comment

                Working...
                X