Why does exception appears

hello people!
i ve got a problem,
my task is to make a program that can be used in the libraries!
the main task is that i make a programm which will be an object-oriented database.
i have already made this (the object - oriented database program) and all i need is to make a UI for my programm which must show how does my database works for example in the library. (like a library program)
i have tested my database programm and it works!
it saves database and loads it, and it adds and deletes objects from it and it can make search, but when i tryed to add an UI to my program, exception appeared:
when i call
database datbs = new database();
Object[] result = datbs.search(Book.class, srch); // here exception occurs
// srch is an object which is used by database.search to filter the objects in the database
the exception is:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
     at findbook.FindBook.search(FindBook.java:267)
     at findbook.FindBook.search(FindBook.java:259)
     at findbook.FindBook.actionPerformed(FindBook.java:182)
     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
     at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
     at java.awt.Component.processMouseEvent(Component.java:6041)
     at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
     at java.awt.Component.processEvent(Component.java:5806)
     at java.awt.Container.processEvent(Container.java:2058)
     at java.awt.Component.dispatchEventImpl(Component.java:4413)
     at java.awt.Container.dispatchEventImpl(Container.java:2116)
     at java.awt.Component.dispatchEvent(Component.java:4243)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
     at java.awt.Container.dispatchEventImpl(Container.java:2102)
     at java.awt.Window.dispatchEventImpl(Window.java:2440)
     at java.awt.Component.dispatchEvent(Component.java:4243)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
but in the test program the same call works without exceptions, (in the test program UI is not used)

are you sure that the database object is created before you call the method?

