Running JUnit code for EJB

Hi,
I have written following JUnit code for testing EJB whose jndi name is SBuySharesHome
public class CTestCase_Default extends TestCase
     public CTestCase_Default ( String arg )
          super ( arg );
     protected updateBuyShares.SBuyShares remote_SBuyShares;
     protected void setUp () throws Exception
          * Getting InitialContext object
          Properties prop = new Properties ();
          prop.put ( Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory" );
          prop.put ( Context.PROVIDER_URL, "iiop://localhost" );
          InitialContext context = new InitialContext ( prop );
          * Creating remote interface object for Session EJB SBuyShares
          Object obj_SBuyShares = context.lookup("SBuySharesHome");
          updateBuyShares.SBuySharesHome home_SBuyShares = ( updateBuyShares.SBuySharesHome ) PortableRemoteObject.narrow ( obj_SBuyShares, updateBuyShares.SBuySharesHome.class );
          remote_SBuyShares = home_SBuyShares.create();
     * buyShares : invalidBuy
     publi void test_Default_0 () throws Throwable
          /** Scenario Element : method buyShares */
          int year = 2004;
          int customerId = 1001;
          int companyId = 1001;
          int noOfShares = 100;
          boolean ret_buyShares = remote_SBuyShares.buyShares(year, customerId, companyId, noOfShares);
This code worked fine with WSAD 5.0 and WAS 5.0
But above code is not running in the WSAD 5.1.2 with WAS 5.1
It is giving following exception
javax.naming.NamingException: The JNDI operation "lookup"on the context
"localhost/nodes/localhost/servers/server1" with the name "null" failed.
Please get the root cause Throwable contained in this NamingException for more information.
Root exception is java.lang.NoClassDefFoundError: com/ibm/ejs/jts/jts/CurrentFactory
     at com.ibm.ws.naming.jndicos.CNContextImpl.suspendTransaction(CNContextImpl.java:4064)
     at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3521)
     at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1565)
     at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
     at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
     at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
     at javax.naming.InitialContext.lookup(InitialContext.java:359)
     at SearchDAOTest.CTestCase_INOUTDTO.setUp(CTestCase_INOUTDTO.java:38)
     at junit.framework.TestCase.runBare(TestCase.java:125)
     at junit.framework.TestResult$1.protect(TestResult.java:111)
     at junit.framework.TestResult.runProtected(TestResult.java:129)
     at junit.framework.TestResult.run(TestResult.java:114)
     at junit.framework.TestCase.run(TestCase.java:118)
     at junit.framework.TestSuite.runTest(TestSuite.java:212)
     at junit.framework.TestSuite.run(TestSuite.java:207)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)
I could not find this required com.ibm.ejs.jts.jts.CurrentFactory.class anywhere in the installation jar.
Can anybody suggest some solution for this?

Let me correct the stack trace in my previous posting, Please ignore the stack trace shown in the last posting. This is the correct stack trace
javax.naming.NamingException: The JNDI operation "lookup"on the context
"localhost/nodes/localhost/servers/server1" with the name "SBuySharesHome" failed.
Please get the root cause Throwable contained in this NamingException for more information.
Root exception is java.lang.NoClassDefFoundError: com/ibm/ejs/jts/jts/CurrentFactory
     at com.ibm.ws.naming.jndicos.CNContextImpl.suspendTransaction(CNContextImpl.java:4064)
     at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3521)
     at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1565)
     at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
     at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
     at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
     at javax.naming.InitialContext.lookup(InitialContext.java:359)
     at SearchDAOTest.CTestCase_INOUTDTO.setUp(CTestCase_INOUTDTO.java:38)
     at junit.framework.TestCase.runBare(TestCase.java:125)
     at junit.framework.TestResult$1.protect(TestResult.java:111)
     at junit.framework.TestResult.runProtected(TestResult.java:129)
     at junit.framework.TestResult.run(TestResult.java:114)
     at junit.framework.TestCase.run(TestCase.java:118)
     at junit.framework.TestSuite.runTest(TestSuite.java:212)
     at junit.framework.TestSuite.run(TestSuite.java:207)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)

