Calling thread.start() more than once concurrently

Hi, I got a simple doubt that may feel awkward or absurd to people who are well versed in the java threading concepts. I just thought of it and as I couldn't get an easy answer I am posting this.
Consider a class that implements the runnable interface. The run() method of the class is implemented with just a System.out.println(). If I make an instance of this class, say 't' in the main method and calling t.start() susequently twice or thrice; an illegal ThreadStateException will be thrown. The code snippet is as follows:
ThreadTest t = new ThreadTest();
t.start();
t.start();
It is understood that state of the thread object is changed to run state and so, if it is again started, it must be thrown. So if I put a Thread.sleep() inbetween these two subsequent calls assuming that the main method thread will be sleeping. So there is sufficient time for the first thread to terminate and then only the second will start - still the same exception is being thrown. I tried putting the synchronized qualifier for run too, still no effect - the same only happening. Why the java thread object is made in such a way that once the thread changes it state from Runnable to Running and then finally to dead state, it can be restated back to Runnable state, such that the start() method can be called again. Is it possible or not? Please post your comments.

As ejp says you can't start a thread more than once - even if it has already terminated after the first start.
By making threads a one-shot it simplifies reasoning about them: you don't have to wonder whether a second start() will work or not, depending on whether the thread has completed its first "incarnation". It also makes it easier to ensure thread resources are reclaimed. It also avoids semantic issues like whether anything about the thread is "carried over" across incarnations.
This might seem a limitation but there are many ways around it - simply don't let the thread terminate. Whatever control structure you would enforce by re-starting the thread can be emulated without letting the thread terminate in between "executions".

