• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.lang.NullPointerException

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello experts ,

I have socket related problem.
How to resolve this???


Server Thread started to listen for socket connection requests
TcpServer::Start: java.lang.NullPointerException
TcpServer::Start: java.lang.NullPointerExceptionMar 04, 2013 4:33:19 PM com.s5.server.watch724.HttpProcessMessage init
INFO: in INIT() config is=org.apache.catalina.core.StandardWrapperFacade@11498ba

TcpServer::Start: java.lang.NullPointerException
TcpServer::Start: java.lang.NullPointerException
TcpServer::Start: java.lang.NullPointerException
TcpServer::Start: java.lang.NullPointerException
TcpServer::Start: java.lang.NullPointerException


 
nagraj patel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

nagraj patel wrote:hello experts ,

I have socket related problem.
How to resolve this???

TcpServer::TcpServer: java.net.BindException: Address already in use: JVM_Bind
Server Thread started to listen for socket connection requests
TcpServer::Start: java.lang.NullPointerException
TcpServer::Start: java.lang.NullPointerException
Mar 04, 2013 4:43:27 PM com.s5.server.watch724.HttpProcessMessage init
INFO: in INIT() config is=org.apache.catalina.core.StandardWrapperFacade@4cb73c

TcpServer::Start: java.lang.NullPointerException
TcpServer::Start: java.lang.NullPointerException
TcpServer::Start: java.lang.NullPointerException
TcpServer::Start: java.lang.NullPointerException
TcpServer::Start: java.lang.NullPointerException


 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The stack trace will tell you what line of code is causing the exception, as well as where it was called from (and where that was called from, etc. ...). Look at that line and find out what's null. Add println() calls to help you see what values are getting shoveled around if you can't figure out the cause just by looking at your code.
 
nagraj patel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Jeff Verdegan:Problem is in deploy and undeploy of application on tomcat .when I try to re deploy (Tcp Exception:null pointer exception ) coming .
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's impossible to tell what's causing the NPE from the information you've provided. However, this might (or might not) be related:

TcpServer::TcpServer: java.net.BindException: Address already in use: JVM_Bind

I don't know which port it's complaining about, but if you can find out--either by cranking up a log level somewhere, or changing various ports in the configuration until one works, or ... something--then fix that problem, and then try again, that may fix your other problems, or at least it will eliminate one variable.

Two other things:

1) You say it's a problem when you redeploy. So does it work the first time you deploy? If so, maybe you're doing something wrong in your redeploy, either procedure-wise or configuration-wise.

2) Does any of your app's code run, after the redeploy, or does tomcat produce the errors without even starting your app?

If the problem is around redeploying, then I would create a very tiny, simple app that does essentially nothing--maybe its doGet method just sends back "Hello World". Get that working first, and than gradually narrow the gap between the simple working app and your more complex non-working one until you find the source of the problem.
 
reply
    Bookmark Topic Watch Topic
  • New Topic