Help. ! nullpointer fun

I am reading stuff from a database [rms on a mobile fone]. i am having difficulty understanding why i am getting a null
pointer exception, having dynamically allocated the space necessary for storing the records in an array....
Later in another function, while attempting to copy a byteArray from RMS to the teamArray it gives nullptr exception.
Strangely if i just create a byteArray and put it in teamArray it is fine, [in the same for loop where space is allocated]
but in a different function [the one that reads in data] it bombs with nullPointer Exception...
public class RWstreams {
     private static RecordStore rs = null; // Record store
     static final String RECORD_STORE = "thers"; // Name of record store
public static byte[][][] byteArrays;
public static byte[][][] teamArray;
public static byte[][][] managerArray;
public static byte[][][] queueArray;
public static byte[] numplayersPerTeam;
private static long numbytes=0;
public RWstreams()
byteArrays = new byte[20][][]; //to store Player objects [ripped to byteArray]
teamArray = new byte[20][1][]; //to store Team objects [ripped to byteArray]
managerArray = new byte[20][1][];
numplayersPerTeam= new byte[20];
public static void InitRmsNoSave() {
     //pass in teams - each has 20 players
//Rip out each player array from team, [now represented as a byte array as has been persisted]
byte[] recData = new byte[ 200 ];
byte[] teamrecData = new byte[ 200 ];
byte[] managerrecData= new byte[200];
byte[] queuerecData = new byte[200];
// System.out.println("numteams:"+theTeams.length);
try{
rs.getRecord(1,numplayersPerTeam,0); //retrieve number of players per team...
for(int j=0; j<20;j++)
byteArrays[j]=new byte[numplayersPerTeam[j]][];
teamArray[j]=new byte[1][];
System.out.println("got value for team:"+j+" ->"+numplayersPerTeam[j]);
} catch( Exception e ) {
e.printStackTrace();
//Snippet from other function where copying to array is done:
          for(int teams=0; teams <20; teams++)//for every team
//retrieve no of players records to read into current team array
int thecounter=(int)numplayersPerTeam[teams];
for( int i = 1; i <= thecounter; i++ )
// Get data into the byte array
rs.getRecord( get, byteArrays[teams][i-1], 0 );<--------BOMBS here..:(
get++;
any help appreciated
Niall

ok sorry didnt read the bit about posting...
i pointed to the wrong piece of code incedentally. the line i said bombed is fine and works ok...
the bit that bombs is below....
  for( int i = 1; i <= thecounter; i++ )
                                 // Get data into the byte array
                                  //  System.out.println("length of array"+byteArrays[teams].length);
                                   rs.getRecord( get, byteArrays[teams][i-1], 0 );
                                   get++;
                                    System.out.println("team:"+teams+" Retrieved player:"+i);
                           rs.getRecord(get, teamArray[teams][0], 0);  <---- THIS IS THE BIT THAT BOMBS
                           get++;
                       any help appreciated
Niall

Similar Messages

  • Help, nullpointer exceptions...

    Heres my source code I cant figure it out!
    import java.awt.*;
    import java.applet.Applet;
    public class BubbleSort extends Applet{
    int[] sortArray;
    int m=0;
         public void init(){
              m=1;
              for (int i=0;i<100;i++){
                   sortArray=(int)(Math.random()*100);
         sort();
         public void paint(Graphics g){
              if (m==1){
                   //g.drawRect(1,i,sortArray[i],i+1);
                   g.drawString(""+sortArray[50],50,50);
                   sort();
         public void sort(){
              if(m==1){
                   for (int i=1;i<98;i++){
                        if (sortArray[i]>sortArray[i+1]){
                             int tempInt=sortArray[i];
                             sortArray[i]=sortArray[i+1];
                             sortArray[i+1]=tempInt;
              repaint();

    I am sorry i forgot the code brackets...
    import java.awt.*;
    import java.applet.Applet;
    public class BubbleSort extends Applet{
    int[] sortArray;
    int m=0;
         public void init(){
              m=1;
              for (int i=0;i<100;i++){
                   sortArray=(int)(Math.random()*100);
         sort();
         public void paint(Graphics g){
              if (m==1){
                   //g.drawRect(1,i,sortArray[i],i+1);
                   g.drawString(""+sortArray[50],50,50);
                   sort();
         public void sort(){
              if(m==1){
                   for (int i=1;i<98;i++){
                        if (sortArray[i]>sortArray[i+1]){
                             int tempInt=sortArray[i];
                             sortArray[i]=sortArray[i+1];
                             sortArray[i+1]=tempInt;
              repaint();

  • Save As JPEG in AppleScript

    Trying to Save a PSD file as JPEG using the script from the Adobe scripting documentation.
    The following code opens the standard Save As dialog box rather than simply saving the file, I am missing something ... but what??!
    tell application "Adobe Photoshop CC"
              set theDocument to current document
              set myFile to "Macintosh HD:Users:peterrhawkes:Desktop:MH.jpg"
              set myOptions to ¬
                        {class:JPEG save options, embed color profile:true, quality:12} ¬
      save theDocument in file myFile as JPEG with options ¬
      myOptions appending no extension without copying
    end tell

    hi peter
    I faced a general error with no further information in photoshop cc when I used your code for a try, even there was no save as dialog box.
    for me it helped to declare the destination path as string.
    tell application "Adobe Photoshop CC"
      set theDocument to current document
      set myFile to "System:Users:imac7:Desktop:MH.jpg" as string
      set myOptions to ¬
      {class:JPEG save options, embed color profile:true, quality:12} ¬
      save theDocument in file myFile as JPEG with options ¬
      myOptions appending no extension without copying
    end tell
    hope this helps.
    have fun.

  • How to use JButton as a JTable column header?

    I'd like to use JButtons as my JTable's column headers.
    I built a JButton subclass which implemented TableCellRenderer and passed it to one of my table column's setHeaderRender method. The resulting header is a component that looks like a JButton but when clicked, it does not visually depress or fire any ActionEvents.

    You might want to check this example and use it accordingly for your requirements.
    http://www2.gol.com/users/tame/swing/examples/JTableExamples5.html
    Reason: The reason you're unable to perform actions on JButton is JTableHeader doesn't relay the mouse events to your JButtons.
    I hope this helps.
    have fun, ganesh.

  • MM functional/Technical

    Hi Industry gurus
    I am confused.suppose there is question"How can I extend all material to a new plant? This question belong to technical side or function side and why? I will appreciate the response for the same.

    This is a Functional question, as this functionality exists in SAP. your answer will be the session code for doing the same and what can be and what cannot be done in that session.
    If the  question is like how can we do that particular piece of functionality, then that will be a technical question. the answer will be process of copying, getting the table details, how the checks will be made during the copy process etc.
    Hope that helps, have fun while enjoying SAP

  • Itunes9 crashes when CD put into computer

    Hello
    Everytime i put a CD into my computer itunes crashes.So its impossible for me to put any of my music onto my nano.
    Ive tried reinstalling itunes and quick time but i keep getting the same message "itunes has stopped working". Ive even tried installing quick time and itunes separatly but that didnt work either.
    Anyone have any ideas?
    thanks in advance

    OK got this to work now. Uninstalled Itunes9 and installed Itunes 8.2. Then without uninstalling itunes 8.2 i installed itunes9 again!!
    And well it works.
    thanks to all who post on the forums for their ideas and help.
    have fun*

  • Chia Pet?

    Disclaimer:
    I'm completely new to the mac OS.
    I downloaded the Chi Pet widget and I just thought it'd grow grass on it's own, but apparently you have to water it. Mine died, and I was kinda upset because it looked pathetic lying on its back all dead-like with this note that said, "YOUR CHI PET DIED BECAUSE YOU FAILED TO WATER IT." Exactly like that. So now, I occasionally click the water droplet next to it and I don't notice anything happening to the Chi Pet, so I was wondering if I was doing it right. I really like the Chi Pet widget because I have two real Chia Pets of my own.
    On to a completely different (and a little less inane than Chi Pet widget) topic...how often should I reformat my laptop? After I downloaded FireFox it said I could eject the something from the hard disk and I'm still confused on what a .dmg file is. I know it's disk image, but I don't know what I can delete and what I need to keep to use an application. Can I move stuff from the applications folder to the desktop and will the application still work? Is there a book that's like, What To Do When You Switch To Mac from Windows? I really am not sure how any of this works still, and the help topics don't always work. I'm still trying to figure out how to switch iTunes from regular view to mini-view. It says there's a zoom button at the top left hand side of the iTunes window, but I've yet to find it there or a preference listed in any of the preference windows.
    And also, I'd like to apologize for a very inappropriate post I made a day or two ago. I guess I didn't realize the extent of what I was asking, and it made me look like a really big jerk. I'm really not into all of that stuff, I'm still getting used to this wireless business. It's just kinda different (for lack of a better word) when a notification box pops up and asks me if I'd like to join the open network NETGEAR. So, sorry, especially to Allan Sampson -- I think I really made a mistake/made people mad.
    Thanks!

    Hi.
    Like baltwo, I can't help with your Chi Pet widget, but see if there is a restart button or something in its preferences that you can reset. Go back to wherever you downloaded it from to read the documentation/instructions.
    A disk image is just that, It is a virtual disk that mounts within a Finder window. To take the case in point, you downloaded Firefox whose .dmg you then opened. In the adjoining pane of the Finder window you'll see the Firefox logo. That is the application. Drag it to your Applications folder. That then copies it to the Apps folder. You'll see a little progress bar for a few seconds while it does so. Don't blink!
    You can then eject the D.I. in finder by clicking on the ⏏ symbol. The original download (.dmg) is now redundant and you can safely drag it to the Trash and empty it.
    Regarding applications on the desktop, Apple Apps should be left in the Applications folder because that's where Software Update expects them to be. If you move Apple apps around they won't get updated. Third party apps, like Firefox for eg, can usually be run from wherever you like. The Applications folder is tidier though. If you want an App readily accessible, just drag its icon to the dock, that will create an 'Alias', ('Shortcut' in Windows-speak), in the Dock. Or, while the app is open, click and hold its icon in the dock and select the 'Keep in Dock' option. Anything that you don't want in the Dock can be dragged off it. It will disappear in a puff of smoke. The Application will still be accessible in your Applications folder, all you have done is got rid of the alias in the Dock.
    Re your iTunes 'Mini view'. at the very top left of the iTunes window you will see three little grey circles. When you point to one of them, you will see a symbol in each. The left hand one with an X closes the window, but unlike Windows' X, doesn't close the Application, (or 'Program' in Windows-speak).
    The centre (center) grey circle has a - sign. That minimises iTunes to the Dock next to the Trash. If you want to see cool slow-motion effects, hold the shift ⇧ key whilst minimising.
    The right hand circle of the three with the + is the one that you want for mini-view.
    Hope this helps,
    Have fun!
    Adrian
    ibook G4 1GHz, 768mb; iMac 17" G4:768mb (10.3.9)   Mac OS X (10.4.6)   Belkin WiFi F5D7632

  • Export a Playlist

    I do a fair amount of editing in many of the available fields for most of my tracks. I use almost all of the fields (most notably 'comments', 'show', 'description'). I also find it helpful (and fun) to export my entire library using the export playlist feature. Unfortunately when using the export playlist function many of the fields are not exported (such as comments, show and description). Is there a way to also export those field to put in a text/excel format?
    If not, i respectfully request that feature to be available in future versions. And also request some generic fields that users can use for any thing they desire.
    Many thanks.

    You can copy what you see in iTunes and paste directly into Excel -- no need to export and then import to Excel. This works for a playlist or your entire library, or even a manually-managed iPod. Just get the fields you want in view, then copy and paste. You cannot re-import from Excel to update your tags, but it is helpful to dump the information to search for things that need correcting in iTunes.
    Also, this is a user-to-user forum, so your requests for Apple to do something will fall on deaf ears. If you want to submit feedback, try going here:
    http://www.apple.com/feedback/itunesapp.html

  • Installing in Firewire Target Disk mode

    I know this is a kind of silly question, but is it advisable to install OS X on my iMac when it's booted into Firewire Target disk mode? I mean, would it get funky stuff in there that the iMac doesn't need if i install from, say, my PowerMac? I know it's quite possible to do this, as I used to do it when I had two identical iMacs. But those were, of course, identical, so the target machine had the same specs as the one that was installing.
    Any thoughts?
    Oh, and let me say a quick "hi" to all the regulars. I haven't really been on this baord too much the past year or so. Who's still around?

    Hi, Trey.
    I installed Tiger via Target Disk Mode, but my G3 has been having kernel panics in the couple weeks since the upgrade. On another post someone said that they'd heard that the Target Disc Mode can be a problem. So I'm checking the posts to find out more.
    My G3 has a CD-R/W drive, so I didn't have an alternative, other than to buy an external drive, or to send Apple my commercial Tiger DVDs and pay them MORE to convert it to CDs. I just paid big bucks for the G5 a month before they came out with a cheaper upgraded version, which I am unhappy about. Of course those Tiger disks are for G5 ONLY, so I couldn't install to my G3 from them, so I coughed up the cash for the DVDs. I couldn't fathom giving them even more for a CD transfer.
    Of course, if the G3 keeps crashing, and I hear from others that a direct install from CD may cure the problem, what choice will I have? As much as I've loved Apple over the years, there's starting to be a more corporate (and dare I say it, Gates-like) vibe from their method of doing business. Now the kid wants an iPod for Christmas, and I have to check those boards to see how they're performing. As helpful and fun as all this technology is, it is also quite stress-inducing...
    Good luck with your upgrade! --kat
    iMac G5 20" (ALS); 2G RAM | iMac G3 500MHz slot-load CD-R/W CRT; 1G RAM   Mac OS X (10.4.3)   Using Apple since IIe, and Macs since 1984
    iMac G5 20" (ALS); 2G RAM | iMac G3 500MHz; slot-load CD-RW; 1G RAM   Mac OS X (10.4.3)   Using Apple since IIe, and Macs since 1984

  • Hotmail Alias in mail app: Refuses to use the selected email address

    Hello,
    Before today I could send emails using my alias account from the iPad mail app, using my hotmail email addresses. However, from today, I select the email address I wish to use (As normal) but instead of sending it from the chosen email address, it instead sends it from my standard email address.
    Thanks for your time.
    Oh, and I have not changed any settings, at all.

    Hello hbm2679,
    I have many aliases email address, but mainly use one. I don't not send emails using my main account email address.
    The way I changed it to only use the one (Alias) account was, when logged in to my hotmail account, over on the right (Next to your name), there is a gear.
    Click the gear, and click "More Mail Settings".
    Next, under "Managing your account", click "your email accounts".
    Scroll to the bottom, and look for 'Default "From" address, and select the account/email address you want to use.
    This is the only work around, I can think of at the moment. I think Apple need add more support for alias accounts.
    Hope this helps,
    Have Fun,
    Matt_75

  • Problems with Downloadin​g Applicatio​ns onto my Blackberry from device!

    I am having problems downloading applications.  I haven't even been able to download the Blackberry App World either.  I know it's not a problem with connection with BIS or my service provider and what not because I can do other things like email and bbm, SMS, calling, facebook, etc. 
    Basically when I go to click "download in Blackberry App World" for any application (example: crunchSMS) it says "cannot view this page, save onto device" (or something along those lines) and then when I click yes it asks me where I want to save, either my media card or the device (I can choose a folder) but then after that I either can't find it or it won't open/download anything when I go to access it. 
    Now, when I go to download Blackberry App World it says that my device doesn't meet system requirements even though I just updated my device to the newest system (5.0?, anyway App World only requires 4.6, I think) but I still keep getting this message. 
    I live in Amman, Jordan and my service provider is ZainJO if that helps with answering my problem.
    I really want to take advantage of this part of my blackberry because it would be really helpful and fun!
    Thanks!

    Hi and Welcome to the Forums!
    Please check this page to ensure you meet the minimum requirements (including if it is available in your country):
    http://na.blackberry.com/eng/services/appworld/dow​nload.jsp
    If it is available in your country and you feel you meet the device-level system requirements, then contact your carrier to ensure that you meet the service plan (from them) requirements for access (via their network) to AppWorld.
    Lastly, do be aware that AppWorld is merely a portal, vending apps developed mainly by others. As such, it is not your exclusive procurement source -- there are others that you can try (e.g., Handango, Handmark, BPlay, GetJAR or Mobihand). I have found that there are very few apps that are exclusive to AppWorld. You can search the on-line catalog and then search out other procurement sources, including quite often the developer website itself.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Reporting Terms of Use Violations

    Dear Kuler Team,
    What can be done about reporting Terms of Use violations,
    specifically, reporting users who steal themes/tags. It used to be
    merely aggravating, but now that there is something on the line
    (the coveted autumn07 t-shirts :) ), I feel it's time to put in
    place a mechanism for calling these people out. Coopting another's
    colorset and/or its associated tag set and publishing it as one's
    own is clearly a violation of sections 6a, 6b and 7a. I know that
    most of these are first-timers and/or one-timers who don't know any
    better, but still, they are all required to abide by the terms of
    use just like everyone else.
    Thanks... and keep up the good work!
    Sheldon

    Hi guys,
    I am a noob here. Just got on yesterday and I have to say
    that this is a very helpful (and fun) tool. I definitely have
    something to say on this topic. Please see the comments below, they
    are a conversation that started with a presumptious user not
    minding his business and ASSUMING that my partner had copied
    someone's swatch. It happened to be that it was my theme that I
    created and published it for her to look at and change if
    necessary. So then someone else jumps in with their two cents. They
    apparently were trying to help the situation, but really if someone
    copies (or you think they copied) your theme complain to the kuler
    team and call them out directly if you want to, but if it is
    someone else who has nothing to do with you or your themes then
    myob. It makes other not want to publish anything on here if people
    who do not know you, your ethics or your intentions jump in and
    make presumptious comments.
    This is how it started and ended...
    [presumptious user]
    Duplicating another artists swatches goes against Kuler tos.
    Even if you only change one color. It's highly inconsiderate.
    [marxmen]
    We are part of the same team and are just working out a color
    swatch so pls myob.
    [marxmen]
    Finally figured out how to remove the other one. Whooohooo!
    [other not so presumptious guy]
    you don't have to work it out in public, you can publish it
    when it's done and hopefully looking more original. At the least
    explain in your initial comment what you're doing and everything
    will be cool :)
    [cs]
    Let's see, we were considering both color schemes so your
    suggestion would not work, and it was not your color scheme so why
    so worried about someone else's business? How about if you guys
    just judge the color scheme and forget what we are doing. If you
    think it sucks give it 1 star, if you think it is great give it 5.
    If you have a comment about the color scheme please also leave
    that. But if it has to do with ethics, leave it at the door because
    the person that made the first comment made assumptions that he/she
    should not have made. Working it out in the backend would require
    extra steps that we do not want to take. Let us use the tool how we
    want to use it as long as we are not stealing your themes. If I
    steal one of your themes, PLS call me out about it, otherwise,
    myob. People always want to assume and then when their assumption
    is wrong they still want to blame you. :|
    [cs]
    And also to touch on the "comments" thing. I have only been
    on this thing for a day so it is safe to say I am still getting
    familiar with it. I did not think about leaving comments on my
    stuff until I read the FAQs.
    [cs]
    And one more thing, 'other not so presumptious guy', some of
    your color schemes are stunning! I can smile to that. ;)
    [other not so presumptious guy]
    let me reassure you my comment was not made to slag you in
    any way. I was just feeling bad about the way it happened and only
    meant to give you an idea about how we can all better get along on
    this site given all the angst that's been passed around lately
    about stolen themes. You're probably just a victim of bad timing.
    There's going to be a lot of discussion around this whole problem
    in the forum next week so please join in.
    This is what she wrote directly to that person on their page:
    [cs]
    In reference to: "Duplicating another artists swatches goes
    against Kuler tos. Even if you only change one color. It's highly
    inconsiderate."I appreciate you going out on a limb for another
    artist, but you should have gotten the facts straight. That happens
    to be one of my partners and we are working on a color scheme. She
    just did not know how to remove it. But thanks for the tip on
    ethics. ;)
    NOTE: Yes she was being sarcastic with my thanks for the
    ethics tip)

  • Game recaps (MLB.tv) stopped appearing

    I recently became addicted to the Game recaps on MLB.tv.  As soon as I got hooked, though, they stopped showing up.  At first, I thought it was another marketing ploy by MLB -- get you hooked, then make you pay.  But my other ATV owner-friends say they are continuing to get the recaps.
    If I navigate to Internet/MLB.tv and choose Game Recaps, I see four games from Wed, 4/27, a bunch of games from 4/26, 4/25, etc.  There were more than four games on 4/27.  But I am not "presented with" the remaining 4/27 games or anything newer than that.
    Obviously, there's no "refresh" button or similar.  And, my (cheapskate/nonpaying) buddies are getting the current recaps.  What can I do to "force" the ATV to go out and fetch the new game recaps?
    Thanks.

    Okay.  Still not sure where you sign out.  Are you talking about signing out of the whole Apple TV?  Like with your iTunes account and password?  Or are you talking about signing out of just MLB?  I'll go take a look at my ATV in a sec to see if it's more obvious.
    But, assuming I figure out what you mean, exactly, then I think your answer is "helpful" because MY previous solution was to completely RESET the ATV -- as in "Restore to Factory Settings."  No other thing I had tried (including power reset of ATV) had previously helped.
    Fun fact:  I called Apple Support yesterday and they pretty much said that they don't really support MLB.tv.  That I could try bugging MLB (I'm sure that'll be really fruitful) or I could bring my ATV into the Genius Bar to be looked at for Hardware trouble.  I'm actually going to My First Genius Bar Appointment this Friday and plan to bring the ATV along, just to get a "second opinion."  I'll repost if I learn anything exciting.

  • Bluetooth will not enable on BB 8330 for sprint

    Hello group I am new here and hope you guys are able to help me, I have search the web all over and see a number of people with the same problem but no solution.
    the problem is as follows:
    I have the BB 8330 for sprint for about 9 months, I have always used a head set (stereo) for music and making calls it had work very well until about a month ago when it started disconnection all on its own.
    now the connection for bluetooth on the BB does not work at all, when I go into options to enable I see the message enabling bluetooth but it does not do it.
    I would really apreciate it if someone helps
    have fun, make money, help people (mr li)

    Found another thread that mirrors your issue.  Never asked what OS you are running; thread suggests an upgrade.  Read and see what you think:  http://supportforums.blackberry.com/rim/board/message?board.id=8300&message.id=10984&query.id=101955...
    Take note of what Bifocals posts as well as bumblepie!
    If the OS isn't your issue, maybe it's time to give yourself the gift of a new BB! 
    IrwinII
    Please remember to "Accept as Solution" the post which solved your thread. If I or someone else have helped you, please tell us you "Like" what we had to say at the bottom right of the post.

  • Nullpointer exception... any help would be appreciated

    In advance, I apologize for any ignorance which I may obviously have... I'm in the process of learning Java, and am used to C/C++... In any case, I'm running into a nullpointer exception while 'compiling', which I'm having trouble figuring out... I'll list everything below, but this message will be rather long, as I will try to include everything I can. For this reason, I will ask my questions here, at the top:
    1) A null pointer exception, I believe, is generated when something is being referenced which is currently null, for example "a=null; a.b;" yields a null pointer exception. However, is there any other way that one is generated?
    2) Are there methods to figure out what/why something is null other than simply looking at it? As shown below, it seems that just looking at it runs you in a circle from line to line, file to file, which leads you back to the beginning where nothing is actually null... (I'm probably just not seeing it, but that seems to be what's happening to me)
    So now, on to the actual code:
    The following is a printout of the debugging info:
    ~/bin/jdk*/bin/java -classpath classes jamie.Main
    java.lang.NullPointerException
    at jamie.Main.Sys_Log(Main.java:110)
    at jamie.Main.Setup(Main.java:142)
    at jamie.Main.main(Main.java:54)
    Exception in thread "main" java.lang.NullPointerException
    at jamie.Main.Sys_Log(Main.java:110)
    at jamie.Main.Shutdown(Main.java:182)
    at jamie.Main.main(Main.java:92)And a short excerpt of each. (*) indicates line which error originates:
    20    )   private static Log                sys_log;
    108  )   static void Sys_Log(String msg)
    109  )   {
    110*)        sys_log.Log(msg);
    111  )   }
    142*)   Sys_Log("Server warming up...");
    182*)   Sys_Log("Server shutting down...");
    50  )     public static void main(String[] args)
    51  )     {
    52  )          try
    53  )          {
    54*)                Setup();
    85  )     catch(Exception e)
    86  )     {
    87  )          e.printStackTrace(System.out);
    88  )          err_log.Log(e.toString());
    89  )     }
    90  )     finally
    91  )     {
    92*)            Shutdown();
    93  )      }Now, various things that I have tried, and their result (you can probably skip this section, as these were mostly futile efforts):
    What seems odd to me is that the initial error is on line 110, which is the logging function Sys_Log. Since it's a null pointer exception, I would assume that sys_log is null? and thus in calling Log we're generating that error... I'm not entirely sure that that makes sense, though. Additionally, and what I find odd, is that if I change it to what I will list below, I get a slew of other seemingly unrelated problems:
    20    )   private static Log                sys_log;
    108  )   static void Sys_Log(String msg)
    109  )   {
    110#)        if (sys_log!=null)
    111  )        sys_log.Log(msg);
    112  )   }This results in a problem with function Err_Log, which I change the same way, resulting in the following:
    java.lang.NullPointerException
            at jamie.Area_LUL.Load(Area_LUL.java:23)
            at jamie.Main.Setup(Main.java:161)
            at jamie.Main.main(Main.java:55)
    Exception in thread "main" java.lang.NullPointerException
            at jamie.Main.Shutdown(Main.java:186)
            at jamie.Main.main(Main.java:93)In Main.java the following lines are generating the error:
    160  )   lul = new Area_LUL();
    161*)   lul.Load();And in Area_LUL.java I also have the following:
    14  )class Area_LUL implements LoaderUnloader
    15  ){
    16  )    public void Load()
    17  )    {
    18  )        try
    19  )        {
    20  )            areadir = new File("./areas/");
    21  )            SAXParser p = SAXParserFactory.newInstance().newSAXParser();
    22  )
    23*)            for(File curr : areadir.listFiles(new Area_Filter()))
    24  )            {
    25  )                p.parse(curr, new XMLParser());
    26  )            }
    27  )        }Where in the above, the for statement is generating the null pointer exception... which would tell me that areadir is null, however it is defined as new File("./areas/"); Also, lul (defined as new Area_LUL(); is generating the same error, though it is clearly defined in Area_LUL.java at the top of the last excerpt.
    Also, LoaderUnloader is defined in another file as follows:
    interface LoaderUnloader
        void Load();
        void Unload();
    }which are defined in Area_LUL in Area_LUL.java .
    A major theory which I currently have is that the compiler is beginning with my main.java file, and not seeing the class definition in another file, and thus attributing the class obj I create as null, which is causing the error, but I also am not sure if this is possible...
    My imports for Main.java are as follows:
    package jamie;
    import java.io.*;
    import java.util.*;I'm not entirely sure what the package is including, however I do have a jamie.jar file in another directory (../../dist) (could be referencing that?). Also, to compile the source I am using the following command:
    ~/bin/jdk*/bin/java -classpath classes jamie.MainHowever my classpath (I believe) isn't set to include all my files in the given directory. I wouldn't believe that this would be an issue, however if it could possibly be causing this, I can figure out how to set it properly. Also, this should mean I'm starting with Main.java, and perhaps I am right in concluding that it isn't referencing Area_LUL in another file properly, which is setting it as null?
    In any case... Any help would be greatly appreciated. This has been a bit of a struggle for about a month now, trying various resources, moving things around, etc... Thanks so much for your time in reading,
    -Jess

    I'm not able to follow the program flow from your post. Please create a small standalone program that exhibits the problem and post that back here.
    Your assumption re a NPE is correct, that's the only way they're generated.
    There are no "canned" methods to resolve NPEs. The best solution is to put System.out.println statements for all of the involved objects and variables immediately preceeding the error line (in this case, 110) and something will show null. Usually that's enough info to backtrace to the real cause.

