• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Exception in Thread in Multi-Class

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exception in thread "main" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1093)
at java.awt.Container.add(Container.java:417)
at AcmeSelfServe.createUserInterface(AcmeSelfServe.java:109)
at AcmeSelfServe.<init>(AcmeSelfServe.java:55)
at AcmeSelfServe.main(AcmeSelfServe.java:190)

I do not understand what I did and having a hard time what to look for. Has to have multiply classes






 
Sheriff
Posts: 7123
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exception in thread "main" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1093)
at java.awt.Container.add(Container.java:417)

at AcmeSelfServe.createUserInterface(AcmeSelfServe.java:109)
at AcmeSelfServe.<init>(AcmeSelfServe.java:55)
at AcmeSelfServe.main(AcmeSelfServe.java:190)

Don't have to worry about the bolded text -- this class is part of Java.

Exception in thread "main" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1093)
at java.awt.Container.add(Container.java:417)
at AcmeSelfServe.createUserInterface(AcmeSelfServe.java:109)
at AcmeSelfServe.<init>(AcmeSelfServe.java:55)
at AcmeSelfServe.main(AcmeSelfServe.java:190)


This is your class, and where you should start looking.

Exception in thread "main" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1093)
at java.awt.Container.add(Container.java:417)
at AcmeSelfServe.createUserInterface(AcmeSelfServe.java:109)
at AcmeSelfServe.<init>(AcmeSelfServe.java:55)
at AcmeSelfServe.main(AcmeSelfServe.java:190)

This is the class and method that the error started in.

Exception in thread "main" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1093)
at java.awt.Container.add(Container.java:417)
at AcmeSelfServe.createUserInterface(AcmeSelfServe.java:109)
at AcmeSelfServe.<init>(AcmeSelfServe.java:55)
at AcmeSelfServe.main(AcmeSelfServe.java:190)

This is the Java file and line number. Unfortunately, your line numbers don't match up, but I was able to see this:



Can you see what you did wrong in the last line?
 
Wayne Williamson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankyou
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic