JDOM - Variable not intialized error, why? please help.

Hello,
Please assit me.....I need a rush help. Stuck! Stuck!!!!
I am reading a text file which has multiple headers(identified in the first 2 pos as '//'), followed by '01' records which are details. It would look like
//nbr....
01address....
01city.....
01zip....
//name...(continues).
My jave routine reads it and puts the tags as
<efldata>
<tx>
<loadmessage>jhdfj
<nodedetail>
<address>....
<zip>
<nodedetail>
djfgkdf..... etc.
While compiling it gives me a loadmessage not initialized error. Please help. I have included arrow marks where the error occurs....
This is my code.....
while ((str = br.readLine()) != null) {
try {  
String type = str.substring(0,2);
if ( "//".equals( type ) )
/**** header data ******/
hdr_count = hdr_count + 1;
controlnbr = str.substring(2,9);
f_first = 'y'; /**** first time header check flag ***/
} else
if ( "01".equals( type ) ) /**** Checks for detail records ****/
// loadmessage = new Element("LoadMessage");
if ((f_first) == 'y') {         /*** Execute if first time(header) ***/
f_first = 'n';
Element tx = new Element("TX");
efldata.addContent(tx);
loadmessage = new Element("LoadMessage");
loadmessage.addAttribute(new Attribute("clientControlNo", controlnbr));
// loadmessage.setContent(null);
tx.addContent(loadmessage);
/*** Detail info ***/
dtl_count = dtl_count + 1;
String stopoffsequence = str.substring(2,4);
String nodecode = str.substring(4,24);
String addr1 = str.substring(24,60);
String bol = str.substring(147,154);
String year = str.substring(192,196);
Element nodedetail = new Element("NodeDetail");
nodedetail.addAttribute("seqInRoute", stopoffsequence);
// nodedetail.setContent(null);
Element nodeaddress = new Element("NodeAddress");
nodeaddress.addAttribute("address1", addr1);
Element nodeaction = new Element("NodeAction"); //.setContent(null);
nodeaction.addAttribute("bol", bol);
Element nodeactiondate = new Element("NodeActionDate");
nodeactiondate.addAttribute("year", year);
--------> loadmessage.addChild(nodedetail);
nodedetail.addChild(nodeaddress);
nodedetail.addChild(nodeaction);
nodeaction.addChild(nodeactiondate);

Try
Element loadmessage= new Element()
Cheers
Sanjay

Similar Messages

  • SP2-0552: Bind variable not declared error. Any help please?

    Hi Experts,
    I have a question regarding the error that I am getting: SP2-0552: Bind variable "V_COUNT_TOT_BAL" not declared.
    I have 'out' parameters declared in my procedure and executing the same from sql script as shown below:
    set ver off
    set serverout on
    set linesize 8000
    Declare
    Variable v_count_dtl_bal NUMBER(10);
    Variable v_updat_dtl_bal NUMBER(10);
    Variable v_count_tot_bal NUMBER(10);
    Begin
    execute load_abc.insert_abc_bal(:v_count_dtl_bal,:v_updat_dtl_bal,:v_count_tot_bal);
    End;
    exit;
    So, when this sql script runs it given me the above error. However, all the result looks good and there's no problem with the data or anything else that might be impacted. I suspect this error stems from the code in the sql script above.
    Any idea what am I doing wrong?
    Thanks in advance for any inputs.

    Thanks Frank. I still receive the same error if I follow your example or any of the ones explained above. This is what I am getting and still an error underneath:
    Usage: VAR[IABLE] [ <variable> [ NUMBER | CHAR | CHAR (n [CHAR|BYTE]) |
              VARCHAR2 (n CHAR) | NCHAR | NCHAR (n) |
              NVARCHAR2 (n) | CLOB | NCLOB | REFCURSOR |
              BINARY_FLOAT | BINARY_DOUBLE ] ]
    Usage: VAR[IABLE] [ <variable> [ NUMBER | CHAR | CHAR (n [CHAR|BYTE]) |
              VARCHAR2 (n CHAR) | NCHAR | NCHAR (n) |
              NVARCHAR2 (n) | CLOB | NCLOB | REFCURSOR |
              BINARY_FLOAT | BINARY_DOUBLE ] ]
    Usage: VAR[IABLE] [ <variable> [ NUMBER | CHAR | CHAR (n [CHAR|BYTE]) |
              VARCHAR2 (n CHAR) | NCHAR | NCHAR (n) |
              NVARCHAR2 (n) | CLOB | NCLOB | REFCURSOR |
              BINARY_FLOAT | BINARY_DOUBLE ] ]
    SP2-0552: Bind variable "V_COUNT_TOT_BAL" not declared.

  • "Audio File "Recording#27.aif" not found" Error Message- Please HELP!

    Hi Everyone-
    I was opening a podcast today to finish editing it and I got this error message, "Audio File "Recording#27.aif" Not Found" - and, naturally, when I opened the project, half of a phone interview was missing (or, rather, it shows up as purple balloons but each one says "File Not Found" inside). This file is the audio from the interviewer (the interviewee file is totally fine, as are all others in the podcast). When I load the project it asks if I want to search for this missing file, but when I click yes it says that it can't be found.
    How can I find this file? What happened to it? Thank you for any ideas, suggestions, etc. For reference, I'm using GarageBand 3.0.4 on a MacBook Intel Core Duo 2Ghz and Mac OS X 10.4.11

    no, GB wouldn't delete anything on it's own. it only deletes files for which you've deleted the entire region from the timeline and then saved
    if the file is not within the projects, i'm afraid it's gone, and i can't think of any way that could happen by itself B-(>
    Well i guess I should warn others that copying and pasting is very dangerous stuff! I had two podcasts- in podcast #1 GB saved the interview file as "Recording#27.aif" and in podcast #2 GB saved a little intro clip under the same name. When I pasted the intro clip from podcast #2 into podcast #1 my interview disappeared. I didn't delete it- I was never asked about it, I didn't delete the region from the timeline, etc. I have to assume that since they had the same name, GB thought I no longer needed the "Recording#27" from podcast #1 and now I can't find it anywhere! If anyone has any suggestions as to how I could find this file I would be very appreciative.

  • HT4097 Help! Everytime I try to update my iPad 2 on 4.3.3 it get is error message "The iPad "iPad" cannot be restored at this time because the iPad software update server could not be contacted or is temporarily unavailable." I dont know why please help

    Help! Everytime I try to update my iPad 2 on 4.3.3 it get is error message "The iPad "iPad" cannot be restored at this time because the iPad software update server could not be contacted or is temporarily unavailable." I dont know why please help.
    I'm running 4.3.3 on a ipad 2 im computer is connected via wire to internet

    See
    iOS 5: Updating your device to iOS 5
    http://support.apple.com/kb/HT4972
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect to your computer & click on the "Update your device using iTunes".
    Tip - You may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. After you update to iOS 5.x, the next update can be installed via wifi (i.e., not connected to your computer).
     Cheers, Tom

  • Photoshop Elements 8. "Could not use Clone Stamp Tool because of a program error."  Please help.

    Photoshop Elements 8.  "Could not use Clone Stamp Tool because of a program error."  Please help.

    Try this:
    Open your picture file
    Access the clone stamp tool
    Hold down the ALT key on the keyboard and left click on the area from which you wish to clone, then release the ALT key, and click to place the pixels at the destination
    TIPS:
    It is a good idea to open a blank layer at the top in the layers palette, and do the cloning on this layer. Be sure that "sample all layers" at the top is checked. You can change the layer opacity if necessary
    Use the bracket keys next to the letter p on the keyboard to increase & decrease the size of the cursor
    Let us know  how you make out with the error message now.

  • I am having trouble dating to version 3.6.14. I am running Linux/Ubutu OS and I get this error message:/tmp/p7x3vko2.part could not be saved, because the source file could not be read. Please help. Thank you , Deb

    I am having trouble dating to version 3.6.14 or updating to the Beta testing. I am running Linux/Ubutu OS and I get this error message:/tmp/p7x3vko2.part could not be saved, because the source file could not be read. Please help. Thank you , Deb

    Solved for me.
    I set the owner/permissions of my profile's mozilla folder's (and all the files in it) to read/write access, and the problem disappeared.
    in linux:''
    * cd /home/myusername/.mozilla
    * chown -cR myusername:mygroup ./
    * chmod -cR +rw ./
    '''Never do that with root privs (nor with sudo)'''

  • HT3743 my iphone 4 i bought was jailbroken to ios 6.0.1 redsn0w but i tried to restore the iphone and now it keeps saying connect to itunes but when i connect and try to restore an "unknown error" occurs and it will not boot up whatsoever. please help!

    my iphone 4 i bought was jailbroken to ios 6.0.1 redsn0w but i tried to restore the iphone and now it keeps saying connect to itunes but when i connect and try to restore an "unknown error" occurs and it will not boot up whatsoever. please help!

    If you want to solve your problems, unjailbreak. And don't do it again, because jailbreaking causes problems as you read about in that article. You can try Recovery Mode: http://support.apple.com/kb/HT1808

  • TS3297 I want to buy the double coins from the game subway surfers! But they told me to contact the itunes support! I don't know why it's not working.. Please help! iPhone 4ss

    I want to buy the double coins from the game subway surfers! But they told me to contact the itunes support! I don't know why it's not working.. Please help! iPhone 4ss

    These are user-to-user forums, you are not talking to Apple here. You can contact iTunes support via this page and ask them why the message is appearing : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then probably Purchases, Billing & Redemption

  • TS3221 my iphone 4s is not connecting with itunes and giving me a message of unknow error 0xE8000012 Please help me out

    my iphone 4s is not connecting with itunes and giving me a message of unknow error 0xE8000012 Please help me out

    You've managed to permanently damage the phone. As gdgmacguy suggests, buy a new one. Preferably from a legitimate source.
    You may also want to keep in mind that it is illegal to use the Gevey SIM in pretty much every country on the planet. It may still be legal on the continent of antarctica, but that's only because penguins don't use cell phones as a rule.

  • After i updated my iphone 4s from 8.1.2 to 8.1.3 problem occurred.i cant restore and update my phone?saying that iphone could not be restored,an unknown error ocuurred.please help me?

    After i updated my iphone 4s from 8.1.2 to 8.1.3 problem occurred.i cant restore and update my phone?saying that iphone could not be restored,an unknown error ocuurred.please help me?

    Thanks for the update and clarification. In researching the issue it seems that the 2003 error code may have something to do with the USB connection. I would use this section of one of the above articles:
    Get help with iOS update and restore errors
    If the USB connection between your device and computer is interrupted, you might not be able to update or restore.
    To narrow down the issue, you can try different equipment:
    Use the USB cable that came with your device, or a different Apple USB cable. 
    Plug your cable into a different USB port directly on your computer. Don't plug it into your keyboard.
    Try a different computer.
    Solve other issues with the USB connection, then with your security software.
    If you still see the error message, check for hardware issues by following the next section.
    Check for hardware issues
    Related errors: 1, 3, 11, 12, 13, 14, 16, 20, 21, 23, 26, 27, 28, 29, 34, 35, 36, 37, 40, 1002, 1004, 1011, 1012, 1014, 1667, or 1669.
    These errors mean that your device or computer might have a hardware issue that stops the update or restore from completing.
    Check that your security software and settings aren't blocking your device from communicating with the Apple update server.
    Then try to restore your iOS device two more times while connected with a cable, computer, and network you know are good.
    Make sure that your security software and settings are allowing communication between your device and update servers.
    If you still see the error message when you update or restore, contact Apple support.

  • PSE11 and 12 will NOT display a JPG i open..... this just occured- have no idea why - please help??

    PSE11 and 12 will NOT display a JPG i open..... this just occured- have no idea why - please help??

    All JPEGs or a particular one?

  • I'm trying to set up my new iPhone 5s from a backup of my previous iPhone, when trying to enter my Facebook login info in settings I keep getting the following error message : error signing in could not communicate with server, please help !

    I'm trying to set up my new iPhone 5s from a backup of my previous iPhone, when trying to enter my Facebook login info in settings I keep getting the following error message : error signing in could not communicate with server, please help !

    Can you access other apps? Can you acess the internet? Can you access applications that use internet besides facebook?
    If answer is yes to all of these; contact Facebook.

  • Hi there, i purchased an app called Top Movies. But when using it on my iPhone to buy movies, it gives me the error 'Your request could not be completed'. Please help.

    Hi there, i purchased an app called Top Movies. But when using it on my iPhone to buy movies, it gives me the error 'Your request could not be completed'. Please help.

    Ok.. I see the app now in iTunes.
    Best thing to do is email the developer of that app.
    You can do that here >  http://www.lymobilesoft.com/contact.html
    Make sure and tell them exactly what the error says: 
    it gives me the error 'Your request could not be completed'.
    Instead of using a third party app, you can download movies directly from the iTunes store.

  • Why does iMessages does not work properly ? Please help me ! Its works better with the previous version if compared with the latest iOS

    Why does iMessages does not work properly ? Please help me ! Its works better with the previous version if compared with the latest iOS

    Many, many thanks for both of you Todd and Rick.
    to Rick:
    I suppose you mean the Color Settings in Project Settings as follows:
    - Working Space: None
    - Match Legacy ... Gamma Adjustments checked ON
    But it does not correct the colors in effects. And checking or unchecking Make Movie/Output Module Settings/Color Management/Profile/Preserve RGB does not make any difference.
    to both of you:
    Those parts of the video image that does not have color effects are just fine. In these parts the color is preserved when reimporting to FCP. However, those parts having color effects (except Levels, as decribed earlier) have altered color results. So, only the parts having effects affecting color are misinterpreted in the image area. The mismatch is of course seen in AE, before making the movie.
    What I ment with "Color Management not working properly" is that (instead of "disabling" it) Color Management does not seem to be able to correct this "misinterpretation" or difference in effect handling between AE 6 and 10.
    So, would you have any solution for this problem?
    Again, many thanks for your fast replies!

  • TS3212 I continue to try to install iTunes; when I attempt to open the newly installed iTunes, I receive errors that it was not correctly installed. I have followed the direction on this website, but I face the same error. Please help.

    I continue to try to install iTunes; when I attempt to open the newly installed iTunes, I receive errors that it was not correctly installed. I have followed the direction on this website, but I face the same error. Please help.

    latest message indicates I need Apple Application Update
    With the Error 2, let's try a standalone Apple Application Support install. It still might not install, but fingers crossed any error messages will give us a better idea of the underlying cause of the issue.
    Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
    http://www.apple.com/itunes/download/
    Download and install the free trial version of WinRAR:
    http://www.rarlab.com/download.htm
    Right-click the iTunesSetup.exe (or iTunes64Setup.exe), and select "Extract to iTunesSetup" (or "Extract to iTunes64Setup"). WinRAR will expand the contents of the file into a folder called "iTunesSetup" (or "iTunes64Setup").
    Go into the folder and doubleclick the AppleApplicationSupport.msi to do a standalone AAS install.
    Does it install properly for you?
    If instead you get an error message during the install, let us know what it says. (Precise text, please.)

Maybe you are looking for

  • Mac mini unable to connect to internet via router

    I can't seem to connect to the internet using my mac mini.i use a netgear wireless router which has my imac,and 2 windowsxp PC and a maxtor network drive connected ,these all work on the network. The macmini(no airport) is connected using an ethernet

  • Candlestick chart problem with multiple series

    Hello, I added one mx:CandlestickSeries object and couple additional mx:LineSeries objects to the chart. All series are represented but still I have one problem. More series I add - less candles are becoming of CandlestickSeries data. It seems that t

  • Internal Order , object class related issue

    hi when i created internal order with the object class (Assignment Tab) :- Investment and not specified any assignment like (cost center ) i am  able to view line items posted to internal order by transaction KOB1 but if i am selecting object class a

  • ATOK is not working in Solaris 10 U5

    Hi, I have installed (using JumpStart server) Solaris 10 U5. Then I installed all Japanse, Chinese and French packages. But when I run Terminal ATOK (Japanese Imput Method) is not visible. Packages required for ATOK are installed as well: JSatsvr Jap

  • Confirmed delivery, credit card charged, then backordere​d

    I placed an order for a TV, received a confirmed delivery date, and then a few days later, the delivery was rescheduled for nearly 3 weeks later.  I took an entire day off of work on the expected delivery date of tomorrow. My credit card was fully ch