Announcement

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

    Huge Issue: Form field lengthRange validator behaving very strange

    Hi

    I have a very serious issue. We've defined lengthRange validators all over our dynamic forms. Like this one:
    validators: [
    {
    type: "lengthRange",
    max: 65535
    }
    ],
    The max length differs.

    Recently, our system load is picking up and every other day, suddenly, every form field with a lengthRange validation gives the following error:

    "Must be no more than 50 characters". It is as if ALL our max values for lengthRange validations is set to 50.

    When we restart TomCat, it's fixed.

    PLEASE help. Any idea or guidance of how to debug this will help!

    Thanks
    Henkie

    #2
    O yes, I'm using SmartClient Power Edition version 10.0. It happens on all browsers. We're running Tomcat on Ubuntu.

    Comment


      #3
      Perhaps related to this issue?

      Comment


        #4
        That does look like the same issue, and again it seems specific to Tomcat. It would be great to get to the bottom of this; the last poster just refused to do any sort of effective investigation. However, note that you've allowed your support to lapse, so please correct that if you expect significant investigative help.

        What we would try:

        1. update to the latest patched version of SmartClient 10.0 by going to smartclient.com/builds. In the future, remember to report your version number, and go ahead and update to the latest patched version before posting about issues

        Assuming the problem still persists..

        2. look at the output for the DataSourceLoader for your application when it is initially working and when it ultimately fails. This output is a JSON representation of the DataSource and should be mostly self-explanatory. What we're looking for is whether you see validator definitions actually change when the problem starts to occur

        3. carefully review this documentation on correct usage of server-side DataSources. If you've broken the rules in some way, you could create concurrency issues

        4. since Tomcat has now shown this problem twice, with strong indications from the other thread that the issue is related to Tomcat, we'd suggest:
        a. use Tomcat on Windows and see if the issue is there
        b. use a different JDK, for example, if you are using OpenJDK, use the one from Sun/Oracle instead
        c. if feasible, try deploying on a totally different engine - Glassfish or Jetty, for instance

        Comment


          #5
          Hi
          Apologies for the long silence. For some reason I did not get the email notifications. I appreciate the input and will execute them and update my findings here.
          Thanks

          Comment


            #6
            Hi
            On point 2, I've taken a log extract of normal conditions so long - I attached the log extract (had to split it over 2 files because of forum upload limitations).
            My question really is:
            You refer to this"2. look at the output for the DataSourceLoader for your application ".
            What logs are the DataSourceLoader logs? Everything or are there specific ones?
            Thanks
            Attached Files

            Comment


              #7
              Hi henkiemaritz,

              regarding your question: My guess: Isomorphic wrote "DataSourceLoader output", not "DataSourceLoader logs".
              "DataSourceLoader output" is what your Browser sees when calling the DataSourceLoader (see your main .html file, it calls DataSourceLoader).

              Best regards
              Blama

              Comment


                #8
                On the following point:
                3. carefully review this documentation on correct usage of server-side DataSources. If you've broken the rules in some way, you could create concurrency issues

                I use the following method to create DataSources.

                static private DSRequest createDSRequest (String dataSourceName, DSRequest dsRequestInput, String actionName) {
                DSRequest dsRequest = new DSRequest(dataSourceName, actionName);

                if (dsRequestInput != null) {
                dsRequest.setRPCManager(dsRequestInput.getRPCManager());
                }
                return dsRequest;
                }

                Will this be a problem?
                Issue with using RPCManager.getDataSource is what if I want to make a database update like from a cron job, etc where I do not have the RPCManager. How do I get the RPC manager?

                Comment


                  #9
                  Thanks Blama!! Got it - will look at that.

                  Comment


                    #10
                    Hi Blama, maybe a stupid question, but to see the DataSourceLoader output - I basically look in the log file when my main html page is loaded?
                    Looks like this?

                    === 2016-08-11 14:15:14,810 [ec-7] DEBUG LoadISCTag - isomorphicURI not specified in tag, defaulting to: version/10.0/isomorphic/
                    === 2016-08-11 14:15:14,825 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'company'
                    === 2016-08-11 14:15:14,845 [ec-7] DEBUG XML - Parsed XML from C:\Dev\workspace\AdminOnline\target\adminonline\shared\ds\company.ds.xml: 5ms
                    === 2016-08-11 14:15:14,845 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'DataSource'
                    === 2016-08-11 14:15:14,848 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource 77 of type 'DataSource' and assigned it to thread http-apr-8080-exec-7
                    === 2016-08-11 14:15:14,851 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource 77 of type 'DataSource' in the pooling flow
                    === 2016-08-11 14:15:14,856 [ec-7] DEBUG PoolableDataSourceFactory - Activated DataSource 77 of type 'DataSource'
                    === 2016-08-11 14:15:14,863 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'DataSourceField'
                    === 2016-08-11 14:15:14,869 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource 78 of type 'DataSourceField' and assigned it to thread http-apr-8080-exec-7
                    === 2016-08-11 14:15:14,872 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource 78 of type 'DataSourceField' in the pooling flow
                    === 2016-08-11 14:15:14,876 [ec-7] DEBUG PoolableDataSourceFactory - Activated DataSource 78 of type 'DataSourceField'
                    === 2016-08-11 14:15:14,883 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'field'
                    === 2016-08-11 14:15:14,888 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'field' in the pooling flow
                    === 2016-08-11 14:15:14,906 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'ServerObject'
                    === 2016-08-11 14:15:14,925 [ec-7] DEBUG XML - Parsed XML from C:\Dev\workspace\AdminOnline\target\adminonline\version\10.0\isomorphic\system\schema\ServerObject.ds.xml: 1ms
                    === 2016-08-11 14:15:14,926 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'Object'
                    === 2016-08-11 14:15:14,926 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource 79 of type 'Object' and assigned it to thread http-apr-8080-exec-7
                    === 2016-08-11 14:15:14,932 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource 79 of type 'Object' in the pooling flow
                    === 2016-08-11 14:15:14,937 [ec-7] DEBUG PoolableDataSourceFactory - Activated DataSource 79 of type 'Object'
                    === 2016-08-11 14:15:14,942 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'fields'
                    === 2016-08-11 14:15:14,948 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'fields' in the pooling flow
                    === 2016-08-11 14:15:14,953 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'ID'
                    === 2016-08-11 14:15:14,958 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'ID' in the pooling flow
                    === 2016-08-11 14:15:14,965 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'methodName'
                    === 2016-08-11 14:15:14,969 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'methodName' in the pooling flow
                    === 2016-08-11 14:15:14,974 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'valueMap'
                    === 2016-08-11 14:15:14,980 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'valueMap' in the pooling flow
                    === 2016-08-11 14:15:14,984 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'lookupStyle'
                    === 2016-08-11 14:15:14,989 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'lookupStyle' in the pooling flow
                    === 2016-08-11 14:15:14,996 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'attributeName'
                    === 2016-08-11 14:15:15,000 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'attributeName' in the pooling flow
                    === 2016-08-11 14:15:15,006 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'attributeScope'
                    === 2016-08-11 14:15:15,010 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'attributeScope' in the pooling flow
                    === 2016-08-11 14:15:15,016 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'bean'
                    === 2016-08-11 14:15:15,020 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'bean' in the pooling flow
                    === 2016-08-11 14:15:15,025 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'visibleMethods'
                    === 2016-08-11 14:15:15,031 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'visibleMethods' in the pooling flow
                    === 2016-08-11 14:15:15,036 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'dropExtraFields'
                    === 2016-08-11 14:15:15,041 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'dropExtraFields' in the pooling flow
                    === 2016-08-11 14:15:15,047 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'crudOnly'
                    === 2016-08-11 14:15:15,051 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'crudOnly' in the pooling flow
                    === 2016-08-11 14:15:15,056 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource 80 of type 'ServerObject' and assigned it to thread http-apr-8080-exec-7
                    === 2016-08-11 14:15:15,059 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource 80 of type 'ServerObject' in the pooling flow
                    === 2016-08-11 14:15:15,065 [ec-7] DEBUG PoolableDataSourceFactory - Activated DataSource 80 of type 'ServerObject'
                    === 2016-08-11 14:15:15,069 [ec-7] DEBUG ISCKeyedObjectPool - Borrowing object for 'serverObject'
                    === 2016-08-11 14:15:15,074 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'serverObject' in the pooling flow
                    === 2016-08-11 14:15:15,082 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource 81 of type 'company' and assigned it to thread http-apr-8080-exec-7
                    === 2016-08-11 14:15:15,084 [ec-7] DEBUG PoolableDataSourceFactory - Created DataSource 81 of type 'company' in the pooling flow
                    === 2016-08-11 14:15:15,089 [ec-7] DEBUG PoolableDataSourceFactory - Activated DataSource 81 of type 'company'
                    === 2016-08-11 14:15:15,119 [ec-7] DEBUG PoolableDataSourceFactory - Cleared and passivated DataSource 81 of type 'company'
                    === 2016-08-11 14:15:15,123 [ec-7] INFO Compression - /adminonline/test.jsp: 12411 -> 2527 bytes

                    Comment


                      #11
                      No, just open your Browser's F12 tools, reload the page and look at the response data for the DataSourceLoader request.

                      I think Isomorphic wants to see if the output changes once you start getting the validation errors. The result of the DataSourceLoader defines what default length validators should be applied clientside.

                      Comment


                        #12
                        For DataSource requests from a cron job or similar, see Standalone DataSource Usage.

                        Comment


                          #13
                          OK, I have just deployed to the live site. We are now running Ubuntu 16.04, Java 8, Tomcat 8.5 and the latest SmartClient Pro nightly build. I will inform this group if the error occurred again. I did go through my code and all looks fine according to the documentation - for both standalone and not. Thanks so far for all the help.

                          Comment

                          Working...
                          X