Error Completing Task

Hi,
I am trying to complete a task in java using the following code:
package com.gw.apps.bpel;
import com.oracle.bpel.client.Locator;
import com.oracle.bpel.client.NormalizedMessage;
import com.oracle.bpel.client.dispatch.IDeliveryService;
import com.oracle.services.bpel.task.DefaultTasklet;
import com.oracle.services.bpel.task.ITask;
import com.oracle.services.bpel.task.IWorklistService;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class CompleteTask
public CompleteTask()
public void completeTask()
try {
Properties props = new java.util.Properties();
props.setProperty("orabpel.platform","oc4j_10g");
props.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
props.setProperty("java.naming.provider.url","ormi://rdclient1/orabpel");
props.setProperty("java.naming.security.principal","admin");
props.setProperty("java.naming.security.credentials","welcome");
props.setProperty("dedicated.rmicontext", "true");
Locator loc = new Locator("default","bpel","127.0.0.1",props);
IWorklistService taskService = (IWorklistService)loc.lookupService(IWorklistService.SERVICE_NAME);
//System.out.println(taskService.getStatus());
ITask task = taskService.lookupTask("bpel://localhost/default/StarLoan~1.0/7804-BpInv0-BpSeq2.9-2");
System.out.println("TASK STATUS "+task.getStatus()+" "+task.getAssignee());
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.newDocument();
Element root = document.createElement("loanOffer");
document.appendChild(root);
Element rsElement = document.createElement("approved");
rsElement.appendChild(document.createTextNode("Approved"));
root.appendChild(rsElement);
rsElement = document.createElement("APR");
rsElement.appendChild(document.createTextNode("121.5"));
root.appendChild(rsElement);
task.setAttachment(document);
task.setConclusion("Approved");
taskService.completeTask(task);
System.out.println("Completed Task");
catch (Exception e)
System.out.println(e.getMessage());
//System.out.println(payload.get("payload"));
* @param args
public static void main(String[] args)
CompleteTask completeTask = new CompleteTask();
completeTask.completeTask();
I have read the task details successfully but when I come to complete the task I get the following error:
TASK STATUS active [email protected]
Failed to create "ejb/collaxa/system/MessageBean" bean; exception reported is: "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
     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
     at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
     at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
     at javax.naming.InitialContext.lookup(InitialContext.java:347)
     at com.collaxa.cube.engine.util.CubeEngineBeanRegistry.lookupMessageBean(CubeEngineBeanRegistry.java:455)
     at com.collaxa.cube.engine.util.CubeEngineBeanRegistry.lookupMessageBean(CubeEngineBeanRegistry.java:443)
     at com.collaxa.cube.engine.util.CubeEngineBeanCache.getMessageBean(CubeEngineBeanCache.java:180)
     at com.oracle.bpel.client.dispatch.BaseDispatcherService.dispatchRemote(BaseDispatcherService.java:915)
     at com.oracle.bpel.client.dispatch.BaseDispatcherService.continuePostAnyType(BaseDispatcherService.java:645)
     at com.oracle.bpel.client.dispatch.BaseDispatcherService.continuePost(BaseDispatcherService.java:356)
     at com.oracle.bpel.client.dispatch.BaseDispatcherService.post(BaseDispatcherService.java:216)
     at com.oracle.bpel.client.dispatch.DispatcherService.post(DispatcherService.java:47)
     at com.oracle.bpel.client.dispatch.DispatcherService.post(DispatcherService.java:35)
     at com.oracle.services.bpel.task.WorklistService.completeTask(WorklistService.java:115)
     at com.gw.apps.bpel.CompleteTask.completeTask(CompleteTask.java:78)
     at com.gw.apps.bpel.CompleteTask.main(CompleteTask.java:121)
Any ideas why?
Thanks

This problem is fixed in the latest build. Please use the latest build else wait for the April release.

Similar Messages

  • Error submitting tasks: Operation could not be completed within the specified time

    I've created a Batch Application and I'm having an issue running a job.  Its suppose to synchronize 2 azure blob containers.
    In my JobSplitter, I compare 2 azure blob containers and find the files in the first container that need to be copied over to the second one.  Just figuring out which files to copy over can take about 5 to 6 minutes the first time this is run depending
    on the number of files that need to get copied over.
    Once we have the files that need to be copied, we group them into sets and create a task for each set.
    The exe that the TaskProcessor runs doesn't do anything just yet. All it does is write the arguments sent to it into a file. Nothing major.
    On the last run, about 900 tasks were created. Four of the tasks completed successfully. I can download the output files for them just fine. The next 4 tasks failed with an error.
    Looking in the JobLogs, I see this:
    The job orchestrator finished
    Failed to process job ac8dd4a3-d882-4ec1-847d-48844fa3e1f4: Error submitting tasks: Operation could not be completed
    within the specified time. RequestId:27eab612-c8ce-4e4b-8dfb-00e7024c71ec Time:2015-01-29T00:37:03.5943898Z
    Has anyone seen this before?
    Thanks,
    matt

    This error is usually a transient error, typically related to an internal storage timeout.  We're working on a fix for it.
    In the meantime, if you go into the Batch Apps portal, select the failed job and click Reprocess in the command bar, Batch Apps should re-run the failed tasks and the not-run tasks.  (Note that the tasks that already succeeded will not be re-run, and
    we will not re-run the job splitter to create new tasks.)
    Please let us know if you continue to see this problem or if reprocessing the job doesn't work for you.

  • Unable to perform the request error while selecting completed tasks in UWL

    Hi,
    When user is selecting the Completed Task in the UWL, the below error is displaying
    error: Unable to perform the request. Try again and if the problem persists, inform your system administrator.
    While selecting completed tasks in the drop down, it is showing "Completed Tasks(30)". But after selecting "Completed Tasks(30)" from the drop down, the above error message is getting.
    How can we resolve this??
    Note: We are using EP 7.0 SP 17. When I checked in sdn, I found that there is a problem with completed tasks earlier to sp14. But in SP14, this issue was fixed. But why we are facing this issue?
    Thanks,
    VV

    Hi,
    Please let us know if you can found any relevant logs on
    1) dafault.trc file
    <Drive>:\usr\sap\<sys-id>\JC<inst-no>\j2ee\cluster\server0\log\
    2) UWL logs:
    usr\sap\<version>\JC00\j2ee\cluster\server0\log\applications\sap.com\u
    wl
    Also Have a look on note 1120556.
    Please remember to evaluate the replays, this incentive the SDN to keep growing,
    regards,
    Fabio

  • 500 Internal error when clicking on Completed tasks in UWL

    Hi All
    We are getting 500 Internal Server Error and java.Lang.Null pointer exception when trying to Click on Completed Tasks.
    We are using GP to design the process flow.
    In UWL we are getting tasks from GP Connector
    Please help to resolve the issue
    Thanks
    Satish
    Edited by: satish jarabana on Oct 23, 2009 3:37 PM

    Hi Satish,
    We are also facing same problem, could you please tell me how did you solve the problem.
    Thanks & Regards,
    Veera.

  • OS X Server 3.0.1 Completed Tasks Error

    Everytime I click on completed tasks in profile manager, I get the error message "A Server Error has Occurred" and am told to reload the page, but it keeps doing the same thing.  I am not able to view my competed tasks.  Is anyone seeing this same issue or have a solution?
    Thank you.

    We have the same problem and I'm looking for a solution. With os x server 2.2, I was able to delete completed tasks with this command:
    sudo psql -h "/Library/Server/PostgreSQL For Server Services/Socket" -U _postgres -d device_management -c "TRUNCATE TABLE tasks;"
    but this command does not work with os x server 3.0.1!

  • Can not open the completed task.

    Hi, All.
         I config my uwl to accept the GP tasks.
         It works fine with the tasks which is in process.
         I can click the link and deal with the gp task successfully.
         When I switch to the completed tasks, I can see the tasks which I finished.
         I click the link, but I get an error page with an error message as below:                                                      
                       Start *****************************Error Page **************************************
         404   Not Found
         Error: Request cannot be processed.
          Troubleshooting Guide https://sdn.sap.com/irj/sdn/wiki?path=/display/jstsg/home
          Details: Requested resource [/JWFTaskDetail] is not found.
    End *****************************Error Page **************************************
    Edited by: LouisHuang on Nov 24, 2010 7:56 PM

    I tried to find something in logs and I got two error logs as below:
        1.
        Cannot process an HTTP request to servlet [forwardServlet] in [webdynpro/dispatcher] web application.
        For more details on the problem please check traces searching by logId: 0010187E3C96059A0000000700002F48
       2.
        Cannot process an HTTP request to servlet [forwardServlet] in [webdynpro/dispatcher] web application.
    [EXCEPTION]
    com.sap.engine.services.servlets_jsp.server.exceptions.ServletNotFoundException: Requested resource [/JWFTaskDetail] is not found.
    at com.sap.engine.services.servlets_jsp.server.lib.StaticResourceUtils.findFile(StaticResourceUtils.java:234)
    at com.sap.engine.services.servlets_jsp.server.lib.StaticResourceUtils.dispatchToResource(StaticResourceUtils.java:51)
    at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:237)
    at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:478)
    at com.sap.tc.webdynpro.serverimpl.wdc.ForwardServlet.doPost(ForwardServlet.java:63)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:400)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:203)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:438)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:427)
    at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:80)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:268)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:54)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:447)
    at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:264)
    at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
    This situation only occurs on gp task. If I use the common uwl task, it works fine.
    Can anyone give me a hand? Thanks a lot.

  • Problem with complete task via email

    Hello,
    I have problem with complete task via email. I found this blog very useful (http://blogs.adobe.com/ADEP/2010/11/how-to-complete-a-task-via-email-using-reply-to-comple te.html), but...
    I set up everything as it’s written in blog mentioned above. When a task is assigned to me, I received an email notification with actions (accept, deny). After that I replied with action “accept”. Then I received email with subject “Errors from LiveCycle ES”:
    LiveCycle ES has tried to process your request and encountered the following error:
    com.adobe.pof.POFRuntimeException: Transaction is not active: tx=TransactionImple ; – nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple )
    This response to your original email
    Subject:RE:Task Assignment – Process: Test/Email_Test. Task 76 has been assigned to you.
    Date Sent:Thursday, October 24, 2011 1:17 PM
    Body:accept
    DO-NOT-DELETE: MTMhMzE0ITMyOA==!
    Attachments:
    In log appeared this following error:
    Caused by: ALC-DSC-215-000: com.adobe.idp.dsc.DSCRuntimeException: None of the Auth Provider could authenticate the user. Authentication Failed
    at com.adobe.livecycle.notification.TaskNotificationServiceImpl.processEmailComplete(TaskNot ificationServiceImpl.java:1157)
    Can you me please? I have no idea what to do to succesfully complete task via email endpoint. Thanks
    Jan Petrla

    Hi Diana, thanks for your reply.
    You're probably right about 2 different error messages.
    To the 1st one: I'm sure that status task is Assigned (to me). I received an email and I also reply on that email.
    To error log: I found out that error log appears when I enable email endpoint on Complete Task service. But I managed to solve this problem. I set wrong user. Now I have here the same user as is written in login-config.xml so log seems to be ok.
    So I created new task and tried to complete it via email. Now I receive email with another error:
    LiveCycle ES has tried to process your request and encountered the following error:
    com.adobe.idp.dsc.provider.service.email.impl.EmailProviderException: Error getting user context
    This response to your original email
    Subject:RE:Task Assignment - Process: WorkFlowClient/Test. Task 92 has been assigned to you.
    Date Sent:Thursday, October 27, 2011 3:05 PM
    Body:Complete
    DO-NOT-DELETE: MTIxMSExNjAzITIwMTE=!
    Attachments:
    And to the last point: email endpoint is set up with TestPOP3@mydomain and user receiving email has jpetrla@mydomain. I use Lotus Notes as email client, I tried another account with gmail, but the result was same.
    Now I really don't know to do...
    Jan

  • Complete Task with Payload Problem  -- no Human Task Drop Handler

    I'm reading section 26.4.1 of Developer’s Guide for Oracle SOA Suite 11g Release 1 (11.1.1) E10224-01 where it refers to figure 26-5 Human Task Drop Handler for Creating the Task Display Form of section 26.4 Creating a Task Display Form.
    I've generated taskDetails1.jspx. I highlight Task as in the figure and right click in askDetails1.jspx (design tab) but I don't get a Create JSF page dialog as in the figure.
    I get a dialog with Insert Before Show Detail Spacer ... etc (no Create /Human Task/Complete Task with payload etc)
    Do I need to position within a particular element ? or is this a bug ? wrongly documented?

    Hi Diana, thanks for your reply.
    You're probably right about 2 different error messages.
    To the 1st one: I'm sure that status task is Assigned (to me). I received an email and I also reply on that email.
    To error log: I found out that error log appears when I enable email endpoint on Complete Task service. But I managed to solve this problem. I set wrong user. Now I have here the same user as is written in login-config.xml so log seems to be ok.
    So I created new task and tried to complete it via email. Now I receive email with another error:
    LiveCycle ES has tried to process your request and encountered the following error:
    com.adobe.idp.dsc.provider.service.email.impl.EmailProviderException: Error getting user context
    This response to your original email
    Subject:RE:Task Assignment - Process: WorkFlowClient/Test. Task 92 has been assigned to you.
    Date Sent:Thursday, October 27, 2011 3:05 PM
    Body:Complete
    DO-NOT-DELETE: MTIxMSExNjAzITIwMTE=!
    Attachments:
    And to the last point: email endpoint is set up with TestPOP3@mydomain and user receiving email has jpetrla@mydomain. I use Lotus Notes as email client, I tried another account with gmail, but the result was same.
    Now I really don't know to do...
    Jan

  • Display custom Subview in completed tasks

    Hi,
    Is it possible to display custom subview in "Completed  Tasks" in UWL?
    I have a custom subview which is visible for items when "New and In Progress Tasks" dropdown option is selected.
    Unfortunately this subview is not visible for items  when  "Completed Tasks" dropdown option is selected.
    It seems that only the standard subviews (for example "Collaboration tasks") are visible when "Completed Tasks" option is selected?
    Is this the standard behaviour?
    Regards,
    Ladislav

    Hi
    in my approver list when i choose completed tasks option it is giving the followng error "unable to perform the request try again if still persists contact your system admiistrator"
    When i checked UWL config file there is no item type defined with <item type = "uwl.completed task instead it is having <item type ="uwl.task" can u please let me know how to get the completed tasks.
    Thanks in advance

  • Cannot Uncomplete Completed task exception

    Hi All,
    When i approve a request and the provisioning workflow is triggered. Now due to an error in the provision flow task , the whole process is rolled back. But I am getting this error--
    DOBJ.SCHTM_INVALID_COMPLETED_CHANGE
    Cannot uncomplete a completed task.
    Is their any restriction for Rollback on the completed tasks in the Approval and Provisioning workflow.
    Any pointers to this issue will be helpful...
    TIA,
    Andy

    I did some investgation and figured out that there is no standard way to invoke an already completed Task.Therefore for our requirement I have proposed a new solution.
    I am storing the Workitem Id, when the task gets created, in a custom table along with all the data which is necessary for the I-View display.
    To enable users to open the I-View of the task they already completed and take a print out of the I-View etc, I have designed another application. and in this application I am using the Workitem Id to read which completed task they want to view.
    See if this works for you.

  • OIM Cannot uncomplete a completed task. OIM User Enable

    Hey Guys,
    I try to Enabled a Disabled user using the OIM user interface.
    When doing it I have an error coming back:
    DOBJ.SCHTM_INVALID_COMPLETED_CHANGE
    Cannot uncomplete a completed task.
    The logs shows:
    ERROR,08 Mar 2011 13:28:45,806,[XELLERATE.ADAPTERS],Class/Method: tcAdpEvent/updateDataSetValuePost encounter some problems: Adapter Execution Error: updateDataObjFieldValuePost: error updating usr_disabled
    ERROR,08 Mar 2011 13:28:45,807,[XELLERATE.ADAPTERS],Class/Method: tcAdpEvent/updateUserInfo encounter some problems: Adapter Execution Error: error updating Disabled
    Any idea where this can come from ?

    Hi
    If you will simply disable or enable user on OIM user profile, it won't give any error, if it is not attached with any resource object.
    I think, provisioning process has been attached with this user and you are going to enable, and one of the resource object is already enabled or data inconsistent.
    Will you provide user details for resource object and code?

  • Task API - Completed Tasks for Creator

    Hi,
    I started to investigate the BPEL TaskManager Service following the Steps of Tutorial 6. That works great, no problem there.
    Then I followed Tutorial 7 to invoke the BPEL process from a Java Application. That also works fine.
    Finally I used the TaskManager API to retrieve all Tasks owned by a creator.
    So I used the following code:
    ITask[] creatorTasks = worklist.listTasksByCreator("TaskSample");
    System.out.println( " **** Creator Tasks ****");
    for (int j = 0; j < creatorTasks.length; j++) {
    ITask thisTask = creatorTasks[j];
    System.out.println("Task Title " + thisTask.getTitle() + " Status: " + thisTask.getStatus());
    What happens is that the API is giving me only the tasks that are in the "Active" Status and I want also the ones that are in the "Completed" Status.
    However with the following code, the completed tasks appear:
    ITask[] allTasks = worklist.listTasks(1,100);
    System.out.println( " **** All Tasks ****");
    for (int j = 0; j < allTasks.length; j++) {
    ITask thisTask = allTasks[j];
    System.out.println("Task Title " + thisTask.getTitle() + " Status: " + thisTask.getStatus());
    So my question is: does "listTasksByCreator" only gives the "Active" tasks or is this a bug ?
    I will be waiting for your answer.
    Thanks,
    Claudio.

    Hi Brooke,
    I recommend to change the $item.percentcomp, $item.created, $item.status and $item.id to be like this: $item[" percentcomp"], $item[" created"], $item[" status"] and $item[" id"] in the command.
    Please also make sure that the percentcomp or status is the internal name of the fields.
    More reference:
    SharePoint: A Complete Guide to Getting and Setting Fields using PowerShell:
    http://social.technet.microsoft.com/wiki/contents/articles/20831.sharepoint-a-complete-guide-to-getting-and-setting-fields-using-powershell.aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Can Lightning pin a completed task to the day completed on the calendar so it always shows up if I click on the day?

    This may be already doable, but I don't know how. It would be convenient to show completed tasks pinned to the calendar day completed. I know that if you switch to the task mode, the completed tasks and the date completed is displayed, but it would enhance the operation, if these completed tasks were displayed in the task panel whenever I highlighted the completion date on the calendar when in the calendar mode.

    Hi Big_T,
    I am not sure, this is what I found about how to use Lightning [https://support.mozilla.org/en-US/kb/lightning-user-interface] and it sounds like you could add more to that article. If you would like please add to the article what you find, because I am sure others would love to know how to do this too!
    Actually you can do this!
    # Go to View
    # Go to Calender
    # then go to Current View
    # Tasks in View and select show completed Tasks
    I knew it was there somewhere.

  • ODI-17517: Error during task interpretation. Task: 6 java.lang.Exception

    Hi,
    Can some one provide a resolution for below error:
    I have created an interface which load data from csv file which has 320 columns, to a Synonym which has 320 columns in it
    using LKM File to SQL, IKM Sql Control Append.
    I am getting below error when executing the interface :
    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: ODI-17517: Error during task interpretation. Task: 6 java.lang.Exception: BeanShell script error: Sourced file: inline evaluation of: ``out.print("The application script threw an exception: java.lang.StringIndexOutOf . . . '' Token Parsing Error: Lexical error at line 2, column 42. Encountered: "
    " (92), after : "": <at unknown location> BSF info: Create external table at line: 0 column: columnNo
    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:485)
    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:711)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:461)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: org.apache.bsf.BSFException: BeanShell script error: Sourced file: inline evaluation of: ``out.print("The application script threw an exception: java.lang.StringIndexOutOf . . . '' Token Parsing Error: Lexical error at line 2, column 42. Encountered: "
    " (92), after : "": <at unknown location>
    BSF info: Create external table at line: 0 column: columnNo
    at bsh.util.BeanShellBSFEngine.eval(Unknown Source)
    at bsh.util.BeanShellBSFEngine.exec(Unknown Source)
    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:471)
    ... 11 more
    Text: The application script threw an exception: java.lang.StringIndexOutOfBoundsException: String index out of range: 2 BSF info: Create external table at line: 0 column: columnNo
    out.print("createTblCmd = r\"\"\"\ncreate table ") ;
    out.print(odiRef.getTable("L", "COLL_NAME", "W")) ;
    out.print("<?=(extTabColFormat.getUseView())?\"_ET\":\"\"?>\n(\n\t") ;
    out.print(odiRef.getColList("", "[CX_COL_NAME]
    t"+
    "<?=extTabColFormat.getExtTabDataType(\\u0022[CX_COL_NAME]\\u0022,\\u0022[SOURCE_DT]
    u0022, \\u0022[DEST_WRI_DT]
    u0022, \\u0022[COL_FORMAT]
    u0022, \\u0022[BYTES]
    u0022, \\u0022[LONGC]
    u0022, \\u0022[SCALE]
    u0022)?>"
    , ",\\n
    t", "","")) ;
    out.print("\n)\nORGANIZATION EXTERNAL\n(\n\tTYPE ORACLE_LOADER\n\tDEFAULT DIRECTORY dat_dir\n\tACCESS PARAMETERS\n\t(\n\t\tRECORDS DELIMITED BY 0x'") ;
    out.print(odiRef.getSrcTablesList("[XFILE_SEP_ROW]","")) ;
    out.print("'\n\t\t") ;
    out.print(odiRef.getUserExit("EXT_CHARACTERSET")) ;
    out.print("\n\t\t") ;
    out.print(odiRef.getUserExit("EXT_STRING_SIZE")) ;
    out.print("\n\t\tBADFILE\t\t'") ;
    out.print(odiRef.getSrcTablesList("", "[RES_NAME]", "", "")) ;
    out.print("_%a.bad'\n\t\tLOGFILE\t\t'") ;
    out.print(odiRef.getSrcTablesList("", "[RES_NAME]", "", "")) ;
    out.print("_%a.log'\n\t\tDISCARDFILE\t'") ;
    out.print(odiRef.getSrcTablesList("", "[RES_NAME]", "", "")) ;
    out.print("_%a.dsc'\n\t\tSKIP \t\t") ;
    out.print(odiRef.getSrcTablesList("", "[FILE_FIRST_ROW]", "", "")) ;
    out.print("\n") ;
    if (odiRef.getSrcTablesList("", "[FILE_FORMAT]", "", "").equals("F")) {out.print("\n\t\tFIELDS\n\t\t") ;
    out.print(odiRef.getUserExit("EXT_MISSING_FIELD")) ;
    out.print("\n\t\t(\n\t\t\t") ;
    out.print(odiRef.getColList("", "[CX_COL_NAME]\\tPOSITION([FILE_POS]:[FILE_END_POS])
    t"+
    "<?=extTabColFormat.getExtTabFormat(\\u0022[CX_COL_NAME]\\u0022,\\u0022[SOURCE_DT]
    u0022, \\u0022DEST_WRI_DT
    u0022, \\u0022[COL_FORMAT]
    u0022, \\u0022[BYTES]
    u0022, \\u0022[LONGC]
    u0022, \\u0022[SCALE]
    u0022)?>"
    , ",\\n\\t\\t
    t", "","")) ;
    out.print("\t\t\n\t\t)\n\t)\n") ;
    } else {out.print("\n\t\tFIELDS TERMINATED BY x'") ;
    out.print(odiRef.getSrcTablesList("", "[XFILE_SEP_FIELD]", "", "")) ;
    out.print("'\n\t\t") ;
    if(odiRef.getSrcTablesList("", "[FILE_ENC_FIELD]", "", "").equals("")){out.print("\n\t\t") ;
    } else {out.print("OPTIONALLY ENCLOSED BY '") ;
    out.print(odiRef.getSrcTablesList("", "[FILE_ENC_FIELD]", "", "").substring(0,1)) ;
    out.print("' AND '") ;
    out.print(odiRef.getSrcTablesList("", "[FILE_ENC_FIELD]", "", "").substring(1,2)) ;
    out.print("' ") ;
    }out.print("\n\t\t") ;
    out.print(odiRef.getUserExit("EXT_MISSING_FIELD")) ;
    out.print("\n\t\t(\n\t\t\t") ;
    out.print(odiRef.getColList("", "[CX_COL_NAME]
    t"+
    "<?=extTabColFormat.getExtTabFormat(\\u0022[CX_COL_NAME]\\u0022,\\u0022[SOURCE_DT]
    u0022, \\u0022DEST_WRI_DT
    u0022, \\u0022[COL_FORMAT]
    u0022, \\u0022[BYTES]
    u0022, \\u0022[LONGC]
    u0022, \\u0022[SCALE]
    u0022)?>"
    , ",\\n\\t\\t
    t", "","")) ;
    out.print("\t\t\n\t\t)\n\t)\n") ;
    }out.print("\tLOCATION (") ;
    out.print(odiRef.getSrcTablesList("", "'[RES_NAME]'", "", "")) ;
    out.print(")\n)\n") ;
    out.print(odiRef.getUserExit("EXT_PARALLEL")) ;
    out.print("\nREJECT LIMIT ") ;
    out.print(odiRef.getUserExit("EXT_REJECT_LIMIT")) ;
    out.print("\n\"\"\"\n \n# Create the statement\nmyStmt = myCon.createStatement()\n \n# Execute the trigger creation\nmyStmt.execute(createTblCmd)\n \nmyStmt.close()\nmyStmt = None\n \n# Commit, just in case\nmyCon.commit()") ;
    ****** ORIGINAL TEXT ******
    createTblCmd = r"""
    create table <%=odiRef.getTable("L", "COLL_NAME", "W")%><?=(extTabColFormat.getUseView())?"_ET":""?>
    <%=odiRef.getColList("", "[CX_COL_NAME]\t"+
    "<?=extTabColFormat.getExtTabDataType(\u0022[CX_COL_NAME]\u0022,\u0022[SOURCE_DT]\u0022, \u0022[DEST_WRI_DT]\u0022, \u0022[COL_FORMAT]\u0022, \u0022[BYTES]\u0022, \u0022[LONGC]\u0022, \u0022[SCALE]\u0022)?>"
    , ",\n\t", "","")%>
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY dat_dir
    ACCESS PARAMETERS
    RECORDS DELIMITED BY 0x'<%=odiRef.getSrcTablesList("[XFILE_SEP_ROW]","")%>'
    <%=odiRef.getUserExit("EXT_CHARACTERSET")%>
    <%=odiRef.getUserExit("EXT_STRING_SIZE")%>
    BADFILE '<%=odiRef.getSrcTablesList("", "[RES_NAME]", "", "")%>_%a.bad'
    LOGFILE '<%=odiRef.getSrcTablesList("", "[RES_NAME]", "", "")%>_%a.log'
    DISCARDFILE '<%=odiRef.getSrcTablesList("", "[RES_NAME]", "", "")%>_%a.dsc'
    SKIP <%=odiRef.getSrcTablesList("", "[FILE_FIRST_ROW]", "", "")%>
    <% if (odiRef.getSrcTablesList("", "[FILE_FORMAT]", "", "").equals("F")) {%>
    FIELDS
    <%=odiRef.getUserExit("EXT_MISSING_FIELD")%>
    <%=odiRef.getColList("", "[CX_COL_NAME]\tPOSITION([FILE_POS]:[FILE_END_POS])\t"+
    "<?=extTabColFormat.getExtTabFormat(\u0022[CX_COL_NAME]\u0022,\u0022[SOURCE_DT]\u0022, \u0022DEST_WRI_DT\u0022, \u0022[COL_FORMAT]\u0022, \u0022[BYTES]\u0022, \u0022[LONGC]\u0022, \u0022[SCALE]\u0022)?>"
    , ",\n\t\t\t", "","")%>
    <%} else {%>
    FIELDS TERMINATED BY x'<%=odiRef.getSrcTablesList("", "[XFILE_SEP_FIELD]", "", "")%>'
    <% if(odiRef.getSrcTablesList("", "[FILE_ENC_FIELD]", "", "").equals("")){%>
    <%} else {%>OPTIONALLY ENCLOSED BY '<%=odiRef.getSrcTablesList("", "[FILE_ENC_FIELD]", "", "").substring(0,1)%>' AND '<%=odiRef.getSrcTablesList("", "[FILE_ENC_FIELD]", "", "").substring(1,2)%>' <%}%>
    <%=odiRef.getUserExit("EXT_MISSING_FIELD")%>
    <%=odiRef.getColList("", "[CX_COL_NAME]\t"+
    "<?=extTabColFormat.getExtTabFormat(\u0022[CX_COL_NAME]\u0022,\u0022[SOURCE_DT]\u0022, \u0022DEST_WRI_DT\u0022, \u0022[COL_FORMAT]\u0022, \u0022[BYTES]\u0022, \u0022[LONGC]\u0022, \u0022[SCALE]\u0022)?>"
    , ",\n\t\t\t", "","")%>
    <%}%> LOCATION (<%=odiRef.getSrcTablesList("", "'[RES_NAME]'", "", "")%>)
    <%=odiRef.getUserExit("EXT_PARALLEL")%>
    REJECT LIMIT <%=odiRef.getUserExit("EXT_REJECT_LIMIT")%>
    # Create the statement
    myStmt = myCon.createStatement()
    # Execute the trigger creation
    myStmt.execute(createTblCmd)
    myStmt.close()
    myStmt = None
    # Commit, just in case
    myCon.commit().
    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:738)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:461)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:662)

    Hi
    I saw your issue and found one think that "String index out of range", can you please compare the columns datatype and column size with target table and ODI table.
    ODI Table:
    After Reverse Engine, CSV changed into table format can you please open the table from designer>model>csv table and goto columns tab, it will list out the all column name datatype and size. compare the column size and type with your target table.
    hope this will resolve your issue.
    Regards,
    Phanikanth

  • External Table LKM: error during task interpretation

    I've had this problem more than once now, using "LKM File to Oracle (EXTERNAL TABLE)". Before the interface can even run, I get an error, as if the script can't be output. I've tried removing the LKM and reimporting. No use. I am using this LKM successfully in other projects... not sure why it would have issues here. When I had this problem previously, Oracle Support couldn't reproduce it (they certainly tried). I managed to work around it then, but now... this is getting problematic. Insight welcome.
    Here's the start of the error:
    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Error during task interpretation
    Task:6
    java.lang.Exception: BeanShell script error: Sourced file: inline evaluation of: ``out.print("The application script threw an exception: java.lang.StringIndexOutOf . . . '' Token Parsing Error: Lexical error at line 2, column 42. Encountered: "\\" (92), after : "": <at unknown location>
    BSF info: Create external table at line: 0 column: columnNo
         at com.sunopsis.dwg.codeinterpretor.a.a(a.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.h.y(h.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Text:The application script threw an exception: java.lang.StringIndexOutOfBoundsException: *String index out of range: 2* BSF info: Create external table at line: 0 column: columnNo

    Hi,
    I have this exact problem, did you get a solution?
    Thanks

Maybe you are looking for