• Post Reply Bookmark Topic Watch Topic
  • New Topic

.jar creating Problems  RSS feed

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Friends,
I am creating .jar file and it run login page after that it only show java.lang.NullPointerException???
 
Ranch Hand
Posts: 63
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check in the stack trace where it is throwing NullPointerException.
 
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does a .jar file have to do with a login page?
 
Ranch Hand
Posts: 449
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you debug any thing why it is failing? Also, without stacktrace, not possible to tell what could be the reason.
 
Prashant Shirode
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I cant trace the code in command prompt using the command java -jar Projectname.jar...
They show only this Exception java.lang.NullPointerException....
 
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had explained earlier how you can get, copy and paste the full stack trace. In fact is this question related to your earlier one?
 
Prashant Shirode
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ya i know but now it show only Exception java.lang.NullPointerException not any other messages...
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find it hard to believe. Can you post the screenshot?
 
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, what do you expect from people answering you here? With this little information, nobody is going to be able to tell you why it throws a NullPointerException and what you must do to make it work.

You will have to investigate this yourself. Debug the program, find out where and why it throws a NullPointerException, and fix the problem.
 
Prashant Shirode
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i know i am asking one question two times so it really hard to believe, But i am facing same problem again and again....
So i attach snapshot for that file...
1.png
[Thumbnail for 1.png]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That doesn't tell us anything you hadn't posted before. You need to find out where in your code this happens - apparently some object reference is null, and then the code dereferences it; which object reference is that?

You seem to have some tray/catch exception handler that doesn't print enough information. You can print the stack trace of the exception using ex.printStackTrace() - that would give you the line number where the exception occurs. Then you can look at your code to see what happens in that line; that should get you started.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, please don't post screenshots. Copy all relevant data and paste it as text. That also makes it searchable here.
 
Marshal
Posts: 56608
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is not a stack trace. You will have to work out where the Exception occurred if you are to have any hope of sorting it out.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!