Announcement

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

    PK is not returned - Add operation

    Hi Isomorphic,

    I face an error while doing an add operation.
    SGWT - 6.1-p20171121

    While executing the below line,
    dsRequest.execute();

    Log: Please refer SC-1

    PK is generated by it is not returned as expected, which leads to fail the fetch operation followed(framework based).

    Ds.xml: please refer SC-2

    Code: Please refer SC-3

    Could you please guide me to get this resolved.


    Thanks,
    Manjula
    Attached Files

    #2
    Your log shows that a generated primaryKey value was detected, and says what they are. Then you cut off the log before the cache sync fetch was attempted (??). That's the part that you're claiming has failed, why did you cut it off?

    This doesn't make any sense at all, please start over. However, before posting again, note that you are almost two years out of date on patches, please retest with the latest patched build (see smartclient.com/builds). Always do this before posting.

    Comment


      #3
      Hi Isomorphic,

      I will try with the new patch version of 6.1.

      Please find the below complete log generated for dsRequest.execute().

      [INFO] === 2020-10-07 16:45:26,627 [6-60] INFO SQLDriver - [builtinApplication.Issue_add] Executing SQL query on 'DS_JNDI' using connection '1596989941': INSERT INTO TABLEA (CREATE_DATE, DESCRIPTION, END_DATE, ID_CREATOR, ID_ENTITY, ID_OWNER, START_DATE, TITLE) VALUES ('2020-10-07T16:45:07', 'test<br>', '20201014', '-1', 33, '-1', '20201013', 't')
      [INFO] === 2020-10-07 16:45:26,633 [6-60] DEBUG SQLDriver - [builtinApplication.Issue_add] Found 1 sequence(s)/autoGenerated PK field(s): [ID_ISSUE]
      [INFO] === 2020-10-07 16:45:26,634 [6-60] DEBUG SQLDriver - [builtinApplication.Issue_add] Discovered zero or one generated key via JDBC: {ID_ISSUE=2609}
      [INFO] === 2020-10-07 16:45:26,636 [6-60] DEBUG SQLDataSource - [builtinApplication.Issue_add] add operation affected 1 rows
      [INFO] === 2020-10-07 16:45:26,639 [6-60] INFO SQLDataSource - [builtinApplication.Issue_add] primaryKeys: {}
      [INFO] === 2020-10-07 16:45:26,640 [6-60] DEBUG SQLDataSource - [builtinApplication.Issue_add] Added JDBC-generated values to the list of primaryKeys. Key values are now: {ID_ISSUE=2609}
      [INFO] === 2020-10-07 16:45:26,641 [6-60] DEBUG DeclarativeSecurity - [builtinApplication.Issue_add] Processing security checks for DataSource null, field null
      [INFO] === 2020-10-07 16:45:26,642 [6-60] DEBUG DeclarativeSecurity - [builtinApplication.Issue_add] DataSource Issue is not in the pre-checked list, processing...
      [INFO] === 2020-10-07 16:45:26,643 [6-60] DEBUG DeclarativeSecurity - [builtinApplication.Issue_add] Processing security checks for DataSource User, field ID_USER
      [INFO] === 2020-10-07 16:45:26,643 [6-60] DEBUG DeclarativeSecurity - [builtinApplication.Issue_add] DataSource User is not in the pre-checked list, processing...
      [INFO] === 2020-10-07 16:45:26,644 [6-60] DEBUG DeclarativeSecurity - [builtinApplication.Issue_add] Processing security checks for DataSource User, field ID_USER
      [INFO] === 2020-10-07 16:45:26,644 [6-60] DEBUG DeclarativeSecurity - [builtinApplication.Issue_add] DataSource User is not in the pre-checked list, processing...
      [INFO] === 2020-10-07 16:45:26,645 [6-60] DEBUG DeclarativeSecurity - [builtinApplication.Issue_add] Processing security checks for DataSource User, field ID_USER
      [INFO] === 2020-10-07 16:45:26,646 [6-60] DEBUG DeclarativeSecurity - [builtinApplication.Issue_add] DataSource User is not in the pre-checked list, processing...
      [INFO] === 2020-10-07 16:45:26,647 [6-60] DEBUG DeclarativeSecurity - [builtinApplication.Issue_add] Processing security checks for DataSource User, field EMAIL
      [INFO] === 2020-10-07 16:45:26,647 [6-60] DEBUG DeclarativeSecurity - [builtinApplication.Issue_add] DataSource User is not in the pre-checked list, processing...
      [INFO] === 2020-10-07 16:45:26,650 [6-60] DEBUG AppBase - [builtinApplication.Issue_add, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
      [INFO] === 2020-10-07 16:45:26,651 [6-60] DEBUG AppBase - [builtinApplication.Issue_add, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
      [INFO] === 2020-10-07 16:45:26,659 [6-60] DEBUG MultipleFieldCriteriaTransformer - [builtinApplication.Issue_add, builtinApplication.null] Transformed criteria {
      [INFO] ID_ISSUE:2609
      [INFO] }
      [INFO] === 2020-10-07 16:45:26,667 [6-60] INFO SQLDataSource - [builtinApplication.Issue_add, builtinApplication.null] Performing fetch operation with
      [INFO] criteria: {ID_ISSUE:2609} values: {ID_ISSUE:2609}
      [INFO] === 2020-10-07 16:45:26,676 [6-60] INFO SQLDataSource - [builtinApplication.Issue_add, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause$defaultAnsiJoinClause WHERE $defaultWhereClause
      [INFO] === 2020-10-07 16:45:26,679 [6-60] DEBUG SQLDataSource - [builtinApplication.Issue_add, builtinApplication.null] Using SQL Limit query
      [INFO] === 2020-10-07 16:45:26,680 [6-60] DEBUG SQLServerDriver - [builtinApplication.Issue_add, builtinApplication.null] Using PK as default sorter: com.isomorphic.sql.SQLOrderClause@23cd4242
      [INFO] === 2020-10-07 16:45:26,681 [6-60] DEBUG SQLDataSource - [builtinApplication.Issue_add, builtinApplication.null] SQL windowed select rows 0->-1, result size 1. Query: SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY ID_ISSUE) AS rowID FROM (SELECT TOP 100 PERCENT TABLEA.ID_ISSUE, TABLEA.ID_DER, TABLEA.TITLE, TABLEA.ID_OWNER, TABLEA.ID_CREATOR, TABLEA.ID_CATEGORY, TABLEA.STEP, TABLEA.DESCRIPTION, TABLEA.COMMENT, TABLEA.START_DATE, TABLEA.END_DATE, TABLEA.ID_ENTITY, TABLEA.PRIORITY, TABLEA.ID_LINKED_ISSUE, TABLEA.CREATE_DATE, TABLEA.RECERTIF_DATE, TABLEA.UPDATE_DATE, TABLEA.UPDATE_USER, TABLEA.UPDATE_COMMENT, TABLEA.IMPACT, TABLEA.ID_ANALYST, TABLEA.IS_VALID, TABLEA.DATE_ANALYS, TABLEA.STATUS, TABLEA.STATUS_RECERTIF, (SELECT ID_CATEG_PARENT FROM TABLEB WHERE ID_CATEG = ID_CATEGORY) AS ID_CATEG_PARENT, TABLEA.APPLICATION, TABLEC.EMAIL FROM TABLEA JOIN dbo.TABLEC ON TABLEA.ID_OWNER = TABLEC.ID_USER AND TABLEA.UPDATE_USER = TABLEC.ID_USER AND TABLEA.ID_ANALYST = TABLEC.ID_USER WHERE (TABLEA.ID_ISSUE=2609)) x) y WHERE y.rowID BETWEEN 1 AND 1
      [INFO] === 2020-10-07 16:45:26,683 [6-60] DEBUG SQLDataSource - [builtinApplication.Issue_add, builtinApplication.null] SQL windowed select rows 0->-1, result size 1. Query: SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY ID_ISSUE) AS rowID FROM (SELECT TOP 100 PERCENT TABLEA.ID_ISSUE, TABLEA.ID_DER, TABLEA.TITLE, TABLEA.ID_OWNER, TABLEA.ID_CREATOR, TABLEA.ID_CATEGORY, TABLEA.STEP, TABLEA.DESCRIPTION, TABLEA.COMMENT, TABLEA.START_DATE, TABLEA.END_DATE, TABLEA.ID_ENTITY, TABLEA.PRIORITY, TABLEA.ID_LINKED_ISSUE, TABLEA.CREATE_DATE, TABLEA.RECERTIF_DATE, TABLEA.UPDATE_DATE, TABLEA.UPDATE_USER, TABLEA.UPDATE_COMMENT, TABLEA.IMPACT, TABLEA.ID_ANALYST, TABLEA.IS_VALID, TABLEA.DATE_ANALYS, TABLEA.STATUS, TABLEA.STATUS_RECERTIF, (SELECT ID_CATEG_PARENT FROM TABLEB WHERE ID_CATEG = ID_CATEGORY) AS ID_CATEG_PARENT, TABLEA.APPLICATION, TABLEC.EMAIL FROM TABLEA JOIN dbo.TABLEC ON TABLEA.ID_OWNER = TABLEC.ID_USER AND TABLEA.UPDATE_USER = TABLEC.ID_USER AND TABLEA.ID_ANALYST = TABLEC.ID_USER WHERE (TABLEA.ID_ISSUE=2609)) x) y WHERE y.rowID BETWEEN 1 AND 1
      [INFO] === 2020-10-07 16:45:26,684 [6-60] DEBUG SQLDataSource - [builtinApplication.Issue_add, builtinApplication.null] Setting DSRequest as being part of a transaction
      [INFO] === 2020-10-07 16:45:26,684 [6-60] INFO SQLDataSource - [builtinApplication.Issue_add, builtinApplication.null] 106: Executing cache sync query on 'DS_JNDI': SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY ID_ISSUE) AS rowID FROM (SELECT TOP 100 PERCENT TABLEA.ID_ISSUE, TABLEA.ID_DER, TABLEA.TITLE, TABLEA.ID_OWNER, TABLEA.ID_CREATOR, TABLEA.ID_CATEGORY, TABLEA.STEP, TABLEA.DESCRIPTION, TABLEA.COMMENT, TABLEA.START_DATE, TABLEA.END_DATE, TABLEA.ID_ENTITY, TABLEA.PRIORITY, TABLEA.ID_LINKED_ISSUE, TABLEA.CREATE_DATE, TABLEA.RECERTIF_DATE, TABLEA.UPDATE_DATE, TABLEA.UPDATE_USER, TABLEA.UPDATE_COMMENT, TABLEA.IMPACT, TABLEA.ID_ANALYST, TABLEA.IS_VALID, TABLEA.DATE_ANALYS, TABLEA.STATUS, TABLEA.STATUS_RECERTIF, (SELECT ID_CATEG_PARENT FROM TABLEB WHERE ID_CATEG = ID_CATEGORY) AS ID_CATEG_PARENT, TABLEA.APPLICATION, TABLEC.EMAIL FROM TABLEA JOIN dbo.TABLEC ON TABLEA.ID_OWNER = TABLEC.ID_USER AND TABLEA.UPDATE_USER = TABLEC.ID_USER AND TABLEA.ID_ANALYST = TABLEC.ID_USER WHERE (TABLEA.ID_ISSUE=2609)) x) y WHERE y.rowID BETWEEN 1 AND 1
      [INFO] === 2020-10-07 16:45:26,698 [6-60] INFO DSResponse - [builtinApplication.Issue_add] DSResponse: List with 0 items
      [INFO] === 2020-10-07 16:45:26,699 [6-60] DEBUG DSRequest - [builtinApplication.Issue_add] freeOnExecute is false for request of type fetch on DataSource Issue - not freeing resources!
      [INFO] === 2020-10-07 16:45:26,700 [6-60] INFO DSResponse - DSResponse: List with 0 items
      [INFO] === 2020-10-07 16:45:26,700 [6-60] DEBUG DSRequest - freeOnExecute is false for request of type add on DataSource Issue - not freeing resources!
      [INFO] === 2020-10-08 13:29:05,131 [-119] DEBUG DataSourceDMI - Invocation threw exception
      [INFO] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      [INFO] at java.util.ArrayList.rangeCheck(ArrayList.java:635)
      [INFO] at java.util.ArrayList.get(ArrayList.java:411)
      [INFO] at com.bp2s.xproducts.gdl.server.servlet.IssueRequest.add(IssueRequest.java:74)
      [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [INFO] at java.lang.reflect.Method.invoke(Method.java:606)
      [INFO] at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:873)
      [INFO] at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:434)
      [INFO] at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64)
      [INFO] at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2809)
      [INFO] at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:230)
      [INFO] at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:187)
      [INFO] at com.bp2s.xproducts.gdl.server.servlet.SecureIDACall.processRequest(SecureIDACall.java:41)
      [INFO] at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119)
      [INFO] at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79)
      [INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
      [INFO] at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:176)
      [INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      [INFO] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
      [INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
      [INFO] at com.bp2s.xproducts.gdl.server.filter.SessionFilter.doFilter(SessionFilter.java:104)
      [INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      [INFO] at com.bp2s.xproducts.gdl.server.filter.GWTCacheControlFilter.doFilter(GWTCacheControlFilter.java:44)
      [INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
      [INFO] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
      [INFO] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      [INFO] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
      [INFO] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      [INFO] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      [INFO] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
      [INFO] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      [INFO] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      [INFO] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      [INFO] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      [INFO] at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:68)
      [INFO] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      [INFO] at org.eclipse.jetty.server.Server.handle(Server.java:370)
      [INFO] at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      [INFO] at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
      [INFO] at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
      [INFO] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
      [INFO] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      [INFO] at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      [INFO] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
      [INFO] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      [INFO] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      [INFO] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      [INFO] at java.lang.Thread.run(Thread.java:744)
      [INFO] === 2020-10-08 13:29:05,132 [-119] DEBUG DSRequest - freeOnExecute is false for request of type add on DataSource Issue - not freeing resources!
      [INFO] === 2020-10-08 13:29:05,132 [-119] WARN RequestContext - dsRequest.execute() failed:
      [INFO] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      [INFO] at java.util.ArrayList.rangeCheck(ArrayList.java:635)
      [INFO] at java.util.ArrayList.get(ArrayList.java:411)
      [INFO] at com.bp2s.xproducts.gdl.server.servlet.IssueRequest.add(IssueRequest.java:74)
      [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [INFO] at java.lang.reflect.Method.invoke(Method.java:606)
      [INFO] at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:873)
      [INFO] at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:434)
      [INFO] at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64)
      [INFO] at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2809)
      [INFO] at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:230)
      [INFO] at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:187)
      [INFO] at com.bp2s.xproducts.gdl.server.servlet.SecureIDACall.processRequest(SecureIDACall.java:41)
      [INFO] at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119)
      [INFO] at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79)
      [INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
      [INFO] at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:176)
      [INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      [INFO] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
      [INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
      [INFO] at com.bp2s.xproducts.gdl.server.filter.SessionFilter.doFilter(SessionFilter.java:104)
      [INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      [INFO] at com.bp2s.xproducts.gdl.server.filter.GWTCacheControlFilter.doFilter(GWTCacheControlFilter.java:44)
      [INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
      [INFO] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
      [INFO] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      [INFO] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
      [INFO] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      [INFO] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      [INFO] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
      [INFO] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      [INFO] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      [INFO] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      [INFO] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      [INFO] at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:68)
      [INFO] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      [INFO] at org.eclipse.jetty.server.Server.handle(Server.java:370)
      [INFO] at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      [INFO] at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
      [INFO] at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
      [INFO] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
      [INFO] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      [INFO] at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      [INFO] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
      [INFO] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      [INFO] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      [INFO] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      [INFO] at java.lang.Thread.run(Thread.java:744)
      [INFO] === 2020-10-08 13:29:05,133 [-119] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
      [INFO] === 2020-10-08 13:29:05,146 [-119] DEBUG SQLTransaction - Rolling back DS_JNDI transaction "2069696741"
      [INFO] === 2020-10-08 13:29:05,147 [-119] DEBUG RPCManager - non-DMI response, dropExtraFields: false
      [INFO] === 2020-10-08 13:29:05,148 [-119] DEBUG SQLTransaction - getConnection() looked for transactional connection for DS_JNDI: hashcode "2069696741"
      [INFO] === 2020-10-08 13:29:05,148 [-119] DEBUG SQLTransaction - Ending DS_JNDI transaction "2069696741"
      [INFO] === 2020-10-08 13:29:05,150 [-119] DEBUG SQLConnectionManager - About to close SQLServerConnection with hashcode "2069696741"
      [INFO] === 2020-10-08 13:29:05,150 [-119] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 103
      [INFO] === 2020-10-08 13:29:05,150 [-119] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 78
      [INFO] === 2020-10-08 13:29:05,150 [-119] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 78
      [INFO] === 2020-10-08 13:29:05,150 [-119] DEBUG PoolableDataSourceFactory - Cleared and passivated DataSource 78 of type 'User'
      [INFO] === 2020-10-08 13:29:05,150 [-119] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 103
      [INFO] === 2020-10-08 13:29:05,150 [-119] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 103
      [INFO] === 2020-10-08 13:29:05,150 [-119] DEBUG PoolableDataSourceFactory - Cleared and passivated DataSource 103 of type 'Issue'
      [INFO] === 2020-10-08 13:29:05,150 [-119] DEBUG DSRequest - Ignoring freeResources call because this is not a primary request!
      [INFO] === 2020-10-08 13:29:05,150 [-119] DEBUG DSRequest - Ignoring freeQueueResources call because this is not a primary request!
      [INFO] === 2020-10-08 13:29:05,150 [-119] DEBUG DSRequest - Ignoring freeResources call because they have already been freed
      [INFO] === 2020-10-08 13:29:05,150 [-119] DEBUG DSRequest - Ignoring freeQueueResources call because they have already been freed
      [INFO] === 2020-10-08 13:29:05,194 [-120] INFO Download - done streaming:



      Thanks,
      Manjula
      Last edited by manjulam; 8th Oct 2020, 04:51.

      Comment


        #4
        Hi Isomorphic,

        I tried with latest patch build , but still the same.


        Thanks,
        Manjula

        Comment


          #5
          Hi manjulam,

          I'd have a lot here 1st, which seems to be your code causing an exception?
          Code:
          com.bp2s.xproducts.gdl.server.servlet.IssueRequest.add(IssueRequest.java:74)
          Best regards
          Blama

          Comment


            #6
            Hi Blama,

            We are executing an add operation. Once insert is done, select will run to retrieve the dsresponse.

            com.bp2s.xproducts.gdl.server.servlet.IssueRequest.add(IssueRequest.java:74)
            In the above line, we have code as dsresponse.getData().get(0)
            As the dsresponse we receive as 0 items. We face an error in that line.
            The insert query is formed correctly and PK is also generated. But during cache sync operation it is not fetching the inserted record from DB.

            Isomorphic, Do you have any points to fix this?

            Thanks,
            Manjula

            Comment


              #7
              The logs show that the newly allocated primary key value is retrieved from JDBC successfully, and the cache sync query is then performed to re-select the record, which correctly incorporates the new primary key (ID_ISSUE=2609), but this results in no records returned:

              [INFO] === 2020-10-07 16:45:26,684 [6-60] INFO SQLDataSource - [builtinApplication.Issue_add, builtinApplication.null] 106: Executing cache sync query on 'DS_JNDI': SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY ID_ISSUE) AS rowID FROM (SELECT TOP 100 PERCENT TABLEA.ID_ISSUE, TABLEA.ID_DER, TABLEA.TITLE, TABLEA.ID_OWNER, TABLEA.ID_CREATOR, TABLEA.ID_CATEGORY, TABLEA.STEP, TABLEA.DESCRIPTION, TABLEA.COMMENT, TABLEA.START_DATE, TABLEA.END_DATE, TABLEA.ID_ENTITY, TABLEA.PRIORITY, TABLEA.ID_LINKED_ISSUE, TABLEA.CREATE_DATE, TABLEA.RECERTIF_DATE, TABLEA.UPDATE_DATE, TABLEA.UPDATE_USER, TABLEA.UPDATE_COMMENT, TABLEA.IMPACT, TABLEA.ID_ANALYST, TABLEA.IS_VALID, TABLEA.DATE_ANALYS, TABLEA.STATUS, TABLEA.STATUS_RECERTIF, (SELECT ID_CATEG_PARENT FROM TABLEB WHERE ID_CATEG = ID_CATEGORY) AS ID_CATEG_PARENT, TABLEA.APPLICATION, TABLEC.EMAIL FROM TABLEA JOIN dbo.TABLEC ON TABLEA.ID_OWNER = TABLEC.ID_USER AND TABLEA.UPDATE_USER = TABLEC.ID_USER AND TABLEA.ID_ANALYST = TABLEC.ID_USER WHERE (TABLEA.ID_ISSUE=2609)) x) y WHERE y.rowID BETWEEN 1 AND 1
              [INFO] === 2020-10-07 16:45:26,698 [6-60] INFO DSResponse - [builtinApplication.Issue_add] DSResponse: List with 0 items
              You can try running this query yourself to troubleshoot what's wrong, but one thing we suspect is that the joins may not be outer joins, which would cause no record from "TABLEA" to be returned if there are no related records in TABLEB or TABLEC.

              If this is the problem, you can either declare the joinTypes on your includeFrom fields as "outer", or you could configure a cacheSyncOperation that uses operationBinding.outputs to eliminate fields that must be acquired via join.

              Comment


                #8
                Hi Isomorphic,

                When I checked the logs of the Testing environment. I could see one point.

                Connection established for Insert query: 2020-10-08 11:40:46,180 [ : 5] DEBUG SQLTransaction - [builtinApplication.Issue_add] Started new GDL_JNDI transaction "-1655895898"

                Connection established for select query: 2020-10-08 11:40:46,195 [ : 5] DEBUG SQLConnectionManager - [builtinApplication.Issue_add, builtinApplication.null] Borrowed UNPOOLED connection '-426997986'

                "-1655895898" connection is not committed. So the connection "-426997986" can't see the record. Rollback happened.

                Do I need to add any configuration in server.properties file ?
                Please help me on this.

                Note: I couldn't able to share the complete log as the above log details are available in Testing environment(UAT).

                Thanks,
                Manjula

                Comment


                  #9
                  Cache sync re-selects are automatically done as part of the same transaction as the update request, and there is no configuration needed for this.

                  You could break this if you had customized the fetch operation being used for re-select and created a new DSRequest yourself, which you did not join with the test of the transaction (via setRPCManager()).

                  Comment

                  Working...
                  X