Strange problem with RandomAcess FIle stream !!!!

In our on going project we have a requirement of locking the files and do some processing on it.
TO achieve this we used new features of JDK 1.4 and attained the locks. We are working on xml files and at present its size is around 390KB. After doing all activity when we try to write the file back to filesystem using 'RandomAccessFile' it does not write the full file. Next time it starts generating parsing errors.
Due to this we are stuck up and donot know why this is happening. We tried doing the same with 'FileOutput'stream and it works fine. But our requirement is to do all the activity with RandomAccess only.
Any help on the above will be highly appreciated.
THanks in advance
Arvind

Below given is how I am reading the file
raf = new RandomAccessFile("xfiles/lkups/analyser1.xml", "rws");
     if(raf!=null)
     channel = raf.getChannel();
     lock = channel.lock(); //Lock the file
     System.out.println("Got Lock !!");
After doing the required processing on the file, the complete xml file resides in 'buffer' (stringBuffer). This is how I am writing it to the stream. (The same stuff works fine with FileOutputStream)
raf.seek(0);
ByteBuffer bBuff=ByteBuffer.wrap(buffer.toString().getBytes());
channel.write(bBuff);
channel.close();
System.out.println(" read channel closed");
raf.close();
After lot of debugging this had been found that the problem is arising at the time of writing the file. The buffer contains the right parsable xml file.

