NullPointerException when processing sql map

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

NullPointerException when processing sql map

Abid Hussain
Hello,

I'm using iBatis 2.3.4.

when processing a sql map iBatis throws the following exeption:
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient
operation; uncategorized SQLException for SQL []; SQL state [null];
error code [0];
--- The error occurred in sqlCrosstab.xml.
--- The error occurred while preparing the mapped statement for
execution.
--- Check the getCrosstabGroup.
--- Check the parameter map.
--- Cause: java.lang.NullPointerException; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in sqlCrosstab.xml.
--- The error occurred while preparing the mapped statement for
execution.
--- Check the getCrosstabGroup.
--- Check the parameter map.
--- Cause: java.lang.NullPointerException

My problem is now that the sql statement ist the results from a large
number of combined nested sql fragments (the sql map file has more
than 4000 lines) built together in the "getCrosstabGroup" select
element. It would take quite a long time to find the fragment which
caused the exeption. Unfortunately iBatis doesn't give any more
detailed information about the fragment in which the exception
occured. The throwed NullPointerException also doesn't has a stack
strace and following the exception cause path is a not ending tree of
NullPointerExceptions.

Does anybody have an idea on how I can find the fragment where the
exception occured or how to instruct iBatis to give more detailed
information?

Regards,

Abid
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when processing sql map

Richard Yee
Divide and conquer. Comment out parts of the file until the error goes away to isolate the problem. Consider refactoring it into more manageable pieces,

Richard


Sent from my iPhone

On Sep 1, 2010, at 8:10 AM, Abid Hussain <[hidden email]> wrote:

> Hello,
>
> I'm using iBatis 2.3.4.
>
> when processing a sql map iBatis throws the following exeption:
> org.springframework.jdbc.UncategorizedSQLException: SqlMapClient
> operation; uncategorized SQLException for SQL []; SQL state [null];
> error code [0];
> --- The error occurred in sqlCrosstab.xml.
> --- The error occurred while preparing the mapped statement for
> execution.
> --- Check the getCrosstabGroup.
> --- Check the parameter map.
> --- Cause: java.lang.NullPointerException; nested exception is
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in sqlCrosstab.xml.
> --- The error occurred while preparing the mapped statement for
> execution.
> --- Check the getCrosstabGroup.
> --- Check the parameter map.
> --- Cause: java.lang.NullPointerException
>
> My problem is now that the sql statement ist the results from a large
> number of combined nested sql fragments (the sql map file has more
> than 4000 lines) built together in the "getCrosstabGroup" select
> element. It would take quite a long time to find the fragment which
> caused the exeption. Unfortunately iBatis doesn't give any more
> detailed information about the fragment in which the exception
> occured. The throwed NullPointerException also doesn't has a stack
> strace and following the exception cause path is a not ending tree of
> NullPointerExceptions.
>
> Does anybody have an idea on how I can find the fragment where the
> exception occured or how to instruct iBatis to give more detailed
> information?
>
> Regards,
>
> Abid
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when processing sql map

Abid Hussain
Thanks. I finally found the error by setting a conditional breakpoint
in iBatis class IterateContext.

On 1 Sep., 18:33, Richard Yee <[hidden email]> wrote:

> Divide and conquer. Comment out parts of the file until the error goes away to isolate the problem. Consider refactoring it into more manageable pieces,
>
> Richard
>
> Sent from my iPhone
>
> On Sep 1, 2010, at 8:10 AM, Abid Hussain <[hidden email]> wrote:
>
> > Hello,
>
> > I'm using iBatis 2.3.4.
>
> > when processing a sql map iBatis throws the following exeption:
> > org.springframework.jdbc.UncategorizedSQLException: SqlMapClient
> > operation; uncategorized SQLException for SQL []; SQL state [null];
> > error code [0];
> > --- The error occurred in sqlCrosstab.xml.
> > --- The error occurred while preparing the mapped statement for
> > execution.
> > --- Check the getCrosstabGroup.
> > --- Check the parameter map.
> > --- Cause: java.lang.NullPointerException; nested exception is
> > com.ibatis.common.jdbc.exception.NestedSQLException:
> > --- The error occurred in sqlCrosstab.xml.
> > --- The error occurred while preparing the mapped statement for
> > execution.
> > --- Check the getCrosstabGroup.
> > --- Check the parameter map.
> > --- Cause: java.lang.NullPointerException
>
> > My problem is now that the sql statement ist the results from a large
> > number of combined nested sql fragments (the sql map file has more
> > than 4000 lines) built together in the "getCrosstabGroup" select
> > element. It would take quite a long time to find the fragment which
> > caused the exeption. Unfortunately iBatis doesn't give any more
> > detailed information about the fragment in which the exception
> > occured. The throwed NullPointerException also doesn't has a stack
> > strace and following the exception cause path is a not ending tree of
> > NullPointerExceptions.
>
> > Does anybody have an idea on how I can find the fragment where the
> > exception occured or how to instruct iBatis to give more detailed
> > information?
>
> > Regards,
>
> > Abid