Workflow is Canceled instantly - System.Threading.ThreadAbortException: Thread was being aborted.

Hi,
I am trying to solve some issues and strange behaviour with an important workflow hooked up with an InfoPath 2010 list in SharePoint 2010. Everything worked fine until now.
One workflow item has ended prematurely with the workflow history messages "An error has occurred in workflowname" followed by some init text message I added, and finally "Could not start workflowname"
(not sure of the exact translation but something like that). Status is still "On Going" (again not sure of translation).
The workflows after this has gotten the status "Canceled" with no further error messages. However the first init text I added is visible in their workflow history but no other messages are displayed, neither my custom ones nor
the built in.
Please help me out, any hints or pointers to help debug this is very appreciated! I do not have other than "view" access so I will have to tell the IT-department to check logs and perform changes if needed.
/Jesper Wilfing
Edit: The IT guys sent me the error message from the log file:
Workflow Infrastructure       72fq
 Unexpected Start Workflow: System.Threading.ThreadAbortException: Thread was being aborted.

Hi,
Thank you for sharing and it will help others who meet the same issue.
Best regards,
Victoria
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Victoria Xia
TechNet Community Support

Similar Messages

  • Thread was being aborted

    I am getting error like in my asp.net website
    System.Threading.ThreadAbortException: Thread was being aborted.
    at System.String.wstrcpy(Char* dmem, Char* smem, Int32 charCount)
    at System.String.FillStringChecked(String dest, Int32 destPos, String src)
    at System.String.Concat(String str0, String str1)
    at reporterror.Page_Load(Object sender, EventArgs e)
    In that procedure i do perform concatenation of two large strings. 
    Can anyone help to know why this error comes? Why Thread was being aborted error comes?

    Hello,
    For ASP.NET projects please consider asking your question here
    http://forums.asp.net/
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Thread was being aborted Exception while creating large number of Sites in SharePoint 2013

    Hi All,
    I am getting threading exception while creating a large extent of sites in SharePoint 2013. I am reading data from an excel file and then looping each row. The sites are creating for first two rows then i am getting exception. This code working fine in dev
    server but not in UAT server. I tried with changing maxRequestLength in web.config but not working. And also followed the below link.
    http://support.microsoft.com/kb/928756
    My code as follows-
    private void CreateSites(DataRow dr)
                try
                    using (SPSite site = new SPSite(OtherSiteCollection)) // I am creating sites in another site collection
                        using (SPWeb web = site.OpenWeb())
                                SPWeb newWeb = null;
                                SPWebTemplateCollection templates = site.RootWeb.GetAvailableWebTemplates(1033);
                                SPWebTemplate template = (from SPWebTemplate m in
                                                              templates
                                                          where m.Title == "SiteTemplate"
                                                          select m).FirstOrDefault(); //Here i am using custom template
        string siteName = dr["Site Name"].ToString();
                                newWeb = web.Webs.Add(siteTitle, siteTitle, siteDescription, 1033, template, true, false); //Getting exception here.
                                newWeb.Update();
                                newWeb.Dispose();
                catch (Exception ex)
                    lblMsg.Text = "Exception in create sites : " + ex.Message + ";" + ex.StackTrace + ";" + ex.ToString()
    I am getting error as-
    Exception in create sites: Thread was being aborted.;   at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent,
    String& bstrWebTemplate, Int32& plWebTemplateId)
       at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)
       at Microsoft.SharePoint.SPWeb.ProvisionWebTemplate(SPWebTemplate webTemplate, String webTemplateToUse, SPFeatureWebTemplate featureWebTemplate)
       at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(SPWebTemplate webTemplate)
       at Microsoft.SharePoint.SPWeb.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWeb.SPWebCollectionProvider.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, SPWebTemplate WebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere)
       System.Threading.ThreadAbortException: Thread was being aborted.
       at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32&
    plWebTemplateId)
       at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)
       at Microsoft.SharePoint.SPWeb.ProvisionWebTemplate(SPWebTemplate webTemplate, String webTemplateToUse, SPFeatureWebTemplate featureWebTemplate)
       at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(SPWebTemplate webTemplate)
       at Microsoft.SharePoint.SPWeb.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWeb.SPWebCollectionProvider.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, SPWebTemplate WebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere)
    Thread was being aborted.;   at System.Threading.ThreadAbortException: Thread was being aborted.
    Can anyone please help. Thanks!
    dinesh

    If you do this from a Console application, does it succeed?
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Thread was being aborted Error.

    HI,
        I am Getting Below error:
    Thread was being aborted. Source of Error :mscorlib Error Method :18 Helplink : Line of Error : at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() 
    Thanks is in Advance,
    Help me.

    try to move Response outside of the Try/Catch block
    Check this thread
    http://stackoverflow.com/questions/1433448/thread-was-being-aborted

  • SPUtility.GetPrincipalsInGroup method throws Thread was being aborted error when SPGroup Name is passed

    Hello,
    I am getting 'Thread was being aborted - Unable to evaluate expression because
    the code is optimized or a native frame is on top of the call stack' error
    when I use 'SPUtility.GetPrincipalsInGroup' method.
    bool bReachedMaxCount = false;
    SPPrincipalInfo[] _spPrincInfoColl = SPUtility.GetPrincipalsInGroup(web, groupName, Int32.MaxValue - 1, out bReachedMaxCount);
    We have both SharePoint groups (SPGroup) & Active Directory groups in our site.
    I am checking if logged in user has access to the group name that I am passing here as 'groupName'.
    Code works without any error when I pass 'domain name' as 'groupName' e.g. (Domain\\usergroup) but the same throws error when I pass SharePoint groups (SPGroup) name.
    Both type of these groups have at least 'Read' permission on site.
    I have this code inside 'try-catch' block and hence I am able to catch that thread aborted error.
    What could be the reason for this error? I don't get any call stack and all other properties of exception object are either null or with garbage values.
    I am having SP2010 foundation, VS2012 and .Net4.5 installed on my machine.
    Kindly suggest on this. Thank you.
    Sagar S.

    I think the RunWithElevatedPrivilages is not working correctly. I believe that the new site and web objects need to be opened within elevatedprivilages to work. it looks like the way your code is working the SPsite and SPweb objects are getting opened before
    the RunWithElevatedPrivilages give this a try and see if your result changes.
    bool IsUserInGroup = false;
    try
    SPSecurity.RunWithElevatedPrivileges(() =>
    Guid siteId = SPContext.Current.Site.ID;
    Guid webId = SPContext.Current.Web.ID;
    using (SPSite newSite = new SPSite(siteId)) {
    using (SPWeb newWeb = newSite.OpenWeb(webId)){
    bool bReachedMaxCount = false;
    SPPrincipalInfo[] _spPrincInfoColl = SPUtility.GetPrincipalsInGroup(newWeb, "TestGroup", Int32.MaxValue - 1, out bReachedMaxCount);
    if (_spPrincInfoColl.Where(a => a.LoginName == username).Count() > 0)
    IsUserInGroup = true;
    }//close web
    }//close site
    catch (Exception ex)
    LogManager.LogMessage(ex.Message.ToString());
    Alex

  • SPLongOperation throws error "Thread was being aborted"

    Recently we have migrated our SharePoint application from 2010 to 2013, we have upgraded our solution from VS 2012 to VS 2013 and deployed it successfully in newly installed SharePoint 2013 prior to content DB migrate and all.
    In our solution, we had requirement to implement lengthy operation which create site from site template, copying documents from one library to another, creating user groups and so on. To achieve these, we have used
    SPLongOperation which is taking care for not to abort thread and complete operation without and time constraint, which is working fine 2010 environment. 
    After upgrading to 2013, we started facing problem with "Thread was being aborted", which seems SPLongOperation is not working.
    Have I missed any configuration?
    Help appreciated.
    Arpan Shah MSFT Mark as Answer if it solves your problem. Vote As Helpful if the post is helpful for you.

    Hi,
     According to your description, I suggest you debug your code in the test
    environment and check if the method of SPLongOperation.End throw the exception.
    The code snippet below for your reference:
    //Long Operation Code
    using (SPLongOperation longOperation = new SPLongOperation(this.Page))
    //Start the long operation
    longOperation.Begin();
    //Your Long Operation Code Goes Here...
    //End the long operation
    longOperation.End("http://localhost/_layouts/success.aspx", Microsoft.SharePoint.Utilities.SPRedirectFlags.DoNotEndResponse, HttpContext.Current, "");
    More information:
    http://snahta.blogspot.com/2009/10/splongoperation-class.html
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • CRVS2010 Beta thread was being aborted

    Hi,
    I am attempting to upgrade from CR 11.5 to CR 2010 Beta2  (with VS 2010, net 4) to see how the reports and applications do in the new environment. All of the reports have sql parameters and connect to sql server 2008r2 stored procedures. I am experiencing one strange issue.
    In the crystal viewer toolbar, if I print the report, after the printer dialog box is opened, the page and report won't work. (it doens't matter if you close the dialog or actually print the report) So, if there are parameter fields or a generate report button, nothing works after the print dialog has been shown. The CrystalDecisions.Web.ErrorEventArgs error says "Thread was being aborted". In order to have access to the web page, the user now needs to refresh the page. Why is this happening? Everything worked fine in both CR 11.5 and CR 2008 Also, if the export button is clicked instead of the print button, everything works fine afterwards, so it's just the print button that is errorring out.
    This error happens both on a development computer (XP sp3) and a development server (2008 x86).
    Any ideas? Thanks, Harlan

    Hi Don,
    I created a new asp.net Crystal reports Web site, created a new report and just connected it to a table instead of a stored procedure with no parameters. When I run it from the browser, I still get the same error messages when I try to print so it does not appear to be a migration issue.
    Thanks again,
    Harlan

  • SPListItem.Update() = Thread was being aborted.

    Hello,
    I currently have a problem to update a mysite list item.
    This code is working very well on my dev environment but in the production it's not working :/
    My logs end with : 
    Item added
    Error: Thread was being aborted.
    Nok: Thread was being aborted
    Anyone have an idea? (on prod the mysites are in a separate web application. that's the only difference)
    Thanks
    public static object Add(String User, String Title, String Text)
    try
    String AuthorLoginName = SPContext.Current.Web.CurrentUser.LoginName;
    SuiteBarLog("Sender: " + AuthorLoginName);
    SPSecurity.RunWithElevatedPrivileges(delegate()
    SuiteBarLog("RunWithElevatedPrivileges");
    using (SPWeb Web = new SPSite(new PeopleManager().GetPropertiesFor(User).PersonalUrl).RootWeb)
    SuiteBarLog("Open Web: " + Web.Url);
    Web.AllowUnsafeUpdates = true;
    SPUser Author = Web.EnsureUser(AuthorLoginName);
    try
    SPList List = Web.Lists[LISTNAME];
    SPListItem Item = List.AddItem();
    SuiteBarLog("Item added");
    Item["Title"] = Title;
    Item["Text"] = Text;
    Item["Read"] = false;
    Item["Author"] = Author.ID + ";#" + Author.Name;
    Item.SystemUpdate();
    SuiteBarLog("Notification Updated");
    List.Update();
    SuiteBarLog("List Updated");
    catch (Exception ex)
    SuiteBarLog("Error: " + ex.Message);
    Web.AllowUnsafeUpdates = false;
    return "ok";
    catch(Exception ex)
    SuiteBarLog("Nok : " + ex.Message);
    return "Nok : " + ex.Message;

    Thanks, but it solves nothing. I have no error to open the website. The error appears once I update my item in the list.
    I tried your code but as I thinked it's always the same error.
    public static object Add(String User, String Title, String Text)
    try
    SuiteBarLog("Add Notification to " + User);
    String AuthorLoginName = SPContext.Current.Web.CurrentUser.LoginName;
    SuiteBarLog("Sender: " + AuthorLoginName);
    String PersonalURL = new PeopleManager().GetPropertiesFor(User).PersonalUrl;
    SPSecurity.RunWithElevatedPrivileges(delegate()
    SuiteBarLog("RunWithElevatedPrivileges");
    using (SPSite Site = new SPSite(PersonalURL))
    using (SPWeb Web = Site.OpenWeb())
    SuiteBarLog("Open Web: " + Web.Url);
    Web.AllowUnsafeUpdates = true;
    SPUser Author = Web.EnsureUser(AuthorLoginName);
    SuiteBarLog("Author confirmed: " + Author.Email);
    try
    SPList List = Web.Lists[LISTNAME];
    SPListItem Item = List.AddItem();
    SuiteBarLog("Item added");
    Item["Title"] = Title;
    Item["Text"] = Text;
    Item["Read"] = false;
    Item["Author"] = Author.ID + ";#" + Author.Name;
    Item.SystemUpdate();
    SuiteBarLog("Notification Updated");
    List.Update();
    SuiteBarLog("List Updated");
    catch (Exception ex)
    SuiteBarLog("Error: " + ex.Message);
    Web.AllowUnsafeUpdates = false;
    return "ok";
    catch(Exception ex)
    SuiteBarLog("Nok : " + ex.Message);
    return "Nok : " + ex.Message;

  • SPUtility.TransferToErrorPage throwing System.Threading.ThreadAbortException

    I am trying to call SPUtility.TransferToErrorPage from with in a ASPX code behind method in a sharepoint farm solution. it throws me the below error:
    System.Threading.ThreadAbortException: Thread was being aborted.
       at System.Threading.Thread.AbortInternal()
       at System.Threading.Thread.Abort(Object stateInfo)
       at System.Web.HttpResponse.End()
       at System.Web.HttpServerUtility.Transfer(String path)
       at Microsoft.SharePoint.Utilities.SPUtility.TransferToErrorPage(String message, String linkText, String linkUrl)
    Can anyone help me in resolving this issue ?
    Thanks
    Vamsee
    Vamsee Inala

    You need to catch ThreadAbortException which might occur when some code is already running.
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • Thread being aborted sharepoint 2013

    Hi All,
    I am receiving the below error "Thread being aborted" when i try to open my dev url. I have no idea about the area(ThirdSPS2010) which is throwing error. As the production was set up by third party and i just took back up of the url and also the
    back up of custom webparts and restored in development environment. I am struck with this error now :(
    06/25/2013 14:06:17.45     w3wp.exe (0x22A4)                           0x13DC    ThirdSPS2010               
         Error                             00000    Unexpected    Thread was
    being aborted.    b6c1289c-d07c-a0de-44ea-088cb42c35e3
    Above this i can find multiple Distributed cache warnings as below
    SharePoint Foundation             DistributedCache                  ah24w    Unexpected  
     Unexpected Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage 'DistributedLogonTokenCache' - Exception 'System.InvalidOperationException: SPDistributedCachePointerWrapper::InitializeDataCacheFactory - No cache hosts are
    present or running in the farm.     at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()'.
    Can someone guide what is the reason for these errors :(
    Thanks in advance
    Ranjani.R

    Unlike other service instances, though, the Distributed Cache Service Instance should either be installed *and* online on a SharePoint server, or not installed at all. If the service instance is stopped (disabled) but not uninstalled, details about the associated
    Cache Host stay in the Cache Cluster Config store, which can cause problems.
    For this reason, the Distributed Cache Service Instance should never be stopped via the Services on Server page in Central Administration or via Stop-SPServiceInstance in PowerShell. A special cmdlet, Remove-SPDistributedCacheServiceInstance, is available
    to stop *and* uninstall the local Distributed Cache Service Instance from a SharePoint server. This cmdlet, and its complement Add-SPDistributedCacheServiceInstance, should be used instead of Stop- and Start-SPServiceInstance for managing the local Distributed
    Cache Service Instance.
    from
    http://blogs.msdn.com/b/besidethepoint/archive/2013/03/27/appfabric-caching-and-sharepoint-2.aspx

  • Workflow Failed on Start (workflow was cancelled by System Account

    I have created a Workflow in SP Designer and attached to the library. It works fine in Dev but failing to run in Prod. getting the error Workflow was cancelled by System account and failed on Start.
    Can anyone help me in this regard.
    Thanks

    Hi,
    What is SharePoint server’s version?
    Check if the account who start the workflow has enough permission.
    If you were using SharePoint server 2007, all Visual Studio workflows (including SharePoint OOB workflow and customized workflows) run as the System Account and have
    full rights to everything in SharePoint Products and Technologies.
    SharePoint Designer workflows, on the other hand, still run as the System Account, but they do so with their permissions trimmed down to those of the account that
    initiates the workflow.
    In other words, SharePoint Designer workflows always run impersonating the user who initiates the workflow.
    For more information about troubleshoot workflow errors, check out the following article:
    http://office.microsoft.com/en-us/sharepoint-designer-help/troubleshoot-workflow-errors-HA010237912.aspx
    (SharePoint 2007)
    http://technet.microsoft.com/en-us/library/cc298927.aspx
    (SharePoint 2010)
    Thanks,
    Rock Wang
    Regards, Rock Wang Microsoft Online Community Support

  • Timers! System.currentTimeMillis() and Thread.Sleep = ?????

    I've experienced some strange results using timers etc. Can anyone explain this:
    package TestPackage;
    public class Timer {
        public static void main( String args[] ) {
            new Timer();
        /** Creates a new instance of Timer */
        public Timer() {
            while ( true ) {
                long startTime = System.currentTimeMillis();
                try {
                    Thread.sleep(100);
                } catch ( Exception e ) {
                    System.err.println("Trouble sleeping tonight...");
                System.out.println("RunTime=" + (System.currentTimeMillis() - startTime) );
    Output:
    RunTime=109
    RunTime=94
    RunTime=109
    RunTime=94
    RunTime=93
    RunTime=110
    RunTime=94
    How can the run time be less than the sleep time ?!?!?!
    Cheers,
    Rob

    There are a multitude of problems here and all of them are Windows related.
    1) Any difference under 10 milliseconds is purely speculative on the part of the OS
    2) There is a Windows bug whereby calling some Windows API with regards to system time basically causes Windows to fall ill with a concussion, temporary coma followed by confusion. The most common symptom of this particular bug is that repeated calls to this API cause teh system clock to accelerate but the nature of the bug means that a variety of tests and results such as this one may be thrown into confusion.

  • Details: System.ArgumentException: AssignedTo at Microsoft.Activities.Hosting.Runtime.Subroutine,sharepoint 2013 designer workflow task cancellation

    We are getting sharepoint 2013 designer workflow task cancellation only for a specific sharepoint user. Its working for other users.
    MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint Lead

    Hi Amit,
    Based on the error message, I recommend to check if the user with issue has user profile generated in User Profile Service Application.
    Please also check the ULS log for detailed error message and a screenshot of the workflow steps for further research.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Job cancelled after system exception ERROR_MESSAGE in DB13

    Hello All,
    When i opened the t-code DB13 i saw that this job "Mark tables requiring statistics update" is cancelled.
    JOB LOG:
    12.02.2011  22:00:16  Job started
    12.02.2011  22:00:16  Step 001 started (program RSDBAJOB, variant &0000000000085, user ID 80000415)
    12.02.2011  22:00:18  Job finished
    12.02.2011  22:00:18  Job started
    12.02.2011  22:00:18  Step 001 started (program RSADAUP2, variant &0000000000081, user ID 80000415)
    12.02.2011  22:01:26  Error when performing the action
    12.02.2011  22:01:26  Job cancelled after system exception ERROR_MESSAGE
    When check for the BGD Job in SM37 for this job i found the same error in the job log with the status cancelled.
    Job log overview for job:    DBA!PREPUPDSTAT_____@220000/6007 / 22001700
    12.02.2011 22:00:18 Job started
    12.02.2011 22:00:18 Step 001 started (program RSADAUP2, variant &0000000000081, user ID 80000415)
    12.02.2011 22:01:26 Error when performing the action
    12.02.2011 22:01:26 Job cancelled after system exception ERROR_MESSAGE
    I couldn't find any logs in SM21 of that time also no dumps in ST22.
    Possible reason for this error:
    I have scheduled the job Check database structure (only tables) at some other time and deleted the earlier job which was scheduled during the bussiness hours which caused performance problem.
    So to avoid performance issue i scheduled this job in the mid night by cancelling the old job which was scheduled during the bussiness hours.
    And from the next day i could see this error in DB13.
    Rest all the backups are running fine but the only job getting cancelled is for "Mark tables requiring statistics update"
    Could anyone tell me what should i do to get rid of this error?
    Can i schedule this "Mark tables requiring statistics update" again by deleting the old one?
    Thanks.
    Regards.
    Mudassir Imtiaz

    Hello Adrian,
    Thanks for your response.
    Every alternate day we used to have performance issue at 19:00hrs.
    Then when i checked what is causing this problem, i discovered that there was a backup "Check Database Structure (tables only)" scheduled at this time and it was mentioned that this backup may cause performance issue.
    Then i changed "Check Database Structure (tables only)" the time of this backup to 03:00hrs.
    The next day when i checked DB13 i found that one of the backups failed.
    i.e. "Mark Tables Requiring Statistics Update"
    Then i checked the log which i posted earlier with the error: "Job cancelled after system exception ERROR_MESSAGE"
    I posted this error here and then i tried to delete the jobs scheduled i.e. "Mark Tables Requiring Statistics Update" and then re-schedule it at the same time and interval.
    And then it started working fine.
    So i just got curious to know the cause of the failure of that job.
    Thanks.
    Regards,
    Mudassir.Imtiaz
    P.S There is one more thing which i would like to say which is not related to the above issue, and m sorry to discuss this in this thread.
    I found a few Bottlenecks in ST04 with Medium and High priority.
    Medium: Selects and fetches selectivity 0.53%: 122569 selects and fetches, 413376906 rows read, 2194738 rows qualified.
    High: 108771 primary key range accesses, selectivity 0.19%: 402696322 rows read, 763935 rows qualified.
    There are a lot these.
    I would really appreciate if you tell me what is the cause for these Bottlenecks and how to resolve.
    Thanks a lot.

  • JMS error- Exception in thread "Main Thread" java.lang.NoClassDefFoundError

    Hi guys,
    I am new to JMS programming and i'm have the following error...I have set up a simple weblogic server on my local machine and i am trying to send a message to a queue i've created on a JMS server. I am trying to manually run an example provided by BEA WebLogic... the code follows.
    //package examples.jms.queue;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Hashtable;
    import javax.jms.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    /** This example shows how to establish a connection
    * and send messages to the JMS queue. The classes in this
    * package operate on the same JMS queue. Run the classes together to
    * witness messages being sent and received, and to browse the queue
    * for messages. The class is used to send messages to the queue.
    * @author Copyright (c) 1999-2006 by BEA Systems, Inc. All Rights Reserved.
    public class QueueSend
      // Defines the JNDI context factory.
      public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
      // Defines the JMS context factory.
      public final static String JMS_FACTORY="weblogic.examples.jms.QueueConnectionFactory";
      // Defines the queue.
      public final static String QUEUE="weblogic.examples.jms.exampleQueue";
      private QueueConnectionFactory qconFactory;
      private QueueConnection qcon;
      private QueueSession qsession;
      private QueueSender qsender;
      private Queue queue;
      private TextMessage msg;
       * Creates all the necessary objects for sending
       * messages to a JMS queue.
       * @param ctx JNDI initial context
       * @param queueName name of queue
       * @exception NamingException if operation cannot be performed
       * @exception JMSException if JMS fails to initialize due to internal error
      public void init(Context ctx, String queueName)
        throws NamingException, JMSException
        qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
        qcon = qconFactory.createQueueConnection();
        qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
        queue = (Queue) ctx.lookup(queueName);
        qsender = qsession.createSender(queue);
        msg = qsession.createTextMessage();
        qcon.start();
       * Sends a message to a JMS queue.
       * @param message  message to be sent
       * @exception JMSException if JMS fails to send message due to internal error
      public void send(String message) throws JMSException {
        msg.setText(message);
        qsender.send(msg);
       * Closes JMS objects.
       * @exception JMSException if JMS fails to close objects due to internal error
      public void close() throws JMSException {
        qsender.close();
        qsession.close();
        qcon.close();
    /** main() method.
      * @param args WebLogic Server URL
      * @exception Exception if operation fails
      public static void main(String[] args) throws Exception {
        if (args.length != 1) {
          System.out.println("Usage: java examples.jms.queue.QueueSend WebLogicURL");
          return;
        System.out.println(args[0]);
        InitialContext ic = getInitialContext(args[0]);
        QueueSend qs = new QueueSend();
        qs.init(ic, QUEUE);
        readAndSend(qs);
        qs.close();
      private static void readAndSend(QueueSend qs)
        throws IOException, JMSException
        BufferedReader msgStream = new BufferedReader(new InputStreamReader(System.in));
        String line=null;
        boolean quitNow = false;
        do {
          System.out.print("Enter message (\"quit\" to quit): \n");
          line = msgStream.readLine();
          if (line != null && line.trim().length() != 0) {
            qs.send(line);
            System.out.println("JMS Message Sent: "+line+"\n");
            quitNow = line.equalsIgnoreCase("quit");
        } while (! quitNow);
      private static InitialContext getInitialContext(String url)
        throws NamingException
        Hashtable<String,String> env = new Hashtable<String,String>();
        env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
        env.put(Context.PROVIDER_URL, url);
        return new InitialContext(env);
    }when i run the main method with args[0] = "t3://localhost:7001", i get the following errors:
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/security/subject/AbstractSubject
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at QueueSend.getInitialContext(QueueSend.java:122)
    at QueueSend.main(QueueSend.java:91)
    Could someone please help. thanks.

    when i run the main method with args[0] = "t3://localhost:7001", i get the following errors:
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/security/subject/AbstractSubject
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at QueueSend.getInitialContext(QueueSend.java:122)
    at QueueSend.main(QueueSend.java:91)
    Could someone please help. thanks.This is Java 101:
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rtrb_classload_viewer.html
    You've got to have the WebLogic JAR that contains the necessary .class files in your CLASSPATH when you run.
    Don't use a CLASSPATH environment variable; use the -classpath option when you run.
    %

Maybe you are looking for