Similar Messages

  • Strange problem with TNSNAMES file

    We just rebaselined a new machine with Windows XP sp2, and installed SQL Plus Release 9.0.1.4.0. We configured the sqlnet.ora file and tnsnames.ora file and placed them in the <orahome>\network\admin\ directory.
    But when we try to connect to the 8i database, we get the following error message:
    ORA-112154: TNS:could not resolve service name.
    Now, I know that this usually means that there's something wrong with the tnsnames.ora file. So I double-checked it and it was fine. So I replaced it with tnsnames.ora files from three other working clients. But it still gave the same error message.
    Next, I replaced the sqlnet.ora file from working clients, but it still wouldn't work.
    Next I added a TNS_ADMIN environment variable pointing to the <orahome>\network\admin\ directory, but still no go.
    Next added an ORACLE_HOME environment variable, but no success.
    I had another pair of eyes look at this, and they couldn't find anything wrong.
    All the clients are on the same network, the database is up and running, and the other clients can connect without a problem. The client that is not working can ping the server where the 8i database resides.
    Help! What am I overlooking? Something in the registry? Can this error message appear for something wrong in the database even though the other 3 clients can connect?

    Mark,
    I don't think there's something wrong with your database.
    This seems more of a communication error between the client and the database, are the other clients the same version?
    From what I know 10g clients are not compatible with 8i databases.
    It's an SID issue I think, can';t remember now.
    will lookup and feed back.
    regards,
    Tony
    PS: Try creating the LOCAL entry in the registry and use the SID you are trying to connect, MIGHT help
    Message was edited by:
    Tony Garabedian

  • Strange problems with Zip Files in Captivate/SumTotal

    Ok, this is a weird one. If I publish a 1.2 SCORM course and select the zip folder option, our (horrible) SumTotal 7.6 system has no problems uploading the course. If I publish to a folder or to my desktop and place all the files in the folder and zip the file, it doesn't track as SCORM at all.
    I get the same results on the ADL Test Scorm tracker. When the zip folder is uploaded, it reads as SCORM compliant. When I publish to an upzipped folder and then zip it, I get a ton of XML file not well formed and other xml errors.
    The issue is that I need to make changes to the imsmanifest file to remove the SumTotal Navigation Player and resize the screen properly for the course.
    The zip program we are using is "ZipGenius".
    1.) Has anyone else run into this issue?
    2.) Any ideas on how to fix this so that I can make changes to the imsmanifest file and still upload the course as 1.2 SCORM compliant?
    Thanks,
    Dan

    Kevin,
    At first, I would have thought the LMS doesn't necessarily return the appropriate information for Captivate to send a score (there are several basic calls that are supposed to be sent by an LMS in SCORM to facilitate this).  So, I created a custom HTM file for the Captivate 4 template...  But in re-reading the thread - you are using SumTotal and I believe SumTotal does make these calls...
    For the purposes of anyone else that is using an LMS and not seeing a score in their LMS (and they are using this custom template) - here is a Captivate 4 template file that forces Captivate to send a score to a SCORM LMS (though not necessarily SCORM-compliant LMS - if these calls are ignored):  http://www.learningconsulting.com/Content/Macromedia/Captivate/SumTotal_Captivate4_SCORM_C ustom.zip
    Kevin - I do not necessarily believe this custom template will work for you.  I can send you an entire debug file I've built for helping to track down AICC/SCORM issues - but let's hold off on that, for now.  Can you edit the resulting HTM file of one of your published Captivate file built using the SCORM template I've provided earlier; modify the last line in the method sendTrackingDataToLMS; uncomment out the alert statement (remove the "//").  I'd like to know what is displayed when you close the content window from SumTotal.
    Regards,
    Andrew

  • Strange problem with local files

    I'm having some experiences with my DW CS3 local
    files that aren't serious ... although annoying. Perhaps there is
    something I'm not seeing. One is that the local files are now
    appearing randomly (not by naming convention as they should). I
    can't figure out how they are sorting ... if they are at all.
    Refresh doesn't fix it. The other is that when I open a sub-folder,
    it opens ... but so do other sub-folders in the site at the same
    time. Any clues or fixes would be appreciated. DW CS3 on my laptop
    works fine ... perhaps I inadvertently changed some setting
    somewhere on my desktop? Thanks!

    > One
    > is that the local files are now appearing randomly (not
    by naming
    > convention as
    > they should).
    Expand Files panel. Click on a header for the file list. The
    files will
    sort by that header.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Kerry Robin" <[email protected]> wrote in
    message
    news:g9bth8$2n3$[email protected]..
    >
    I'm having some experiences with my DW CS3 local
    files that
    > aren't
    > serious ... although annoying. Perhaps there is
    something I'm not seeing.
    > One
    > is that the local files are now appearing randomly (not
    by naming
    > convention as
    > they should). I can't figure out how they are sorting
    ... if they are at
    > all.
    > Refresh doesn't fix it. The other is that when I open a
    sub-folder, it
    > opens
    > ... but so do other sub-folders in the site at the same
    time. Any clues or
    > fixes would be appreciated. DW CS3 on my laptop works
    fine ... perhaps I
    > inadvertently changed some setting somewhere on my
    desktop? Thanks!
    >

  • Strange problem with linking to external vob-file

    I have a strange problem with linking to external vob-file. I
    have created a link using BudApi:
    on mouseup
    set OK = baOpenFile ( the pathname &
    "Files\General\Video\VTS_01_1.VOB", "normal")
    end
    This code opens mpg-videos correctly, but nothing happens
    when I try to open vob-files with the same code. The strangest
    thing is that when I change the default program for vob-files to
    WinDVD this code works and the file opens, but when I change the
    default program to Nero Showtime this code doesn't do anything
    (when I open the file 'manually' from the folder, it opens
    correctly on Nero Showtime). My client uses Nero Showtime, so I
    really would appreciate any help on this one.

    temes wrote:
    >
    quote:
    Originally posted by:
    Newsgroup User
    >> When using Nero Showtime as a default program, the
    error code is 31,
    >> "There is no application associated with the given
    filename".
    >
    > Which suggests that something has gone wrong with file
    associations.
    > If
    > you double-click one of these files in an Explorer
    window does it fire
    > up Showtime and open the file?
    >
    >
    > Yes, the file opens correctly in Nero Showtime when
    double-clicking
    > it in an Explorer. I tried the file associations and
    created a
    > html-page with a link to the vob-file, and the html-link
    opens the
    > vob-file correcly with Nero Showtime. My client reported
    this
    > problem, so it's not just my computer which is having
    this problem.
    If you open a command prompt, do you get an association
    listed like this
    example for .txt files:
    C:\>assoc .txt
    .txt=txtfile
    C:\>ftype txtfile
    txtfile="D:\Program Files\JGsoft\EditPadLite\EditPadLite.exe"
    "%1"
    Andrew

  • Strange problem with Adobe Acrobat X (crash without a trace)

    Hi,
    I have a strange problem with Adobe Acrobat. It happens totally randomly, it leaves no signs in system logs.
    What is happening: during my work Adobe Acrobat sudennly crashes. After a crash I cannot run it again - system seems to do something for a second, but then nothing happends. When i look into taks manager - there are no processes of Acrobat.exe. It just doesn't want to run. What I need to do is to reinstall whole Adobe Acrobat - which requires restart.
    I've already tried to restart system after crash, it doesn't help - reinstall is required.
    Sometimes everyting is fine for a 3 months, sometimes crash happens a week after the previous one. It also happens in very different situations (somtimes  while opening a file, sometimes when doing something simple, sometimes in more complex tasks).
    Has anyone encountered a similar problem?
    Acrobat version: 10.1.1
    System info: Windows 7 64 bit

    Hi Kelvin,
    Please let me know what OS version you are using.
    The error also shows OS requirements not met.
    Futher please try the steps below :
    > Enable the hidden Admin Account on Windows 7 ( Ref :  http://www.howtogeek.com/howto/windows-vista/enable-the-hidden-administrator-account-on-wi ndows-vista/ )
    > Disable all Non-Microsoft Startup Services. (Ref : http://helpx.adobe.com/x-productkb/global/disable-startup-items-services-windows.html )
    > Disable all the Antivirus softwares like CA, Norton,Mc Afee etc. temporarily from the computer.
    Reboot and try installing in the new enabled Admin user account and check.
    Please refer the Kb Doc : http://helpx.adobe.com/creative-suite/kb/error-exit-6-exit-7.html.
    Also see Troubleshoot with install logs | CS5, CS5.5, CS6 - http://helpx.adobe.com/creative-suite/kb/troubleshoot-install-logs-cs5-cs5.html for information on how to review your installation logs
    Regards,
    Rave

  • Strange problem with Subviews on 1.0 Beta

    Hi,
    I'm having a strange problem with SubViews on 1.0 Beta. I'm not sure If I'm being stupid and have done something wrong, or if there's a problem here.
    My application is directly based on one of the examples, so the structure etc is almost identical. I've simplified the files below to avoid confusing the issue.
    The default landing page (greeting.jsp) looks like this:
    <%@ taglib declarations for HTML and CORE taglibs %>
    <HTML>
    <HEAD><title>Insulation Layer Demo</title></HEAD>
    <body bgcolor="white">
    <f:view>
    <jsp:include page="sysstatus.jsp" />
    <!-- other strictly HTML content -->
    </f:view>
    </body>
    </HTML>
    sysstatus.jsp looks like this:
    <%@ taglib declarations for HTML and CORE taglibs %>
    <f:subview id="SystemStatusView">
    <h:form id="systemStatusForm">
    <p><h:selectboolean_checkbox id="System1Available" value="#{SystemStatus.system1Available}"/>System 1<br/>
    <h:selectboolean_checkbox id="System2Available" value="#{SystemStatus.system2Available}"/>System 2</p>
    <p><h:command_button id="submit" action="success" value="submit" /></p>
    </h:form>
    </f:subview>When I view this page, the checkboxes all seem to work okay (in that their state is preserved across calls etc), but the formatting is very screwy. The resulting page looks something like:
    <chkbox1> <chkbox2> <Submit>
    System 1
    System 2
    <Other HTML content from greeting.jsp>When I look at the HTML source code being generated, it is genuinly being generated as above, that is, all the form tags first, and then the rest of the content. Interestinly, I tried adding a ${SystemStatus.system2Available} into the body text, and it was rendered as literal text (i.e. not evaluated as EL), which is very curious -- makes me wonder if the included file is included as text, rather than JSP, although the custom taglibs and <f:form> tags etc are not in the generated HTML.
    If I lift all the content between the <h:form> tags (inclusive) out of sysstatus.jsp and put it in greeting.jsp in place of the <jsp:include> tag, all is well.
    Any ideas? All help gratefully recieved!
    Thanks,
    Paul

    Personally, I think it is a bug in the rendering model of JSF itself because if you include any non-JSF tags, they don't get rendered according to my understanding of the what the spec says (in the location the tags are written).
    The only workaround that I could come up with is to use straight JSF tags in all of your layers. Things are then rendered the way that they "should" be rendered.
    You could try wrapping all of your HTML tags in <f:verbatim> tags and see if that helps.
    Good luck!
    David

  • Strange problem with SQL query in toad.

    Guys,
    My colleague is up with a strange problem with an SQL query that if it is run in toad encounters the "ORA-03113: end-of-file on communication channel" problem,but if run in SQL plus executes just fine.
    Do anyone have thoughts about this strange error in toad?
    Thanks!!!!
    Regards,
    Bhagat

    Not sure what version of TOAD you have but it may have shipped with SQLMonitor which montiors SQL sent from Windows apps . Navigation should be similar to;
    Start~Programs~Quest Software~TOAD for Oracle~Tools~SQLMonitor
    or
    C:\Program Files\Quest Software\Toad for Oracle\SQLMonitor.exe
    To use it, start TOAD and connect, start SQLMonitor and click the checkbox for TOAD.exe, then execute the query. SQLMonitor will show you the actual query that TOAD sent to the client. It may be exactly what you sent or it may contain some extras.

  • Strange problem with my build JAR

    Hiii everybody... I'm having a strange problem with my build (JAR file)... when I work with the Eclipse and I click in the table that returns the clients stored in my PostGre database it works fine, but when I build my application and it generates my JAR file and I open it and click in the same table to return the objects that I have.. it does not appears anymore.. just show when I work with eclipse... and the database is the same for both.
    I already checked the database path in my properties file... and the application recognize the database because I can login and there isn't any runtime exception...
    In that application I work with Hibernate and Spring... for me it is very strange because the application works fine when I run by eclipse... but does not return the database data when I click on my Jar file to open the application..
    Someone can help me with that?
    I dont know if the problem is in the Spring, Hibernate, Libraries...
    thanks in advance...

    So what's the error then? Are there any error messages? Have you checked the console? Or are you just clicking on the jar and you wouldn't even see the errors if there are any?
    What do the logs say?
    You're not giving a lot to work on here.

  • Strange problem with HD

    I'm having a strange problem with my titanium 15" Powerbook G4 (I believe it's 867Mhz). When I start it up, I get a flashing question mark/folder, and I can't boot into safe mode or make it start up past that question mark.
    Here's the really weird part-- the hard drive is completely fine. I booted it in target mode, was able to access all files on it, transfer files to and from it, and when I ran disk utility, everything was fine.
    I heard disk utility doesn't catch everything, so I ran fsck 3 or 4 times with both the -f and -r options (to rebuild the file catalog), and it came up with 0 errors.
    I think it's just not recognizing the hard drive as the boot volume, but when I press option on startup to select it, it doesn't pop up in the list-- so there's no way to select it.
    Any suggestions?
    Thanks!
    Tim

    I reinstalled Leopard on it using the target disk method (because the DVD drive is broken on the computer). It installed fine, and I can see all system files on it, but I can't boot off of it-- same problem. Thanks for the suggestion... any others?
    Tim

  • Strange problem with reminders when waking iMac

    I'm having a strange problem with reminders in Mountain Lion, and I thought someone might be able to help. If I have a reminder set, and it goes off when my iMac is asleep, after waking the iMac I can't dismiss the reminder. I can click on "Close" or "Snooze" once, and there is the puff of smoke like it has been dismissed, but the notice is still on the screen (even in the Dashboard view), and hover over it only gives the spinning beachball and I can't access notifications with the two finger swipe. So far, restarting my iMac is the only solution I have found to this situation.
    Is anyone else having this happen? Is there an easy solution? Thanks!

    user11000236 wrote:
    Thanks for the info.
    How does Oracle/SQLPLUS allows any username or password to log in to DB with SYSDBA Privillages? What is the concept behind this.?
    This is explainted in the above mentioned link:
    Operating system authentication takes precedence over password file authentication. If you meet the requirements for operating system authentication, then even if you use a password file, you will be authenticated by operating system authentication.

  • Strange problem with purple-remote

    Hi, I experience a strange problem with purple-remote (program which allow to control Pidgin via D-Bus) :
    To get the current status message, you have to type
    $ purple-remote getstatusmessage
    This works, but when I type
    $ echo $(purple-remote getstatusmessage)
    this fails with the error
    Traceback (most recent call last):
    File "/usr/bin/purple-remote", line 238, in <module>
    print output
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 12: ordinal not in range(128)
    Why?
    How can this program work in the first case but not in the second?
    Thank you
    Edit: BTW, is there a workaround to put the output of `purple-remote getstatusmessage' in a variable? $(), redirections and piping doesn't work.
    Fractal
    Last edited by Fractal (2010-04-04 12:09:56)

    Hi Andyh,
    Welcome to the forum.  How annoying does that sound, if I had to get up every time I wanted to change channel or volume I would crack up.
    Drop me an email to [email protected], please include your BT account details and I will see what can be done to help.
    Cheers
    Sean
    BTCare Community Manager
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Strange problem with motherboard H67MA-E45(B3) =( please help

    Hi, I have a strange problem with my motherboard . I have a H67MA-E45 (B3) (MSI-7678) , when i try to update it ( http://www.pcbrain.it/images/stories/msi/H67MA-E45/bios/14.JPG ) , i choose the fourth option "Select one file to update bios" , but the bios did not recognize the update file (E7678IMS.1C0) into the Usb flash drive , but if i choose the second option (select one file to boot) the file is recognized. First I made a backup of the bios, and into the USB flash drive has been created a file called "E7678ICX.162" (my current update). Why the extension is IXC ?!? it should have been IMS ! . I tried changing the file extension "E7678IMS.1C0" (the new update) into "E7678ICX.1C0" and when i select the fourth option , the file is recognized! . Obviously I have not started the update , but if I proceed with the update, changed the name of the extension, is it safe? Or do damage?..please help me  :(
    P.S. Sorry for my bad bad and very poor english , i'm italian =)

    Quote from: HU16E on 28-September-11, 04:38:29
    Manufacturer's Website info;
    "KHX1333C9D3B1K2/4G 4GB 1333MHz
    (2 x 2GB)   CL9-9-9-27 1.5V"
    Still think there is a batch conflict or possibly a bad stick in the new sticks. Might test each new stick individually for a bad one. Again, the other solution for an 8BG kit may be the new Kingston HyperX PnP's. Could you post a screenshot of CPUID's CPU-Z Memory & SPD Tab for one of the new sticks?
    Added: Actually, screenshots of the old sticks Memory & SPD Tab may be of help too. It may be tRAS or tRFC differences between the two kits. Just speculation at this point though.
    All the batchs works perfectly...this is the screen http://imageshack.us/f/163/ramkk.jpg/ ...save and zoom
    EDIT: The old stick are SLOT #1 and SLOT #2 ...the new 3 and 4

  • Strange problem with IGS

    Dear Experts
    I have a strange problem with IGS
    My IGS server is running perfectly when I execute SIGS at my server system and also thrw Http link, and in GRC also
    But when I tried to execute the same tcode SIGS from internet thrw another system it is blank.
    Even risk terminator also blank due to that.

    Explain what you meant by internet thrw another system?
    IGS is integrated into the SAP kernel and make sure your kernel files are intact when compared to your server with another server you quoted.
    Check the program name is IGS.<SID of the SAP instance> in the RFC dest IGS_RFC_DEST & GFW_ITS_RFC_DEST.

  • Strange Problem with Web Object Manager

    Hi,
    I have a very strange problem with JDev.
    When I register a servlet with the Web Object Manager, it does not work (the web server does not find the servlet). This is not the end... If I exit JDev, re-open it and return to the Web Object Manager, instead of the Web Object Manager tree appears a tree labeled JTree with leaves labeled "colors", "sports" and "food"???
    No way to recover the Web Object Manager!
    I had to re-install JDev.
    Any ideas?
    Thanks
    -David

    Thanks but I don't understand. Here is wtgapp.xml:
    <?xml version = '1.0'?>
    <workspace>
    </workspace>
    Here is webtogo.ora:
    [WEBTOGO]
    USE_SYSTEM_CLASSPATH=YES
    DEBUG=YES
    [FILESYSTEM]
    ROOT_DIR=C:\
    TYPE=OS
    [MIMES]
    html=text/html
    xml=text/xml
    xsl=text/xml
    jsp=text/html;handler=oracle.jsp.JspServlet
    xsql=text/html;handler=oracle.xml.xsql.XSQLServlet
    [APPLICATIONS]
    xmlfile=.\wtgapp.xml
    [SERVLET_PARAMETERS]
    emit_debuginfo=true
    bypass_source=true
    jspcompiler=oracle.jdeveloper.jsp.JspOjcCompiler
    page_repository_root=C:\Program Files\Oracle\JDeveloper 3.1.1.2\myclasses\_pages
    after I added my servlet (which was named Servlet1). Where is the problem exactely.
    Thanks.
    -David
    In any case, is the fixed version available?
    null

Maybe you are looking for

  • How do you change default note size font

    I accidentally posted this for iWork previous to 08, sorry. I want to change the default font size for all notes in a file. I realize you can change them one slide at a time by using Cmd-+or-, but I don't want to have to do every one separately since

  • ITunes not sending email notifications to iTunes and App Store gifts recipients

    I sent several iTunes and App Store gifts from my Apple ID... I set the date to be sent of Dec 25. The gift recipients have not received email notifications about their gifts. I went into my iTunes account and resent the gift, but the people I sent g

  • Business Catalyst Sandpile meeting 10 July

    Partner Call 10th July US, UK, 11th July AUST TIme: 8.00 PM, 10th July, NEW YORK Time - check your timezone here... http://www.timeanddate.com/worldclock/meetingtime.html?day=10&month=7&year=2012&p1=179&p2= 5&p3=196&p4=240&p5=226&p6=80&iv=1800 Please

  • Detail tabular form based on two tables

    db11gxe , apex 4.0 , firefox 24 , hi all , i have a master detail form based on two tables , the detail form ofcourse based on one table , the problem is i want to include a column of another table into the tabular form , so i have changed the query

  • Importing picture material from Adobe Lightroom

    Dear iBook Author Community, I am creating quite some photo and textual content materila and intend to start my own series of iBooks just now. In order to enhance user experience for my travle photo collections, I intend to import my photo material t