Maybe you are looking for

  • HTML5 API - Heat Layer Points Not Working

    Hi everyone, Really weird issue this, and I am honestly at a loss to explain what's going on, so hopefully someone can spot my mistake! I want to overlay a density-based heat map over a map of Britain, based on longitude/latitude points stored in OBI

  • Game Streaming said that I don't have enough bandwidth to play. I have DSL connection

    All I get in response is the error code 5001-9 telling me my bandwidth isn't fast enough suggests DSL or Cable. I already have DSL By Verizon and it's just been upgrading to the latest version. Please give me answers to this problem. Thank You

  • User Exits in SD and MM Modules

    Hi Guys, Please send some User Exits in SD or MM modules and its  functionality . it should be great if you send some real time scenarios with screen shots. Regards, Madhu

  • Cocoon 2.1.11 pdf dont display cirilic?

    Hi all I was installing cocoon with apex as describe at http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html but when I have cirilic theres ##### (so I m trying to set APEX_FOP/apache-tomcat-6.0.29/webapps/cocoon/WEB-INF/web.xml from IS

  • IDS Sensor 4.1 doesn't capture events.

    My IDS Sensor 4.1 stops capturing events after some time. I don't know if maybe it is because there are a lot of VLANs in SPAN and the IDS doesn't support all this traffic. Am i wrong? Here is the show ver output:> # sh ver Application Partition: Cis