Integration problem - Null pointer Exception

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • uhdam
    New Member
    • Mar 2009
    • 50

    Integration problem - Null pointer Exception

    Hi...

    When my project is executed as individual files it is executed perfectly. But when its executed as a whole project it throws Null Pointer Exception.

    How could this be rectified and what will be the problem.

    I accessed the value using variable and tried using getter methods too and still throws the same error.

    Thank you.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Are you using file resources? If you move those files to a .jar file the resources won't be files anymore and (of course) can't be found anymore. (think of Icons etc.)

    kind regards,

    Jos

    Comment

    • uhdam
      New Member
      • Mar 2009
      • 50

      #3
      Ok sir,

      That should be the problem.

      But How could a value be converted to icon ?

      Thank you.

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by uhdam
        But How could a value be converted to icon ?
        That was just an example; suppose you have a small .gif file and you load that file as an Icon; if you move that .gif file to a .jar file the .gif file doesn't exist anymore; don't think too much of it.

        kind regards,

        Jos

        Comment

        • uhdam
          New Member
          • Mar 2009
          • 50

          #5
          Ok sir.

          Actually, I am using XML file system. I am Retrieving XML elements using DOM parser and Storing elements as class Attributes. While executing the parsed file alone (fileScanner.ja va) i am getting the attribute values properly. But when accessing fileScanner.jav a through .jar files, i am getting Null Pointer Exception for the same attribute value.

          How to rectify this and execute the same.

          Thank you.

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by uhdam
            How to rectify this and execute the same.
            We don't know, you haven't shown us any code. Check all your code and see where you want to open a file and if you stuck that file in your .jar file. That causes the problem.

            kind regards,

            Jos

            Comment

            Working...