8 Replies Latest reply on Dec 20, 2011 12:30 PM by Steven Hawkins

    Nullpointer Exception in ResolverUtil

    Rakesh Balguri Expert

      Hi,

       

      I am getting the following error when I am trying to execute the SQL SELECT * FROM ORDERS.

       

      The following is my model.xml and I am using teiid 7.3. My request is also not reaching to the translator.

       

      The translator is deployed properly.

       

      Please let me know how to resolve this problem.

       

      <models>

                <model name="SECURITY_DATACOM">

                <property key="importer.schemaPattern" value="SYSADM" />

                          <translator type="datacom" datasource="java:DatacomDS" />

                </model>

      </models>

       

       

       

       

       

      java.lang.NullPointerException

                 at org.teiid.query.resolver.util.ResolverUtil.getGroupInfo(ResolverUtil.java:503)

                 at org.teiid.query.resolver.util.ResolverUtil.resolveElementsInGroup(ResolverUtil.java:489)

                 at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.resolveSelectableElements(SimpleQueryResolver.java:280)

                 at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:270)

                 at org.teiid.query.sql.symbol.AllSymbol.acceptVisitor(AllSymbol.java:56)

                 at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:61)

                 at org.teiid.query.sql.navigator.AbstractNavigator.visitNodes(AbstractNavigator.java:72)

                 at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:429)

                 at org.teiid.query.sql.lang.Select.acceptVisitor(Select.java:194)

                 at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:61)

                 at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:242)

                 at org.teiid.query.resolver.command.SimpleQueryResolver.resolveCommand(SimpleQueryResolver.java:105)

                 at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:151)

                 at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:117)

                 at org.teiid.dqp.internal.process.Request.resolveCommand(Request.java:283)

                 at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:383)

                 at org.teiid.dqp.internal.process.Request.processRequest(Request.java:452)

                 at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:372)

                 at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:174)

                 at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)

                 at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188)

                 at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:116)

                 at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:290)

                 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                 at java.lang.Thread.run(Thread.java:662)

      03 Dec 2011 13:37:48,470 IST ERROR [PROCESSOR] Unexpected exception for request unSgEev0K4YS.0

      java.lang.NullPointerException

                 at org.teiid.query.resolver.util.ResolverUtil.getGroupInfo(ResolverUtil.java:503)

                 at org.teiid.query.resolver.util.ResolverUtil.resolveElementsInGroup(ResolverUtil.java:489)

                 at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.resolveSelectableElements(SimpleQueryResolver.java:280)

                 at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:270)

                 at org.teiid.query.sql.symbol.AllSymbol.acceptVisitor(AllSymbol.java:56)

                 at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:61)

                 at org.teiid.query.sql.navigator.AbstractNavigator.visitNodes(AbstractNavigator.java:72)

                 at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:429)

                 at org.teiid.query.sql.lang.Select.acceptVisitor(Select.java:194)

                 at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:61)

                 at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:242)

                 at org.teiid.query.resolver.command.SimpleQueryResolver.resolveCommand(SimpleQueryResolver.java:105)

                 at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:151)

                 at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:117)

                 at org.teiid.dqp.internal.process.Request.resolveCommand(Request.java:283)

                 at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:383)

                 at org.teiid.dqp.internal.process.Request.processRequest(Request.java:452)

                 at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:372)

                 at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:174)

                 at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)

                 at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188)

                 at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:116)

                 at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:290)

                 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                 at java.lang.Thread.run(Thread.java:662)

      03 Dec 2011 13:38:13,304 IST ERROR [PROCESSOR] Unexpected exception for request LqRA6ueaTogk.0

      java.lang.NullPointerException

                 at org.teiid.query.resolver.util.ResolverUtil.getGroupInfo(ResolverUtil.java:503)

                 at org.teiid.query.resolver.util.ResolverUtil.resolveElementsInGroup(ResolverUtil.java:489)

                 at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.resolveSelectableElements(SimpleQueryResolver.java:280)

                 at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:270)

                 at org.teiid.query.sql.symbol.AllSymbol.acceptVisitor(AllSymbol.java:56)

                 at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:61)

                 at org.teiid.query.sql.navigator.AbstractNavigator.visitNodes(AbstractNavigator.java:72)

                 at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:429)

                 at org.teiid.query.sql.lang.Select.acceptVisitor(Select.java:194)

                 at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:61)

                 at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:242)

                 at org.teiid.query.resolver.command.SimpleQueryResolver.resolveCommand(SimpleQueryResolver.java:105)

                 at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:151)

                 at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:117)

                 at org.teiid.dqp.internal.process.Request.resolveCommand(Request.java:283)

                 at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:383)

                 at org.teiid.dqp.internal.process.Request.processRequest(Request.java:452)

                 at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:372)

                 at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:174)

                 at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)

                 at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188)

                 at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:116)

                 at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:290)

                 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                 at java.lang.Thread.run(Thread.java:662)

       

      Thanks

      Rakesh

        • 1. Re: Nullpointer Exception in ResolverUtil
          Ramesh Reddy Master

          Can you try with 7.6? If the problem still exists then you open a jira

           

          Ramesh..

          • 2. Re: Nullpointer Exception in ResolverUtil
            Rakesh Balguri Expert

            Hi Ramesh,

             

            I tried using Teiid 7.6 and I still get this error.

            The metadata from my source is loaded successfully.

            Is there a workaround for this problem. If yes please let me know how to resolve this problem.

             

            Please help me in solving this problem.

             

            The stack trace is as follows:

             

            21:20:21,971 ERROR [PROCESSOR] Unexpected exception for request jKGgbCCGLEO9.2

            java.lang.NullPointerException

                    at org.teiid.dqp.internal.process.DataTierManagerImpl.processSystemQuery(DataTierManagerImpl.java:350)

                    at org.teiid.dqp.internal.process.DataTierManagerImpl.registerRequest(DataTierManagerImpl.java:192)

                    at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:137)

                    at org.teiid.query.processor.relational.AccessNode.registerRequest(AccessNode.java:367)

                    at org.teiid.query.processor.relational.AccessNode.open(AccessNode.java:156)

                    at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:255)

                    at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:255)

                    at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:255)

                    at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:255)

                    at org.teiid.query.processor.relational.RelationalPlan.open(RelationalPlan.java:167)

                    at org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:182)

                    at org.teiid.query.processor.QueryProcessor.getFinalBuffer(QueryProcessor.java:238)

                    at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:137)

                    at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:370)

                    at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:287)

                    at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)

                    at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:215)

                    at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:232)

                    at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:118)

                    at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:288)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                    at java.lang.Thread.run(Thread.java:662)

            21:20:34,243 ERROR [PROCESSOR] Unexpected exception for request jKGgbCCGLEO9.4

            java.lang.NullPointerException

                    at org.teiid.dqp.internal.process.DataTierManagerImpl.processSystemQuery(DataTierManagerImpl.java:350)

                    at org.teiid.dqp.internal.process.DataTierManagerImpl.registerRequest(DataTierManagerImpl.java:192)

                    at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:137)

                    at org.teiid.query.processor.relational.AccessNode.registerRequest(AccessNode.java:367)

                    at org.teiid.query.processor.relational.AccessNode.open(AccessNode.java:156)

                    at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:255)

                    at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:255)

                    at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:255)

                    at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:255)

                    at org.teiid.query.processor.relational.RelationalPlan.open(RelationalPlan.java:167)

                    at org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:182)

                    at org.teiid.query.processor.QueryProcessor.getFinalBuffer(QueryProcessor.java:238)

                    at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:137)

                    at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:370)

                    at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:287)

                    at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)

                    at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:215)

                    at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:232)

                    at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:118)

                    at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:288)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                    at java.lang.Thread.run(Thread.java:662)

            21:20:36,799 ERROR [PROCESSOR] Unexpected exception for request jKGgbCCGLEO9.5

            java.lang.NullPointerException

                    at org.teiid.query.resolver.util.ResolverUtil.getGroupInfo(ResolverUtil.java:517)

                    at org.teiid.query.resolver.util.ResolverUtil.resolveElementsInGroup(ResolverUtil.java:503)

                    at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.resolveSelectableElements(SimpleQueryResolver.java:279)

                    at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:269)

                    at org.teiid.query.sql.symbol.MultipleElementSymbol.acceptVisitor(MultipleElementSymbol.java:89)

                    at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:61)

                    at org.teiid.query.sql.navigator.AbstractNavigator.visitNodes(AbstractNavigator.java:72)

                    at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:425)

                    at org.teiid.query.sql.lang.Select.acceptVisitor(Select.java:168)

                    at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:61)

                    at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:236)

                    at org.teiid.query.resolver.command.SimpleQueryResolver.resolveCommand(SimpleQueryResolver.java:103)

                    at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:294)

                    at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:147)

                    at org.teiid.dqp.internal.process.Request.resolveCommand(Request.java:291)

                    at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:392)

                    at org.teiid.dqp.internal.process.Request.processRequest(Request.java:459)

                    at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:506)

                    at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:276)

                    at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)

                    at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:215)

                    at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:232)

                    at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:118)

                    at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:288)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                    at java.lang.Thread.run(Thread.java:662)

             

            Thanks

            Rakesh.

            • 3. Re: Nullpointer Exception in ResolverUtil
              Ramesh Reddy Master

              Please provide us with process plan.

              • 4. Re: Nullpointer Exception in ResolverUtil
                Steven Hawkins Master

                It looks to me that you have invalid metadata, specifically a table with no columns.  Are you using a custom connector?  We perform little metadata validation at import time so that construction may be as flexible as possible.

                 

                Steve

                • 5. Re: Nullpointer Exception in ResolverUtil
                  Rakesh Balguri Expert

                  Hi,

                   

                  Ramesh,

                  The request is not reaching the translator and I am unable to generate the plan for the SQL.

                   

                   

                  Steven,

                  Yes, I am using a custom connector and using a custom translator. Can you let me know what validations are performed for importing the metadata.

                  Is there any way I can force teiid to throw an exception if invalid metadata is being imported?

                   

                  Thanks

                  Rakesh

                  • 6. Re: Nullpointer Exception in ResolverUtil
                    Steven Hawkins Master

                    Rakesh,

                     

                    Primarily duplicate checks are made by the standard import logic, but there is nothing currently that enforces a table must have columns.  Obviously downstream code of course assumes that tables have columns.  Without a patch, Teiid will not proactively throw an exception for you.  Because of how the MetadataFactory works checks like this would need to be performed after the metadata is loaded and not durring (as the Table objects are created first and then have columns added to them).  You should add a JIRA for more built-in metadata validation.  And your custom connector can just as easily be modified to validate your imported tables as well.

                     

                    Steve

                    • 7. Re: Nullpointer Exception in ResolverUtil
                      Rakesh Balguri Expert

                      Hi Steven\Ramesh,

                       

                      The problem was with our custom connector and it was not retrieving the columns from the metadata. Thanks for your help.