General discussion


what is causing this java error?

By shimshai ·
I have imported several tables of data into an sql server db with an html interface from another DB using odbc.
All the tables seem to work fine except when i try to view locations.
I then get the following error page:

Unexpected Exception
The exception is :- java.lang.NullPointerException
at psdi.mbo.MboSet.generateMboInstance(
at psdi.mbo.MboSet.fetchMbos(
at psdi.mbo.MboSet.getMbo(
at psdi.mbo.MboSet.isEmpty(
at psdi.jsp.beans.MboSetBean.isEmpty(
at psdi.jsptags.InputTagSupport.gridTagSupportWriter(
at psdi.jsptags.GridTagSupport.doEndTag(
at jsp_servlet._jsp._app._location.__main._jspService(
at weblogic.servlet.jsp.JspBase.service(
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(
at weblogic.servlet.internal.ServletRequestImpl.execute(
at weblogic.kernel.ExecuteThread.execute(

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by josef.scherer In reply to what is causing this java ...


Could you submit some code, s.t. someone can judge, whether one of the Location objects is null?


Collapse -

by sbockelman In reply to what is causing this java ...

The error is caused by an attempt to access a property or call a method on an object reference that does not currently point to any valid object instance. This error is in the source code on line 604 of the file,

How do I know this?
And why can't I tell you more?

1. That's exactly what the stack-trace/error message you included says.

2. You didn't include enough information to solve the problem.

I suggest asking a Java developer at your location to help you debug the JSP page that is failing.

Collapse -

by georgehsnyder In reply to what is causing this java ...

if you go to line 604 of you will probably find a loop (for or while). You appear to be trying to process beyond the end of your data array. Maybe you did not initialize it to a large enough size or you are up against the old 'off by one' problem. Create a DEBUG class that opens a file and writes your data into it. Pass each element of your data into the debug class then look at the file to see where things are going bad.

Collapse -

by debuggist Staff In reply to what is causing this java ...

Obviously, you're trying to access something that is null. Could you supply the source code that is throwing the exception?

Do you have the source code for

Collapse -

by debuggist Staff In reply to

What was the answer to this question?

Collapse -

by ms_anand_babu In reply to what is causing this java ...

Probably u might've used a select query and tried to display the query results. U would've accessed the recordset when there is nothing returned to it out of execution of the query. Query result may be nothing.

Related Discussions

Related Forums