Announcement

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

    SQLDataSource errors with latest 13.1 for includedFrom fields

    Hello, I was trying 13.1-d20230815 and I noticed a bunch of errors in my app, for example:

    Code:
    ERROR SQLDataSource Aliases incFrom AUTH_USERS_ROLES.ROLE includes AUTH_ROLES.ROLE via ID_ROLE_FK using alias ROLES
    ERROR SQLDataSource Aliases incFrom AUTH_USERS_ROLES.ROLE includes AUTH_ROLES.ROLE via ID_ROLE_FK using alias ROLES
    ERROR SQLDataSource Aliases incFrom AUTH_USERS_ROLES.ROLE_DESCRIPTION includes AUTH_ROLES.DESCRIPTION via ID_ROLE_FK using alias ROLES
    ERROR SQLDataSource Aliases incFrom AUTH_USERS_ROLES.ROLE includes AUTH_ROLES.ROLE via ID_ROLE_FK using alias ROLES
    ERROR SQLDataSource Aliases incFrom AUTH_USERS_ROLES.EMAIL includes AUTH_USERS.EMAIL via ID_USER_FK using alias USERS
    ERROR SQLDataSource Aliases incFrom AUTH_USERS_ROLES.IS_SUPER_USER includes AUTH_ROLES.IS_SUPER_USER via ID_ROLE_FK using alias ROLES
    ERROR SQLDataSource Aliases incFrom AUTH_USERS_ROLES.APP_ID includes AUTH_ROLES.AUTH_APPS.APP_ID via ID_ROLE_FK using alias ROLES_APPS
    ERROR SQLDataSource Aliases incFrom AUTH_USERS_ROLES.APP_ID includes AUTH_ROLES.AUTH_APPS.APP_ID via ID_ROLE_FK using alias ROLES_APPS
    ERROR SQLDataSource Aliases incFrom AUTH_USERS_ROLES.EMAIL includes AUTH_USERS.EMAIL via ID_USER_FK using alias USERS
    ERROR SQLDataSource Aliases incFrom AUTH_USERS_ROLES.ROLE includes AUTH_ROLES.ROLE via ID_ROLE_FK using alias ROLES
    and also the generated SQL is different in respect to latest 13.0, so I just wanted to tell you, since I don't know if there is some bug or if I should expect some behaviour change with 13.1

    Please let me know if you need some more details (and if I need to worry for some incorrect usage by me which won't work with 13.1)

    #2
    These are not meant to be visible in production, thank you for the report. This is now fixed and will be available for download in nightly builds since Aug 18 (tomorrow).

    Regarding generated SQL difference - could you please share how exactly it is different, especially the part you consider to be a bug?

    Comment


      #3
      Hello,

      this is the log using 13.0-p20230816:

      Code:
      2023-08-17T20:06:19,367 INFO DSRequest Executing AUTH_USERS_ROLES.fetch rows: 0->-1 with
      criteria: {
          _constructor:"AdvancedCriteria",
          criteria:[
              {fieldName:"APP_ID", value:"JcaAuth", operator:"equals"},
              {fieldName:"EMAIL", value:"foo@bar.com", operator:"iEquals"}
          ],
          __normalized:true,
          operator:"and"
      }
      sortBy: [ROLE]
      2023-08-17T20:06:19,372 DEBUG DataSource Initializing inInitState
      2023-08-17T20:06:19,372 DEBUG DataSource Setting inInitState
      2023-08-17T20:06:19,372 DEBUG PoolableDataSourceFactory Activated DataSource 14 of type 'AUTH_ROLES' with hashCode '805093809'
      2023-08-17T20:06:19,373 DEBUG Relation Caching instance of toDS 'AUTH_ROLES' in the DSRequest map
      2023-08-17T20:06:19,373 DEBUG PoolableDataSourceFactory Activated DataSource 18 of type 'AUTH_USERS' with hashCode '1538520514'
      2023-08-17T20:06:19,373 DEBUG Relation Caching instance of toDS 'AUTH_USERS' in the DSRequest map
      2023-08-17T20:06:19,373 DEBUG PoolableDataSourceFactory Activated DataSource 15 of type 'AUTH_APPS' with hashCode '23273616'
      2023-08-17T20:06:19,373 DEBUG Relation Caching instance of toDS 'AUTH_APPS' in the DSRequest map
      2023-08-17T20:06:19,373 DEBUG DataSource Returning cached relation for AUTH_USERS_ROLES -> AUTH_ROLES.AUTH_APPS (the relation is not necessarily direct)
      2023-08-17T20:06:19,373 DEBUG DataSource Returning cached relation for AUTH_USERS_ROLES -> AUTH_USERS (the relation is not necessarily direct)
      2023-08-17T20:06:19,373 DEBUG DataSource Returning cached relation for AUTH_USERS_ROLES -> AUTH_ROLES (the relation is not necessarily direct)
      2023-08-17T20:06:19,374 DEBUG DeclarativeSecurity Processing security checks for DataSource null, field null
      2023-08-17T20:06:19,374 DEBUG DeclarativeSecurity Request is not a client request, ignoring security checks.
      2023-08-17T20:06:19,375 DEBUG AppBase No userTypes defined, allowing anyone access to all operations for this application
      2023-08-17T20:06:19,375 DEBUG AppBase No public zero-argument method named '_null' found, performing generic datasource operation
      2023-08-17T20:06:19,377 WARN SQLOrderClause Building order by clause, could not locate the correct index for includeFrom field ROLE (AUTH_ROLES.ROLE)
      2023-08-17T20:06:19,388 DEBUG SQLDataSource 13: Executing SQL query on 'dbJFrame': SELECT AUTH_USERS_ROLES.ID_REC, AUTH_USERS_ROLES.ID_ROLE_FK, AUTH_USERS_ROLES.ID_USER_FK, ROLES.ROLE, ROLES.ROLE AS NOME_GRUPPO, ROLES.DESCRIPTION AS ROLE_DESCRIPTION, USERS.EMAIL, ROLES_APPS.APP_ID FROM DBJFRAME.AUTH_USERS_ROLES JOIN DBJFRAME.AUTH_ROLES ROLES ON AUTH_USERS_ROLES.ID_ROLE_FK = ROLES.ID_REC JOIN DBJFRAME.AUTH_USERS USERS ON AUTH_USERS_ROLES.ID_USER_FK = USERS.ID_REC JOIN DBJFRAME.AUTH_APPS ROLES_APPS ON ROLES.ID_APP_FK = ROLES_APPS.ID_REC WHERE ((ROLES_APPS.APP_ID = 'JcaAuth' AND ROLES_APPS.APP_ID IS NOT NULL) AND (LOWER(USERS.EMAIL)=LOWER('foo@bar.com') AND USERS.EMAIL IS NOT NULL)) ORDER BY ROLE
      and this is the log using 13.1-d20230817:

      Code:
      2023-08-17T18:43:03,321 INFO DSRequest Executing AUTH_USERS_ROLES.fetch rows: 0->-1 with
      criteria: {
          _constructor:"AdvancedCriteria",
          criteria:[
              {fieldName:"APP_ID", value:"JcaAuth", operator:"equals"},
              {fieldName:"EMAIL", value:"foo@bar.com", operator:"iEquals"}
          ],
          __normalized:true,
          operator:"and"
      }
      sortBy: [ROLE]
      2023-08-17T18:43:03,326 DEBUG DataSource Initializing inInitState
      2023-08-17T18:43:03,327 DEBUG DataSource Setting inInitState
      2023-08-17T18:43:03,327 DEBUG PoolableDataSourceFactory Activated DataSource 14 of type 'AUTH_ROLES' with hashCode '846133246'
      2023-08-17T18:43:03,327 DEBUG Relation Caching instance of toDS 'AUTH_ROLES' in the DSRequest map
      2023-08-17T18:43:03,327 DEBUG PoolableDataSourceFactory Activated DataSource 18 of type 'AUTH_USERS' with hashCode '1135873850'
      2023-08-17T18:43:03,328 DEBUG Relation Caching instance of toDS 'AUTH_USERS' in the DSRequest map
      2023-08-17T18:43:03,328 DEBUG PoolableDataSourceFactory Activated DataSource 15 of type 'AUTH_APPS' with hashCode '1717464579'
      2023-08-17T18:43:03,328 DEBUG Relation Caching instance of toDS 'AUTH_APPS' in the DSRequest map
      2023-08-17T18:43:03,328 DEBUG DataSource Returning cached relation for AUTH_USERS_ROLES -> AUTH_ROLES.AUTH_APPS (the relation is not necessarily direct)
      2023-08-17T18:43:03,328 DEBUG DataSource Returning cached relation for AUTH_USERS_ROLES -> AUTH_USERS (the relation is not necessarily direct)
      2023-08-17T18:43:03,329 DEBUG DataSource Returning cached relation for AUTH_USERS_ROLES -> AUTH_ROLES (the relation is not necessarily direct)
      2023-08-17T18:43:03,329 DEBUG DeclarativeSecurity Processing security checks for DataSource null, field null
      2023-08-17T18:43:03,329 DEBUG DeclarativeSecurity Request is not a client request, ignoring security checks.
      2023-08-17T18:43:03,331 DEBUG AppBase No userTypes defined, allowing anyone access to all operations for this application
      2023-08-17T18:43:03,331 DEBUG AppBase No public zero-argument method named '_null' found, performing generic datasource operation
      2023-08-17T18:43:03,331 INFO SQLDataSource Aliases relation AUTH_USERS_ROLES->AUTH_ROLES using aliases null->ROLES otherFK: false using FKs fromFields: [ID_ROLE_FK ] toFields: [ID_REC ]
      2023-08-17T18:43:03,331 INFO SQLDataSource Aliases relation AUTH_USERS_ROLES->AUTH_ROLES using aliases null->ROLES otherFK: false using FKs fromFields: [ID_ROLE_FK ] toFields: [ID_REC ]
      2023-08-17T18:43:03,332 INFO SQLDataSource Aliases relation AUTH_USERS_ROLES->AUTH_ROLES using aliases null->ROLES otherFK: false using FKs fromFields: [ID_ROLE_FK ] toFields: [ID_REC ]
      2023-08-17T18:43:03,332 INFO SQLDataSource Aliases relation AUTH_USERS_ROLES->AUTH_ROLES using aliases null->ROLES otherFK: false using FKs fromFields: [ID_ROLE_FK ] toFields: [ID_REC ]
      2023-08-17T18:43:03,332 INFO SQLDataSource Aliases relation AUTH_USERS_ROLES->AUTH_USERS using aliases null->USERS otherFK: false using FKs fromFields: [ID_USER_FK ] toFields: [ID_REC ]
      2023-08-17T18:43:03,332 INFO SQLDataSource Aliases relation AUTH_USERS_ROLES->AUTH_ROLES using aliases null->ROLES otherFK: false using FKs fromFields: [ID_ROLE_FK ] toFields: [ID_REC ]
      2023-08-17T18:43:03,332 INFO SQLDataSource Aliases relation AUTH_USERS_ROLES->AUTH_ROLES using aliases null->ROLES otherFK: false using FKs fromFields: [ID_ROLE_FK ] toFields: [ID_REC ]
      2023-08-17T18:43:03,332 INFO SQLDataSource Aliases relation AUTH_ROLES->AUTH_APPS using aliases ROLES->ROLES_APPS otherFK: false using FKs fromFields: [ID_APP_FK ] toFields: [ID_REC ]
      2023-08-17T18:43:03,332 INFO SQLDataSource Aliases relation AUTH_USERS_ROLES->AUTH_ROLES using aliases null->ROLES otherFK: false using FKs fromFields: [ID_ROLE_FK ] toFields: [ID_REC ]
      2023-08-17T18:43:03,332 INFO SQLDataSource Aliases relation AUTH_ROLES->AUTH_APPS using aliases ROLES->ROLES_APPS otherFK: false using FKs fromFields: [ID_APP_FK ] toFields: [ID_REC ]
      2023-08-17T18:43:03,333 INFO SQLDataSource Aliases relation AUTH_USERS_ROLES->AUTH_USERS using aliases null->USERS otherFK: false using FKs fromFields: [ID_USER_FK ] toFields: [ID_REC ]
      2023-08-17T18:43:03,333 INFO SQLDataSource Aliases relation AUTH_USERS_ROLES->AUTH_ROLES using aliases null->ROLES otherFK: false using FKs fromFields: [ID_ROLE_FK ] toFields: [ID_REC ]
      2023-08-17T18:43:03,335 WARN SQLOrderClause Building order by clause, could not locate the correct index for includeFrom field ROLE (AUTH_ROLES.ROLE)
      2023-08-17T18:43:03,335 WARN SQLOrderClause Building order by clause, could not locate the correct index for includeFrom field ROLE (AUTH_ROLES.ROLE)
      2023-08-17T18:43:03,335 WARN SQLOrderClause Building order by clause, could not locate the correct index for includeFrom field ROLE (AUTH_ROLES.ROLE)
      2023-08-17T18:43:03,344 DEBUG SQLDataSource 13: Executing SQL query on 'dbJFrame': SELECT AUTH_USERS_ROLES.ID_REC, AUTH_USERS_ROLES.ID_ROLE_FK, AUTH_USERS_ROLES.ID_USER_FK, ROLES.ROLE, ROLES.ROLE, ROLES.DESCRIPTION AS ROLE_DESCRIPTION, ROLES.ROLE, USERS.EMAIL, ROLES_APPS.APP_ID FROM DBJFRAME.AUTH_USERS_ROLES JOIN DBJFRAME.AUTH_ROLES ROLES ON AUTH_USERS_ROLES.ID_ROLE_FK = ROLES.ID_REC JOIN DBJFRAME.AUTH_USERS USERS ON AUTH_USERS_ROLES.ID_USER_FK = USERS.ID_REC JOIN DBJFRAME.AUTH_APPS ROLES_APPS ON ROLES.ID_APP_FK = ROLES_APPS.ID_REC WHERE ((ROLES_APPS.APP_ID = 'JcaAuth' AND ROLES_APPS.APP_ID IS NOT NULL) AND (LOWER(USERS.EMAIL)=LOWER('foo@bar.com') AND USERS.EMAIL IS NOT NULL)) ORDER BY ROLE
      here I try to highlight the differences in the latest query:

      Code:
      SELECT AUTH_USERS_ROLES.ID_REC,
             AUTH_USERS_ROLES.ID_ROLE_FK,
             AUTH_USERS_ROLES.ID_USER_FK,
             ROLES.ROLE,
             ROLES.ROLE, -- in the former query it's: ROLES.ROLE AS NOME_GRUPPO,
             ROLES.DESCRIPTION AS ROLE_DESCRIPTION,
             ROLES.ROLE, -- not present in the former query
             USERS.EMAIL,
             ROLES_APPS.APP_ID
      FROM DBJFRAME.AUTH_USERS_ROLES
               JOIN DBJFRAME.AUTH_ROLES ROLES ON AUTH_USERS_ROLES.ID_ROLE_FK = ROLES.ID_REC
               JOIN DBJFRAME.AUTH_USERS USERS ON AUTH_USERS_ROLES.ID_USER_FK = USERS.ID_REC
               JOIN DBJFRAME.AUTH_APPS ROLES_APPS ON ROLES.ID_APP_FK = ROLES_APPS.ID_REC
      WHERE ((ROLES_APPS.APP_ID = 'JcaAuth' AND ROLES_APPS.APP_ID IS NOT NULL) AND
             (LOWER(USERS.EMAIL) = LOWER('foo@bar.com') AND USERS.EMAIL IS NOT NULL))
      ORDER BY ROLE
      Here are the datasources involved ():

      Code:
      <DataSource xmlns:fmt="WEB-INF/" xmlns="http://www.smartclient.com/schema"
                  ID="AUTH_USERS_ROLES"
                  serverType="sql"
                  dbName="dbJFrame"
                  schema="DBJFRAME"
                  tableName="AUTH_USERS_ROLES"
                  allowAdvancedCriteria="true"
                  useAnsiJoins="true"
                  requiresAuthentication="true"
                  dropExtraFields="false"
      >
          <fmt:bundle basename="i18nMessages" encoding="utf-8"/>
          <fields>
              <field name="ID_REC" primaryKey="true" type="sequence" hidden="true" sequenceName="SEQUENCE_AUTH"/>
              <field name="ID_ROLE_FK" type="integer" foreignKey="AUTH_ROLES.ID_REC" relatedTableAlias="ROLES" required="true"/>
              <field name="ID_USER_FK" type="integer" foreignKey="AUTH_USERS.ID_REC" relatedTableAlias="USERS" required="true"/>
              <field name="ROLE" type="text" includeFrom="AUTH_ROLES.ROLE" includeVia="ID_ROLE_FK"/>
              <field name="NOME_GRUPPO" type="text" includeFrom="AUTH_ROLES.ROLE" includeVia="ID_ROLE_FK"/>
      
              <field name="ROLE_DESCRIPTION" type="text" includeFrom="AUTH_ROLES.DESCRIPTION" includeVia="ID_ROLE_FK"/>
              <field name="ROLES" type="text" includeFrom="AUTH_ROLES.ROLE" includeVia="ID_ROLE_FK" customSQL="true"/>
              <field name="EMAIL" type="text" includeFrom="AUTH_USERS.EMAIL" includeVia="ID_USER_FK"/>
      
              <field name="IS_SUPER_USER" type="boolean" sqlStorageStrategy="singleCharTF" includeFrom="AUTH_ROLES.IS_SUPER_USER" includeVia="ID_ROLE_FK"/>
              <field name="APP_ID" type="text" includeFrom="AUTH_ROLES.AUTH_APPS.APP_ID" includeVia="ID_ROLE_FK"/>
          </fields>
      </DataSource>
      Code:
      <DataSource xmlns:fmt="WEB-INF/" xmlns="http://www.smartclient.com/schema"
                  ID="AUTH_ROLES"
                  serverType="sql"
                  dbName="dbJFrame"
                  schema="DBJFRAME"
                  tableName="AUTH_ROLES"
                  allowAdvancedCriteria="true"
                  useAnsiJoins="true"
                  requiresAuthentication="true"
                  dropExtraFields="false"
      >
          <fmt:bundle basename="i18nMessages" encoding="utf-8"/>
          <fields>
              <field name="ID_REC" primaryKey="true" type="sequence" hidden="true" sequenceName="SEQUENCE_AUTH"/>
              <field name="ROLE" type="trimText" length="200" required="true"/>
              <!-- per retrocompatibilitÓ...-->
              <field name="NOME_GRUPPO" type="text" customSelectExpression="ROLE"/>
              <field name="DESCRIPTION" type="trimText" length="200"/>
              <field name="ID_APP_FK" type="integer" foreignKey="AUTH_APPS.ID_REC" relatedTableAlias="APPS" required="true"/>
              <field name="IS_SUPER_USER" type="boolean" sqlStorageStrategy="singleCharTF" editRequiresRole="ADMIN, ROLE_ADMIN"/>
              <field name="APP_ID" type="text" includeFrom="AUTH_APPS.APP_ID" includeVia="ID_APP_FK"/>
          </fields>
      </DataSource>
      Code:
      <DataSource xmlns:fmt="WEB-INF/" xmlns="http://www.smartclient.com/schema"
                  ID="AUTH_USERS"
                  serverType="sql"
                  dbName="dbJFrame"
                  schema="DBJFRAME"
                  tableName="AUTH_USERS"
                  allowAdvancedCriteria="true"
                  useAnsiJoins="true"
                  requiresAuthentication="true"
                  dropExtraFields="false"
      >
          <fmt:bundle basename="i18nMessages" encoding="utf-8"/>
          <fields>
              <field name="ID_REC" primaryKey="true" type="sequence" hidden="true" sequenceName="SEQUENCE_AUTH"/>
              <field name="EMAIL" type="trimText" length="200" required="true"/>
          </fields>
      </DataSource>
      Code:
      <DataSource xmlns:fmt="WEB-INF/" xmlns="http://www.smartclient.com/schema"
                  ID="AUTH_APPS"
                  serverType="sql"
                  dbName="dbJFrame"
                  schema="DBJFRAME"
                  tableName="AUTH_APPS"
                  allowAdvancedCriteria="true"
                  useAnsiJoins="true"
                  requiresAuthentication="true"
                  dropExtraFields="false"
      >
          <fmt:bundle basename="i18nMessages" encoding="utf-8"/>
          <fields>
              <field name="ID_REC" primaryKey="true" type="sequence" hidden="true" sequenceName="SEQUENCE_AUTH"/>
              <field name="APP_ID" type="trimText" length="100" required="true"/>
          </fields>
      </DataSource>

      Comment


        #4
        Hello, did you manage to see the problem?

        Comment


          #5
          Apologies for the delay - there are some differences between 13.0 and 13.1, but same valid datasources setup should result in same generated SQL output.

          There are these two fields including same column from the same related record, that cause an unpredictable behavior:
          Code:
          <field name="ROLE" type="text" includeFrom="AUTH_ROLES.ROLE" includeVia="ID_ROLE_FK"/>
          <field name="NOME_GRUPPO" type="text" includeFrom="AUTH_ROLES.ROLE" includeVia="ID_ROLE_FK"/>
          Despite this accidentally works as you expect in 13.0, it is still unpredictable in 13.0 as it is in 13.1. There should be single field including same related field via same foreign key. So, basically one of these fields should be removed for this to work consistently.

          Note that you can include same related fields from different related records of the same related table by having includeVia referring different foreign keys, which you most likely already aware of as you are using all these features.

          Comment


            #6
            Hello, thank you for the heads up.

            I wasn't aware of this. I do know that DataSourceField.name must be unique, and also nativeName (relative to a table), and those seem obvious, but apparently multiple includeFroms were working, as they used different alias, and I don't see an obvious warning.

            I think that I can simply use a customSelectExpression for the 2nd, as it's essentially a duplicate needed only for backward compatibility in my applications.

            I hope there aren't any similar cases like this in my project. Would it be possible for you to log a WARN message when loading the dataSources?

            Also please note that I still see warnings as in the first post using 13.1-d20230910
            Last edited by claudiobosticco; 11 Sep 2023, 05:21.

            Comment


              #7
              SNAPSHOT_v13.1d_2023-09-19/Enterprise Deployment (2023-09-19)

              Oracle 19c

              Hello, just to let you know that using the latest build, the previous test case, with the dataSource which previously had the "duplicated" includeFrom, modified like this:

              Code:
              <DataSource xmlns:fmt="WEB-INF/" xmlns="http://www.smartclient.com/schema"
                          ID="AUTH_USERS_ROLES"
                          serverType="sql"
                          dbName="dbJFrame"
                          schema="DBJFRAME"
                          tableName="AUTH_USERS_ROLES"
                          allowAdvancedCriteria="true"
                          useAnsiJoins="true"
                          requiresAuthentication="true"
                          dropExtraFields="false"
              >
                  <fmt:bundle basename="i18nMessages" encoding="utf-8"/>
                  <fields>
                      <field name="ID_REC" primaryKey="true" type="sequence" hidden="true" sequenceName="SEQUENCE_AUTH"/>
                      <field name="ID_ROLE_FK" type="integer" foreignKey="AUTH_ROLES.ID_REC" relatedTableAlias="ROLES" required="true"/>
                      <field name="ID_USER_FK" type="integer" foreignKey="AUTH_USERS.ID_REC" relatedTableAlias="USERS" required="true"/>
                      <field name="ROLE" type="text" includeFrom="AUTH_ROLES.ROLE" includeVia="ID_ROLE_FK"/>
                      <!-- per retrocompatibilitÓ...-->
                      <field name="NOME_GRUPPO" type="text" customSelectExpression="ROLES.ROLE"/>
              
                      <field name="ROLE_DESCRIPTION" type="text" includeFrom="AUTH_ROLES.DESCRIPTION" includeVia="ID_ROLE_FK"/>
                      <field name="ROLES" type="text" customSelectExpression="ROLES.ROLE" customSQL="true"/>
                      <field name="EMAIL" type="text" includeFrom="AUTH_USERS.EMAIL" includeVia="ID_USER_FK"/>
              
                      <field name="IS_SUPER_USER" type="boolean" sqlStorageStrategy="singleCharTF" includeFrom="AUTH_ROLES.IS_SUPER_USER" includeVia="ID_ROLE_FK"/>
                      <field name="APP_ID" type="text" includeFrom="AUTH_ROLES.AUTH_APPS.APP_ID" includeVia="ID_ROLE_FK"/>
                  </fields>
              </DataSource>
              so with customSelectExpression instead of duplicated includeFrom, is now producing a wrong query (no joins, no order by, and AUTH_USERS_ROLES.null column):

              Code:
              SELECT AUTH_USERS_ROLES.ID_REC,
                     AUTH_USERS_ROLES.ID_ROLE_FK,
                     AUTH_USERS_ROLES.ID_USER_FK,
                     ROLES.ROLE AS NOME_GRUPPO
              FROM DBJFRAME.AUTH_USERS_ROLES
              WHERE ((AUTH_USERS_ROLES.null = 'JcaAuth' AND AUTH_USERS_ROLES.null IS NOT NULL) AND
                     (LOWER(AUTH_USERS_ROLES.null) = LOWER('foo@bar.com') AND AUTH_USERS_ROLES.null IS NOT NULL))
              while SNAPSHOT_v13.1d_2023-09-10/Enterprise Deployment (built 2023-09-10)
              was correctly producing this query:

              Code:
              SELECT AUTH_USERS_ROLES.ID_REC,
                     AUTH_USERS_ROLES.ID_ROLE_FK,
                     AUTH_USERS_ROLES.ID_USER_FK,
                     ROLES.ROLE AS NOME_GRUPPO,
                     ROLES.ROLE,
                     ROLES.DESCRIPTION AS ROLE_DESCRIPTION,
                     USERS.EMAIL,
                     ROLES.IS_SUPER_USER,
                     ROLES_APPS.APP_ID
              FROM DBJFRAME.AUTH_USERS_ROLES
                       JOIN DBJFRAME.AUTH_ROLES ROLES ON AUTH_USERS_ROLES.ID_ROLE_FK = ROLES.ID_REC
                       JOIN DBJFRAME.AUTH_USERS USERS ON AUTH_USERS_ROLES.ID_USER_FK = USERS.ID_REC
                       JOIN DBJFRAME.AUTH_APPS ROLES_APPS ON ROLES.ID_APP_FK = ROLES_APPS.ID_REC
              WHERE ((ROLES_APPS.APP_ID = 'JcaAuth' AND ROLES_APPS.APP_ID IS NOT NULL) AND
                     (LOWER(USERS.EMAIL) = LOWER('foo@bar.com') AND USERS.EMAIL IS NOT NULL))
              ORDER BY ROLE
              Last edited by claudiobosticco; 20 Sep 2023, 00:29. Reason: added db version

              Comment


                #8
                Logs from #1 are now fixed and won't appear on their own, but they could be enabled as described at the bottom of the includeVia docs (13.1 only).

                Additionally, there is a new warning logged during both DataSource loading and request execution, reporting ambiguous includeFrom fields (13.1 only, mentioned in the same docs as above).

                As for the issue with the incorrect query from #7, it appears to be a recent regression that has now been fixed. Could you please try the 2023-09-21 nightly build and let us know how it works for you?

                Comment


                  #9
                  Thanks for new warning logged and the clarification in the docs!

                  Originally posted by Isomorphic View Post
                  As for the issue with the incorrect query from #7, it appears to be a recent regression that has now been fixed. Could you please try the 2023-09-21 nightly build and let us know how it works for you?
                  I can confirm that SNAPSHOT_v13.1d_2023-09-21/Enterprise Deployment it's working, thank you very much.

                  Just a note:

                  While downloading the build with maven, I noticed these warnings:
                  Code:
                  [WARNING] Expected to find exactly 1 POM matching artifact with name 'isomorphic-spring-hibernate3', but found 0.  Skpping installation.
                  [WARNING] Expected to find exactly 1 POM matching artifact with name 'isomorphic-embedded-tomcat9', but found 0.  Skpping installation.
                  and then while running the application, I noticed this two warnings in the tomcat console:

                  Code:
                  2023-09-21T16:24:47,322 [ ] WARN InterfaceProvider Configuration error - cannot find provider for interface: IObfuscator
                  java.lang.ClassNotFoundException: com.isomorphic.obfuscation.Obfuscator
                      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1291) ~[catalina.jar:8.5.23]
                      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119) ~[catalina.jar:8.5.23]
                      at java.lang.Class.forName0(Native Method) ~[?:?]
                      at java.lang.Class.forName(Class.java:315) ~[?:?]
                      at com.isomorphic.base.Reflection._classForName(Reflection.java:333) ~[isomorphic-core-rpc-13.1-d20230921.jar:?]
                      at com.isomorphic.base.Reflection.classForName(Reflection.java:297) ~[isomorphic-core-rpc-13.1-d20230921.jar:?]
                      at com.isomorphic.interfaces.InterfaceProvider.exists(InterfaceProvider.java:160) ~[isomorphic-core-rpc-13.1-d20230921.jar:?]
                      at com.isomorphic.interfaces.InterfaceProvider.exists(InterfaceProvider.java:138) ~[isomorphic-core-rpc-13.1-d20230921.jar:?]
                      at com.isomorphic.assembly.FileAssembler.<clinit>(FileAssembler.java:92) ~[isomorphic-assembly-13.1-d20230921.jar:?]
                  and

                  Code:
                  2023-09-21T16:26:16,277 [ ] WARN InterfaceProvider Configuration error - cannot find provider for interface: IHibernateDataSource
                  java.lang.ClassNotFoundException: com.isomorphic.hibernate.HibernateDataSource
                      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1291) ~[catalina.jar:8.5.23]
                      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119) ~[catalina.jar:8.5.23]
                      at java.lang.Class.forName0(Native Method) ~[?:?]
                      at java.lang.Class.forName(Class.java:315) ~[?:?]
                      at com.isomorphic.base.Reflection._classForName(Reflection.java:333) ~[isomorphic-core-rpc-13.1-d20230921.jar:?]
                      at com.isomorphic.base.Reflection.classForName(Reflection.java:297) ~[isomorphic-core-rpc-13.1-d20230921.jar:?]
                      at com.isomorphic.interfaces.InterfaceProvider.exists(InterfaceProvider.java:160) [isomorphic-core-rpc-13.1-d20230921.jar:?]
                      at com.isomorphic.interfaces.InterfaceProvider.exists(InterfaceProvider.java:138) [isomorphic-core-rpc-13.1-d20230921.jar:?]
                      at com.isomorphic.sql.SQLConnectionManager.<clinit>(SQLConnectionManager.java:70) [isomorphic-sql-13.1-d20230921.jar:?]

                  Last edited by claudiobosticco; 21 Sep 2023, 07:52.

                  Comment

                  Working...
                  X