Exception when retreiveing list from JNDI when the list updates at the same time.

Hi
I get a Exception when i am retreiving a list from the jndi:
Start server side stack trace:
com.sun.java.util.collections.ConcurrentModificationException
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at
com.sun.java.util.collections.ConcurrentModificationException.<init>(Concurr
entModificationException.java:48)
at com.sun.java.util.collections.HashMap$HashIterator.next(Compiled
Code)
at
weblogic.jndi.toolkit.ReadOnlyMapBasedNamingStore$1.nextElement(Compiled
Code)
at weblogic.jndi.toolkit.AbstractNamingEnumeration.next(Compiled
Code)
at
weblogic.jndi.toolkit.AbstractNamingEnumeration.nextElement(Compiled Code)
at
weblogic.utils.enumerations.BatchingEnumerationBase.nextBatch(Compiled Code)
at
weblogic.utils.enumerations.BatchingEnumerationBase_WLSkel.invoke(BatchingEn
umerationBase_WLSkel.java:66)
at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(Compiled
Code)
at
weblogic.rmi.extensions.BasicRequestHandler.handleRequest(Compiled Code)
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:1
5)
at weblogic.kernel.ExecuteThread.run(Compiled Code)
End server side stack trace
It says in the documentation of the weblogic server that: if the jndi is
updated while you are retreiving the list from the server, you will only get
the old list.
And that is ok for me. But insted i get this exception that interupts the
list retreiving. And if i just catch this exception an just continue or
start again, it comes over and over.
the code that does this, is like this:
InitialContext context = new InitialContext(env);
NamingEnumeration list = context.listBindings("sid");
Vector copy = new Vector(10000,1000);
log("Initiating copy of JNDI list!");
try
while (list.hasMore())
copy.addElement(list.next());
catch (Exception e)
log("Copying interupted:" + e.toString());
How can i solve this ?
Is it a configuration of the server problem ?
Are ther other ways of retreiving the list ?
-Ståle Tomten

Be carefull - you read Object two times, so if you
have only one object you will get null after second
reading, and NullPointerException as a result if you
try to do smth with null.
Wrong:
while( inputFromServlet1.readObject() != null)
Object o = inputFromServlet1.readObject();Previous man example is also wrong because you
cannot declare anything in while
Sorry for this one... I certainly must have spent too much time on these fora ;-)
Thanks for the correction, by the way...
Correct:
Object o;
while( (o = inputFromServlet1.readObject()) != null)
String str = (String)o;
System.out.println("Got Object");

