Problem accessing EJB's in KM Scheduler Task

Hi,
I have created a new SchedulerTask which implements com.sapportals.wcm.service.scheduler.ISchedulerTask.
In the run method of the SchedulerTask, I was trying to access the Session bean as below
     try {
          Context initial = new InitialContext();
          Object objref = initial.lookup("JNDI Name Of the Session Bean");
          Object obj = PortableRemoteObject.narrow(objref, BeanHome.class);
     } catch (NamingException ex) {
          ex.printStackTrace();          
     } catch (Exception ex) {
          ex.printStackTrace();          
When the task is executed, initial lookup is returning 915(I have tried to log the objref above to console and it prints 915) which is resulting in classcast exception while narrowing.
But, When I placed the same code in a Portal Component, it works fine.
Portal component and SchedulerTask are in the same portal application project, which mean that all configurations are same.
I have been struggling very hard to figure out this indifferent behavior.
Any hints or help would be greatly appreciated.
Thanks and Regards,
Suresh.

Hi,
Try some thing like this:
ClassLoader originalContextClassLoader = Thread.currentThread().getContextClassLoader();                                   
try {
          Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
          Context initial = new InitialContext();
          Object objref = initial.lookup("JNDI Name Of the Session Bean");
          Object obj = PortableRemoteObject.narrow(objref, BeanHome.class);
     } catch (NamingException ex) {
          ex.printStackTrace();          
     } catch (Exception ex) {
          ex.printStackTrace();          
     finally {
     Thread.currentThread().setContextClassLoader(originalContextClassLoader);
Regards,
Praveen Gudapati

Similar Messages

  • Problem accessing ejb from servlet

    Hi,
    I'm aving a problem accessing a stateful session bean from a servlet. I'm using a jndi lookup to do it because I need that a client has its own bean reference...
    My code into the service method is:
    InitialContext ctx;
    try {
    ctx = new InitialContext();
    carrelloService = (CarrelloLocal)ctx.lookup("java:comp/env/ejb/Carrello");
    and I have a reference to EJB into web.xml:
    <ejb-local-ref>
    <ejb-ref-name>ejb/Carrello</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home></local-home>
    <local>carrello.model.CarrelloLocal</local>
    </ejb-local-ref>
    If I use @EJB annotation to inject the servlet, it works fine.
    Instead using jndi lookup throws a NamingException because it doesn't find java:comp/env/ejb/Carrello entry.
    Any idea about the problem?

    Here's something simple that I have that works:
    <p> </p>
    SimpleBean
    <p> </p>
    @Stateless(name="SimpleBean")
    public class SimpleBeanBean implements SimpleBeanLocal {
    <p> </p>
    web.xml; -- note I use a whacko ejb-ref-name just to make it obvious where I'm using it.
    <p> </p>
        <ejb-local-ref>
            <ejb-ref-name>ejb_mapping_doodad/SimpleBean</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            <local>sab.otn681398.ejb.SimpleBeanLocal</local>
        </ejb-local-ref><p> </p>
    servlet:
    <p> </p>
    package sab.otn681398.web;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import sab.otn681398.ejb.SimpleBeanLocal;
    public class TestServlet extends HttpServlet  {
        private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
        private static final String SIMPLE_BEAN_JNDI = "ejb_mapping_doodad/ASimpleBean";
        private final boolean USEENC = true;
        private SimpleBeanLocal simple = null;
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response) throws ServletException, IOException {
            response.setContentType(CONTENT_TYPE);
            PrintWriter out = response.getWriter();
             try {
                if(simple==null) {
                    simple = createSimple();
            } catch(NamingException ne) {
                throw new ServletException("Error in looking up the EJB", ne);
            out.println("<html>");
            out.println("<head><title>TestServlet</title></head>");
            out.println("<body>");
            out.printf("&lt;p&gt;The %s bean has been hit: %s times&lt;/p&gt;", simple, simple.getHitCount());
            out.println("</body></html>");
            out.close();
        private SimpleBeanLocal createSimple() throws NamingException {
          return (USEENC==true? createSimpleViaENC(): createSimpleViaName());
        private SimpleBeanLocal createSimpleViaENC() throws NamingException {
            InitialContext ic = new InitialContext();
            SimpleBeanLocal simple = (SimpleBeanLocal)ic.lookup("java:comp/env/" + SIMPLE_BEAN_JNDI);
            return simple;
        private SimpleBeanLocal createSimpleViaName() throws NamingException {
            InitialContext ic = new InitialContext();
            SimpleBeanLocal simple = (SimpleBeanLocal)ic.lookup(SIMPLE_BEAN_JNDI);
            return simple;
    }<p> </p>
    -steve-

  • Problem running AD Organization Lookup Recon scheduled task

    Hey all,
    I'm getting errors thrown in JBoss when trying to run the AD org lookup recon scheduled task.
    Running OIM 9.1.0.1 with the latest AD connector.
    here is the error JBoss is throwing...
    2009-10-21 16:00:01,399 DEBUG [OIMCP.ADCS] com.thortech.xl.integration.ActiveDirectory.tcADUtilLDAPController : connectToAvailableAD:: FINISHED
    2009-10-21 16:00:01,399 DEBUG [OIMCP.ADCS] com.thortech.xl.integration.ActiveDirectory.tcADUtilLDAPController : disconnect:: STARTED
    2009-10-21 16:00:01,414 DEBUG [OIMCP.ADCS] com.thortech.xl.integration.ActiveDirectory.tcADUtilLDAPController : disconnect:: FINISHED
    2009-10-21 16:00:01,430 ERROR [STDERR] Exception in thread "DefaultQuartzScheduler_Worker-7"
    2009-10-21 16:00:01,461 ERROR [STDERR] java.lang.NoClassDefFoundError: com/sun/jndi/ldap/ctl/PagedResultsControl
    2009-10-21 16:00:01,461 ERROR [STDERR]      at com.thortech.xl.integration.ActiveDirectory.tcADUtilLDAPController.searchResultPageEnum(Unknown Source)
    2009-10-21 16:00:01,461 ERROR [STDERR]      at com.thortech.xl.schedule.tasks.ADLookupReconTask.performReconciliation(Unknown Source)
    2009-10-21 16:00:01,461 ERROR [STDERR]      at com.thortech.xl.schedule.tasks.ADLookupReconTask.execute(Unknown Source)
    2009-10-21 16:00:01,461 ERROR [STDERR]      at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.run(Unknown Source)
    2009-10-21 16:00:01,477 ERROR [STDERR]      at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionAction.run(Unknown Source)
    2009-10-21 16:00:01,477 ERROR [STDERR]      at Thor.API.Security.LoginHandler.jbossLoginSession.runAs(Unknown Source)
    2009-10-21 16:00:01,477 ERROR [STDERR]      at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown Source)
    2009-10-21 16:00:01,477 ERROR [STDERR]      at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
    2009-10-21 16:00:01,493 ERROR [STDERR]      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
    2009-10-21 16:00:01,493 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: ADP ClassLoader failed to load: com.sun.jndi.ldap.ctl.PagedResultsControl
    2009-10-21 16:00:01,493 ERROR [STDERR]      at com.thortech.xl.dataobj.tcADPClassLoader.findClass(Unknown Source)
    2009-10-21 16:00:01,493 ERROR [STDERR]      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    2009-10-21 16:00:01,508 ERROR [STDERR]      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    2009-10-21 16:00:01,508 ERROR [STDERR]      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    2009-10-21 16:00:01,508 ERROR [STDERR]      ... 9 more
    I believe I have my AD connector configured properly.
    My domain is dc=test-oim,dc=local
    Any help would be greatly appreciated.
    Thanks in Advance.
    -Bryan

    You might have to add ldapbp.jar in the class path. either place it in jdk lib or oim ext lib directory.
    Hope this helps,
    Saggu

  • Problems accessing ejb 3.0 entity bean from project

    I have written some code using ejb 3.0 and was previously accessing the entity bean without problem when both ejbs and the accessing code were in the same project. However I have moved the accessing code into a different project within the same application and now when the code tries to accessing the entity bean I get the following error:
    com.colwilson.web.ingestion.IdentifiedException: java.lang.ClassCastException: __Proxy3
         at com.colwilson.web.ingestion.IngestionHandler.recordArrived(IngestionHandler.java:140)
         at com.colwilson.web.ingestion.IngestionHandler.main(IngestionHandler.java:52)
    Caused by: java.lang.ClassCastException: __Proxy3
         at com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.getFreshObject(StatelessSessionRemoteInvocationHandler.java:21)
         at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.getReplacementObject(RecoverableRemoteInvocationHandler.java:64)
         at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.handleRecovery(RecoverableRemoteInvocationHandler.java:41)
         at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:30)
         at com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(StatelessSessionRemoteInvocationHandler.java:43)
         at __Proxy1.mergeEntity(Unknown Source)
         at com.colwilson.web.ingestion.IngestionHandler.recordArrived(IngestionHandler.java:137)
         ... 1 more
    Now, of course I could move the code back into the same project, but as I understand it that is just the point of ejbs. I'm looking up the entity bean thus:
    final Context context = InitialContext();
    ingestionSessionEJB =
    (IngestionSessionEJB)context.lookup("IngestionSessionEJB");
    It may be true that I don't understand the way lookup works, but to be honest I can't find the docs that explain what I've got wrong.
    Please help.

    hi
    Double Click on the project which is goin to use the project which contains bean from the Application Navigator window. The project properties window will open. Choose the "Dependencies" item from left panel. click on the radio "User Project Settings" and select another project which contain ejb which you're goin to access...
    Best Of Luck
    Ravi A. Trivedi

  • Problems Accessing EJB from Client

    Hello All,
    I have deployed my first EJB in my JBoss App server and thats fine. However when I try and run the simple client that I have written to access this I get the following error:
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    I have tried Debugging the app and cant understand where/why this error is occurring? Any ideas and suggestions would be appreciated...The code I am using in the client is below:
    Context c = new InitialContext();
          Object o = c.lookup("HelloWorldEJB");
          HelloWorldHome hw = (HelloWorldHome)PortableRemoteObject.narrow (o, HelloWorldHome.class);
          HelloWorld hello = hw.create();
          System.out.println ("Result is: " + hello.hello());
          hello.remove();

    Hi!
    I do not know if you have got the solution for your problem....
    I am also struggling around with similar issue
    Here is how i tried
    Properties prop = System.getProperties();
    prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
    prop.put(Context.PROVIDER_URL, "localhost");
    prop.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" );
    Context ctx = new InitialContext(prop);
    System.out.println("looking up ejb");
    Object obj = ctx.lookup("ejb/test");
    DO NOT forget to put jbossall-client.jar and jnpserver.jar in your classpath .
    This way at least you get the solution of the problem you are facing now.....
    Good Luck
    Alok

  • Problems accessing EJB

    Hello everybody
    i wrote a CMP EJB using the JDeveloper 3.2. I could deploy everything without any problems. No i tried to get the bean's home interface within my client and i get always the error:
    javax.naming.NamingException: Unknown reasons. Root exception is org.omg.CORBA.UNKNOWN: minor code: 16 completed: Maybe
    the stack trace is:
    java.lang.Object oracle.aurora.jndi.sess_iiop.SessionCtx.activateObject(oracle.aurora.AuroraServices.PublishedObject)
    java.lang.Object oracle.aurora.jndi.sess_iiop.ServiceCtx.lookup(javax.naming.Name)
    java.lang.Object oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.lookup(javax.naming.Name)
    java.lang.Object oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.lookup(java.lang.String)
    java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
    void Client.Client.main(java.lang.String[])
    does anybody now something about this problem??
    please help me...

    OK! Fixed that one myself - for now. I had used some wrong jar:s in my libraries.
    There are still some problems.
    If I use JDK 1.1.8, I get the following trace when trying to run my client:
    java.lang.NoSuchMethodError: java.lang.System: method setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; not found
    at
    at javax.naming.spi.NamingManager.getDefaultInitialContextFactory(NamingManager.java:696)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:744)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:181)
    at javax.naming.InitialContext.<init>(InitialContext.java:158)
    at test.BCEJBClient.main(BCEJBClient.java:32)
    The problem goes away if I instead use JDK 1.2.2. But in the project I'm working on we are usng JDK 1.1.8. How can this problem be solved?

  • Problem accessing EJB located on remote application server

    Hi there,
    I am working on a project where I need to use a remote EJB in my project....
    I am able to do it but having a problem after that....
    The problem is that for the first time when I get a remote object using JNDI lookup and call a function of the object, it works well....
    But, next time when I try to get the same remote object and call the same function again, I get the following exception...
    The following exception was logged java.lang.NullPointerException
    at com.ibm.ISecurityLocalObjectBaseL13Impl.CSICredentialsManager.getClientSubject(CSICredentialsManager.java:389)
    at com.ibm.ISecurityLocalObjectBaseL13Impl.CSIClientRI$2.run(CSIClientRI.java:454)
    at java.security.AccessController.doPrivileged1(Native Method)
    at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
    at com.ibm.ISecurityLocalObjectBaseL13Impl.CSIClientRI.send_request(CSIClientRI.java:450)
    at com.ibm.rmi.pi.InterceptorManager.iterateSendRequest(InterceptorManager.java:404)
    at com.ibm.rmi.iiop.ClientRequestImpl.<init>(ClientRequestImpl.java:136)
    at com.ibm.rmi.iiop.GIOPImpl.createRequest(GIOPImpl.java:141)
    at com.ibm.rmi.iiop.GIOPImpl.createRequest(GIOPImpl.java:97)
    at com.ibm.rmi.corba.ClientDelegate._createRequest(ClientDelegate.java:1854)
    at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1132)
    at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1285)
    at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1065)
    at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1251)
    at com.ibm.rmi.corba.ClientDelegate.request(ClientDelegate.java:1731)
    at com.ibm.CORBA.iiop.ClientDelegate.request(ClientDelegate.java:1207)
    at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:460)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1171)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:676)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:203)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:300)
    at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:246)
    at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:458)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:936)
    I do get the object reference without any issue but on calling the function, I get the exception mentioned above.
    I tried to lookup on the internet if anyone else has the same problem but no luck...
    Appreciate any help!!!
    Thanks in advance...

    Hi!
    I have the same problem, but i never runs ok, the first time that I get a remote object i have these exception... java.lang.NullPointerException.
    I send you my client app code.
    The exception appears when execute the .create method.
    Can you send me your code?
    Good luck
    Mike
    [email protected]
    ==============================000
    package estacion;
    import servidor.InteresesRemote;
    import servidor.InteresesRemoteHome;
    import java.util.Properties;
    import javax.rmi.PortableRemoteObject;
    import javax.naming.*;
    public class Main {
    /** Creates a new instance of Main */
    public Main() {
    public static void main(String[] args) {
    // TODO code application logic here
    Properties env = new Properties();
    // Definir las propiededas y ubicaci�n de b�squeda de Nombres
    JNDI.
    env.setProperty("java.naming.factory.initial",
    "com.sun.jndi.cosnaming.CNCtxFactory");
    env.setProperty("java.naming.provider.url",
    "iiop://localhost:3700");
    try
    // Traer el Contexto de Nombre
    InitialContext jndiContext = new InitialContext(env);
    System.out.println("Contexto Disponible");
    // Traer la Referencia del EJB
    Object ref = jndiContext.lookup("ejb/InteresesBean");
    System.out.println("Se encontr� Referencia del EJB!");
    // Traer la referencia del "Home Interface "
    InteresesRemoteHome home = (InteresesRemoteHome)
    PortableRemoteObject.narrow (ref, InteresesRemoteHome.class);
    // Crear un Objeto a partir del "Home Interface"
    InteresesRemote interes = home.create();
    // Llamar la funci�n
    System.out.println("Inter�s de 10,000 Capital, a tasa 10%,
    bajo 2 plazos anuales:");
    System.out.println(interes.calcularInteres(10000, 0.10, 2));
    catch(Exception e)
    System.out.println(e.toString());
    Run Trace:
    ====================================================
    Contexto Disponible
    Se encontr� Referencia del EJB!
    java.lang.NullPointerException

  • Cannot create scheduled task, access denied

    Windows Server 2003 R2
    I am logged in as a local administrator and cannot create a scheduled task:
    [Task Scheduler]
    The new task could not be created.
    The specific error is:
    0x80070005: Access is denied.
    Try using the Task page Browse button to locate the application.
    [OK]
    My research lead me to look look in the Group Policy Object Editor for:
    Windows Settings > Security Settings > File System > %SystemRoot%\Tasks
    On this machine, there is no "File System" folder. In the MSDN Library, I find:
    "The File System folder is available only in Group Policy objects associated with domains, OUs, and sites. The File System folder does not appear in the Local Computer Policy object."
    Any ideas?

    found this information, problem solved...
    Problem Description:
    ===================
    When trying to create a new scheduled task, error occurred "The new task could not be created." "0x80070005: Access is denied. Try using the Task page Browse button to locate the application."
    Cause:
    ===================
    The Administrators group lack permission on the C:\WINDOWS\Tasks folder.
    Resolution:
    ===================
    Start - Run - CMD - C:/windows - CACLS TASKS /E /G builtin\administrators:F
    The steps above grant Administrators group full control permission to the C:\WINDOWS\Tasks folder.
    Again, thank you for posting in the SBS newsgroups. Please feel free to contact us again in the future.
    Best regards,
    Robbin Meng(MSFT)
    Microsoft Online Newsgroup Support

  • Reference for Connecting EJB in KM scheduler Task

    Hi,
           What are the main References we need to add portalapp.xml,when we connect Ejb in Km scheduler Tasks
    For Example:
    portalapp.xml
    <?xml version="1.0" encoding="UTF-8"?>
      <application >
        <application-config>
        <property name="SharingReference" value="usermanagement, knowledgemanagement,landscape,       htmlb, exportalJCOclient, exportal, com.sap.portal.admin.wizardframework"/>  </application-config>
      <components/>
      <services>
        <service name="RFServiceWrapper">
          <service-config>
            <property name="className" value="com.sap.netweaver.rf.wrapper.RFServiceWrapper"/>
            <property name="startup" value="true"/>
          </service-config>
        </service>
      </services>
    </application>
    Regards,
    Vino

    Hi,
    Try some thing like this:
    ClassLoader originalContextClassLoader = Thread.currentThread().getContextClassLoader();                                   
    try {
              Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
              Context initial = new InitialContext();
              Object objref = initial.lookup("JNDI Name Of the Session Bean");
              Object obj = PortableRemoteObject.narrow(objref, BeanHome.class);
         } catch (NamingException ex) {
              ex.printStackTrace();          
         } catch (Exception ex) {
              ex.printStackTrace();          
         finally {
         Thread.currentThread().setContextClassLoader(originalContextClassLoader);
    Regards,
    Praveen Gudapati

  • CcmEval Scheduled task not being created with "Access Denied" error 0x80070005 only on XP machines

    Before coming on here I checked out http://social.technet.microsoft.com/Forums/en-US/ddbfe6c3-ee54-4b2a-a3a7-a6515d974f76/client-check-failed-on-xpserver-2003-systems-onlyccmeval-is-not-being-scheduled?forum=configmanagerdeployment (GPO
    to allow scheduled tasks by users) and another thread about a hotfix that seems to be pre-XP SP3 and pre-CM 2012 R2.
    That said, I'm having an issue many seem to have, but I can't find the answer. From what I understand SCCM uses the user context to create the CcmEval task, but in XP users cannot set a task to run as any other user (ie SYSTEM in this instance) so what is
    the workaround? I can't just give users Administrator permissions to install the client.
    The exact log entries are:
    <![LOG[Client evaluation task doesn't exist.]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="2" thread="4356" file="ccmevalcheck.cpp:705">
    <![LOG[Client evaluation task is not found or is disabled or is not compliant, perform remediation]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="2"
    thread="4356" file="ccmevalcheck.cpp:341">
    <![LOG[Attempting to recreate client evaluation task.]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="1" thread="4356" file="ccmevalcheck.cpp:833">
    <![LOG[Task scheduler 2.0 is not supported, peform task registration with 1.0 API.]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="1" thread="4356"
    file="ccmevaltask.cpp:345">
    <![LOG[Failed to delete task Configuration Manager Health Evaluation (0x80070002).]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="2" thread="4356"
    file="ccmevaltask.cpp:379">
    <![LOG[Failed to create task item (0x80070005).]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="3" thread="4356" file="ccmevaltask.cpp:387">
    <![LOG[Failed to create client evaluation task.]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="2" thread="4356" file="ccmevalcheck.cpp:850">
    The bolded section is what's telling me it's Access Denied, and manual creation of any program task set to run as SYSTEM tells me the same- users cannot do this; only admins can.
    What can I do?

    So after sifting through some RSOP results and GPO objects I found a policy that wasn't necessarily prohibiting creation of them. (Not where you think it would be - under
    Administrative Templates > Windows Components > Task Scheduler > "Prohibit New Task Creation" -
    this was set to allow them) but this one I found was a File Permissions policy that set SYSTEM permissions to READ and EXECUTE.
    I've changed this to FULL CONTROL for SYSTEM. I'm unable to get on the machines to examine everything closely, but from what I can see at least one of them has remediated themselves and now has a successful client check in the console. Hopefully the rest
    of them will come around as GP updates itself and the client does an evaluation to remediate the Scheduled Task.
    Hopefully this helps someone in the future as well.

  • Server 2008 and MS Access 2007 Scheduled Task

    I have a Server 2008 with MS Access 2007 installed.
    I created a task that is designed to lanuch Access, open a designated database, and run a macro. The macro calls a function within the database that generates a series of reports in PDF format for use in a web app.  The task was created to
    run a local user, with credentials stored.  This whole process has been running fine for many months.  A recent group policy change has caused this to now stop.
    The GP now states that user credentials can no longer be stored.  I changed the task so that it is to run as SYSTEM but this is not working either.  It seems access is launching as SYSTEM, I can see this in the task manager, but it does not seem
    to open my database since no .ldb is being created.  I also added logging code to my function and nothing ever gets in there.  I think the issue is that there is no profile for SYSTEM, so when access starts running it's looking to build a profile
    for that user.
    Does anyone know how I can make this work?

    Hi Scott,
    Based on my research, the functionality of storing password for some Group Policy Preferences is being removed because the password was stored insecurely.
    Especially for Scheduled Tasks and Data Sources, we will be unable to achieve the same goals that were available through the non-secure functionality of Group Policy Preferences passwords.
    As a workaround, scheduled tasks still can run in the context of the local service. 
    More information for you:
    MS14-025: Vulnerability in Group Policy Preferences could allow elevation of privilege: May 13, 2014
    http://support.microsoft.com/kb/2962486/en-us
    Best Regards,
    Amy

  • Scheduled Tasks problem after midnight

    I am running CFMX 7.0.2 and am experiencing an issue where
    scheduled tasks run correctly until roughly midnight. After
    midnight they cease to run. In the logs I can see that the task is
    being incorrectly rescheduled for a later time. Instead of being
    rescheduled for 1 minute and 1 second later, it will be rescheduled
    for much longer - typically about 24 hours later. Any ideas what I
    can do to narrow down the cause of this problem?

    I've since discovered that this problem does not occur when
    the task is scheduled to run at 12 AM. Otherwise, after the task
    runs post-midnight, it reschedules itself for its next daily run at
    whatever time it was scheduled for.
    Is it possible to have a scheduled task that will kick off at
    10PM and then run every 1 minute and 1 second later until it is
    stopped, even if that means continuing through the next day?

  • Scheduled Task to run as Local System cannot access the Netlogon Share in Windows 8.1

    I've created a Scheduled Task that is setup to run as the local System Account which uses cscript.exe to execute a VBScript residing on the Domain Netlogon Share. It works perfectly on Windows 7, but fails miserably on Windows 8.1. When I open a command
    prompt as the System account and try to run the script from the Netlogon share manually, I get the following error:
    CScript Error: Loading script \\<FullyQualifiedomainName>\Netlogon\xyz.vbs failed (The account used is a computer account. Use your global user account or local user account to access this server. ).
    Is there something different I need to set in Windows 8 to get this to run?
    Thank you!!
    Eric Myers

    Hi Eric,
    What's the result of Arnav's question?
    How did you set it? Please set it as the following steps:
    1.Go to Start > Administrative Tools > Task Scheduler
    2.In the Task Scheduler window double click your task, and on the "General" tab, under "Security options" section,  click the "Change User or Group" button.
    4.Make sure "From this location" is set to the local machine name (to change click "Locations" button and select the local computer name)
    5.Type "SYSTEM" in the text box and press ok . Under "When running the task, use the following user account:" you should see "NT AUTHORITY\SYSTEM".
    Karen Hu
    TechNet Community Support

  • Coldfusion Scheduled Tasks Problem

    Hello--
    I am experiencing a strange problem. In a product that my office has created, we make use of Scheduled Tasks in Coldfusion. All of our clients are working just fine with the exception of one. There are several Tasks that all should behave the same way. The task starts, it writes to a log file that it is starting, it processes what it needs to process, it writes to the log file that it is done.
    Here is the problem we are having:
    Scheduled task is scheduled to run at 3:00am daily. Task will run the first time through without any problems, and sometimes will run a second time without any problems. But, normally, the second time the task starts, the log file we have generated is not updated at all. The timestamp stays the same, so no action has been done to the file. Further, the Task doesn't do any of the process it should. In addition, the JRun process hangs, taking up 99%-100% of CPU and stays that way until the server is restarted. The Coldfusion scheduler.log says that the task has executed. Nothing else is recorded in any of the other Coldfusion logs.
    This is a problem that has been reoccurring consistently for the past month with all scheduled tasks. I have spent hours on the phone with the client to debug the issue. All of the Coldfusion settings match between their environment and ours. The server setup is similar to our own server. Server is a VM with 2x3.3GHz processors and 2GB of RAM.
    Does anyone have any ideas, suggestions, or help? At this point, I'm at a complete and total loss and any help would be much appreciated...

    Well that's all good news, in a way.
    OK, so in the test environment stop CF, blitz all the CF and JRun logs, start it, run the script via a browser, run it again.  Inspect logs.
    I can't believe nothing goes into the logs.
    And do you have a <cflog> entry as the very first line of code in the script file?  And that log entry never gets made?
    If the <cflog> entry never shows up, put an Application.cfm file in the same dir as the script, with a single <cflog> entry in it.  Does that <cflog> entry get made?
    Adam

  • Problem creating OIM 11g Custom Schedule task

    hi,
    i am creating custom schedule task in oim . while importing scheduletask metadata xml getting follwoing error.
    Problem invoking WLST - Traceback (innermost last):
    File "/app/Oracle/Middleware/Oracle_IDM1/server/bin/weblogicImportMetadata.py", line 21, in ?
    File "/app/Oracle/Middleware/oracle_common/common/wlst/mdsWLSTCommands.py", line 268, in importMetadata
    File "/app/Oracle/Middleware/oracle_common/common/wlst/mdsWLSTCommands.py", line 727, in executeAppRuntimeMBeanOperation
    File "/app/Oracle/Middleware/oracle_common/common/wlst/mdsWLSTCommands.py", line 697, in getMDSAppRuntimeMBean
    UserWarning: MDS-91002: MDS Application runtime MBean for "OIMMetadata" is not available. "importMetadata" operation failure.
    can any one help me.
    Thanks in Advance.

    Do the following:
    From the oracle home (oracle_idm1) run the command <ORACLE_OIM_HOME>\common\bin\wlst.cmd
    Run the connect() command and connect with the weblogic user to the to the oim managed server (port 14000)
    Use the following command change your from location to the directory where your files are at. The location should be one folder up from the base "db" directory : importMetadata(application='oim', server='oim_server1', fromLocation='e:/files', applicationVersion='*')
    -Kevin

Maybe you are looking for

  • How to print/list all the groups/users present in Weblogic using Java code

    Hi, Weblogic version : 11.1.1.5 How to print/list all the groups/users present in Weblogic using Java code I want to make a remote connection to Weblogic server and print all the users/groups present in it. I have gone through the below mentioned sit

  • Apache 2.4 mod_perl libapreq problems

    I recently upgraded to Apache 2.4. This is now the bane of my existence. I run several servers with mod_perl and perl-libapreq. I cannot figure out how to these modules to work with Apache 2.4. I get the error: httpd: Syntax error on line 39 of /etc/

  • Purchase Order price problem

    Hi experts, i have the system customized so a purchase order needs to have a purchase requisition linked to it, for example i have the purchase requisition 300000015 with material 1000, qty 10 and price per unit 10 USD, when i make the purchase order

  • After burning cds on iTunes using my Mac, every track seems to skip

    I've been always burning cds on iTunes. Lately, I burned about 3 cds and everytime I play them, every track seems to skip. Is there a solution for this? I'm not sure if it's the burner or something else. Please help!

  • How to check if the site studio site is in contribution mode?

    Is there a function or global variable using which we can check if the site studio site is in contribution mode? Regards, Pratap