DbgHelp fails in a Windows service

I am trying to download debugging symbols from a .NET Windows service. The service calls a helper dll that does the actual calls into dbghelp.dll. I've found that the call to SymGetTypeFromNameW fails but GetLastError returns 0.  If I run the exact
same code but in a Windows form application it works exactly as it should.  This is not a versioning issue because I load dbghelp with LoadLibrary with the exact path of the version I want to use and have verified through the debugger that it has actually
loaded the correct version. 
Here is the snippet of code that fails with a service but works with a form app.
 sz = sizeof(SYMBOL_INFOW) + MAX_SYM_NAME + 1;
 siw = (PSYMBOL_INFOW)malloc(sz);
 ZeroMemory(siw, sz);
 siw->SizeOfStruct = sizeof(SYMBOL_INFOW);
 siw->MaxNameLen   = MAX_SYM_NAME + 1;
 bRet = SymGetTypeFromNameW(proc, mb, sn, siw);
 if (!bRet) {
  gle = GetLastError();
  DebugBreak();
  free(siw);
  return gle;
I have not yet stepped through the call to see where it fails but I'm wondering if anyone else has had this issue and if so knows a way to solve it.  Thanks.

Hi DevOps26,
Like this document:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms679309(v=vs.85).aspx
As my understanding, the DbgHelp would be related to the windows debugging, I help you move this case to the
WinDbg forum for dedicated support. Thanks for your understanding.
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Calling SSIS package from C# Windows Service Fails

    Hi All.
    I've got an SSIS package that reads from an Excel file and populates a database. The Excel file location gets passed in to the package as a variable. Also the Protection Level of the package is set to EncryptSensitiveWithPassword.
    This all works fine when I run the package from Visual Studio or using DTEXEC. When I try to run it from a C# Windows Service though I get the following exception:
    SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft Office Access Database Engine"  Hresult: 0x80004005  Description: "The Microsoft Office Access database engine cannot open or write to the file ''. It is already opened exclusively
    by another user, or you need permission to view and write its data.".
    SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Input Excel Connection" failed with error code 0xC0202009.  There may be error messages posted before this
    with more information on why the AcquireConnection method call failed.
    Dedupe Worksheet failed validation and returned error code 0xC020801C.
    One or more component failed validation.
    There were errors during task validation.
    The windows service runs with LocalSystem account and the following code is used to call the SSIS Package:
                    Application app = new Application();
                    Package package = null;
                    app.PackagePassword = "*******";
                    //Load the SSIS Package which will be executed
                    package = app.LoadPackage(@"C:\Projects\DataDedupeMatch\DataDedupeMatch\DataDedupe.dtsx", null);
                    //Pass the varibles into SSIS Package
                    package.Variables["User::FilePath"].Value = e.FullPath.Replace(@"\\", @"\");
                    Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();
    I would really appreciate if someone could help me out with this.
    Thanks in advance,
    Deon

    Instead of hosting the SSIS runtime in your service, you should use a separate host process for your SSIS package.  You're using the Office drivers, which aren't designed or supported for running in long-lived unattended processes like a Windows Service. 
    You can use your own SSIS hosting code, or just use dtexec.exe to host your package.  In either case you would start the child process with
    Process.Start. 
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Failed to Configured Domain Services for Windows

    Hi!
    I am installing OES 2 SP3 with DSfW Pattern as a "New Domain Controller in an Existing Domain Services for Windows Domain" with Replication Configuration and Schema Partition.
    During the "Perform eDirectory Configuration" at last task "Configure Domain Services for Windows " at 93% we encountered an error: "Failed to configure Domain Services for Windows".
    Here's details of error ;
    command : perl /opt/novell/xad/sbin/ndsdcinit.pl retry full-replica -d 'vec.apd.com.ph' -l 'ou=OESSystemObjects,dc=vec,dc=apd,dc=com,dc=ph'
    -g 'ou=OESSystemObjects,dc=vec,dc=apd,dc=com,dc=ph' -f 'apd.com.ph' -p 'apd.com.ph' -o 192.168.81.92 -t
    Could not create gss directory /etc/opt/novell/xad/gss at /opt/novell/xad/sbin/ndsdcinit.pl line 463, line 652
    LDAP Based utility [ndsConfigServerContext.sh] to retrieve server context for YaST
    DomainName : vec.apd.com.ph
    NdsAdminName : CN=Administrator,CN=Users,DC=vec,DC=apd,DC=com,DC= ph
    ExistingServerIP : ANDROMEDA.vec.apd.com.ph
    ExistingServerPort : 0
    Add_DC : true
    Returning server context->ou=OESSystemObjects.dc=vec.dc=apd.dc=com.dc=ph
    LDAP Based utility [ndsConfigServerContext.sh] to retrieve server context for YaST
    DomainName : vec.apd.com.ph
    NdsAdminName : CN=Administrator,CN=Users,DC=vec,DC=apd,DC=com,DC= ph
    ExistingServerIP : ANDROMEDA.vec.apd.com.ph
    ExistingServerPort : 0
    Add_DC : true
    Returning server context->ou=OESSystemObjects.dc=vec.dc=apd.dc=com.dc=ph
    SASL/GSS-SPNEGO authentication started
    SASL SSF: 56
    SASL installing layers
    Failed to fetch dNIPDNSZones from DNS_LOCATOR_OBJECT at /opt/novell/xad/lib64/perl/Install/adc_install.pm line 503
    at /opt/novell/xad/lib64/perl/Logger.pm line 119
    Logger::_err('Failed to fetch dNIPDNSZones from DNS_LOCATOR_OBJECT at /opt/...') called at /opt/novell/xad/lib64/perl/Logger.pm line 202
    Logger::Log(0, 'Failed to fetch dNIPDNSZones from DNS_LOCATOR_OBJECT at /opt/...') at /opt/novell/xad/lib64/perl/Install/adc_install.pm line 532
    adc_install::decide_domain_zones() called at /opt/novell/xad/lib64/perl/install/adc_install.pm line 150
    adc_install::stage_domain('adc_install=HASH (0X8b9370)') called at /opt/novell/xad/sbin/ndsdcinit.pl line 1383
    main::main(62, 'apd.com.ph', 'vvec.apd.com.ph', 'TRUE','ou=OESSystemObjects,dc=vec,dc=apd,dc=com,d c=ph','ADM_PASSWD_DOMAIN','ou=OESSystemObjects,dc= vec,dc=apd,dc=com,dc=ph','replops::DESTROY',
    'APD.COM.PH',...) called at /opt/novell/xad/sbin/ndsdcinit.pl line 1301
    main::main() called at /opt/novell/xad/sbin/ndsdcinit.pl line 1425
    ENV PATH = /opt/novell/xad/sbin:/opt/novell/xad/bin:/opt/novell/xad/share/dcinit:/opt/novell/eDirectory/bin:
    LIB=lib64
    LD LIBRARY PATH =
    /opt/novell/xad/lib64:/opt/novell/xad/lib64/nds-
    modules:/opt/novell/eDirectory/lib64:/opt/novell/eDirectory/lib64/nds-modules
    SASL PATH = /opt/novell/xad/lib64/sasl2
    DCINIT CONFIG: /etc/opt/novell/xad/xad.ini
    DOMAIN NAME: vec.apd.com.ph
    PARENT NAME: apd.com.ph
    FOREST NAME: apd.com.ph
    NETBIOS NAME: VEC
    Any ideas on this error ?
    Regards. Thanks.
    denzmo

    Thanks for the reply.
    I have some followup questions
    2. Can you explain the DNS setting in your setup ?
    Tree ---> Power--> apd.com.ph -- dlpc.apd.com.ph
    -- vec.apd.com.ph -- Andromeda.vec.apd.com.ph (DNS)
    -- Pictor.vec.apd.com.ph ( additional domain server ) -> "Failed to configure in DSFW"
    1. apd.com.ph, dlpc.apd.com.ph, vec.apd.com.ph are DSfW domains or just DNS domains ?
    2. Andromeda.vec.apd.com.ph (DNS) - is this the DC of a DSfW domain ?
    3. You are adding the Additional domain controller to the vec.apd.com.ph domain right ?
    The
    # LDAPCONF=/etc/opt/novell/xad/openldap/ldap.conf /usr/bin/ldapsearch -Y EXTERNAL -s sub -b dc=ph "(objectclass=dniplocator)" dn
    Heres the result ;
    a.) running the command in the DNS server (child domain) ANDROMEDA;
    SASL /EXTERNAL authentication started
    SASL username: gidNumber=0+uidNumber=0, cn=peercred,cn=external,cn=auth
    SASL SSF: 0
    # extended LDIF
    # LDAPv3
    # base <dc=ph(objectclass=dniplocator) [email protected]> with scope subtree
    # filter: (objectclass=*)
    # requesting:ALL
    # search result
    search : 2
    result : 32 No such object
    text : NDS error : no such entry (-601)
    # numResponses :1
    This is strange. This ldapsearch is failing to find the locator object in the tree under dc=ph.
    - Can you try this same command from your FRD DC too and find the result ?
    - Is your server non-name mapped or your adding a DSfW server into an existing eDirectory tree (name mapped) ?
    - If it is later can you try the same search with '-b' parameter replaced with container to which FRD is mapped to into the eDirectory Tree.
    - Can you tell in your setup where are the locator object present for your first DSfW server which is acting as DNS server ?
    - While installing this ADC server, you have given the remote dns server as 192.168.81.92. In the YaST DNS screen did you do retrieve (by clicking 'retrieve' button on the screen ) or you entered those inputs manually ?
    - Another follow up question. The locator context provided to the ndsdcinit command in your first post, is 'ou=OESSystemObjects,dc=vec,dc=apd,dc=com,dc=ph'. Can you confirm your locator
    context is correct ?
    [/QUOTE]
    b.) running the command in the ADC PICTOR;
    SASL /EXTERNAL authentication started
    ldap_sasl_interactive_bind_s: invalid credentials (49)
    [/QUOTE]
    This is expected as the server is not completely configured.
    Please get it touch with our NTS for passing on more information about this setup.

  • Created windows service fails to start

    Hi all. We have a piece of software that must always be running on a Windows Server 2008 box. 
    Currently due to poor development, this software is only run by a local user (not as SYSTEM nor initiated via a Windows Service) so when our user gets logged off, the software goes down with it.
    I have to find a way to get a particular command to run (as administrator) when the machine turns on (even if a user a user does not log in). I have been playing with the SC command to create a service but I cannot get the service to start. I keep receiving
    the error:
    FAILED 1053: The service did not respond to the start or control request in a timely fashion.
    Another option I was trying as a temporary fix was to use the PsTools to launch the software. When the processes are running they are running as SYSTEM, but they still shut down when the user is logged off. Is there an easier way to get services to work?
    Or another way entirely to get software to launch on System boot? Please note that I am very restricted in this environment so doing this without the use of 3rd party tools is preferable. Thank you!!

    If you're the dev, then these might help:
    http://msdn.microsoft.com/en-us/library/zt39148a%28v=vs.110%29.aspx and
    http://www.codeproject.com/Articles/106742/Creating-a-simple-Windows-Service
    This might help you also:
    http://www.timdavis.com.au/general/creating-a-user-defined-service-in-windows-7/

  • Weblogic Windows service fails when aspectwerkz is added to configuration

    All,
    I have been running weblogic as windows service successfully. Now, we are utilizing AOP from aspectwerkz. I added the necessary settings for aspectwerkz in the install script. After adding the changes, I am able to install the service. However, when I start the service it fails with the MMC error dialog box displaying:
    'Error 1067: The process terminated unexpectedly.'
    I opened the Event viewer and checked the System events. I see an error which says:
    'The beasvc med1d2_med1d2as01 service terminated unexpectedly. It has done this 2 time(s). The following corrective action will be taken in 0 milliseconds: No action.'
    Unfortunately, the info I get from MMC and event viewer doesn't really help in any way. I tried tweaking 'CMDLINE' and other stuff in the install script to no avail. I would appreciate any help.
    Infrastructure information:
    OS: Windows Server 2000
    App server: Weblogic 8.1 sp4
    JDK: Sun JDK 1.4.2 04
    Thanks in advance.
    Message was edited by:
    FastBucks

    Hi, raynorman, and welcome to the Community!
    I have referred your enquiry to the vendor for more information.
    Best regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • Failed to start applications after deployed as Windows service.

    I deployed Administration server as a Windows service. Started Administration server in Windows Serivices control panel. The applications FMW Welcome Page Application (11.1.0.0.0), DMS Application (11.1.1.1.0) failed. I also installed adf-richclient-demo, this application in prepared status.
    It reported "java.lang.ClassNotFoundException: oracle.dms.wls.DMSServletFilter", when I tried to start the applications. However the applications are Ok by starting Administration server with domain\bin\startWebLogic.cmd.
    Do any one know how to solve the issue?
    Thanks!

    I asume you are using NodeManager to start AdminServer when you says "I deployed Administration server as a Windows service".
    If so, make sure the jar file (jar that contains oracle.dms.wls.DMSServletFilter class) is added to CLASSPATH, that NodeManager uses to start the server. Node Manager starts a Server using the startup arguments configured for the Managed Server in the Server—>Configuration—>Server Start tab.
    I suggest restart the NodeManager when you modify this properties.
    Check [http://e-docs.bea.com/wls/docs81/adminguide/nodemgr.html#1144313]

  • Welogic failed to start as a Windows services

    I have installed Weblogic 816 and I am able to start it from command line. I also install it as a Windows 2003 Service but failed to start. The error is "Could not start the beasvc myserver service on local computer Error 1067: The process terminated unexpectedly"
    What am I missing and how to debug it?
    Thanks

    See if you are following these steps given below URL while creating weblogic server instance as windows service.
    http://ananthkannan.blogspot.com/2009/10/how-to-create-weblogic-server-as.html

  • Deploying Windows Service Fails Every Other Time

    I'm using Release Management 2013 to deploy a Windows service.  I go through the steps listed below to deploy it.  It fails on the first step (Delete Service) every other time.  When I run it again, it works.  It seems like it's saying
    it failed, but is somehow actually succeeding.  After it fails, I don't see the service in the Services list anymore.  Then when I run the deployment again, it succeeds. 
    I have found that if I manually stop the service before deploying again, it will always succeed.  There doesn't seem to be a good way of doing that in Release Management though, since the Stop Service action will error out if the service doesn't exist.
    Any help would be appreciated!
    ==============
    Delete Service
    Create Folder
    XCopy Site Deployment (deploys from drop folder)
    Copy Config Files from Drop folder (copies config files folder from drop folder)
    Delete File(s) or Folder (deletes existing config)
    Rename File or Folder (renames appropriate copied config to the name of the previously deleted config file)
    Delete File(s) or Folder (deletes other config files)
    Delete File(s) or Folder (deletes config folder)
    Create Service
    Start Service

    Hi,
    You may have solved this by now, but for the record, I had the exact same issue. The problem is in this section of ManageWindowsServices.ps1
    elseif ($Action -eq "delete")
    #If the service exists, we first stop it to avoid "Marked for deletion" problems
    $service = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue
    if ($service -ne $null)
    #Stop the service
    $status = & "sc.exe" "$ServerName" stop "$ServiceName"
    "Stop status : $status"
    $status = & "sc.exe" "$ServerName" $Action "$ServiceName"
    "Delete status : $status"
    #Ensure the service was deleted successfully
    $service = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue
    if ($service -ne $null)
    $(throw "The deletion of the service failed.")
    else
    $exitCode = 0
    and is due to the fact that the second Get-Service call does actually return the service, even though it's after the call to delete it. Presumably this is some kind of race condition, where the call to delete the service returns before it's finished all
    it's work.
    In any case, the solution I went for was to rewrite this section as:
    elseif ($Action -eq "delete")
    [int]$returnCode = 0
    #If the service exists, we first stop it to avoid "Marked for deletion" problems
    $service = Get-WmiObject -Class Win32_Service -Filter "Name='$ServiceName'"
    if ($service -ne $null)
    #Stop the service
    $status = & "sc.exe" "$ServerName" stop "$ServiceName"
    "Stop status : $status"
    "Deleting Service..."
    $returnCode = $service.delete().ReturnValue
    "Return code was : $returnCode"
    if ($returnCode -ne 0)
    $(throw "The deletion of the service failed: Return code was $returnCode")
    #Ensure the service was deleted successfully
    $service = Get-WmiObject -Class Win32_Service -Filter "Name='$ServiceName'"
    if ($service -ne $null)
    $(throw "The deletion of the service failed.")
    else
    $exitCode = 0
    The above code works in all cases that I've run it for. You can either edit the existing ManageWindowsServices script, or simply create a new one. I opted for the latter.
    Note: This is my first attempt at using Powershell, so there may well be a better way of doing the above.

  • MDM Server Window Service failed after adding server password

    After adding MDM server password, MDM server window service can't start up. We have to use clix command to start the server. Is there anyway to fix window service problem?

    Hi Jean,
    From the version number it sounds like you're using version 5.5 SP4, right? The Console application was significantly changed in SP5 and you would no longer see the locked server icon... If you unmount the server from the Console, and re-mount it, isn't there an option on the context menu for the tree (right-click on the server node) to provide the password? Did you try "Connect to Server" or "Start Server" on this context menu?
    Thanks... I don't know if I can help you with your problem, but I will try!
    -Cleopatra
    Message was edited by: Author - found the option on the context menu to provide the password to the server
            Cleopatra Von Ludwig
    Message was edited by:
            Cleopatra Von Ludwig

  • Application Restart and Recovery APIs doesn't work for windows services

    I am using the Application Restart and Recovery mechanism (provided in Windows API Code Pack for Microsoft.NET Framework) to collect some information (i.e. stack information when there's an unhandledexception)  before my windows service crash down.
    It works well for windows form applications, but the callback method wouldn't be called if the host is a windows service. 
    I have checked the article: https://msdn.microsoft.com/zh-cn/subscriptions/downloads/cc303708
    But it doesn't specify clearly whether it works for a windows service. It seems that the recovery will only be activated when the user interacts with the error dialog of Windows Error Reporting (clicking "close" on the dialog, for example).
    So I am wondering is my guess right that the Application Restart and Recovery mechanism doesn't work for windows services. Or is there a better way to meet my requirement? 

    I would suggest trying ARR if that's what you want to use.  The restart portion won't work, but it doesn't need to as if you fail out of your service, the Windows service controller will handle recovery (up to and including restarting your service).
     You configure those recovery actions either through code or one of the built in administrative tools for services such as services.msc.  
    DebugDiag/ADplus and similar tools ultimately do use built-in APIs; you don't need to add anything external to collect debugging information.  You do however have to write a good deal of code to do somethings.  It's pretty simple to use the unmanaged
    function that I pointed out before and
    MiniDumpWriteDump to write a minidump when you hit an unexpected error(the dbghelp.dll that comes installed with Windows has it so you don't need anything additional installed).  You can even write a basic debugger that literally debugs a process using
    only kernel32 functions (see
    https://msdn.microsoft.com/en-us/library/windows/desktop/ms679301(v=vs.85).aspx if you're interested).  
    WinSDK Support Team Blog: http://blogs.msdn.com/b/winsdk/

  • Permissions for Windows Service on Server

    Post Author: bdimon
    CA Forum: Authentication
    I wrote a Windows service running as an Active Directory user. It cannot print on the Windows Server so I wrote a windows application to test the permissions. When a user with local admin rights runs the test application, it prints. He starts the program using the "Run As" option and enters the Active Directory user from the service, he gets the same error as the Windows Service gets. This must be permissions-based.
    When I installed this Windows Service on a staging server, everything was fine. However the staging server was not "secured" by the network team so the Active Directory user had Read/Execute permissions on the C: drive. I do not want to ask for these permissions on the production server's C: drive.
    The error is:
    System.Exception: Load report failed. ---> System.Runtime.InteropServices.COMException (0x800002AD): Error in File UNKNOWN.RPT:
    The request could not be submitted for background processing.
       at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
       at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
       at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
       --- End of inner exception stack trace ---
       at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)
       at WindowsApplication1.frmTestServerPrint.PrintCrystalReport(String& ErrorText, String ReportFileName, String PrinterLocation, Int32 PayTransStatusCode)

    Post Author: jgreg311
    CA Forum: Authentication
    I believe I'm having a similar problem, and was hoping to see if either you have found an answer to the problem or reactivate this thread in hopes someone will finally answer us.I'm creating reports using a windows service as well.  The report files are compiled into the DLL, and they are being exported to save them to disk.   The error is being generated when the report object is first accessed (which happens to be when attempting to set the Text property on a TextObject).  It works fine on my development machine.  I've installed the service on the production server using a Visual Studio 2005 Setup and Deployment project.  I added the 2005 Crystal merge module to the setup, so all necessary files should exist on the server.  The service is running as a domain user that has admin rights on the local machine, but we're still getting this error that seems, according to posts I've found online, to be a permissions issue.Here is the exception in its entirety:
    Exception Type:
    System.Exception
    Exception Message:
    Load report failed.
    Exception Stack Trace:
    at
    CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
    at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String
    filename, OpenReportMethod openMethod, Int16 parentJob) at
    CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String
    reportName, OpenReportMethod openMethod, Int16 parentJob) at
    CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport()
    at
    CrystalDecisions.CrystalReports.Engine.ReportDocument.get_ReportDefinition()
    at ...
    Inner Exception:
    System.Runtime.InteropServices.COMException (0x800002AD): Error in File
    UNKNOWN.RPT: The request could not be submitted for background
    processing. at
    CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object&
    DocumentPath, Int32 Options) at
    CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object&
    DocumentPath, Int32 Options) at
    CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() Any help with this would be GREATLY appreciated.  Once again Crystal Reports are the only thing holding up an important project.

  • How to launch an application with elevated administrator account privilege from windows service even if the account has not yet logon

    Here is the case:
    OS environment: Windows 7
    There are two user accounts in my system, standard user "S" and administrator account "A", and there is a windows service running with "Local System" privilege.
    Now i logged-in with account "S", and i want to launch an application with elevated administrator account "A" from that service program, so here is the code snippet:
    int LaunchAppWithElevatedPrivilege (
    LPTSTR lpszUsername, // client to log on
    LPTSTR lpszDomain, // domain of client's account
    LPTSTR lpszPassword, // client's password
    LPTSTR lpCommandLine // command line to execute e.g. L"C:\\windows\\regedit.exe"
    DWORD dwExitCode = 0;
    HANDLE hToken = NULL;
    HANDLE hFullToken = NULL;
    HANDLE hPrimaryFullToken = NULL;
    HANDLE lsa = NULL;
    BOOL bResult = FALSE;
    LUID luid;
    MSV1_0_INTERACTIVE_PROFILE* profile = NULL;
    DWORD err;
    PTOKEN_GROUPS LocalGroups = NULL;
    DWORD dwLength = 0;
    DWORD dwSessionId = 0;
    LPVOID pEnv = NULL;
    DWORD dwCreationFlags = 0;
    PROCESS_INFORMATION pi = {0};
    STARTUPINFO si = {0};
    __try
    if (!LogonUser( lpszUsername,
    lpszDomain,
    lpszPassword,
    LOGON32_LOGON_INTERACTIVE,
    LOGON32_PROVIDER_DEFAULT,
    &hToken))
    LOG_FAILED(L"GetTokenInformation failed!");
    __leave;
    if( !GetTokenInformation(hToken, (TOKEN_INFORMATION_CLASS)19, (VOID*)&hFullToken,
    sizeof(HANDLE), &dwLength))
    LOG_FAILED(L"GetTokenInformation failed!");
    __leave;
    if(!DuplicateTokenEx(hFullToken, MAXIMUM_ALLOWED, NULL,
    SecurityIdentification, TokenPrimary, &hPrimaryFullToken))
    LOG_FAILED(L"DuplicateTokenEx failed!");
    __leave;
    DWORD dwSessionId = 0;
    WTS_SESSION_INFO* sessionInfo = NULL;
    DWORD ndSessionInfoCount;
    bResult = WTSEnumerateSessions(WTS_CURRENT_SERVER_HANDLE, 0, 1, &sessionInfo, &ndSessionInfoCount);
    if (!bResult)
    dwSessionId = WTSGetActiveConsoleSessionId();
    else
    for(unsigned int i=0; i<ndSessionInfoCount; i++)
    if( sessionInfo[i].State == WTSActive )
    dwSessionId = sessionInfo[i].SessionId;
    if(0 == dwSessionId)
    LOG_FAILED(L"Get active session id failed!");
    __leave;
    if(!SetTokenInformation(hPrimaryFullToken, TokenSessionId, &dwSessionId, sizeof(DWORD)))
    LOG_FAILED(L"SetTokenInformation failed!");
    __leave;
    if(CreateEnvironmentBlock(&pEnv, hPrimaryFullToken, FALSE))
    dwCreationFlags |= CREATE_UNICODE_ENVIRONMENT;
    else
    pEnv=NULL;
    if (! ImpersonateLoggedOnUser(hPrimaryFullToken) )
    LOG_FAILED(L"ImpersonateLoggedOnUser failed!");
    __leave;
    si.cb= sizeof(STARTUPINFO);
    si.lpDesktop = L"winsta0\\default";
    bResult = CreateProcessAsUser(
    hPrimaryFullToken, // client's access token
    NULL, // file to execute
    lpCommandLine, // command line
    NULL, // pointer to process SECURITY_ATTRIBUTES
    NULL, // pointer to thread SECURITY_ATTRIBUTES
    FALSE, // handles are not inheritable
    dwCreationFlags, // creation flags
    pEnv, // pointer to new environment block
    NULL, // name of current directory
    &si, // pointer to STARTUPINFO structure
    &pi // receives information about new process
    RevertToSelf();
    if (bResult && pi.hProcess != INVALID_HANDLE_VALUE)
    WaitForSingleObject(pi.hProcess, INFINITE);
    GetExitCodeProcess(pi.hProcess, &dwExitCode);
    else
    LOG_FAILED(L"CreateProcessAsUser failed!");
    __finally
    if (pi.hProcess != INVALID_HANDLE_VALUE)
    CloseHandle(pi.hProcess);
    if (pi.hThread != INVALID_HANDLE_VALUE)
    CloseHandle(pi.hThread);
    if(LocalGroups)
    LocalFree(LocalGroups);
    if(pEnv)
    DestroyEnvironmentBlock(pEnv);
    if(hToken)
    CloseHandle(hToken);
    if(hFullToken)
    CloseHandle(hFullToken);
    if(hPrimaryFullToken)
    CloseHandle(hPrimaryFullToken);
    return dwExitCode;
    I passed in username and password of account "A" to method "LaunchAppWithElevatedPrivilege", and also the application i want to launch, e.g. "C:\windows\regedit.exe", but when i run the service program, i found it do launch
    "regedit.exe" with elevated account "A", but the content of regedit.exe is pure back. screenshot as below:
    Can anyone help me on this?

    You code is not dealing with the DACL access to Winsta0\Default.  Only the LocalSystem account will have full access and the interactively logged on user which is why regedit is not displaying properly.  You'll need to grant access to your user. 
    You also need to deal with UAC since that code is going to give you a non-elevated token via LogonUser().  You need to get the full token via a call to GetTokenInformation() + TokenLinkedToken.
    thanks
    Frank K [MSFT]
    Follow us on Twitter, www.twitter.com/WindowsSDK.

  • Problems with Comodo Kill Switch, Windows Services & Bitlocker Encryption on Asus N56VZ

    Hi All,
    So recently I found myself stuck in a different scenario than before, and after many hours researching and efforts to fix this I still find myself stuck  yet with a few options still to fix.
    What is the problem?
    So as a security cautious user when i first got to Windows 8.1 Pro 64Bit I encrypted both the C and D drive (Split the main disk) to protect myself and my family. Unfortunately that has not been very helpful with the way in which booting and running from
    either external USB devices or CD/DVD works, not allowing myself to at all.
    My usual security suit I  use is Comodo Internet Security, which additionally comes with Comodo Kill Switch. Whilst using the application instead of stopping one of the TCP connections I was meant to I accidently stopped an Windows Explorer connection.
    For some reason since then Windows Explorer, nor most windows apps or services themselves will run. For example msconfig will run but sfc /scannow or mmc will not, whether in safe mode or normal mode.
    What Caused the Problem?
    Cannot 100% say
    What I Think Caused the Problem?
    Myself running Comodo Kill Switch stopping a vital server connection with Windows Explorer that messed up alot. Or a potential Virus unknown how cannot fully scan system as wont boot externally or run many apps.
    Additional Info
    Asus Webcam is Disabled on Purpose
    Laptop was fully customized to run latest games full graphics minus Anti Aliasing, works with Evolve + CoD Advanced Warfare
    Laptop does not boot if USB Keyboard plugged in, works with everything else normal (had this on other systems no problem for me)
    Ask me for more info if required to add here, braindead again
    Specifications of my system
    Intel® Core™ i7 3610QM Processor
    Windows 8.1 Pro 64Bit
    Intel® HM76 Chipset
    DDR3 1600 MHz SDRAM, 2 x SO-DIMM 8GB
    15.6" HD (1366x768)/Full HD (1920x1080)/Wide View Angle LED Backlight
    NVIDIA® GeForce® GT 650M with 2GB DDR3 VRAM
    1TB 5400RPM OR 750GB 5400/7200RPM (Cannot remember off top of head, braindead)
    Super-Multi DVD 
    Kensington lock (Security Feature)
    LoJack (Security Feature)
    BIOS Booting User Password Protection (Security Feature)
    HDD User Password Protection and Security (Security Feature)
    Pre-OS Authentication by programmable key code (Security Feature)
    What Can Run and Won't Run?
    ON BOOT:
    Bitlocker Encryption Password & Advanced Settings are accessible
    Bios (password protected) is accessible
    Windows Recovery Mode is accessible (Think it is F9 or F10)
    Windows Logon Password Screen is accessible
    ON NORMAL/SAFE-MODE START UP:
    After Log-In Windows Explorer will not run
    Task Manager will run, also allows me to browse the files when trying to start new task
    Can run Command prompt
    Cannot run any control panel items
    Cannot run services.msc
    Cannot run mmc
    Cannot run sfc
    Every time it metions windows drive is locked
    Start Error's when running certain applications (Will post codes soon)
    Rufus USB Tool does run
    Cannot boot Kali Linux off USB
    Cannot boot Windows 8.1 off USB
    Cannot boot Windows 8.1 off DVDRW
    Fixwin2 will not run
    Apps either work or don't whether in safe mode or normal
    Cannot use Windows Installer
    What Fixes I Have Tried So Far
    Ok so like any normal user I don't want to lose my files. So here are what I have tried so far:
    Repair MBR (Repair Completed, No Luck)
    SFC /SCANNOW (Returns Error 'Windows Resource Protection could not start the repair service')
    Tried sfc /SCANNOW /OFFBOOTDIR=c:\ /OFFWINDIR=c:\windows (Could not access drive)
    Fixwin2 (Will not run in either normal or safe mode)
    Booting using Windows 8.1 via USB (Cannot boot from extermal devices due to Bitlocker Encryption)
    Booting using Kali Linux Via DVD & USB (Cannot boot from external devices due to Bitlocker Encrytption)
    How do I know it is because of Bitlocker, because last time I disabled it, I could run from external devices
    Tried to run bitlocker to change settings (Will not run)
    Have used both password and recovery keys to unlock driver, they work but when applications are running on windows the drive is still locked?
    Tried windows Automatic Diagnostic and Repair (Could not repair anything, did make a log I am still to extract from the syste)
    There are No System Restore Points
    I'm sure there is much more information I could post however I will leave it on an ask to know basis, apart from the log files and further information to gather. Below is my list of trial and error fixes to try for today (need more ideas and help please!):
    Hiren's 15.2 Boot CD via DVD (NOT ABLE TO BOOT)
    Hiren's 15.2 Boot CD via USB (NOT ABLE TO BOOT)
    Research into the Bios and Possible Update in-case of implementation of Virus, can access flash utility (STILL NOT TESTED)
    Try and get a portable version or a working version of windows installer to try and re-install Comodo Internet Security (STILL NOT TESTED)
    Another way to disable Bitlocker
    Anti-Malware / Anti-Virus Scan If Possible to Run One
    Bitlocker Repair Tool, will try this also
    I have posted this as have not found much info online, usually find it and crack on but this time things are a little more tricky, my priority task I really need to do is remove the Bitlocker Encryption, but if the application will not run... what do I do
    then?
    Thanks for your time reading all, Sorry for any poor formatting or spelling.
    Update 1: MMC.exe Error Code
    Ok so now have the computer in safe mode, still same as before, no explorer.exe, no services etc... Just went into the Task Manager > Services (Tab) > Open Services (Option at bottom)
    This is the error I get:
    'The Instruction at 0x785a746c referenced memory at 0x000000a8. The memory could not be read.
    Any Ideas on what this error is and why?
    Update 2: CHKDSK Works with no Fix
    Update 3: Hiren's 15.2 Boot CD - USB Boot still no luck booting around Bitlocker Encryption
    Just to explain again, I already have unlocked the drive with correct bitlocker password or recovery key yet the drive remains locked not allowing windows refresh of files of complete install from the windows recovery menu as keeps saying drive is locked

    Ok so attempt number two to write this update via bloody phone! (Just refreshed page whilst writing!)
    Update 4:
    Problem - cannot run from bootable devices (DVD/USB)
    Cause - bitlocker fully encrypted drive stops this working
    Repair - Boot up holding F9 to enter windows recovery Input Bitlocker recovery keys to unlock drives
    Navigate to Command Prompt in advanced settings Execute following code:
    Repair-bde c: d: -rp 000111-222333-444555-etc...
    (Code found from https://technet.microsoft.com/en-us/library/ee523219%28v=ws.10%29.aspx)
    Note for those using this: It is common while unlocking certain drives to get errors such as: Quote from http://www.benjaminathawes.com/2013/03/17/resolving-partial-encryption-problems-with-bitlocker/
    "LOG INFO: 0x0000002aValid metadata at offset 8832512000 found at scan level
    1.LOG INFO: 0x0000002b Successfully created repair context.
    LOG ERROR: 0xc0000037 Failed to read sector at offset 9211592704.
    (0×00000017) LOG ERROR: 0xc0000037 Failed to read sector at offset 9211593216.
    (0×00000017) …followed by around 20 similar entries that differed only by the offset value"
    Repair Status for Update 4: COMPLETED - However over wrote D drive data so now need to recover that
    Problem 2 - windows services corrupted along with windows files
    Cause - Unknown
    Repair - wait until system is fully decrypted Once fully decrypted ensure boot from USB/DVD
    Re-do fixes that would not work before if this has fixed boot issue Confirm fix / update post Hope anything I put here helps others also

  • Printing Crystal Report to Printer from Windows Service

    Hello Support,
    We are currently using 13.0.3.612 version of Crystal report. We want to print the report to the printer from the windows service. For printing the report to the printer we are using the “PrintOutputController.PrintReport” method. At our end on the Windows 8 machine this method is giving following error:
    Message: Error HRESULT E_FAIL has been returned from a call to a COM component.
    StackTrace:    at CrystalDecisions.ReportAppServer.Controllers.PrintOutputControllerClass.PrintReport(PrintReportOptions options)
       at PMLWLibrary.CrystalReport.LoadReports()
    And on the Windows 7 machine the report is sent to the print spooler, however the report is not printed on the printer. Not sure what could be causing the issue. Can you please let us know what could be causing the issue.

    Hi Brian,
    Thank you for your response.
    We tried running the service under the domain user account as well which has access to the printer, but even this fails. Further, from the regular .net application when we try to print the report to the printer, it directly prints the report without displaying any print window. So I assume that even from the service no print window should be launched. Can you please confirm on this.
    We are attaching herewith the code snippet which we have used to print to printer through the service. Can you please review the same and let us know if we are missing something here.
    Dim printReportOptions As New CrystalDecisions.ReportAppServer.Controllers.PrintReportOptions
    Dim printOutputController As New CrystalDecisions.ReportAppServer.Controllers.PrintOutputController
    Dim rptClientDoc As CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument
    rptClientDoc = ReportDocument.ReportClientDocument
    printReportOptions.PrinterName = "\\pc2\HP LaserJet 1015"
    printReportOptions.JobTitle = [Enum].GetName(GetType(ReportNames), PrinterSetting)
    printReportOptions.Collated = False
    printReportOptions.AddPrinterPageRange(1, 1)
    rptClientDoc.PrintOutputController.PrintReport(printReportOptions)

  • Unable to start Admin Server as a windows service

    I installed Admin Server as a windows service and when I started it, I got the below errors. Do you have any ideas?
    I'm using SOA Suite 11.1.1.2.0 and WL 10.3.2 on Windows
    Thanks,
    [Mon Mar 15 11:16:19 2010] [initLog] initializing logger
    [Mon Mar 15 11:16:19 2010] [E] [initLog] No 'ROTATION_TYPE' header found. 'TIME' based rotation will be used by default.
    [Mon Mar 15 11:16:19 2010] [E] [initLog] No 'TIME_START_DATE' header found or value is invalid. Rotation will take place every 24 hours beginning today at 23:59:59
    [Mon Mar 15 11:16:19 2010] [E] [initLog] No 'TIME_INTERVAL_MINS' header found. Using the default value of 24 hours.
    [Mon Mar 15 11:16:19 2010] [I] [initLog] TIME based log rotation is ON
    [Mon Mar 15 11:16:19 2010] [I] [trigger] First rotation due in 45820 secs
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] console allocation successful. THREAD_DUMP redirection enabled
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] About to execute CreateThread()
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] lpszCmdLine = -jrockit -Xms128m -Xmx256m -Xverify:none -classpath "C:\ORACLE~1\MIDDLE~1\patch_wls1032\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORACLE~1\MIDDLE~1\JROCKI~1.5-3\lib\tools.jar;C:\ORACLE~1\MIDDLE~1\utils\config\10.3\config-launch.jar;C:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\ORACLE~1\MIDDLE~1\modules\features\weblogic.server.modules_10.3.2.0.jar;C:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\ORACLE~1\MIDDLE~1\modules\ORGAPA~1.0/lib/ant-all.jar;C:\ORACLE~1\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\ORACLE~1\MIDDLE~1\JROCKI~1.5-3\jre\lib\rt.jar;C:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;" -Dweblogic.Name=AdminServer -Dweblogic.management.username= -Dweblogic.ProductionModeEnabled= -Djava.security.policy="C:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy" weblogic.Server
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] lpszJavaHome = C:\ORACLE~1\MIDDLE~1\JROCKI~1.5-3
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] lpszExecDir = C:\Oracle11112\Middleware\user_projects\domains\soadev_domain
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] lpszOldPath = C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] lpszNewPath = C:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\native\win\32;C:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\bin;C:\ORACLE~1\MIDDLE~1\JROCKI~1.5-3\jre\bin;C:\ORACLE~1\MIDDLE~1\JROCKI~1.5-3\bin;C:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] lpszDelay = 0
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] lpszStopClass = []
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] lpszLog = [C:\Oracle11112\Middleware\user_projects\domains\soadev_domain\servers\AdminServer\logs\AdminServerSvc.log]
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] Thread created successfully
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] Reporting SCM of SERVICE_START_PENDING with delay=0
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] lpszHost = []
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] lpszPort = []
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] Reporting SCM of SERVICE_RUNNING
    [Mon Mar 15 11:16:19 2010] [I] [ServiceStart] waiting for multiple events
    [Mon Mar 15 11:16:19 2010] [I] [StartJVM] Parsing JVM Arguments
    [Mon Mar 15 11:16:19 2010] [I] [StartJVM] Initializing JVM
    [Mon Mar 15 11:16:20 2010] [I] [RunJavaApp] Loading class - weblogic.Server
    [Mon Mar 15 11:16:20 2010] [I] [RunJavaApp] Locating method "public static void main([]String)" in main class
    [Mon Mar 15 11:16:20 2010] [I] [RunJavaApp] Building arguments for main class
    [Mon Mar 15 11:16:20 2010] [I] [RunJavaApp] Invoking main class
    <Mar 15, 2010 11:16:22 AM PDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with BEA JRockit(R) Version R27.6.5-32_o-121899-1.6.0_14-20091001-2107-windows-ia32 from BEA Systems, Inc.>
    <Mar 15, 2010 11:16:23 AM PDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.2.0 Tue Oct 20 12:16:15 PDT 2009 1267925 >
    <Mar 15, 2010 11:16:27 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Mar 15, 2010 11:16:27 AM PDT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <Mar 15, 2010 11:16:27 AM PDT> <Notice> <LoggingService> <BEA-320400> <The log file C:\Oracle11112\Middleware\user_projects\domains\soadev_domain\servers\AdminServer\logs\AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <Mar 15, 2010 11:16:27 AM PDT> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Oracle11112\Middleware\user_projects\domains\soadev_domain\servers\AdminServer\logs\AdminServer.log00005. Log messages will continue to be logged in C:\Oracle11112\Middleware\user_projects\domains\soadev_domain\servers\AdminServer\logs\AdminServer.log.>
    <Mar 15, 2010 11:16:27 AM PDT> <Notice> <Log Management> <BEA-170019> <The server log file C:\Oracle11112\Middleware\user_projects\domains\soadev_domain\servers\AdminServer\logs\AdminServer.log is opened. All server side log events will be written to this file.>
    <Mar 15, 2010 11:16:34 AM PDT> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <Mar 15, 2010 11:16:41 AM PDT> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "JRF Startup Class", java.lang.ClassNotFoundException: oracle.jrf.wls.JRFStartup
    java.lang.ClassNotFoundException: oracle.jrf.wls.JRFStartup
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:41 AM PDT> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "JPS Startup Class", java.lang.ClassNotFoundException: oracle.security.jps.wls.JpsWlsStartupClass
    java.lang.ClassNotFoundException: oracle.security.jps.wls.JpsWlsStartupClass
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:41 AM PDT> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "ODL-Startup", java.lang.ClassNotFoundException: oracle.core.ojdl.weblogic.ODLConfiguration
    java.lang.ClassNotFoundException: oracle.core.ojdl.weblogic.ODLConfiguration
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:41 AM PDT> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "AWT Application Context Startup Class", java.lang.ClassNotFoundException: oracle.jrf.AppContextStartup
    java.lang.ClassNotFoundException: oracle.jrf.AppContextStartup
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:41 AM PDT> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "JMX Framework Startup Class", java.lang.ClassNotFoundException: oracle.as.jmx.framework.wls.spi.StartupListener
    java.lang.ClassNotFoundException: oracle.as.jmx.framework.wls.spi.StartupListener
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:41 AM PDT> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "JOC-Startup", java.lang.ClassNotFoundException: oracle.ias.cache.Startup
    java.lang.ClassNotFoundException: oracle.ias.cache.Startup
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:41 AM PDT> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "DMS-Startup", java.lang.ClassNotFoundException: oracle.dms.wls.DMSStartup
    java.lang.ClassNotFoundException: oracle.dms.wls.DMSStartup
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:43 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <Mar 15, 2010 11:16:43 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Mar 15, 2010 11:16:47 AM PDT> <Error> <HTTP> <BEA-101371> <There was a failure when processing annotations for application C:\Oracle11112\Middleware\user_projects\domains\soadev_domain\servers\AdminServer\tmp\_WL_user\FMW Welcome Page Application_11.1.0.0.0\cb7uge\fmw-welcome.war. Please make sure that the annotations are valid. The error is oracle.dms.wls.DMSServletFilter>
    <Mar 15, 2010 11:16:47 AM PDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'FMW Welcome Page Application [Version=11.1.0.0.0]' due to error weblogic.application.ModuleException: Failed to load webapp: '/'.
    weblogic.application.ModuleException: Failed to load webapp: '/'
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:378)
         at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:391)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassNotFoundException: oracle.dms.wls.DMSServletFilter
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:296)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         Truncated. see log file for complete stacktrace
    >
    When processing WebService module 'wsil.war'. Failed to load servlet Class: oracle.j2ee.ws.server.wsil.WSILServlet
    Ignoring: unable to load class:java.lang.ClassNotFoundException: oracle.j2ee.ws.server.wsil.WSILServlet at: weblogic.xml.schema.binding.util.ClassUtil.loadClass(ClassUtil.java:76)
    When processing WebService module 'wsil.war'. Failed to load servlet Class: oracle.j2ee.ws.server.wsil.WSILServlet
    Ignoring: unable to load class:java.lang.ClassNotFoundException: oracle.j2ee.ws.server.wsil.WSILServlet at: weblogic.xml.schema.binding.util.ClassUtil.loadClass(ClassUtil.java:76)
    <Mar 15, 2010 11:16:47 AM PDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'em' due to error weblogic.management.DeploymentException: .
    weblogic.management.DeploymentException:
         at weblogic.application.internal.flow.BaseLifecycleFlow$CreateListenerAction.run(BaseLifecycleFlow.java:176)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.application.internal.flow.BaseLifecycleFlow$BaseAction.invoke(BaseLifecycleFlow.java:104)
         at weblogic.application.internal.flow.HeadLifecycleFlow.createListener(HeadLifecycleFlow.java:117)
         Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassNotFoundException: oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at weblogic.application.internal.flow.BaseLifecycleFlow$CreateListenerAction.run(BaseLifecycleFlow.java:140)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:47 AM PDT> <Error> <HTTP> <BEA-101165> <Could not load user defined filter in web.xml: ServletContext@11450347[app:DMS Application module:dms.war path:/dms spec-version:2.5 version:11.1.1.1.0] oracle.dms.wls.DMSServletFilter.
    java.lang.ClassNotFoundException: oracle.dms.wls.DMSServletFilter
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:296)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:47 AM PDT> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'DMS Application [Version=11.1.1.1.0]'.
    weblogic.application.ModuleException:
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1399)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
         Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassNotFoundException: oracle.dms.wls.DMSServletFilter
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:296)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:47 AM PDT> <Error> <HTTP> <BEA-101165> <Could not load user defined filter in web.xml: ServletContext@12124116[app:wsil-wls module:/inspection.wsil path:/inspection.wsil spec-version:2.5] oracle.dms.wls.DMSServletFilter.
    java.lang.ClassNotFoundException: oracle.dms.wls.DMSServletFilter
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:296)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:47 AM PDT> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'wsil-wls'.
    weblogic.application.ModuleException:
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1399)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
         Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassNotFoundException: oracle.dms.wls.DMSServletFilter
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:296)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:48 AM PDT> <Notice> <LoggingService> <BEA-320400> <The log file C:\Oracle11112\Middleware\user_projects\domains\soadev_domain\servers\AdminServer\logs\soadev_domain.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <Mar 15, 2010 11:16:48 AM PDT> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Oracle11112\Middleware\user_projects\domains\soadev_domain\servers\AdminServer\logs\soadev_domain.log00004. Log messages will continue to be logged in C:\Oracle11112\Middleware\user_projects\domains\soadev_domain\servers\AdminServer\logs\soadev_domain.log.>
    <Mar 15, 2010 11:16:48 AM PDT> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <Mar 15, 2010 11:16:48 AM PDT> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "Audit Loader Startup Class", java.lang.ClassNotFoundException: oracle.security.audit.ajl.loader.JEEAuditLoader
    java.lang.ClassNotFoundException: oracle.security.audit.ajl.loader.JEEAuditLoader
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205)
         Truncated. see log file for complete stacktrace
    >
    <Mar 15, 2010 11:16:48 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <Mar 15, 2010 11:16:48 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <Mar 15, 2010 11:16:48 AM PDT> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on fe80:0:0:0:0:5efe:a01:1b5:7001 for protocols iiop, t3, ldap, snmp, http.>
    <Mar 15, 2010 11:16:48 AM PDT> <Notice> <Server> <BEA-002613> <Channel "Default[3]" is now listening on fe80:0:0:0:0:100:7f:fffe:7001 for protocols iiop, t3, ldap, snmp, http.>
    <Mar 15, 2010 11:16:48 AM PDT> <Notice> <Server> <BEA-002613> <Channel "Default[5]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
    <Mar 15, 2010 11:16:48 AM PDT> <Notice> <Server> <BEA-002613> <Channel "Default[4]" is now listening on 0:0:0:0:0:0:0:1:7001 for protocols iiop, t3, ldap, snmp, http.>
    <Mar 15, 2010 11:16:48 AM PDT> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on fe80:0:0:0:4b5:ea73:59f2:2e1a:7001 for protocols iiop, t3, ldap, snmp, http.>
    <Mar 15, 2010 11:16:48 AM PDT> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.1.1.181:7001 for protocols iiop, t3, ldap, snmp, http.>
    <Mar 15, 2010 11:16:48 AM PDT> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "AdminServer" for domain "soadev_domain" running in Development Mode>
    <Mar 15, 2010 11:16:48 AM PDT> <Warning> <Server> <BEA-002611> <Hostname "mycomputer.abc.com", maps to multiple IP addresses: 10.1.1.100, bf80:0:0:0:3gr:kdab:43f3:2e1a%10>
    <Mar 15, 2010 11:16:49 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <Mar 15, 2010 11:16:49 AM PDT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

    Hi,
    If you see your logs, you server has actually started in "RUNNING" mode. Its only throwing lot of "ClassNotFoundException" because I guess they classes are not available in classpaths. If you know the "jar" which contains which are being complained, copy the jar files to "DOMAIN_HOME/lib" which is simple way to add jars to classpath.
    <Mar 15, 2010 11:16:49 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <Mar 15, 2010 11:16:49 AM PDT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    Thanks.
    Vijay Bheemineni.

Maybe you are looking for