Similar Messages

  • PB won't start more than once without PMU Reset

    My son just got a hand-me-down G4 1.5Ghz 15" PowerBook at work. When he got it the battery would not hold a charge for more than about 5 minutes. We checked the serial number and it was part of the PowerBook battery recall so we requested a battery exchange from, Apple. The new battery arrived today and when he put it in, the PowerBook would not start up even on AC.
    He reset the PMU and it seemed to be OK but when the computer went to sleep he could not wake it up. He uplugged it and took out the battery but it will not restart. Also, the charge indicator on the AC adapter turned green after about 15 minutes but the battery indicator in the menu bar still says 0%. He pushed the test button on the bottom of the battery but no lights come on so the battery can't be charged. Even putting the old battery back into the PB won't let it restart more than once without resetting the PMU.
    While the old battery did not hold a charge at least the machine could be used and restarted without a PMU reset. Now it won't even do that.
    Anyone see this behavior on another machine? Any suggestions on what is wrong or how to fix it?
    Please help.
    Thanks,
    David

    It appears that deleting the com.apple.Powermanagement.plist file has resolved the restart problem. In fact. it looks like the old battery may now be charging properly. I still can't get the machine to start using the replacement battery.

  • AddOn: Prevent from loading more than once

    Good Afternoon
    Experts:
    I appreciate you patience as I resurrect this topic since it has become an
    increasing concern here.  We need a way to restrict our AddOn from "being in"
    Task.mgr more than once.  We are working with Terminal Services.  A couple ways we have found more than one instance in TM is the User just opening another session or opening another session after a "problem/Issue/Crash". 
    I have this code which restricts the AddOn from starting more than once here on my local machine:
    Public Sub Main()
            Try
                Dim x As Integer = 0
                Dim Ctr As Integer = 0
                Dim som() As System.Diagnostics.Process
                som = System.Diagnostics.Process.GetProcesses
                Dim Name As String
                For x = 0 To som.Length - 1
                    Name = som(x).ProcessName.ToUpper
                    If som(x).ProcessName = "Test.Enhance" Then
                        Ctr += 1
                    End If
                Next x
                If Ctr > 0 Then
                    MsgBox("LBSI.Enhance AddOn is already started...Exiting application.", MsgBoxStyle.Critical)
                    Exit Try
                Else
                    ReInitializeAddOn()
                    Application.Run()
                End If
            Catch ex As Exception
                HandleException("Main", ex, True)
            End Try
        End Sub
    Is there a better more elegant way to do this? How about for Terminal Services?
    Thanks in advance for your insight,
    EJD

    Not answered...so I will close.

  • Method called more than once - and dies with EXC_BAD_ACCESS error

    Hi,
    In my app, I have 4 views with their respective viewControllers. In the appDelegate.m, I provide methods that allows to switch to any of these views. Following is code for switching to the editView:
    -(void) flipToEditView {
    [self populateTheList]; // populate an array
    EditViewController *anEditVC = [[EditViewController alloc] initWithNibName:@"EditView" bundle:nil];
    [self setEditVC:anEditVC];
    [viewController.view removeFromSuperview];
    [self.window addSubview:[editVC view]];
    [anEditVC release]; }
    The view is not switched - and moreover, this method is called more than once; and the app dies with EXCBADACCESS!
    2009-08-23 14:54:40.648 iNotate[2128:20b] Album (before): x= 0 y=20 width=320 height=460
    2009-08-23 14:54:40.653 iNotate[2128:20b] Album (after): x= 0 y= 0 width=320 height=480
    warning: Couldn't find minimal bounds for "_sigtramp" - backtraces may be unreliable
    (gdb) bt
    #0 -[iNotateAppDelegate flipToEditView] (self=0x523690, _cmd=0x9563) at /Users/sam/MY_FILES/iPhone Apps/app/Classes/iNotateAppDelegate.m:116
    #1 0x00008661 in -[FirstView editAction] (self=0x546a30, _cmd=0xac94) at /Users/sam/MY_FILES/iPhone Apps/app/FirstView.m:25
    #2 0x30a4eee6 in -[UIApplication sendAction:to:from:forEvent:] ()
    #3 0x30ab0d36 in -[UIControl sendAction:to:forEvent:] ()
    #4 0x30ab11fe in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
    #5 0x30ab0544 in -[UIControl touchesEnded:withEvent:] ()
    #6 0x30a67917 in -[UIWindow sendEvent:] ()
    #7 0x30a56fff in -[UIApplication sendEvent:] ()
    #8 0x30a561e0 in _UIApplicationHandleEvent ()
    #9 0x31565dea in SendEvent ()
    #10 0x3156840c in PurpleEventTimerCallBack ()
    #11 0x94a713c5 in CFRunLoopRunSpecific ()
    #12 0x94a71aa8 in CFRunLoopRunInMode ()
    #13 0x31566600 in GSEventRunModal ()
    #14 0x315666c5 in GSEventRun ()
    #15 0x30a4eca0 in -[UIApplication _run] ()
    #16 0x30a5a09c in UIApplicationMain ()
    #17 0x000027e8 in main (argc=1, argv=0xbffff068) at /Users/sam/MY_FILES/iPhone Apps/app/main.m:14
    Current language: auto; currently objective-c
    (gdb) continue
    2009-08-23 14:54:55.885 iNotate[2128:20b] >>>>>>>>>>>>>>>>>> populateTheList
    (gdb) bt
    #0 -[iNotateAppDelegate flipToEditView] (self=0x523690, _cmd=0x9563) at /Users/sam/MY_FILES/iPhone Apps/app/Classes/iNotateAppDelegate.m:116
    #1 0x00008661 in -[FirstView editAction] (self=0x5457b0, _cmd=0xac94) at /Users/sam/MY_FILES/iPhone Apps/app/FirstView.m:25
    #2 0x30a4eee6 in -[UIApplication sendAction:to:from:forEvent:] ()
    #3 0x30ab0d36 in -[UIControl sendAction:to:forEvent:] ()
    #4 0x30ab11fe in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
    #5 0x30ab0544 in -[UIControl touchesEnded:withEvent:] ()
    #6 0x30a67917 in -[UIWindow sendEvent:] ()
    #7 0x30a56fff in -[UIApplication sendEvent:] ()
    #8 0x30a561e0 in _UIApplicationHandleEvent ()
    #9 0x31565dea in SendEvent ()
    #10 0x3156840c in PurpleEventTimerCallBack ()
    #11 0x94a713c5 in CFRunLoopRunSpecific ()
    #12 0x94a71aa8 in CFRunLoopRunInMode ()
    #13 0x31566600 in GSEventRunModal ()
    #14 0x315666c5 in GSEventRun ()
    #15 0x30a4eca0 in -[UIApplication _run] ()
    #16 0x30a5a09c in UIApplicationMain ()
    #17 0x000027e8 in main (argc=1, argv=0xbffff068) at /Users/sam/MY_FILES/iPhone Apps/app/main.m:14
    (gdb) continue
    2009-08-23 14:55:22.493 iNotate[2128:20b] >>>>>>>>>>>>>>>>>> populateTheList
    Program received signal: “EXCBADACCESS”.
    (gdb) continue
    What's happening here?
    Sam!

    -(void) flipToEditView {
    [self populateTheList]; // populate an array
    EditViewController *anEditVC = [[EditViewController alloc] initWithNibName:@"EditView" bundle:nil];
    [self setEditVC:anEditVC];
    [viewController.view removeFromSuperview];
    [self.window addSubview:[editVC view]];
    [anEditVC release]; }
    }<---- is this } matched elsewhere?

  • QuickTime DOM Events called more than once?

    I am in the process of writing code in JavaScript that will track the interaction on a embedded QuickTime video.
    function ew_addImage(v) {
    trackImg=new Image(1,1);
    trackImg.src=v;
    function ew_pauseTrk() {
    var imgStr='http://www.sldkfjsldfjk.com/200125/EWTRACKNEW_VINT?ewadid=751801&ewbust='ewbust'&eid=1078554&file=$VIDEO$&bw=56&vlen=3:00&vint=PAUSED';
    ew_addImage(imgStr);
    if (document.addEventListener)
    document.getElementById("mov1").addEventListener("qt_pause", ew_pauseTrk, false);
    Everything works correctly. I am able to see the image being called when I am looking at Wireshark. The problem is when I click pause more than once.. It seems like the QuickTime DOM Events can only be called once.. Is that true?
    Thanks

    -(void) flipToEditView {
    [self populateTheList]; // populate an array
    EditViewController *anEditVC = [[EditViewController alloc] initWithNibName:@"EditView" bundle:nil];
    [self setEditVC:anEditVC];
    [viewController.view removeFromSuperview];
    [self.window addSubview:[editVC view]];
    [anEditVC release]; }
    }<---- is this } matched elsewhere?

  • How to call the same query more than once with different selection criteria

    Hi,
    Please do anybody know how to solve this issue? I need to call one query with the fixed structure more than once with different selection criteria. For example. I have following data
    Sales organization XX
                         Income 2008  Income 2009
    Customer A       10                 20
    Customer B        30                  0
    Sales organization YY
                         Income 2008  Income 2009
    Customer A        20                5
    Customer B        50                10
    Now, I need this. At the selection screen of query, user fill variable  charakteristic "Sales organization" with interval  XX - YY, than I need to generate two separate results per sales organization, one for Sales Organization XX and the second for SO YYwhich will be displayed each on separate page, where result for SO YY will be dispayed under result for SO YY. Are there some options how to do it for example in Report Designer or WAD or with programming? In Report Designer is possible to use one query more than once, but I dont know how to force each query in RD to display result only for one Sales Organization, which will be defined in selection screen.
    Thank you very much
    J.

    Hello,
    thanks to all for cooperation. Finally we solved this issue with the following way..
    User fill appropriate SO on the selection screen, which is defined as range. This will resulte, that selected SO are listed in report below each othe (standard behavior). Required solution we achieved with the Report Designer, we set page break under each Result row of RD. This caused, that report is divided into required part per SO, which are stated each on separate page.
    J.

  • Error: An attribute cannot appear more than once in the same start tag

    Hi Everyone,
    when i run the page sometimes it works fine but sometimes it throws Compilation Error as below.
    "Error(502,1224): file:/C:/Jdeveloper/jdevhome/jdev/myhtml/OA_HTML/fwk/t/Session_2055663493/region1.uix<Line 502, Column 1224>: XML-20124: (Fatal Error) An attribute cannot appear more than once in the same start tag."
    And i delete the particular file from the path and run the page so this time it works fine.
    But later after sometime i get the same error but the session number will be changed, then again i need to delete it and run.
    What can be the permanent solution for this issue?
    Plz let me know any suggetions.
    Thanks.

    Seems like the mdl file is corrupted or was not generated correctly.
    Can you try to create the mdl file again and then try the import ?
    If it doesn't work then try contacting Oracle Support.

  • Have to click on firefox icon more than once to start the programme

    Sometimes I have to click on Firefox icon more than once to start the programme. Multi-clicking on the icon does not always start multiple windows ie the programme just isn't starting sometimes on 1st click.
    Firefox always opens when using a hyperlink in an email, document etc.
    Have tried creating a new quick launch & also re-installing.
    Happens on two PCs - 1x Vista & 1x XP
    All help is appreciated :)

    First let me disclose that I am not an expert nor even much less. However I used to have this slow as a turtle opening of FF until I got rid of my antivirus software which at the time was Avast. I switched to Microsoft Security Essentials and have had no problems since. FF loads in 3 to 4 seconds!

  • WDDOMODIFYVIEW and WDDOPOSTPROCESSING is called more than once!

    Hello everybody,
    maybe someone can help me. Our WDA application consist of 5 Components. One main and 4 components embedded in it. We instantiate the components in the WDDOINIT of the main component and use them between themselves.
    I suppose that's the reason that the events in the views and componentcontrollers of each component is called so often.
    With a break point in a WDDOMODIFYVIEW an the debugger I find out that the  HANDLE_REQUEST methos from the CL_WDR_CLIENT_ABSTRACT_HTTP  class is startet also more than once.
    1.  if m_ucf is not bound -> yes and  m_request_type = suspend
    2.  if m_ucf is not bound -> initial and  m_request_type = suspend
    3.  if m_ucf is not bound -> initial and  m_request_type = suspend
    4.  if m_ucf is not bound -> initial and  m_request_type = refresh
    Maybe someone has expierence with it an can give a hint or explanations for this.
    I hope so
    Thanks for any answer
    Best regards
    Christian Breitenbach

    hi christian.......
         a wddomodifyview view method will be called even if there is a little change in your view. it will b e called more times than your normal pbo in a dynpro application. the wddoinit will be called only before the view is loaded... but the modify willbe called even for popups nad any event.
    ---regards,
       alex b justin

  • -setFence:count: called more than once per transaction

    I am getting following error, any body have any idea what it is?
    -setFence:count: called more than once per transaction
    Debugger stopped.
    Program exited with status value:101.
    Thanks in Advance
    Ravi

    I am getting the same error...
    T'is usly a m'ry error.
    Use the debugging/testing tools in the latest Xcode to track down suspects, etc.

  • Problem with starting more than one SwingWorker

    Hello
    I wonder if anyone could tell me if there are known problems with starting more than one SwingWorker thread at once?
    In response to an action the user performs, I need to obtain several lists of things from the server. This includes a couple of server-calls, and I want to do the server calls in a thread outside the awt-event thread. So I start a couple of SwingWorker-threads. This works fine sometimes, but not always. Sometimes code in some of the SwingWorkers finished method does not update the ui. I can see that the correct calls are made, but the ui is still not updated correctly. The problem seems to be related to the sequence of when the different thread are finished. For instance, if the sequence is like this:
    SwingWorker1.construct
    SwingWorker2.construct
    SwingWorker1.finished
    SwingWorker2.finished
    Things go fine, but if the sequence is:
    SwingWorker1.construct
    SwingWorker1.finished
    SwingWorker2.construct
    SwingWorker2.finished
    the ui-updates in SwingWorker1.finished is not done correctly.
    Can anyone help me with this?

    This is the point:
    In one SwingWorker thread you have 1 construct method, and 1 finish method - which are both invoked once.
    Therefore you only have one opportunity to update the gui in that thread. This forces you to use many threads if you want regular updates, which I try to avoid.
    Therefore, the solution!
    Have a loop in the construct method that executes the algorithm accordingly, updating the gui accordingly at regular times, maintaining just the 1 thread - becomes easier and nicer for the programmer and the JVM.
    The finish method in this case is to update the gui when all iterations are finished.
    There is nothing wrong with this. Just because you have a finish method that is called in the event-dispatching thread doesn't mean that all your update code must be in there.
    What you MUST ensure is that ALL your update code is executed in the event-dispatching thread, that is the most important thing. After all, SwingWorker is just a helper class, not the gospel template of how to update a gui.

  • How to use same page fragment more than once in a page,

    Hi Gurus,
    How to use same page fragment more than once in a page. I have a complex page fragment which has lots of Bindings (Binding Property set with backingBean variables).
    I want to use the same page fragment multiple times on the same page with different tabs.
    I want different ApplicationModule Instance for the page fragment in different tabs.
    So I have created a Bounded Taskflow with pagefragments which has this complex pagefragment.
    I've dragged the taskflow to page and created regions.
    I'm able to execute the page successfully when I have only one region but fails if I have region more than once in the page.
    Can anyone help me how to resolve this issue.
    Web User Interface Developer's Guide for Oracle Application Development Framework: section 19-2 states we can have same pagefragment more than once in a page.
    Thanks,
    Satya

    java.lang.IllegalStateException: Duplicate component id: 'pt1:r1:0:t2:si5', first used in tag: 'com.sun.faces.taglib.jsf_core.SelectItemsTag'
    +id: j_id_id1
    type: javax.faces.component.UIViewRoot@1d23189
      +id: d1
       type: RichDocument[UIXFacesBeanImpl, id=d1]
        +id: j_id_id5
         type: HtmlScript[UIXFacesBeanImpl, id=j_id_id5]
          +id: j_id0
           type: javax.faces.component.html.HtmlOutputText@bc252
        +id: m1
         type: RichMessages[UINodeFacesBean, id=m1]
        +id: f1
         type: RichForm[UIXFacesBeanImpl, id=f1]
          +id: pt1
           type: RichPageTemplate[oracle.adf.view.rich.component.fragment.UIXInclude$ContextualFacesBeanWrapper@2a0cc, id=pt1]
            +id: ps1
             type: RichPanelSplitter[UIXFacesBeanImpl, id=ps1]
              +id: pt3
         at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1199)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag265(__projectrevenuern_jsff.java:12356)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag264(__projectrevenuern_jsff.java:12317)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag263(__projectrevenuern_jsff.java:12262)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag262(__projectrevenuern_jsff.java:12200)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag261(__projectrevenuern_jsff.java:12147)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag260(__projectrevenuern_jsff.java:12099)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag259(__projectrevenuern_jsff.java:12047)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag258(__projectrevenuern_jsff.java:11992)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag257(__projectrevenuern_jsff.java:11948)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag255(__projectrevenuern_jsff.java:11860)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag254(__projectrevenuern_jsff.java:11808)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag9(__projectrevenuern_jsff.java:510)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag8(__projectrevenuern_jsff.java:461)
         at jsp_servlet.__projectrevenuern_jsff._jspx___tag1(__projectrevenuern_jsff.java:149)
         at jsp_servlet.__projectrevenuern_jsff._jspService(__projectrevenuern_jsff.java:67)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:499)
         at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:429)
         at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:163)
         at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:184)
         at oracle.adfinternal.view.faces.taglib.region.IncludeTag.__include(IncludeTag.java:443)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTag.java:153)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTag.java:128)
         at oracle.adf.view.rich.component.fragment.UIXRegion.processRegion(UIXRegion.java:492)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(RegionTag.java:127)
         at jsp_servlet.__projectrevenuepg_jspx._jspx___tag50(__projectrevenuepg_jspx.java:2392)
         at jsp_servlet.__projectrevenuepg_jspx._jspx___tag49(__projectrevenuepg_jspx.java:2353)
         at jsp_servlet.__projectrevenuepg_jspx._jspx___tag46(__projectrevenuepg_jspx.java:2209)
         at jsp_servlet.__projectrevenuepg_jspx._jspx___tag45(__projectrevenuepg_jspx.java:2162)
         at jsp_servlet.__projectrevenuepg_jspx._jspx___tag9(__projectrevenuepg_jspx.java:526)
         at jsp_servlet.__projectrevenuepg_jspx._jspx___tag8(__projectrevenuepg_jspx.java:475)
         at jsp_servlet.__projectrevenuepg_jspx._jspx___tag7(__projectrevenuepg_jspx.java:424)
         at jsp_servlet.__projectrevenuepg_jspx._jspx___tag6(__projectrevenuepg_jspx.java:373)
         at jsp_servlet.__projectrevenuepg_jspx._jspx___tag2(__projectrevenuepg_jspx.java:202)
         at jsp_servlet.__projectrevenuepg_jspx._jspx___tag1(__projectrevenuepg_jspx.java:144)
         at jsp_servlet.__projectrevenuepg_jspx._jspService(__projectrevenuepg_jspx.java:71)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:499)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:248)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
         at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:473)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:141)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:710)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:205)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = CAMIND1 TXID =  CONTEXTID =  TIMESTAMP = 1262712477691 
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 30000
    >
    <JMXWatchNotificationListener><handleNotification> failure creating incident from WLDF notification
    oracle.dfw.incident.IncidentCreationException: DFW-40116: failure creating incident
    Cause: DFW-40112: There was an error executing adrci commands; the following errors have been found "DIA-48415: Syntax error found in string [create home base=C:\\Documents and Settings\\tammineedis\\Application] at column [69]
    DIA-48447: The input path [C:\\Documents and Settings\\tammineedis\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr] does not contain any ADR homes
    DIA-48447: The input path [diag\ofm\defaultdomain\defaultserver] does not contain any ADR homes
    DIA-48494: ADR home is not set, the corresponding operation cannot be done
    Action: Ensure that command line tool "adrci" can be executed from the command line.
         at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createADRIncident(DiagnosticsDataExtractorImpl.java:708)
         at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createIncident(DiagnosticsDataExtractorImpl.java:246)
         at oracle.dfw.spi.weblogic.JMXWatchNotificationListener.handleNotification(JMXWatchNotificationListener.java:195)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor$ListenerWrapper.handleNotification(DefaultMBeanServerInterceptor.java:1732)
         at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:257)
         at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:322)
         at javax.management.NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:307)
         at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:229)
         at weblogic.management.jmx.modelmbean.WLSModelMBean.sendNotification(WLSModelMBean.java:824)
         at weblogic.diagnostics.watch.JMXNotificationProducer.postJMXNotification(JMXNotificationProducer.java:79)
         at weblogic.diagnostics.watch.JMXNotificationProducer.sendNotification(JMXNotificationProducer.java:104)
         at com.bea.diagnostics.notifications.JMXNotificationService.send(JMXNotificationService.java:122)
         at weblogic.diagnostics.watch.JMXNotificationListener.processWatchNotification(JMXNotificationListener.java:103)
         at weblogic.diagnostics.watch.Watch.performNotifications(Watch.java:621)
         at weblogic.diagnostics.watch.Watch.evaluateLogRuleWatch(Watch.java:546)
         at weblogic.diagnostics.watch.WatchManager.evaluateLogEventRulesAsync(WatchManager.java:765)
         at weblogic.diagnostics.watch.WatchManager.run(WatchManager.java:525)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: oracle.dfw.common.DiagnosticsException: DFW-40112: failed to execute the adrci commands "create home base=C:\\Documents and Settings\\tammineedis\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr product_type=ofm product_id=defaultdomain instance_id=defaultserver
    set base C:\\Documents and Settings\\tammineedis\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr
    set homepath diag\ofm\defaultdomain\defaultserver
    create incident problem_key="BEA-101020 [HTTP]" error_facility="BEA" error_number=101020 error_message="null" create_time="2010-01-05 12:27:58.155 -05:00" ecid="0000INzXpbB7u1MLqMS4yY1BGrHn00000K"
    Cause: There was an error executing adrci commands; the following errors have been found "DIA-48415: Syntax error found in string [create home base=C:\\Documents and Settings\\tammineedis\\Application] at column [69]
    DIA-48447: The input path [C:\\Documents and Settings\\tammineedis\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr] does not contain any ADR homes
    DIA-48447: The input path [diag\ofm\defaultdomain\defaultserver] does not contain any ADR homes
    DIA-48494: ADR home is not set, the corresponding operation cannot be done
    Action: Ensure that command line tool "adrci" can be executed from the command line.
         at oracle.dfw.impl.incident.ADRHelper.invoke(ADRHelper.java:1052)
         at oracle.dfw.impl.incident.ADRHelper.createIncident(ADRHelper.java:786)
         at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createADRIncident(DiagnosticsDataExtractorImpl.java:688)
         ... 19 moreI get the above Error.
    I have checked the bindings and it has 2 instances of the taskflow.
    I have changed the backingbean scope to backingBean

  • Just want to enable more than 2 concurrent RDP on Server 2012

    All I want to do to enable more than two concurrent RDP connections to some of my Server 2012. And that requirement is at this moment for some domain users (for 15 users out of 300 users), I don’t want to publish any remote apps or give user a web
    link to logon. I just want user to do RDP from local desktop like they are doing now.
    Honestly speaking, when I read this, it confuse me well enough as I don’t understand RDS well.
    http://technet.microsoft.com/en-us/library/dd378949(v=ws.10).aspx
    However when I see lots of TechNet forums, it just confuse me more
    Currently I have Terminal Server licencing server for 2008R2 and I understand that I can’t use this licencing server due to version incapability
    http://social.technet.microsoft.com/wiki/contents/articles/14988.rds-and-ts-cal-interoperability-matrix.aspx
    I would like to know what do from start to finish step by step
    So what I understood that I will need to
    1
    Commission a new 2012 R2 server for RDS Service deployment
    2
    Deploy RDS 2012 Services
     on the new server
    3
    Activate Licencing service on the new server
    4
    On this server, install User CALs on the licencing server and   then
    Manage RDS CAL for 15 Users by RD Licencing Manager.
    Questions
    Do I have to activate/install anything on the 2012 servers, where I want to more than two concurrent RDP connection
     2. As in my production environment I have Terminal services 2008 working, will the new version of terminal service run side by side or I will need to migrate all the older version of licences/services to the newer version?
     3. Is there any risk of creating disruption/trouble on the existing terminal services infrastructure?
    If so what are they and how to manage those?
      4. The new RDS service deployment has lots of functions, like RDCB, RDWA,RDSH and in addition RDGW, RDVH and RDLI, not sure, which I need to configure. 
    I understood that I just need to activate and configure RDLI. Did I understand correctly or I need to configure other thinks as well.

    Hi,
    Thank you for posting in Windows Server Forum.
    From your comment, it’s clear that you need more than 2 remote session in your environment and you need to install and activate the RD License server\CAL as you have listed. Now what you can do is, on server 2012 R2 you can act as RD License server and on server
    2012 you can just install RDSH role so that you can have more than 2 connection for your environment. 
    From server 2012\R2 we can manage all the server with RDCB role as middle-man and can install RDSH role on other server and point finally to RD License server so that we can get available CAL for use.
    The old environment will run side-by side but as per my suggestion I would say that you migrate all your old to new one so you can enjoy all new feature and can maintain from single point. 
    In regards to your last question, it depends on your requirement that what you want to use. You can refer following thread for information.
    How to set up an clasic TS-desktop with Windows 2012 (R2)?
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/894e3b5d-b424-4817-8185-532015817379/how-to-set-up-an-clasic-tsdesktop-with-windows-2012-r2?forum=winserverTS
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support

  • Submit submit a large number of task to a thread pool (more than 10,000)

    i want to submit a large number of task to a thread pool (more than 10,000).
    Since a thread pool take runnable as input i have to create as many objects of Runnable as the number of task, but since the number of task is very large it causes the memory overflow and my application crashes.
    Can you suggest me some way to overcome this problem?

    Ravi_Gupta wrote:
    I have to serve them infinitely depending upon the choice of the user.
    Take a look at my code (code of MyCustomRunnable is already posted)
    public void start(Vector<String> addresses)
    searching = true;What is this for? Is it a kind of comment?
    >
    Vector<MyCustomRunnable> runnables = new Vector<MyCustomRunnable>(1,1);
    for (String address : addresses)
    try
    runnables.addElement(new MyCustomRunnable(address));
    catch (IOException ex)
    ex.printStackTrace();
    }Why does MyCustomRunnable throw an IOException? Why is using up resources when it hasn't started. Why build this vector at all?
    >
    //ThreadPoolExecutor pool = new ThreadPoolExecutor(100,100,50000L,TimeUnit.MILLISECONDS,new LinkedBlockingQueue());
    ExecutorService pool = Executors.newFixedThreadPool(100);You have 100 CPUs wow! I can only assume your operations are blocking on a Socket connection most of the time.
    >
    boolean interrupted = false;
    Vector<Future<String>> futures = new Vector<Future<String>>(1,1);You don't save much by reusing your vector here.
    for(int i=1; !interrupted; i++)You are looping here until the thread is interrupted, why are you doing this? Are you trying to generate loading on a remote server?
    System.out.println("Cycle: " + i);
    for(MyCustomRunnable runnable : runnables)Change the name of you Runnable as it clearly does much more than that. Typically a Runnable is executed once and does not create resources in its constructor nor have a cleanup method.
    futures.addElement((Future<String>) pool.submit(runnable));Again, it unclear why you would use a vector rather than a list here.
    >
    for(Future<String> future : futures)
    try
    future.get();
    catch (InterruptedException ex)
    interrupted = true;If you want this to break the loop put the try/catch outside the loop.
    ex.printStackTrace();
    catch (ExecutionException ex)
    ex.printStackTrace();If you are generating a load test you may want to record this kind of failure. e.g. count them.
    futures.clear();
    try
    Thread.sleep(60000);Why do you sleep even if you have been interrupted? For better timing, you should sleep, before check if you futures have finished.
    catch(InterruptedException e)
    searching = false;again does nothing.
    System.out.println("Thread pool terminated..................");
    //return;remove this comment. its dangerous.
    break;why do you have two way of breaking the loop. why not interrupted = true here.
    searching = false;
    System.out.println("Shut downing pool");
    pool.shutdownNow();
    try
    for(MyCustomRunnable runnable : runnables)
    runnable.close(); //release resources associated with it.
    catch(IOException e)put the try/catch inside the loop. You may want to ignore the exception but if one fails, the rest of the resources won't get cleaned up.
    The above code serve the task infinitely untill it is terminated by user.
    i had created a large number of runnables and future objects and they remain in memory until
    user terminates the operation might be the cause of the memory overflow.It could be the size of the resources each runnable holds. Have you tried increasing your maximum memory? e.g. -Xmx512m

  • Deauthorizing all machines more than once in a year?

    Is it possible to deauthorize all machines more than once in a year? I have had two machines crash and one time I forgot to de-authorize before I installed a new OS.
    iTunes tells me I have to wait until June to do this. There has to be a way to manually get someone to agree to do this. Is there a number I can call or process????
    tflink
    HP Compaq NC8230   Windows XP Pro  

    No.

Maybe you are looking for