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

    Server side NPE when executing request in

    Hi Isomorphic,

    as a one-off I just noticed an NPE in my server logs that seems to come from your code. I'm using v12.1p_2022-08-10 and this is the stack trace:

    Caused by: java.lang.NullPointerException
        at com.isomorphic.sql.SQLSelectClause.addSQLForJoinedFields(
        at com.isomorphic.sql.SQLSelectClause.getSQLString(
        at com.isomorphic.sql.SQLSelectClause.getSQLString(
        at com.isomorphic.sql.SQLDataSource.getClausesContext(
        at com.isomorphic.sql.SQLDataSource.SQLExecute(
        at com.isomorphic.sql.SQLDataSource.processRequest(
        at com.isomorphic.sql.SQLDataSource.executeFetch(
        at com.lmscompany.lms.server.LMSSQLDataSource.executeFetch(
        at com.isomorphic.datasource.DataSource.execute(
        at com.lmscompany.lms.server.LMSSQLDataSource.execute(
        ... 77 more
    Could you have a look if you can spot something obvious in

    Thank you & Best regards

    The NPE could occur in two scenarios:

    #1 There might be a concurrency issue where some resources are freed, but the application still attempts to use them. Can you consistently reproduce this issue in a relatively isolated environment?

    #2 The dataSource may not be initialized properly, leading to the absence of some internals that are expected to always be present. In such cases, an error should be logged during initialization. Specifically for your case, could you check if the following error is logged?

    ERROR SQLDataSource - The following stacktrace is setting 'table' to null for SQLDataSource '1226463442' java.lang.Exception
        at com.isomorphic.sql.SQLDataSource.setTable(
        at com.isomorphic.sql.SQLDataSource.init(
        at com.isomorphic.datasource.DataSource.initialize(
    Depending on your feedback, we may need a way to reproduce this issue, so a standalone use case would be ideal. Additionally, if there's a misconfiguration or incorrect usage, please let us know. We might want to address this in a more informative manner.


      Hi Blama, in the past I had an error which may or may not be similar:

      with SmartClient versions older than yours it was pretty frequent.

      With more recent versions, it seems disappeared.

      BUT, with the same version as yours (v12.1p_2022-08-10), I had just an handful of cases, and I just noticed that it was at the same time with this ORACLE error:

      Unable to obtain initial connection: Cannot create PoolableConnectionFactory (ORA-04031: unable to allocate 12312 bytes of shared memory ("shared pool","unknown object","KKSSP^6308","kglseshtTable"))
      see also:

      I really don't know if those handful of the "addSQLForJoinedFields" error could actually be related to this "shared pool" error, but are you noticing some issue with shared memory by chance?


        Hi Isomorphic,

        sorry for the delay in the reply. No, as written in #1 this was a one-off.
        But here are some more details:
        1. We run our application on three Tomcats with HAProxy loadbalancing for HA and sticky sessions.
          All the errors in the log (11.03.24 - 14.03.24 16:21) are all from one Tomcat, the other two don't show the symptom
        2. We run our application war in ~10 <host> entries in server.xml
          All the errors are only from one of those <host> entries
        3. After a server stop/start of that Tomcat the errors are no longer appearing
        The error occurred 29 times in the logs and in those three days there where ~50000 IDACall requests in total for that Tomcat and host.
        This makes me think that it is a plain JRE issue.

        To your second question:
        I don't have any hits for LoggerName:com.isomorphic.sql.SQLDataSource AND Severity:ERROR in my logs and four (correct) ones for WARN.

        So thank you very much for willing to look into this, but I assume everything is correct on your end.

        Best regards