Similar Messages

  • HT203167 I downloaded two movies from itunes at the same time (both free digital copies from a dvd) and when they finished downloading... they disappeared. I've not been able to re-download them or find them.. anywhere. Any suggestions for tracking them d

    I downloaded two movies from itunes at the same time (both free digital copies from a dvd) and when they finished downloading... they disappeared. I've not been able to re-download them or find them.. anywhere. Any suggestions for tracking them down?

    If you downloaded them on your computer's iTunes then they should have gone into the Movies part of your iTunes library, if on a device (iPad, iPhone or iPod Touch) then into the Videos app - they haven't appeared there ?
    If you downloaded on your PC and they don't show in the Movies section then you could try searching for them by name (or part of their name) via windows explorer and see if that finds them. Or if you downloaded them on a device and they aren't in the Videos app then have you got a film age rating set in Settings > General > Restrictions that is hiding them, and if not can you find them via the device's spotlight search screen (swipe your first homescreen to the right) ?

  • How do you stop multiple Youtube videos from playing at the same time?

    As of a few days ago, when I click on a youtube video, as the commercial begins to play, you can begin to hear multiple/different commercials playing at the same time. After the commercials, the same issue occurs with the main video--multiple videos are being played at the same time and are not in sync. I've updated all my plug ins and have tried the suggestion posted in the forum provided in the link below in which someone else has expressed the same issue, but nothing has worked so far. Does anyone know what can be done?
    http://productforums.google.com/forum/#!topic/youtube/5Lnikma4UqM

    Are you loading those videos as Flash or HTML5? It is possible to prevent videos from playing until you click something with Flashblock for Flash or Stop Tube HTML5 for HTML5. You can also stop the commercials with Adblock Plus with an Easylist subscription.
    * https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/
    * https://addons.mozilla.org/en-US/firefox/addon/flashblock/
    * https://addons.mozilla.org/en-US/firefox/addon/stop-tube/

  • App to record screen and capture video from camera at the same time?

    For the love of God, why is it 2013 (the age of YouTube and such), and I can't find an app that lets me record my hdv camera (canon hv30) AND the computer screen at the same time? I make piano tutorials on YouTube and my current workflow is so horrendous that I havent even made a video in almost a year. What should take 30 minutes, takes 5 hours. Here is my current shi**y workflow.
    1. I use iMovie Hd to capture hdv camera
    2. I use QuickTime X to capture the screen (i record a virtual keyboard display that lights up the keys I am playing)
    3. I have to use a DAW to record the piano sound and my voice since iMovie hd doesnt have the ability to record audio from a separate source than the camera, for some **** reason. (opening up and setting up all three programs takes about 8 minutes)
    4. I press "record" on all three programs as quickly as possible to make syncing easier. (my videos are about 7 minutes long, so this part takes about 7 minutes)
    5. After I record all 3 things, I export the video from iMovie into a friendlier format to edit in another video editor since iMovie doesmt have the ability to overlay the screencap over another video (****). (25 minutes)
    6. I render the audio I recorded in the DAW into a wave file. (another 10 minutes)
    7. I import the camera footage, the screen cap, and the audio file into the video editing program. (another 5-10 minutes)
    8. I sync the audio and video clips since they were recorded separately (2 minutes)
    9. I do all the edits (add intro, cut unwanted footage etc) (10 minutes)
    10. I re-render the footage into a final video file. (about 30 minutes)
    This is fu*****g ridiculous. There is no ONE program that does everything I need, just diferrent programs that have a feature I need, but is missing another. For example, a program called "screen flow" let's me record the screen, a camera, and an external audio source all at once, but for some frisking reason, it doesmt support "hdv" cameras (basically anything that records HD). Then, there are programs that record HD, but can't record the screen at the same time. This is only an issue since I am on a Mac, since apparently there are countless of programs that can do all the things I need at once (so I don't have to resync, and render things like 3 times each) and many of them are even free (such as xsplit) but they only work in Windows. For the love of God why? It's 2013 for christs sakes. It shoudnt take me 5 hours to make a 7 minute video. If it wasmt for this turn-off, I would have thousands of piano tutorials on yourtube already.
    So my question. Is there an app that fixes my workflow and allows me to do all the things I need in one program? If there isn't such a program, why isn't there one?

    maybe you have outgrown or just need to look at the "pro" applications instead.
    Other pro audio applications
    https://discussions.apple.com/community/professional_applications/other_pro_audi o
    http://www.apple.com/support/logicexpress/
    http://www.apple.com/support/logicstudio/
    http://www.apple.com/support/finalcutstudio/
    At the least, check out their communities.

  • Writing to a file and Reading from it "AT THE SAME TIME"

    Hello,
    If you have a vi (vi 1) that is generating and storing data to a file. Is it possible to write ANOTHER vi (vi 2) that reads & plots the data located at the same file (BTW, vi 1 will still store data to the file while vi 2 is reading the data)
    All I am trying to do is to plot data that is generated from a different vi (vi 1) somewhat in "real time". Unfortunately, I cannot access the vi (vi 1) that is generating the data and add a diagram to it. I have to build my own separate vi (vi 2).  Is this possible?
    Thanks in advance

    Once you open the file, you can't access it again until the original reference is closed. You might want to look at a functional global architecture. You use a case structure to determine how to access the data. Initialize, write, read, save are common examples of sections inside the functional global.
    http://zone.ni.com/devzone/conceptd.nsf/webmain/D2​E196C7416F373A862568690074C759

  • IMac wakes from sleep at the same time each night

    For some reason my iMac is waking from its 'sleep' mode at exactly 21:57 each night. Very odd, but any ideas why this is happening and at this particular time.
    It never used to?! I have not set any timer on it.
    Ideas appreciated. Thanks.

    Hi Barbara,
    I have nothing scheduled (thats why i don't get it??) and the only options I have 'checked' are the default options:
    Put the hard drive to sleep when possible (which i have tried unchecked too)Allow power button to put computer to sleep
    Automatically reduce brightness after power failure
    No schedules are set up.
    I could understand the blue tooth thing firing up the Mac from sleep mode, but it can't be this waking up at a set time each night of 21:57 ???
    Very strange and really frustrating.

  • Is it possible to create a script to produce a high res and low res pdf and jpeg from Indesign at the same time

    Hi, I'm just wondering if there is a way to automate a long process I have to do to create assets for my job.
    I have a single page InDesign 6 file which I have to output three ways:
    A low res pdf without bleed or trims
    A high res pdf with bleed and trims
    A low res jpeg downsized to 2% of original size.
    If anyone knows if this is possible I'd love to hear from you.
    Thanks in advance

    Automation requires creating your own IDML script for output. Scroll down on this page to the section on Scripting resources. The text is a bit confusing. It says InDesign CS5 Scripting resources, but then the paragraph for that section says the PDF files are for CS6. I haven't read through these, I just found them by searching for "indesign automation". It does say in part that is can be used for preparing files for printing, so once you figure it out, it should be a single click option to do all three steps.
    You can do them now with the menus you have, assuming you also have Acrobat Pro installed. With any document open, choose File > Adobe PDF Presets, and choose either from the prebuilt defaults, or create your own in the Distiller. However, I don't see a way in the Distiller settings to choose whether or not to include bleed and marks, so I'm not really sure how you'd have them on for one and not the other. As far as JPEG output, that can be chosen under Export. You get a choice to set a resolution and JPEG quality level, but not a size, so the output will be the dimensions of the document.

  • How to add and remove storage from ASM at the same time?

    Scenario:
    I want to drop some disks from asm
    1- Add disk to asm -----> rebalance
    2- drop disk from asm ----> rebalance
    Is there anyway to make this process faster instead of going to rebalancing twice?

    I think you could try something like this.....
    Add with a power limit of zero and then drop the disks with a powerlimit of 11.
    alter system set ASM_POWER_LIMIT=0;
    select * from v$asm_operation;
    alter diskgroup DBFILE01_GRP
    add disk 'ORCL:DB0009', 'ORCL:DB0010', 'ORCL:DB0011', 'ORCL:DB0012';
    alter diskgroup DBFILE01_GRP drop disk DB0001, DB0002, DB0003, DB0004;
    alter diskgroup DBFILE01_GRP rebalance power 11;
    select * from v$asm_operation;

  • How do I stop multiple videos from loading at the same time and playing while looking at any article on google news?

    Multiple videos load at once and start playing creating sound mess and sucking up ram. This is happening on Firefox on both Windows 8 and Windows 7 machines. This started about three weeks ago. I have run Avast, malwarebytes, hitman pro, and other malware killers. A new youtube setting appeared in settings, I have unticked everything. The videos do not appear to be youtube based.

    You could enable plugins click-to-play. Also, set the plugins to Ask to Activate rather than Always Activate. I also recommend the extension "Click to Play per-element".
    https://addons.mozilla.org/en-US/firefox/addon/click-to-play-per-element/

  • How to read from two boards at the same time

    I have two NI DAQ Boards, a PCI 6034E and a PCI 6025E I want to make one a master and one a slave and read from both at the same time. Do they need jumpers between them
    from one board to the other or does the motherboard bus take care of that? I can find software to handle this but I can't find anything on the way the hardware should be configured, is there a cable I need between them?

    Hi,
    We have a couple of great tutorials on this:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/6DC991028566309886256F990080A720
    http://zone.ni.com/devzone/conceptd.nsf/webmain/2638A8DA4E4CFD1F86256D250070C093?opendocument
    -Sal

  • Both windows minimising at the same time?

    Hi I was wondering how to stop both windows from minimising at the same time. When ever I want to move a window from one screen to the other (Dual screen) I am unable to do so because both windows minimise? and when I click the top of the window
    to move it both are transferred to the other screen. PLEASE HELP ME THIS IS FUSTRATING.

    The behavior you describe sounds quite unusual. Can you provide a screenshot of the window you are attempting to move?
    If you are describing the process of moving a tab from one Internet Explorer window to another on a separate screen, you do not need to drag the tab to the taskbar icon when transitioning between
    windows, you can drag the tab directly from the row of tabs on one window to the other.
    If you are clicking a button in the window bar that minimizes multiple windows simultaneously, you may be describing a third party window management application (NVIDIA nView, AMD HYDRAVISION).
    Brandon
    Windows Outreach Team- IT Pro
    Windows for IT Pros on TechNet

  • Satellite L550-11k - HDMI + VGA at the same time?

    Hi there,
    I have Satellite L550-11k laptop, and i was wondering if i can have external monitor working hooked up on VGA port and HDMI monitor working ( or just audio from hdmi ) at the same time.
    I tried and have no luck making it work together.
    I am using Ubuntu 10.04 as OS, and i think it's not problem related to operating system.
    Thanks in advance.
    Kind Regards

    I was able to select HDMI and VGA,( my built in monitor turned off ) but as i don't have a third monitor ( only laptop one and one external ) i could not test is there a picture on HDMI output but i can say there is no sound so i assume there is no picture also. I just needed sound from HDMI. Maybe i will be able to test it on summer. Thanks on your quick reply. I was wondering is this is a limitation of the graphics adapter ? By the way, it seems Dynadock is not compatible with Linux operating systems.

  • When syncing my iTunes to my iPad from the laptop, I get a list of missing songs; they are in the library, but not in the music folder on my HD. In particular, I uploaded 3 CDs at the same time, all are in my library - but two are missing from the folder.

    When syncing my iTunes to my iPad from the laptop, I get a list of missing songs; they are in the library, but not in the music folder on my HD. In particular, I uploaded 3 CDs at the same time, all are in my library, and all synced to the iPad - but the music from two of them are missing from the music folder. Questions are (a) where might they have gone? and (b) is there a way of "reverse loading" them back to my hard drive from the iPad? Thanks in advance!

    Hi dones49,
    It sounds like your issue here is that iTunes can not find the files for some of the songs you have brought into it. This happens occasionally even if the songs have not been moved from the location that iTunes places them on import or purchase. When you try to use the song, iTunes prompts you to find the file, as you have seen.
    To find the file, use the information in this article to navigate through the iTunes media folders -
    Locate and organize your iTunes files
    If you are still unable to locate the files, you may need to download them from the iTunes store again, or rip them from your CDs. See this article for assistance with downloading your past purchases -
    Download past purchases
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • I have installed itunes 11.0.2.26. When I delete a file or podcast I am not being prompted to delete the file from its folder at the same time.

    I have installed itunes 11.0.2.26. When I delete a file or podcast I am not being prompted to delete the file from its folder at the same time. How do I restore this facility? I am running a 64bit Windows 7 OS

    Is the media files in question in the iTunes library or elsewhere on the computer?

  • [svn] 2692: Bug: BLZ-227 - When using JMS Destination, MessageClient and FlexClient not released from memory when the session times out .

    Revision: 2692
    Author: [email protected]
    Date: 2008-07-31 13:05:35 -0700 (Thu, 31 Jul 2008)
    Log Message:
    Bug: BLZ-227 - When using JMS Destination, MessageClient and FlexClient not released from memory when the session times out.
    QA: Yes
    Doc: No
    Checkintests: Pass
    Details: Fixed a memory leak with JMS adapter. Also a minor tweak to QA build file to not to start the server if the server is already running.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-227
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/messaging/adapters/J MSAdapter.java
    blazeds/branches/3.0.x/qa/build.xml

    Revision: 2692
    Author: [email protected]
    Date: 2008-07-31 13:05:35 -0700 (Thu, 31 Jul 2008)
    Log Message:
    Bug: BLZ-227 - When using JMS Destination, MessageClient and FlexClient not released from memory when the session times out.
    QA: Yes
    Doc: No
    Checkintests: Pass
    Details: Fixed a memory leak with JMS adapter. Also a minor tweak to QA build file to not to start the server if the server is already running.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-227
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/messaging/adapters/J MSAdapter.java
    blazeds/branches/3.0.x/qa/build.xml

  • Phone and my husbands iphone ring at the same time when only one of us is being called. How can I stop this from happening?

    Both my iphone and my husbands iphone ring at the same time when only one of us is being called. How can I stop this from happening?

    This post has already been answered. Why are you plugging your own site with an answer that has already been given? Not to mention that the information you are handing out is incorrect. There is no bug, there is no patch, and no one needs to delete any email addresses. If you take the time to read the posts with the correct answers, you will see that the solution is totally different than the erroneous one you have posted.
    GB

Maybe you are looking for