JAVA BEANSHELL EXCEPTION HANDLING

Hi
still new to ODI
I have created a java beanshell script in ODI which calls a simple java class, cars, then sets the no of seats to a value designed to raise an exception. Exception raised but procedure works OK,
How can I register the fact that it has failed through exception handling? (It is possible that my java exception handling isn't quite right)
The no of seats has no effect on the success/failure of the ODI procedure, but the log shows that the exception is caught !
any assistance gratefully received.
Regards
Terry
cars class: (added to agent start)
====================
public class cars {
private int seats;
public void setSeats (int seats) throws tooManySeatsException {
if (seats) < 100) {
this .seats = seats;
} else {
throw new tooManySeatsException("Too many seats");
public int getSeats () {
return this.seats;
class tooManySeatsException extends Exception {
public tooManySeatsException (String msg){
super();
Java beanshell procedure in ODI
====================
import cars;
public class carsTest {
public carsTest(){
public void init(){
cars c = new cars();
c.setSeats(20);
//c.setseats(200);
try {
carsTest ct = new carsTest();
ct.init();
} catch (Exception e) {
throw Error (e);
}

Your code throws exception when you set value >100 but you are setting 20 thus it would not throw exception.
In the procedure step you can uncheck "Ignore error" flag to let execution failed on throwing any exception from your code. If you check that flag then the execution would not fail rather lease the task in warning state.

Similar Messages

  • Java Junit4 Exception Handling

    Hi,
    Is it possible to test an excption in JUnit4 with out,
    throwing an exception object from the oriogional class.
    How can the exceptions which usualy throw errow objects
    can be handled in JUnit4.
    thak you

    Thank you for the reply, but I was expecting a way test
    exceptionWhat is a 'way test exception'?
    such as "FileNotFoundException"Why is 'FileNotFoundException' a 'way test exception'?
    original code if an object of "FileNotFoundException" is not
    thrown then, Junit is unable to detect the exception.Well of course because there isn't one. Is there a reason why you can't use the suggestion above?
    >
    In my origional code I cannot throw an exception objectSo why do you need to test it?
    so JUnit does't see "FileNotFoundException" etc.. as an ExceptionBecause you haven't thrown it,
    I need to find a techniques to test such cases
    What cases? You haven't made any sense at all here.

  • How to hook(Listen) to java's exception handler?

    Hello Guys,
    If you know you can replace or add new EventQueue in AWT event queue listener, so what ever events occurs, will be received by own extended class of EventQueue.
    Now how to listen to the global exception listener,
    Like,
    I want to monitor for a perticular execution of a program , which says how many exceptions are raised by Java, and which are the exceptions.
    So is there any method where i can listen using some interface for exceptions...???
    -Regards,
    Nachiket

    Hello,
    I tried to find out somethings on java.beans.ExceptionListener, but i am unable to find out any help or anything which explains how to use it.
    Regards,
    Nachiket

  • Java Exception Handling

    Hello everyone,
    I'm searching for a design pattern / framework to manage exception handling. I'm currently working on a distributed document management system for PC / AS/400, which consists of Commandline clients, a Socket Server and a windows NT daemon in java, which accepts network requests from the Socket Server. Communication is done via serialized Objects.
    My Problem is, that exceptions can be thrown either on the server or on the client side and have to be transferred to the user. Error Messages should be read from the database. Exception handling should prefferably take place in a central piece of code, such as the two endpoints of network connections, the SocketServer as service under win32 and another SocketServer as Application on another box, currently with UNIX OS.
    thanks in advance for any answers
    regards

    You should look into Bridge [GOF:151] and Memento [GOF:273].
    Bridge allows you to decouple your mechanism from the implementation memento on how to propergate the decoupled exception information.

  • Integration Process exception handling & alerts, Java

    Hello,
    I would like to enhance my basic scenarios fool proof and with as much Java as possible.
    I have set up several asynchronous and synchronous File to SOAP transfers between systems A and B
    using PI70 including my own Java mapping classes and PI's AF_Modules beans. They work just fine.
    I have not designed my own Integration Processes yet, so execution is based on channel settings and availability timing.
    I have learned this aproach may be exposed to general faults resulting manual monitoring and repairing.
    For example server problems at receiver side can result data losses as sender channel just keeps removing source
    files like normally, as the process would be better to just stop right there and alert or something.
    My question is, is the "Enterprise services Builders" Integration Process & Graphical definition screen the one and only tool to 
    customize whole process exception handling and alerts in PI, and Java is not an option?
    Appreciate your advice on this.
    Kind regards m

    Hi m,
    Strange Name
    >>I have learned this aproach may be exposed to general faults resulting manual monitoring and repairing. For example server problems at receiver side can result data losses as sender channel just keeps removing source  files like normally, as the process would be better to just stop right there and alert or something.
    If you are looking to handle this particular scenario, then we have the alert mechanism and CCMS monitoring. There you will come to know whether the end system down or not.
    Also in addition to this you can write your own java (in message mapping, as modules, java mapping) /abap code (as abap mapping, user exit in standard functions etc) for providing more details in error scenarios. But you need to validate whether the maintenance/development cost for the code is justified in your scenarios
    Regards
    Suraj

  • Throw exception in Java mapping and handle this in BPM

    Hi,
    I'll use a Java mapping in a BPM transform step. Is it possible to throw an exception inside this Java mapping and handle this in a BPM exception handler?
    thanks and regards
    Verena

    Hi Verena,
    In a BPM transformation step, I think you can throw exceptions only for system errors.
    Let me explain with an example, one of the ways to handle your scenario:
    Lets assume your Java Mapping fails then you can trap that exception in your Java mapping and compose an XML message which indicates that an error has occurred.
    say for e.g.
    <intermediateStructure>
    <SatusDocument>
    <StatusCode>ERROR</StatusCode>
    <ErrCode>123</ErrCode>
    <ErrDesc><!populate the thrown exception details></ErrDesc>
    </StatusDocument>
    <Payload>
    <!contains actual XML message with data>
    </Payload>
    </intermediateStructure>
    if Java mapping is Successful, you can compose the XML message as follows:
    <intermediateStructure>
    <SatusDocument>
    <StatusCode>SUCCESS</StatusCode>
    <ErrCode>0</ErrCode>
    <ErrDesc></ErrDesc>
    </StatusDocument>
    <Payload>
    <!contains actual XML message with data>
    </Payload>
    </intermediateStructure>
    You can use BPM switch operation to switch to different processing branches say for e.g. "error" branch or "success" branch by examining the value of <StatusCode> tag.
    Hope it helps !
    Regards,
    Sridhar

  • Handling Java Mapping Exception in BPM Transformation step

    Dear SDN members,
    I have developed a File to File scenario using BPM as follows.
    Step 1:
    Sender file adapter picks the file from FTP server and using file content conversion mapped to XML structure.
    Step 2:
    BPM will recieve the XML payload , immediately in the block a transformation step is called with an interface mapping. In the interface mapping a Java mapping will be executed with certain data validations on the XML payload. If found any invalid data is there a suitable excptions will be raised . Here the transformation step should be catch the error and control should be sent to exception block to place the recived file as a error file.
    else if the transformation is executed with out any issues, the file will be placed in success folder.
    But in the transformation step, though java mapping thorwing exceptions, the control not going into exception block, instead it is continuing to next step i.e the file is placing in the success folder.
    Can anybody tell me, how to handle the exceptions raised in java mapping in the BPM transformation step?
    I have refered all the SDN blogs, forums related to this issue, but could not able to find the answer. Please help me?
    Thanks & Regards
    Vijayanand Poreddy

    Hi Abhishek,
    Once the file is picked from FTP server then sent to BPM,
    the BPM steps
    Step1:
    -->Recive
    Step 2:
    Block Starts
       ---Block Start: New Transaction
       ---Block End : New Transaction
       ---Exception : Error
    Step 3 
    Inside the Block
    Transformation Step
       --Interface Mapping: <IM Name>
       -- Check box ticked for Create New Transcation
       -- Exceptions
          --System Error: Error
       --Source Message: Message recieved in Recieve Step (Step 1)
    Step 4:
      --Send
      --Source Maessage: Output message from the Transformation Step
    Block End
    Inserted a Exception Branch for Block
    Steps inside Exception Branch
      -Control
        --Throw Alert
       --Alert Name
    In the above scenario
    The transformation step is not throwing error even my interface mapping going to error. The same transformation step if i place outside the block next to recieve step, then the transformation step is throwing error and BPM stops the process.
    Also, when transformation is inside the block, i have used the exception handling on the send step inside the block. here it is throwing error as the source message payload is empty. because in the preceding transformation step the interface mapping is failed due to which there the target will not be filled. But even though it is not entered into exception block.
    Regards
    Vijayanand Poreddy

  • Exception Handling in Java .. Help

    Hi folks I needed some help in exception handling ...
    I know that I could go like this
    public class MyClass
         public static void main(String args[])
              try
              System.out.println(1/0);
              catch(java.lang.Exception e)
                   e.printStackTrace();
    Now what if i want to throw an error for example in C++ we would go like
    try
    throw 1;
    throw 0;
    throw 'A';
    catch (int i) //If exception is of integer type ... you may overload it
    cout << "Integer value thrown and caught \n";
    catch (...) //Unexpected error
    cout << "Some other unexpected exception \n";
    How could i impliment a code such as the above in Java using throw...
    Thanks again folks...

    1. When you post code, use code tags to make it readable. Copy/paste from your original source in your editor (NOT from your earlier post here), highlight the code, and click the CODE button. Use the Preview tab to see how your post will work.
    2. [http://download.oracle.com/javase/tutorial/essential/exceptions/]

  • Is Exception Handling  in every Java code?

    Hi there,
    just curious, is including exception handling the "norm" for any Java code?

    Java divide the exception handling in two kinds :
    - exceptions which need to be programatically handled
    - exceptions which are automatically handled by Java such as ArrayIndexOutOfBounds, DivisionByZero, and lot of subclasses of RuntimeException.
    It's not because they are automatically handled that you can't handle them programatically, but programming will be too difficult and long if they wasn't handled automatically.
    Exception mechanism is very powerfull but a little bit long when an exception is thrown.
    Denis

  • Study security related exception handling in Java

    Hi all,
    I am required to do an indepth study on security-related exception handling in Java, their Pluses and minuses... Can ppl suggest me places where I can get a kick start? Any resource that u know can help me out?
    I appreciate ur help in this regard...FYI, I am a grad student and I am doing this as a part of my course-work...I am writing up a report on this...
    Thanx a bunch, in advance for ur help ppl..

    Take a look at the JAAS API and docs.
    - Saish

  • Generic Exception handler in java

    We have developed a client java application with our own exception hierarchy derived from java.lang.exception. We raise our own exception in case of error scenarios. But there is one additional thing which we want to do:
    1. When ever any exception is raised in our exception we want to do some generic exception handling (like kicking of some module which collects the log files and send it to the administrator.
    2. We want the above activity to happen also when any runtime exception is raised. We are not catching any runtime exception and we have no handle for this.
    How should we go about this. Can we write a very low-level generic exception handler?
    We do not want to have done at every catch block we have in our code. I mean we want to have some hook at a very generic place.
    Let me know if some body can be help me on this.

    As far as I know, for exceptions that are caught, you must make a call to a generic handler in the catch block, or you may rethrow the exception as a RuntimeException, and let it propagate.
    For RuntimeExceptions and Errors in threads that you create, the easiest way to solve this is to subclass ThreadGroup, override uncaughtException with the appropriate code, and create all your threads in this group. For a thread like main, have the first thing in the thread be the creation of a new thread in the new group, then pass control to that thread. For fixed threads, like the event queue, someone had a suggestion already. Note that uncaughtException is only called just before the thread ends, so an exception that shouldn't end the thread should be handled seperately.

  • Good exception handling policy for Java web application

    I'm looking for a good exception handling policy for Java web application. First I found this Java exception handling best practices - How To Do In Java which says that you should never catch the Trowable class nor use e.printStackTrace();
    Then I found this Oracle page The Message-Driven Bean Class - The Java EE 6 Tutorial, which does just that. So now I'm confused. Is there a good page online for an exception handling policy for Java EE Web applications? I have a hard time finding one. I've read that you should not catch the Exception class. I've been catching it previously to make sure that some unknown exception doesn't slip through early in the loop and stops all other customers from executing later on in the loop. We have a loop which runs once a minute implemented using the Quartz framework. Is it OK if you just change the implementation to catch the RuntimeException class instead of the Exception class? We're using Java 7 and the Jetty Servlet Container.

    I'm looking for a good exception handling policy for Java web application.
    If you have not done so I suggest you start by reviewing the several trails in The Java Tutorials.
    Those trails cover both HOW to use exceptions and WHEN to use them.
    This trail discusses  the 'controversy' you mention regarding 'Unchecked Exceptions'
    http://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html
    Unchecked Exceptions — The Controversy
    Because the Java programming language does not require methods to catch or to specify unchecked exceptions (RuntimeException, Error, and their subclasses), programmers may be tempted to write code that throws only unchecked exceptions or to make all their exception subclasses inherit from RuntimeException. Both of these shortcuts allow programmers to write code without bothering with compiler errors and without bothering to specify or to catch any exceptions. Although this may seem convenient to the programmer, it sidesteps the intent of the catch or specify requirement and can cause problems for others using your classes.
    Why did the designers decide to force a method to specify all uncaught checked exceptions that can be thrown within its scope? Any Exception that can be thrown by a method is part of the method's public programming interface. Those who call a method must know about the exceptions that a method can throw so that they can decide what to do about them. These exceptions are as much a part of that method's programming interface as its parameters and return value.
    The next question might be: "If it's so good to document a method's API, including the exceptions it can throw, why not specify runtime exceptions too?" Runtime exceptions represent problems that are the result of a programming problem, and as such, the API client code cannot reasonably be expected to recover from them or to handle them in any way. Such problems include arithmetic exceptions, such as dividing by zero; pointer exceptions, such as trying to access an object through a null reference; and indexing exceptions, such as attempting to access an array element through an index that is too large or too small.
    Generally don't catch an exception unless you plan to HANDLE the exception. Logging, by itself is NOT handliing.
    First I found this Java exception handling best practices - How To Do In Java which says that you should never catch the Trowable class nor use e.printStackTrace(); 
    That article, like many, has some good advice and some poor or even bad advice. You get what you pay for!
    I've read that you should not catch the Exception class.
    Ok - but all that does is indicate that a problem of some sort happened somewhere. Not very useful info. Java goes to a lot of trouble to provide specific exceptions for specific problems.
    I've been catching it previously to make sure that some unknown exception doesn't slip through early in the loop and stops all other customers from executing later on in the loop.
    If the exception is 'unknown' then maybe it NEEDS to 'stop all other customers from executing later on in the loop'.
    That is EXACTLY why you don't want to do that. You need to identify which exceptions should NOT stop processing and which ones should.
    Some 'unknown' exceptions can NOT be recovered and indicate a serious problem, perhaps with the JVM itself. You can NOT just blindly keep executing and ignore them without risking data corruption and/or the integrity of the entire system Java is running on.
    Is it OK if you just change the implementation to catch the RuntimeException class instead of the Exception class? We're using Java 7 and the Jetty Servlet Container.
    No - not if you want a well-behaved system.
    Don't catch exceptions unless you HANDLE/resolve them. There are times when it makes sense to log the exception (which does NOT handle it) and then raise it again so that it gets handled properly later. Yes - I know that is contrary to the advice given in that article but, IMHO, that article is wrong about that point.
    If you have ever had to maintain/fix/support someone else's Java code you should already understand how difficult it can be to find WHERE a problem occurs and WHAT the exact problem is when exceptions are not handled properly.

  • Could not validate SPNEGO token.java.lang.Exception: Checksum error.

    Hello consultant:
    We are trying configurated SSO usind SPNEGO  module
    We have a portal 7.0 ehp1 and Active Directory Microsoft versión 2003 native
    we have followed the steps described in note Sap 1457499"Note 1457499 - SPNego add-on"
    When we have logged with user Active Directory and we try access to portal we obtain following error:
    Authorization check user error
    We have Deploy the Web diagtool from SAP Note 1045019 on the J2EE server, run it and perform the
    following steps:
    1. Select "Component" = "security" and "Activity" = "all"
    2. Click the "Go" button, followed by the "Add All" button
    3. Select "Component" = "All" and in the "Search pattern" field write "com.sap.security.spnego"
    4. Click the "Go" button, followed by the "Add All" button
    5. Start the tool
    Then we have reproduce the problem and stop the tool. The generated zip file will contain following error:
    15:45:20:078 Error J2EE_GST_PRD SAPEngine_Application_Thread[impl:3]_15 ~p.security.spnego.krb5.crypto.DesCrypto Checksum error! checksum: 0xc46bfed8d0dbc54221ee75405c8cd5ac; calculated checksum: 0x6ead7e801608b729a6957597327f2ba5
    15:45:20:078 Error J2EE_GST_PRD SAPEngine_Application_Thread[impl:3]_15 ~m.sap.security.spnego.SPNEGOLoginModule Could not validate SPNEGO token.
    java.lang.Exception: Checksum error.
    at com.sap.security.spnego.krb5.crypto.DesCrypto.decrypt(DesCrypto.java:43)
    at com.sap.security.spnego.krb5.KrbEncryptedData.decrypt(KrbEncryptedData.java:81)
    at com.sap.security.spnego.krb5.KrbApReq.decrypt(KrbApReq.java:67)
    at com.sap.security.spnego.SPNEGOLoginModule.parseAndValidateSPNEGOToken(SPNEGOLoginModule.java:234)
    at com.sap.security.spnego.SPNEGOLoginModule.processAuthorizationHeader(SPNEGOLoginModule.java:385)
    at com.sap.security.spnego.SPNEGOLoginModule.login(SPNEGOLoginModule.java:102)
    at com.sap.engine.services.security.login.LoginModuleLoggingWrapperImpl.login(LoginModuleLoggingWrapperImpl.java:185)
    at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:70)
    at java.security.AccessController.doPrivileged(AccessController.java:246)
    at com.sap.engine.services.security.login.FastLoginContext.login(FastLoginContext.java:181)
    at com.sap.engine.system.SystemLoginModule.login(SystemLoginModule.java:90)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:61)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
    at java.lang.reflect.Method.invoke(Method.java:391)
    at javax.security.auth.login.LoginContext.invoke(LoginContext.java:699)
    at javax.security.auth.login.LoginContext.access$000(LoginContext.java:151)
    at javax.security.auth.login.LoginContext$4.run(LoginContext.java:634)
    at java.security.AccessController.doPrivileged(AccessController.java:246)
    at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:631)
    at javax.security.auth.login.LoginContext.login(LoginContext.java:557)
    at com.sap.security.core.logon.imp.SAPJ2EEAuthenticator.logon(SAPJ2EEAuthenticator.java:912)
    at com.sapportals.portal.prt.service.authenticationservice.AuthenticationService.login(AuthenticationService.java:367)
    at com.sapportals.portal.prt.connection.UMHandler.handleUM(UMHandler.java:126)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:181)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:541)
    at java.security.AccessController.doPrivileged(AccessController.java:246)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:430)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:321)
    at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:377)
    at com.sap.portal.navigation.Gateway.service(Gateway.java:126)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(AccessController.java:219)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Could you help us?
    Many thanks for your collaboration

    << Do not post the same question across a number of forums >>

  • 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

  • Keytool error: java.lang.Exception: Keystore file does not exist:

    Hi All,
    While listing the keystore using the command keytool -list, I got the error message that
    keytool error: java.lang.Exception: Keystore file does not exist: C:\Documents and Settings\subramanian.arivalag\.keystore
    I noticed there is no file .keystore in the above mentioned directory. What's this .keystore file? Will it be created automatically or should we create manually?
    Already I created a keystore using -genkey command and received CA authority also.
    Kindly provide me more details about .keystore file and how to handle this error.

    If you specified a keystore filename when you created the keystore
    i.e. keytool -genkey -alias jboss-ssl -keyalg RSA -keystore my_name.keystore -validity 3650
    then you need to specify the same keystore when you export the cert
    i.e. keytool -export -alias jboss-ssl -keystore my_name.keystore –file my_name.cer

Maybe you are looking for

  • Crashing.. (URGENT HELP PLEASE)

    Hey guys, I had version 6.0.3 installed I then formated my computer, i resintalled everything and now I am up to installing iTunes, i install it and when I go to run it, the program crashes. It gives me the send error window. Why is this happening an

  • Why doesn't customer support understand?

    I recently needed to reinstall windows xp.  I have saved everything I needed to reinstall all my software.  My photoshop CS2 is the only problem I've had.  Since it was an upgrade my installation pkge is looking for a previous version.  I have the se

  • Calling oracle SQL Loader from java program

    Hi, I want to insert data into oracle tables from a text files containing fixed length fields. I am using SQLLoader to achieve this. The requirement is to call the SQLLoader within the java program. Does anyone know how to call SQL Loader from java p

  • Do we need to match KP06 and KPZ2?

    Dear Experts, I understand that KP06 can do the planning by a combination of 'cost center' and 'cost element', and whereas KPZ2 can plan by 'cost center' only. Say the following are the example of the planning in KP06. Cost center 101 and cost elemen

  • How to embed Typekit code in Muse pages?

    How to embed Typekit code in Muse pages?