Similar Messages

  • What is the colored spinning disk, and why does it appear, and how do I get rid of it?

    What is the colored spinning disk, and why does it appear, and how do I get rid of it?

    Repairing permissions will help as will running the UNIX commands. This widget will do all but the pram.
    http://db.tt/Lob4XtPB  Maintenance Widget  One of those links will get you the widget.
    To reset the pram hold the Command+Option+P+R when starting up, wait through 4 startup sounds before letting go.

  • Why does border appear around embedded video?

    Hello,
    I have an embedded YouTube video in a page on my site. It was working fine for a while but I've just discovered that there is now a black edge showing on the left, right and bottom of the video? I created a white round cornered frame within Premier so that it's part of the video. I did this as the pgae it's embedded in is white so that when it plays back it appears seamless and with curved edges to match it's container. This worked fine for a week or so but now it has these black edges? Can anybody tell me why? You can see for yourself at www.glovesanddoves.com. Go to the fighters page and you'll see the video at the bottom. The video's width is a multiple of 16 and the ratio is 16:9 at 384px X 216px. The containg Divs are also set to these measurements.
    I've attached a screenshot below:
    Any help would be much appreciated.
    Jack

    It only seems to be affecting the page when viewed in Safari although it was working fine for over a week before today?
    Date: Thu, 11 Oct 2012 16:39:47 -0600
    From: [email protected]
    To: [email protected]
    Subject: Why does border appear around embedded video?
        Re: Why does border appear around embedded video?
        created by Ken Binney in Dreamweaver General - View the full discussion
    No prob in FF 15.0.1or IE 8  on PC - Rounded corners boxes on both
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4767926#4767926
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4767926#4767926
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4767926#4767926. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Dreamweaver General by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Why does "nobr" appear?

    <p>When I post a message and include both code and a link, I often get a &#91;nobr] at the top, and &#91;/nobr] at the bottom.
    <p>Adding this link:
    Why does "nobr" appear?
    trying a line of code<p>Now, note the "nobr" top and bottom. I did not put them there. It appears that if I mix ubb tags (with the &#91;] brackets) and html tags (with the &lt;> characters), the offending nobr shows up.
    <p>What is it?
    <p>And what can I do to prevent it?
    <p>Thanks in advance.

    Just a test...
    Adding this link:
    Why does "nobr" appear?
    trying a line of codeHmmmm... I see that if I use UBB tags for the link as in: &#91;url=http...]Link title&#91;/url], then the nobr goes away.
    So now the question is... is there any place this stuff is documented?

  • Why does Share appear in my menu in Final Cut Pro X

    'Share'  does not appear in my menu between 'Modify' and 'Window' in Final Cut Pro X. I download it from the app store yesterday

    ==edit==
    since vers 06, Share is avail as 'button' on the very far right side in the middle of the Window, or under 'File'
    http://help.apple.com/finalcutpro/mac/10.0.6/#ver9d10063a

  • Why does ST03n appear to give conflicting stats?

    Ok, so I'm looking at the month of May in ST03n
    Workload Overview for the month says:
    average % DB time is 61.6%,
    average % Roll wait time is 14.1%
    If I look at Time Profile and work out the averages manually for the same month
    average % DB time is 57.92%
    average % Roll wait time is 16.91%
    More of a rhetorical question really but why does different areas of ST03n report the same thing differently?
    Which is accurate? Which is correct?

    When you put it like that, that makes sense!
    Ok so for instance (just to make sure I'm understanding correctly!) if I take the top 100 transactions in terms of number of dialog steps and calculate the average response times for those transactions - is that a more accurate representation of actual response time vs the average response time given under Workload Overview?
    Because for yesterday they're very different (Work.Over.  0.427 secs vs Trans,Pro.  0.974 secs)
    I appreciate your time on this.  thank you.

  • Why does it appear that photostream is using up space on my devices?

    On all of my devices, when I look under the Usage>Photos it shows that there is space being taken up by photostream even though photostream is turned off on all devices and the pictures have been erased. Is it really using space on my device or does it appear that way?

    How much is being used?
    Id significant:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.

  • Why does iCloud appear each time I close Mail?

    Why is it that when I close out of Mail and go back into Mail, the iCloud inbox is the first to appear?  So, basically each time I close the Mail program on my iPhone 6 Plus and go back to it, regardless if new mail has arrived in the other three accounts I have set up, I am in theiCloud account and have to press the back button at the top of the screen to go into the account where the mail has arrived. It's sort of annoying to have to go back to the account where the mail has arrived. Any suggestions? Thanks!

    I don't think I understand your question...
    I just received an e-mail(your reply), and Mail was totally closed. I pressed the Mail icon with the little 1 in the corner and instead of it going to list of accounts or the "mailboxes" screen, instead it went directly into my iCloud account. My friend's iPhone 6 goes directly into mailboxes when he presses the Mail button. Mine does not.

  • Why does photoshop appear blue?

    So photoshop was installed on my computer by our tech department and every colour appears as various shades of blue. I have spoken to those who installed it and they don't know why it appears like this. Not sure if when it was installed there was some sort of mode put on or what caused this, but does anyone know how to solve this?

    Looks like it is on the default settings. When I downloaded the free trial it worked and looked just fine.

  • Unable to connect Firefox can't establish a connection to the server at 'URL of the site' why does this appear in all browser??

    I have used these sites
    -www.facebook.com
    -www.dubbedonline.tv/ and some others for a long time but few weeks ago i couldn't access them anymore and this appeared :
    Unable to connect
    Firefox can't establish a connection to the server at www.facebook.com.
    The site could be temporarily unavailable or too busy. Try again in a few moments.
    If you are unable to load any pages, check your computer's network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
    i have also tried many ways to access them but none of the solution worked, one of them was checking troubleshooting problems and it detected that the remote device won't accept the connection, so, how can i fix this?

    You can check the connection settings.
    *Tools > Options > Advanced > Network : Connection > Settings
    *https://support.mozilla.org/kb/Options+window+-+Advanced+panel
    If you do not need to use a proxy to connect to internet then try to select "No Proxy" if "Use the system proxy settings" or one of the others do not work properly.
    See "Firefox connection settings":
    *https://support.mozilla.org/kb/Firefox+cannot+load+websites+but+other+programs+can
    Do a malware check with several malware scanning programs on the Windows computer.
    Please scan with all programs because each program detects different malware.
    All these programs have free versions.
    Make sure that you update each program to get the latest version of their databases before doing a scan.
    *Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
    *AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
    *SuperAntispyware:<br>http://www.superantispyware.com/
    *Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
    *Windows Defender:<br>http://windows.microsoft.com/en-us/windows/using-defender
    *Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
    *Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
    You can also do a check for a rootkit infection with TDSSKiller.
    *Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • Why does email appear in the draft folder after email is sent

    could someone tell me why emails I am sending appear in the draft folder even after the email has been sent and is in the sent folder?

    Do you get draft emails every time your write an email, or do you just have a pesky email in drafts? There's a big difference.
    If it happens every time, it could be that your email isn't being sent to your recipient. If it happened only once, it's just an incomplete email you haven't sent or deleted yet.
    Which is your situation?

  • Why does Exception.StackTrace disappear?

    I'm attempting to catch unhandled exceptions in my app on windows 8.1
    I've noticed that in my App_UnhandledException handler, that the UnhandledExceptionArgs.Exception.StackTrace is valid on entry.
    However, I take the same Exception object, and pass it to a function, and the value mysteriously becomes null.
    As a workaround, I capture the stack trace into a string variable before any other operations on the exception object, but I don't understand why this should be necessary.
    Anthony Wieser | Wieser Software Ltd |
    www.wieser-software.com

    For some reason, it seems the getter of the 'Exception' property of the 'UnhandledExceptionEventArgs' returns the original exception the first time (I've checked, it's the exact same reference), and creates a new exception the subsequent times. I don't know
    where this behavior comes from, but instead of saving the stacktrace you should keep a reference to the whole exception:
    var exception = e.Exception;
    // Now inspect exception instead of e.Exception

  • Branching View - Why does it appear this way?

    This is my first large project with Captivate 3 and I am
    trying to create a storyboard. I need to show my manager/client the
    branching view so they can follow along. What I created was a menu
    page that allows the users to go to many different subjects in no
    particular order. At he end of ech subject, I created a button that
    sends the user back to a COPY of the menu so the user doesn't have
    to hear a repeat of the audio every time the go back to the menu
    page and select a new subject. The problem is in the branching
    view....for some reason, the duplicate menu page appears at the end
    of line "A" or after slide 13 instead of following slide 5 (menu
    slide).
    Any thoughts on how to move this? Or, does anyone have a
    better idea than creating this copied slide?
    Thanks.

    nathand wrote:
    Ben wrote:
    nathand wrote:
    You cannot get a reference to an individual element in an array control.  The ArrayElem reference will always refer to the same control regardless of what array index is visible.  This isn't specific to a combo-box, every array works like this.
    I have not tested it lately but as of the time of this Nugget I found that it will point to the top left visable array element.
    The ArrayElem property always returns the same reference no matter which element of the array is in the top-left corner, as demonstrated by the code below (screenshot instead of snippet to avoid mangled references and property nodes).
    Yes that is true but the value returned when using a property node >>> value will return the top left displayed value. In the code included in that Nugget, I set the size of the control such that it only shows a single element then by manipulating the index control I can raed each element in the array.
    At least that is how it behaved back in the day of that nugget.
    Yes, my wife left me home alone with a case of beer and LV to find that tidbit. I suspect that feature will one day disapear without anyone noticing.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Why does iCloud appear twice

    On opening my Contacts in my iMac I get two entries listed for All iCloud followed by one entry for my yahoo account, why are there two iCloud listings?  I only have one account.  On my ipad I get multiple entries of all my contacts, I want one contact list that appears the same on all my devices.

    Thank you for responding.  I don't have a me.com address, but I did eventually work out to go to Preferences and select Accounts and there it showed the two iCloud accounts and I just deleted one of them, no idea how the second one got added, but like most problems it was probably me !  I opted to keep the addresses on my mac just in case it caused all of my iCloud entries to dissappear.  Thanks again.

  • I had two numbers for one of my contacts and I deleted one because it's no longer in use. But why does it appear when I type in the name (when starting a new message) with the word "other" next to it?

    And how do it delete that "other" number entirely from my phone? I've tried deleteing the contact and adding it in again, but it still appears
    Also, on an unrelated note, my phone tends to turn off at 10-7 percent. How can I fix this so it turns off after 1 percent? (the phone doesn't turn on after it turns off by itself unless you charge it)

    1. Don't wait until your phone completely discharges before charging the battery. To help with the battery percentage reset your phone. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.
    2. The phone remembers recently used items in addition to stored items. So the contact you want to delete is presently in the recently used category. If that phone number is not used it will eventually disappear from your phone. Patience IDs the key here.

Maybe you are looking for