?
Solved

java.lang.NullPointerException

Posted on 2006-04-18
17
Medium Priority
?
958 Views
Last Modified: 2012-06-21
Can someone give me some idea of what this exception is, it seems to be causing our web app to break...

java.lang.NullPointerException
at psdi.server.AppService.freeDBConnection(AppService.java:431)
at psdi.mbo.MboSet.getUserWhere(MboSet.java:956)
at psdi.mbo.MboSet.buildWhere(MboSet.java:5940)
at psdi.mbo.MboSet.buildWhere(MboSet.java:5915)
at psdi.mbo.MboSet.buildSelectStatement(MboSet.java:1538)
at psdi.mbo.MboSet.getNextRowData(MboSet.java:1723)
at psdi.mbo.MboSet.fetchMbos(MboSet.java:1613)
at psdi.mbo.MboSet.getMbo(MboSet.java:1363)
at psdi.mbo.MboSet.isEmpty(MboSet.java:2907)
at psdi.security.SecurityService.authenticateUser(SecurityService.java:280)
at psdi.security.SecurityService.authenticateUser(SecurityService.java:180)
at psdi.server.MXServer.getSystemUserInfo(MXServer.java:1376)
at psdi.app.inventory.ReorderService.init(ReorderService.java:2038)
at psdi.server.ServiceCoordinator$ServiceStartThread.run(ServiceCoordinator.java:304)
0
Comment
Question by:whitersx
  • 6
  • 5
  • 2
  • +3
16 Comments
 
LVL 1

Assisted Solution

by:geekprog
geekprog earned 150 total points
ID: 16480445
one of the object in your code is being assigned NULL

0
 
LVL 23

Assisted Solution

by:rama_krishna580
rama_krishna580 earned 300 total points
ID: 16480452
Hi,

it seems like some thing wrong at line number >>>> psdi.server.AppService.freeDBConnection(AppService.java:431)

i.e AppService.java:431

Some checking is being done at this level which is causing Nullpointer.

R.K
0
 
LVL 23

Assisted Solution

by:Siva Prasanna Kumar
Siva Prasanna Kumar earned 300 total points
ID: 16480592
Just put forward AppService.java file or check line number : 431. Som object you are trying to process is null.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 14

Expert Comment

by:Tommy Braas
ID: 16480801
Assuming that you don't have access to the source code, and that no code has changed, it seems to me that a connection to the db was never established in your case. Look through log files or the cause of the problem.

If you do have acces to the code, I would suggest verifying that a connection to a db has been established before you try to free it.
0
 

Author Comment

by:whitersx
ID: 16481064
I can confirm the connection to the db via the dsn as well as the application pulling fields in other components, we are just experiencing this error in one module that requires a lot of writing the database.
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 16481131
Are you using a connection pool?

How long does the processing for the write take? Is the timeout value for the connection above the processing time?
0
 

Author Comment

by:whitersx
ID: 16481217
The writing process takes several minutes, I am unsure if there is a timeout value defined, I will investigate.
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 16481276
The default timeout on Oracle is usually less than a minute.
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 16481281
That means that the connection  will time out, and the connection pool is probably going to release it and null out the reference.
0
 

Author Comment

by:whitersx
ID: 16481342
The database is SQL, here are the connection pool properties.

// Number of database connections needed to be kept open as soon as MXServer
// is started. Default value is 15.
      mxe.db.initialConnections=15
// Maximum number of free database connections available in the connection
// pool.  Default value is 30.
      mxe.db.maxFreeConnections=30
// Minimum number of free database connections available in the connection
// pool for more connections to be allocated. Default value is 10.
      mxe.db.minFreeConnections=10
// Number of new connections to be created when the minimum number of free connections
// are available in the connection pool. Default value is 5.      
      mxe.db.newConnectionCount=5

Is it possible there is a restriction on the amount of connections on the SQL server?
0
 
LVL 14

Accepted Solution

by:
Tommy Braas earned 600 total points
ID: 16481881
>> Is it possible there is a restriction on the amount of connections on the SQL server?
Certainly there would be.

The question is what the JDBC driver connection timeout is set to.
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 150 total points
ID: 16484809
>> ServiceCoordinator.java:304

What does this line have?
0
 

Author Comment

by:whitersx
ID: 16495273
>> ServiceCoordinator.java:304

that file is not available, i assume because the application is compiled.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16495305
Is it not your class?
0
 

Author Comment

by:whitersx
ID: 16753621
everyone gets points, we decided to use a different web server and no longer receive the error. thanks!
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 16754640
;-D
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month15 days, 19 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question