Similar Messages

  • Where can i get code for EJB

    hi
    please tell me where can i get code for EJB 's to create applications

    georgemc wrote:
    sunil.varma wrote:
    hi
    please tell me where can i get code for EJB 's to create applicationsCould you make your question more vague pleasehai mr. george.
    ejb codez.
    iz it good?

  • Error while running the code for watermarking

    HI,
    I am using pdf proffesional and SDK for developing my application. At the time of watermarking I am getting below mentioned error.
    An unhandled exception of type 'System.MissingMemberException' occurred in microsoft.visualbasic.dll
    Additional information: Public member 'addWatermarkFromText' on type '_ComObject' not found.
    Code for watermarking is
    Dim pdDoc As Acrobat.CAcroPDDoc
    pdDoc = CreateObject("AcroExch.PDDoc")
    If pdDoc Is Nothing Then
    MsgBox("Failed to create Acrobat PDDoc object.")
    End
    End If
    ' Open the source PDF document
    Dim rc As Integer
    rc = pdDoc.Open(SamplePDFFilePath)
    If rc <> -1 Then
    MsgBox("Failed to open PDF document " & SamplePDFFilePath)
    End
    End If
    ' Acquire the Acrobat JavaScript Object interface from the PDDoc object
    jsObj = pdDoc.GetJSObject
    ' Add a watermark from a file.
    ' function prototype:
    ' addWatermarkFromFile(cDIPath, nSourcePage, nStart, nEnd, bOnTop, bOnScreen, bOnPrint, nHorizAlign, nVertAlign, nHorizValue, nVertValue, bPercentage, nScale, bFixedPrint, nRotation, nOpacity)
    jsObj.addWatermarkFromFile(SampleImageFilePath, 0, 0, 0, True, True, True, 0, 3, 10, -10, False, 0.4, False, 0, 0.7)
    In the above code I am getting error in last line..
    Kindly help me!!!!

    is jsObj returing null?

  • QA10 User Exit to run addational code for Material Backflush

    Does anyone know if there is a User Exit for QA10 Automatic Usage Decision that will allow you to tack on additional code to complete a material backflush.  I have a batchjob that runs every 5 minutes which fires off a variant to evaluate the Inspection Results.  If all results recording are good the UD gets completed and the material is moved from QI Stock to Unrestricted.  At the same time once the UD and stock transfer is done I would like to run a User exit that will allow me to access a custom lookup table to change the material from CP14.B1 to CP14 and complete a backflush.

    Yes you are correct in saying that I want to do another Backflush once the auto UD is completed.  The scheduled job using program RQEVAI30 completes the UD and posts the material from QI Stock to Unrestricted Stock if results are good.  Once the UD is completed and the stock is posted to Unrestricted I need to find a User Exit that will allow me to write custom code to do a table lookup.  This table will also be custom development that we can use to say if material is CP14.B1 and the Insp. Lot Type is 04 then run MFBF to backflush raw material and complete movement type 309 to CP14 Material.  I just need to know if there is a User exit available that I can use once the lot evaluation is completed.

  • Setting Run-time parameters for EJB objects

    Hello,
    I need to set a run-time paramater that will be used by the session beans in my
    application. I looked thru the documentation, but I'm not finding an obvious
    way to do this.
    In weblogic-application.xml, there is an <application-parameter> element that
    seems promising, but I can't find a weblogic method for getting the value of this
    element from within an EJB.
    Any ideas on the best way to do this?
    Thank you

    Ellen,
    There is no global <env-entry> that you can use currently, but you can make
    an
    <env-entry> in the EJB module's descriptors for each session bean that needs
    the run-time parameter.
    the <application-parameter> element you speak of is not a place that
    arbitrary
    values can be placed and obtained. That element is used to by the server
    and there are a specific set of values that are recognized
    as override options for the server to use for the application.
    Michael Kovacs
    Senior Software Engineer
    BEA Systems
    "Ellen Kraffmiller" <[email protected]> wrote in message
    news:3f857657$[email protected]..
    >
    Hello,
    I need to set a run-time paramater that will be used by the session beansin my
    application. I looked thru the documentation, but I'm not finding anobvious
    way to do this.
    In weblogic-application.xml, there is an <application-parameter> elementthat
    seems promising, but I can't find a weblogic method for getting the valueof this
    element from within an EJB.
    Any ideas on the best way to do this?
    Thank you

  • Run same code for didSelectRowAtIndexPath & accessoryButtonTappedForRowWith

    Is there a way to call the other method from one of this even so that I do not have to duplicate the same code in both these events?
    Basically if the user taps the row or the cheveron button the same code should run,
    so is there a way to trigger an event of accessoryButtonTappedForRowWithIndexPath from inside didSelectRowAtIndexPath?
    TIA
    Raj

    The following should work:
    - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
    [self tableView:tableView didSelectRowAtIndexPath:indexPath];
    Andreas

  • Run a code for all records

    Dear all, please tell me how can I perform a code save for all records in ms dynamics crm 2011. (I've changed part of a code and need it work for all old records)

    Andrii thanks for your reply, but it will not work. In this case I work with a N:N connected records. I found this:
    https://rajeevpentyala.wordpress.com/2012/02/05/update-record-using-odata-and-jquery-in-crm-2011/

  • Super 1.5 - source code level tracing for EJB, JSP and others

     

    Would you want to try new installation for Super 1.6?
    Please visit www.acelet.com
    Thanks.
    "Dominique Jean-Prost" <[email protected]> wrote:
    If only your installation tool was easy to use ...
    dom
    "Wei Jiang" <[email protected]> a écrit dans le message news:
    [email protected]...
    Super supports source code level tracing for Java and JSP!
    Announcement: Super 1.5 - an EJB/J2EE monitoring tool with
    SuperPeekPoke
    SuperLogging
    SuperStress
    SuperEnvironment
    It is free for development.
    You can anomyously down load it from:
    http://www.acelet.com.
    Super is a component based administration tool for EJB/J2ee.
    It provides built-in functionality as well as
    extensions, as SuperComponents. Users can install
    SuperComponents onto it, or uninstall them from it.
    Super has the following functions:
    * A J2EE/EJB monitor.
    * A gateway to EJB servers from different vendors.
    * A framework holding user defined SuperComponents.
    * A PeekPoke tool to read/write attributes from EJBs.
    * A full-featured logging/tracing tool for centralized, chronologicallogging.
    * A Stress test tool.
    * A global environment tool.
    It is written in pure Java.
    The current version support:
    * Universal servers.
    * Weblogic 5.1
    * Weblogic 6.0
    What is new:
    Version 1.50 August, 2001
    Enhancement:
    1. Source code level tracing supports EJB, JSP, java helper and other
    programs which are written in native languages (as long as you
    write correct log messages in your application).
    2. Redress supports JSP now.
    3. New installation with full help document: hope it will be easier.
    4. Support WebSphere 4.0
    Version 1.40 June, 2001
    Enhancement:
    1. Add SuperEnvironment which is a Kaleidoscope with TableView,TimeSeriesView
    and PieView for GlobalProperties.
    GlobalProperties is an open source program from Acelet.
    2. SuperPeekPoke adds Kaleidoscope with TableView, TimeSeriesView andPieView.
    Changes:
    1. The structure of log database changed. You need delete old installationand
    install everything new.
    2. The format of time stamp of SuperLogging changed. It is not localedependent:
    better for report utilities.
    3. Time stamp of SuperLogging added machine name: better for clusteringenvironment.
    Bug fix:
    1. Under JDK 1.3, when you close Trace Panel, the timer may not bestopped
    and
    Style Panel may not show up.
    Version 1.30 May, 2001
    Enhancement:
    1. Add ConnectionPlugin support.
    2. Add support for Borland AppServer.
    Version 1.20 April, 2001
    Enhancement:
    1. Redress with option to save a backup file
    2. More data validation on Dump Panel.
    3. Add uninstall for Super itself.
    4. Add Log Database Panel for changing the log database parameters.
    5. Register Class: you can type in name or browse on file system.
    6. New tour with new examples.
    Bug fix:
    1. Redress: save file may fail.
    2. Install Bean: some may fail due to missing manifest file. Now, itis
    treated
    as foreign beans.
    3. Installation: Both installServerSideLibrary and installLogDatabasecan
    be worked
    on the original file, do not need copy to a temporary directory anymore.
    4. PeekPoke: if there is no stub available, JNDI list would be emptyfor
    Weblogic5-6.
    Now it pick up all availble ones and give warning messages.
    5. Stress: Launch>Save>Cancel generated a null pointer exception.
    Changes:
    1. installLogDatabase has been changed from .zip file to .jar file.
    2. SuperLogging: If the log database is broken, the log methods willnot
    try to
    access the log database. It is consistent with the document now.
    3. SuperLogging will not read system properties now. You can put logdatabase
    parameters in SuperLoggingEJB's deployment descriptor.
    Version 1.10 Feb., 2001
    Enhancement:
    1. Re-written PeekPoke with Save/Restore functions.
    2. New SuperComponent: SuperStress for stress test.
    3. Set a mark at the highlighted line on<font size=+0> the Source Code
    Panel (as a work-a-round for JDK 1.3).</font>
    4. Add support for WebLogic 6.0
    Bug fix:
    1. Uninstall bean does physically delete the jar file now.
    2. WebLogic51 Envoy may not always list all JNDI names. This is fixed.
    Version 1.00 Oct., 2000
    Enhancement:
    1. Support Universal server (virtual all EJB servers).
    2. Add Lost and Found for JNDI names, in case you need it.
    3. JNDI ComboBox is editable now, so you can PeekPoke not listed JNDIname
    (mainly
    for Envoys which do not support JNDI list).
    Version 0.90: Sept, 2000
    Enhancement:
    1. PeekPoke supports arbitrary objects (except for Vector, Hashtable
    and alike) as input values.
    2. Reworked help documents.
    Bug fix:
    1. Clicking Cancel button on Pace Panel set 0 to pace. It causes
    further time-out.
    2. MDI related bugs under JDK 1.3.
    Version 0.80: Aug, 2000
    Enhancement:
    1. With full-featured SuperLogging.
    Version 0.72: July, 2000
    Bug fix:
    1. Ignore unknown objects, so Weblogic5.1 can show JNDI list.
    Version 0.71: July, 2000
    Enhancement:
    1. Re-worked peek algorithm, doing better for concurent use.
    2. Add cacellable Wait dialog, showing Super is busy.
    3. Add Stop button on Peek Panel.
    4. Add undeploy example button.
    Bug fix:
    1. Deletion on Peek Panel may cause error under JDK 1.3. Now it worksfor
    both
    1.2 and 1.3
    Version 0.70: July, 2000
    Enhancement:
    1. PeekPoke EJBs without programming.
    Bug fix:
    1. Did not show many windows under JDK 1.3. Now it works for both 1.2and
    1.3
    Changes:
    1. All changes are backward compatible, but you may need to recompilemonitor
    windows defined by you.
    Version 0.61: June, 2000
    Bug fix:
    1. First time if you choose BUFFER as logging device, message willnot
    show.
    2. Fixed LoggingPanel related bugs.
    Version 0.60: May, 2000
    Enhancement:
    1. Add DATABASE as a logging device for persistent logging message.
    2. Made alertInterval configurable.
    3. Made pace for tracing configurable.
    Bug fix:
    1. Fixed many bugs.
    Version 0.51, 0.52 and 0.53: April, 2000
    Enhancement:
    1. Add support to Weblogic 5.1 (support for Logging/Tracing and
    user defined GUI window, not support for regular monitoring).
    Bug fix:
    1. Context sensitive help is available for most of windows: pressF1.
    2. Fix installation related problems.
    Version 0.50: April, 2000
    Enhancement:
    1. Use JavaHelp for help system.
    2. Add shutdown functionality for J2EE.
    3. Add support to Weblogic 4.5 (support for Logging/Tracing and
    user defined GUI window, not support for regular monitoring).
    Bug fix:
    1. Better exception handling for null Application.
    Version 0.40: March, 2000
    Enhancement:
    1.New installation program, solves installation related problems.
    2. Installation deploys AceletSuperApp application.
    3. Add deploy/undeploy facilities.
    4. Add EJB and application lists.
    Change:
    1.SimpleMonitorInterface: now more simple.
    Version 0.30: January, 2000
    Enhancement:
    1. Add realm support to J2EE
    2. Come with installation program: you just install what you want
    the first time you run Super.
    Version 0.20: January, 2000
    Enhancement:
    Add support to J2EE Sun-RI.
    Change:
    1. Replace logging device "file" with "buffer" to be
    compliant to EJB 1.1. Your code do not need to change.
    Version 0.10: December, 1999
    Enhancement:
    1. provide SimpleMonitorInterface, so GUI experience is
    not necessary for developing most monitoring applications.
    2. Sortable table for table based windows by mouse
    click (left or right).
    Version 0.01 November., 1999:
    1. Bug fix: An exception thrown when log file is large.
    2. Enhancement: Add tour section in Help information.
    Version 0.00: October, 1999
    Thanks.

  • Best practice for @EJB injection in junit test (out-of-container) ?

    Hi all,
    I'd like to run a JUnit test for a Stateless bean A which has another bean B injected via the @EJB annotation. Both beans are pure EJB 3 POJOs.
    The JUnit test should run out-of-container and is not meant to be an EJB client, either.
    What is the easiest/suggested way of getting this injection happening without explicitely having to instantiate the bean B in my test setup ?

    you can deal with EntityBeans without having the Container managed senario , you can obtain instance of EntityManager using the "EntityManagerFactory" and providing the "persistence.xml" file and provide the "provider" (toplink,hibernate ,...), then you can use entities as plain un managed classes

  • Batch code for running a find/replace all on multiple files within a source floder/directory

    What I need is a Batch source code that will open all files in a folder/directory and run a find and replace_all query within them and then save all the files.  The files were created in Illustrator and saved using the Scene7 FXG format extension.    These files will be uploaded into Scene7 as a group after the find and replace macro/query is run on the code.  The same find and replace query will be the same for all the files.  Basically this function or batch process  will save time in setting the same parameters all at one time instead of having to set the parameters individually in scene7.
    a source code sample of the find/replace module macro might be              searchString:  s7:colorvalue="#FFFFFFFF" 
                                                                                                                          replaceString: s7:colorValue="#&txtclr;"
                                                                                                                          searchWhat   "FXG document"    
                                                                                                                             searchSource:  true,
                                                                                                                        useRegularExpressions:   true
    I have no problems creating batch files within Ai and PhotoShop but I have limited programming skills in how to create source code for manuipulating documents outside of those apps or in a OS invironment.
    I could probably come up witha simple program to do what i want for one document but i get lost when dealing with multiple documents in a source folder (prolbem is,  I will be dealing with thousands of documents not 100 or less)
    If anything which Adope cloud app would work best:  Dreamweaver or Edge code   (or just use my notepad)

    What I need is a Batch source code that will open all files in a folder/directory and run a find and replace_all query within them and then save all the files.  The files were created in Illustrator and saved using the Scene7 FXG format extension.    These files will be uploaded into Scene7 as a group after the find and replace macro/query is run on the code.  The same find and replace query will be the same for all the files.  Basically this function or batch process  will save time in setting the same parameters all at one time instead of having to set the parameters individually in scene7.
    a source code sample of the find/replace module macro might be              searchString:  s7:colorvalue="#FFFFFFFF" 
                                                                                                                          replaceString: s7:colorValue="#&txtclr;"
                                                                                                                          searchWhat   "FXG document"    
                                                                                                                             searchSource:  true,
                                                                                                                        useRegularExpressions:   true
    I have no problems creating batch files within Ai and PhotoShop but I have limited programming skills in how to create source code for manuipulating documents outside of those apps or in a OS invironment.
    I could probably come up witha simple program to do what i want for one document but i get lost when dealing with multiple documents in a source folder (prolbem is,  I will be dealing with thousands of documents not 100 or less)
    If anything which Adope cloud app would work best:  Dreamweaver or Edge code   (or just use my notepad)

  • JSP codes for running a JAVA program

    hello...
    does anyone know the JSP codes for running a Java program from my web page?? i mean i already have my java program compiled... and i just want this java program to run in the background when I click on a button or a link...
    Any idea about this?
    plz advice..
    avi

    yes... u r somewhat right... but this runs on Jakarta Tomcat...
    i'm using the Apache Http Server together with the ServletExec AS which enable the Apache server to run JSP..
    I've created a package where i've put my classes...
    WEB-INF/classes/tbd(package name)/my classes
    and i've added.. package name.. in my java program..
    and then in jsp... i've written..
    <%@ page import="tdb.*"%>
    <jsp:useBean id="exec" class="tdb.textdb" />
    <%exec.convert_data();%>
    but when i run the page it says the package does not exist...
    can anyone tell where to place the folder WEB-INF so that it can run fine?
    thx
    avi

  • T. Code for Cancelling / Deleting the Payment Run in F110

    Hi Gurus,
    Can anybody please tell me the transaction code for deleting the payment run (before taking print out) in F110.
    I tried to do it from F110 itself and is working fine.
    I want to know if there is any separate T.Code available.
    Regards.
    Vikas

    Hi Chintan
    If there is no concept of Deleting Output then why SAP provided Delete Output Option in F110.
    Vikas you are right We can Delete the Payment Run in F110 itself.
    And as you mentioned you did not make the printout form so there is no Check Printed, you go to Transaction FBRA and Reset & Reverse the Payment Document(Clearing Document).
    If the Check is printed then you need to use FCH8 , Cancel the Check and then Reverse the Document as said Above by Zubin.
    Regards
    Venkat

  • Cannot write the suitable source codes for running program

    I want to write a program that help student to compile program and run program by using some test cases. For the compiled part, i have been wrote it successfully, but for the run part, i cannot pass the test cases to the program for running. Could any ppl help me to find the problem on the followng codes, why the error will on there? how do i change it? Thanks!
    //<!--start get Program Test Case File-->
    java.io.BufferedReader TestCaseBuf = null;
    Connection con = null;
    Statement stmt = null;
    ResultSet rs = null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:compas", "sa", "password");
    stmt = con.createStatement();
    String strSQL = "SELECT testValue FROM TEST_CASE WHERE progID='"+progID+"'";
    stmt = con.createStatement();
    rs = stmt.executeQuery(strSQL);
    try
    while (rs.next())
    TestCaseBuf = new java.io.BufferedReader(new java.io.InputStreamReader(rs.getBinaryStream("testValue")));                         
    finally
    if (rs != null)
         rs.close();
    if (stmt != null)
         stmt.close();
    //<!--end get Program Test Case File-->
    //<!--start run program -->
    String[ ] args2 = new String[ ]
         "java", "-cp", System.getProperty("user.dir"), FileName
    try
         Runtime rt = Runtime.getRuntime();
         Process proc = rt.exec(args2);
         java.io.BufferedReader ireader = new java.io.BufferedReader(new java.io.InputStreamReader(proc.getInputStream()));
         java.io.PrintWriter pwriter = new java.io.PrintWriter(proc.getOutputStream());
    String atestcase = null;
         String line= null;
         try
    while ((atestcase = TestCaseBuf.readLine()) != null) <------------I found that error seems on here!!!!
         pwriter.write(atestcase+"\r");
    pwriter.flush();     
    if (atestcase != null)
              if ((line = ireader.readLine()) != null)
              FileOutput = FileOutput + line +"\r\n";
    else {break; }
         } //while
         catch (java.io.IOException e)
         out.println("[IOException]. Printing Stack Trace");
         e.printStackTrace();
         pwriter.close();
         ireader.close();
    catch (java.io.IOException e)
    out.println("[IOException]. Printing Stack Trace");
    e.printStackTrace();
    //<!--end run program -->

    Whats the error message??
    Just a guess, but could be (without seeing the error) that you've already closed the TestCaseBuf reader by closing the result set, hence when you go to read it, you're reading on closed reader.
    Give this a go...Put the //<!--run program --> code into the result set while loop
    while (rs.next())
    TestCaseBuf = new java.io.BufferedReader(new java.io.InputStreamReader(rs.getBinaryStream("testValue")));
    //<!--start run program -->
    ...some code
    //<!--end run program -->
    } Hard to tell without the error message

  • Steps for Running T-code MIRO in the background

    HI,
    Plz let me know the steps for running T-code MIRO in the background Programatically.
    Regards

    Hi
    check following link it will help to you
    [http://help.sap.com/saphelp_46c/helpdata/en/a8/b992bd452b11d189430000e829fbbd/content.htm]
    [invoice verification in background;
    Regards
    Kailas Ugale

  • Any code for clearing container after interface run - UDF

    Hi All,
    I create a user simple UDF, and use it for two fields. In the first mapping I was populated all data in the <b>container</b> and it would be used by second field also. It has perfectly running.
    But my problem is that when I rerun the interface the container has populated same value which is I populated in the first time. I think <b>container</b> preserve of all the data after end of interface run.
    I want <b>container</b> has to be free after run the interface. There is any code for clearing <b>container</b> after interface run?

    Hi,
    That is strange. Container is initialized for every mapping and it is not persistent between mapping programs.
    Also, a quick note, why are you using Global Conatiner? from  Sp 14 onwards, you hava a separate java Section and Global Variables that can be used withing the mapping prorgram in different UDF's.
    please refer to this blog for the same,
    /people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
    Regards
    Bhavesh

Maybe you are looking for

  • HTTPBC POST does not contain any values on the recieving end.

    I have a BPEL which reads the content of a file as String and send it to a Servlet using the HttpBC Post method. But when I want to get this value on the recieving end (The Servlet), the httpRequest object is empty and it returns Null value? If I do

  • SQL Developer 3.0 Bug

    In ORACLE Developer 3.0.04 is a bug in showing the functions or procedures of a package. When "for update nowait" is included in source code no functions or procedures will be shown. select vts_server into v_server from vt_server where vts_status = 1

  • How to use "packageless" class in resin app

    Good day to all. I have posted this on the Resin support but haven't heard an answer. If anyone can help I would really appreciate it. I have a web application that used a combination of "packaged" classes and non "packaged" third party classes. It w

  • Do i have to have my photos saved to photostream in order to view them on pc?

    I recently lost my ipod and I didn't have the pictures saved to my photostream, Can i still access them?

  • Creaking sound upon wake from Sleep

    I have only had my MBP (very first mac) last 1/25 and for a few days would wake from sleep totally silent.  In the last couple of days occasionally it wil make a creaking sound for a couple of seconds after I raise the lid sounds kinda like gears. No