How to get Error Trace on Linux

Hi All,
I am trying to run my JAR ( A simple JAR that uses JCO) on Linux SUSE 10, when I run it, it just gives me the following error, there is no trace.
How can I get the full trace. Please help.
This is what im doing and the next line is the error message.
dsadm@mach1:/opt/IBM/media/SAP/sapjco> java -jar ditest1.jar
The java class is not found: com/sap/mw/jco/JCO$Exception
dsadm@mach1:/opt/IBM/media/SAP/sapjco>
This is the (ONLY) class file in the JAR, I exported my JAVA project from NWDS as a JAR file.
package com.test;
* Conn.java
* Property of SAP AG, Walldorf
* (c) Copyright SAP AG, Walldorf, 2000-2003.
* All rights reserved.
import com.sap.mw.jco.*;
public class Conn {
  // The MySAP.com system we gonna be using
  static final String SID = "R3";
  // The repository we will be using
  com.sap.mw.jco.IRepository repository;
  public Conn()
     System.out.println("**** DI11 *****");
         this.buildConnection();
       System.out.println("**** DI 22*****");
  public void buildConnection(){
     try {
               System.out.println("**** DI2 *****");
            // Add a connection pool to the specified system
            //    The pool will be saved in the pool list to be used
            //    from other threads by JCO.getClient(SID).
            //    The pool must be explicitely removed by JCO.removeClientPool(SID)
          com.sap.mw.jco.JCO.addClientPool( SID,         // Alias for this pool
                                    10,          // Max. number of connections
                                    "040",       // SAP client
                                    "testuser",   // userid
                                    "pass",  // password
                                    "EN",        // language
                                    "ipaddress",// host name
                                    "xx" );
            // Create a new repository
            //    The repository caches the function and structure definitions
            //    to be used for all calls to the system SID. The creation of
            //    redundant instances cause performance and memory waste.
            repository = com.sap.mw.jco.JCO.createRepository("MYRepository", SID);
          catch (Exception ex) {
            System.out.println("Caught an exception: \n" + ex.getMessage());
  // Retrieves and prints information about the remote system
  public void systemInfo()
    try {
      // Get a function template from the repository
      IFunctionTemplate ftemplate = repository.getFunctionTemplate("RFC_SYSTEM_INFO");
      // if the function definition was found in backend system
      if(ftemplate != null) {
        // Create a function from the template
        JCO.Function function = ftemplate.getFunction();
        // Get a client from the pool
        JCO.Client client = JCO.getClient(SID);
        // We can call 'RFC_SYSTEM_INFO' directly since it does not need any input parameters
        client.execute(function);
        // The export parameter 'RFCSI_EXPORT' contains a structure of type 'RFCSI'
        JCO.Structure s = function.getExportParameterList().getStructure("RFCSI_EXPORT");
        // Use enumeration to loop over all fields of the structure
        System.out.println("System info for " + SID + ":\n" +
        for (JCO.FieldIterator e = s.fields(); e.hasMoreElements(); ) {
          JCO.Field field = e.nextField();
          System.out.println(field.getName() + ":\t" + field.getString());
        }//for
        System.out.println("\n\n");
        // Release the client into the pool
        JCO.releaseClient(client);
      else {
         System.out.println("Function RFC_SYSTEM_INFO not found in backend system.");
     catch (JCO.Exception ex) {
       System.out.println("Caught an exception: \n" + ex);
  // Retrieves and displays a sales order list
  public void salesOrders()
     JCO.Client client = null;
    try {
      // Get a function template from the repository
      IFunctionTemplate ftemplate = repository.getFunctionTemplate("BAPI_SALESORDER_GETLIST");
      // if the function definition was found in backend system
      if(ftemplate != null) {
          // Create a function from the template
          JCO.Function function = ftemplate.getFunction();
          // Get a client from the pool
          client = JCO.getClient(SID);
          // Fill in input parameters
          JCO.ParameterList input = function.getImportParameterList();
          input.setValue("0000001200", "CUSTOMER_NUMBER"   );
          input.setValue(      "1000", "SALES_ORGANIZATION");
          input.setValue(         "0", "TRANSACTION_GROUP" );
          // Call the remote system
          client.execute(function);
          // Print return message
          JCO.Structure ret = function.getExportParameterList().getStructure("RETURN");
          System.out.println("BAPI_SALES_ORDER_GETLIST RETURN: " + ret.getString("MESSAGE"));
          // Get table containing the orders
          JCO.Table sales_orders = function.getTableParameterList().getTable("SALES_ORDERS");
          // Print results
          if (sales_orders.getNumRows() > 0) {
            // Loop over all rows
            do {
              System.out.println("-----------------------------------------");
              // Loop over all columns in the current row
              for (JCO.FieldIterator e = sales_orders.fields(); e.hasMoreElements(); ) {
                 JCO.Field field = e.nextField();
                 System.out.println(field.getName() + ":\t" + field.getString());
              }//for
            } while(sales_orders.nextRow());
          else {
            System.out.println("No results found");
          }//if
      else {
         System.out.println("Function BAPI_SALESORDER_GETLIST not found in backend system.");
       }//if
    catch (Exception ex) {
      System.out.println("Caught an exception: \n" + ex);
    finally {
       // Release the client to the pool
      JCO.releaseClient(client);
  protected void cleanUp() {
    JCO.removeClientPool(SID);
  public static void main(String[] argv)
    Conn e = new Conn();
  e.systemInfo();
  e.salesOrders();
  e.cleanUp();
This is standard SAP code, please help on how can I get the complete error trace on linux.

You do not require RFCSDK to build a jaava application that uses JCO on LINUX.

Similar Messages

  • How to get errors and/or air.trace() from installed air app?

    I'm trying to debug an installed air app that behaves
    differently once installed than when run with adl. However, i can't
    figure out any way to get errors or air.trace() information. I am
    on OS X (10.5.6). Any tips?
    I imagine this should be easy since debugging an installed
    app is pretty much a necessity for development.

    You can enable logging to a text file using settings in the
    mm.cfg file. See
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19323
    Note that ALL trace output will go to the log.
    Other things you can do are:
    1. Run the installed app with adl -- just pass the installed
    app descriptor to adl on the command line
    2. Supply a publisher id to adl. This removes one difference
    between installed/ not installed apps and may be enough if the
    behavior issue has to do with local connections or other matters
    involving the publisher id.
    3. Use the adl -nodebug flag. This removes another difference
    between installed/uninstalled apps. You won't see uncaught
    exceptions, but trace statements are still reported.

  • TS3212 How to get error 2 message to go away when downloading on windows 7

    How to get itunes to download on windows

    Let's try a standalone Apple Application Support install. It still might not install, but fingers crossed any error messages will give us a better idea of the underlying cause of the issue.
    Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
    http://www.apple.com/itunes/download/
    Download and install the free trial version of WinRAR:
    http://www.rarlab.com/
    Right-click the iTunesSetup.exe (or iTunes64Setup.exe), and select "Extract to iTunesSetup" (or "Extract to iTunes64Setup"). WinRAR will expand the contents of the file into a folder called "iTunesSetup" (or "iTunes64Setup").
    Go into the folder and doubleclick the AppleApplicationSupport.msi to do a standalone AAS install.
    Does it install properly for you?
    If instead you get an error message during the install, let us know what it says. (Precise text, please.)

  • Report 2.5 : How to get error

    Hi,
    I have done the migratation of our application from report 2.0 to
    report 2.5.
    When a preview is starting, a window 'Report Progress' appeared
    with a cancel press button.
    If I press this button during "Initialilizing report" message, a
    REP-0099 report is aborted at upon user request, after cliquink
    on Ok, no report preview appears. It's Ok for me.
    The same actions during "Formating Page x" make the message
    REP-0099 appeared and the preview is ran. By navigating on the
    report preview (next page), the REP-099 message appeared at the
    page number for which the cancel operation have been processed.
    I had tried to get the error number (srw.geterr_run) in all form
    triggers. It doesn't work.
    What i want is to stop the Report preview if the user had pressed
    the Cancel button.
    So, I would like to know if you have a method to stop the report
    when Cancel button is pressed on the "Report Progress" window (by
    getting error message in forms, or any other method).
    Thanks.
    DAVID RONGEAT.
    null

    It's not possible to use wild-cards in sql-substitution.
    Here are your choices :
    1) write xquery that does what you need - something like :
    if ( sum( $whatever) ne 0 ) then
    sum( $whatever )
    else (: need to distinguish between sum==0 and sum==null :)
    if ( some $x in TABLE()
    where $x/key eq $thekey ) then
    0 (: there were matching rows, but whatever we were summing was still 0 :)
    else (: no matching rows, sum was 0 )
    -9999
    This is likely going to result in some ugly/less efficient sql
    2) use sql substitution where needed. I don't see this as being any more evil than (1). If you have ten places where you need to do sql substitution - there will be ten places where you need to do (1), correct?
    3) Create a Physical Data Service based on the sql-statement that you want to have executed. This is about as much work as (2), and about twice as hard to get correct.
    4) open a case with customer support for a product enhancement. You won't get this enhancement - trust me.
    5) change your requirements
    6) Post here again asking "but can I do xyz instead?" - in which case I will point you to this case with the six options.

  • How to get Error Msg from A step in TestStand into a variable (with Record Result disable)

    I have disable "Record Result" in a step (action) that call a Labview VI (Minimise memory usage during long run).
    But I want to capture the error msg and put it in a local variable (locals.log).
    So in the "Post Expression" of that step, I add:
    locals.log = step.result.error.msg
    But it always an empty string, Is the post expression executed when the there is an error in the step ?
    So How can I capture it ?

    Hi,
    The trouble is that when a step errors, the Post Expression doesn't get executed.
    Try using one of the Override callbacks - SequenceFilePostStepRuntimeError, ProcessModelPostStepRuntimeError or StationPostStepRuntimeError.
    There is an example in the Examples\Callbacks.
    The Step properties are passed as a parameter to the callback so you can get the error message and do your logging.
    Hope this helps
    Ray Farmer
    Regards
    Ray Farmer

  • How to get the trace file name for current running application?

    Hi, I want to know if it is possible to get the file name directly for current running application instance which is launched by javaws.
    There is a property "deployment.user.logdir" tells the log directory, it would be great if a file name property
    is available. something like "instance.trace.file".
    Our application wants it because we would like our client send use the application log by clicking a "send error"
    button, the codes finds the trace file and compress it and send it by using a smtp server.
    In 1.5, we can do it by using a shell program.

    I found other asked it before, but I tried to set both properties, but neither works. my sun JRE version :java version "1.6.0_04"
    <property
    name="deployment.javaws.traceFileName"
    value="abcfefsfdsf"/>
    <property
    name="deployment.javapi.trace.filename"
    value="235235235"/>
    But it always write to one trace file with name lik javaws63645.trace

  • How to send Error Trace in Alert

    Hi All,
    I am using the following blog to raise an exception in mapping
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    I am able to get the exceptions as expected, which is good.
    When i executed the interface, if it failed then throwing an exception but it is giving in TRACE part of the MONI.
    When an alert triggered, it says mapping error. I would like to have the Exception message in the alert.l
    Is there any way to get that Exception message to Alert
    Regards

    Hi Vamsi Krishna,
    You can access only limited Constant Field Values using Java API (UDF or Java Mapping). [Link1|http://help.sap.com/javadocs/pi/SP3/xpi/constant-values.html#com.sap.aii.mapping.api.StreamTransformationConstants.DYNAMIC_CONFIGURATION]
    May be you can use this method [Link2|http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/engine/interfaces/messaging/api/exception/MessagingException.html#setErrorCategory(java.lang.String)] . Please explore more about this API, you can use "setErrorCategory" method and in CCMS alerts you can sent that ErrorCategory. But I am think SAP will not recommend it.
    Regards,
    Raghu_Vamsee

  • How to get error information back from Office Web Apps server?

    I'm developing a web application with an embedded Word iframe that interfaces with an Office Web Apps server; I am trying to implement the MS-FSSHTTPB protocol for my WOPI server.
    More details here. When I send a bad response back to the OWA server it stops making requests to the WOPI server and sends the following error message back to the browser client: "Sorry, there was a problem and we can't open this document. If this
    happens again, try opening the document in Microsoft Word."
    Is there a way I can get additional information about what went wrong so that I can correct it?

    Yes, this is closely related to SharePoint.
    I'm trying to embed a Word editor in our web app. The Word iframe is served from the OWA server. It typically communicates with a SharePoint server to receive information about the document its trying to display.
    I'm trying to implement the SharePoint portion. The servers communicate via the MS-FSSHTTPB protocol (among others) which I'm struggling to implement. When I send a response to the OWA server that it doesn't like then it stops replying. I'm wondering how
    I can retrieve the exact error the occurred.
    I believe I originally posted this question to Open Specifications  >  SharePoint Server Protocols.

  • How to get error message for VISA in CVI?

    Hi there,
      I was using labview 2012 to handle GBIP interface with VISA, the VISA write code will return an error cluster if exists. Recently, I switch to CVI and I use viWrite to write to the GBIP, but in this case, how can I get the error cluster?

    Erik-S wrote:
    Hi dragondriver,
    There is not an error cluster in CVI in the same way that there are error clusters in LabVIEW. A VISA function should output an integer if there is an error, but it will not include a string and a boolean like LabVIEW does. You can set up a function that acts like an error cluster by creating a struct that has the error integer, a string related to that integer, and a boolean. You would have to use the integer to look up the error string from a library. 
    -Erik S
    Thanks Erik. I found that when I operate the VISA, it actually return a number to tell success or failure only. I wonder how to extract the error message as string in CVI?

  • How to get error's field name when execute sql error

    I want to get the error's field name when execute sql error,but SQLException is not provide corresponding function to get it.
    How can I do for it?

    user523110,
    I believe the "unique constraint" error message displays the name of the constraint, not the column name, as you have posted.
    As far as I know, the only way to extract the column(s) would be to query the data dictionary using the constraint name provided in the error message.
    Also, as far as I know, there is nothing in the JDBC API that can return the names of the columns associated with a given unique constraint.
    Good Luck,
    Avi.

  • How to get error message on the same jsp

    Hi guys,
    I have a login.jsp page and I want an error message to be printed "login failed" in the same jsp page when the user enters the wrong credentials.
    Any ideas on how to do that is highly appreciated.
    Thanx in advance.sri

    If you use struts it would have been a lot easier and better than only JSP.
    In struts :
    Add this line in ur JSP page
    <html:errors/>
    In ur Action servlet ex: LoginAction.java add thsi code extract in the appropriate position ...
    ActionErrors errors = new ActionErrors();
    errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.user.wrong"));
    if (!errors.isEmpty())
    saveErrors(request, errors);
    But in JSP do something like this:-
    If authentication fails then post to the same JSP and put this code in the reqd position...
    <%
    String postFlag=request.getParameter("postFlag");
    if(postFlag.equals("FAILED"))
    %>
    LOGIN FAILED
    <%
    %>
    So for JSp simply set the request parameter  (postFlag)  to SUCCESSFUL/FAILED  from your servlet.

  • How to get error and correct result in different file...

    Hi,
    sqlplus -s u/p@i >logfile /nolog <<EOF
    @ sql script
    exit
    EOF
    Is it possible to write sqplplus so as to get only connection related error in logfile and PL/SQL script related error in spool file.
    Regards
    Sri

    Below is a sample script I used recently; here "2>" puts the errors into file mentioned and I spool inside the sql script I call from sqlplus session.
    Also if you use this type of connection users can not see you database users password with unix ps command -
    #!/bin/ksh                                                                     
    export SAMPLE_USERNAME="usernm"                                               
    export SAMPLE_PASSWORD="passwd"                                               
    export SAMPLE_DATE=$1                                                     
    export SAMPLE_DIR="/xxx/yyy/log"                                                   
    if [[ -z $SAMPLE_DATE ]]
    then
       echo
       echo HATA : SAMPLE_DATE parametresi girilmis olmali!..
       echo
       exit -1
    fi
    cd ${SAMPLE_DIR}
    retc=0
    sqlplus -s > $SAMPLE_DATE.log 2> $SAMPLE_DATE.err <<EOF
    $SAMPLE_USERNAME/$SAMPLE_PASSWORD
    @/xxx/scripts/yyy.sql $SAMPLE_DATE
    exit ;
    EOFbest regards.

  • How to get error message from the BPEL process

    Hi,
    We have some BPEL processes running in BPEL PM 10g. If any of these BPEL process fails, we would like to get the error message caused this process to fail.
    Please let me know where does the BPEL proccess holds (table/file) these details. or is it possible to get the error message programatically.
    Thanks

    You can go through below link that can help
    http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/faults.htm#sthref1186
    http://bpelknowledge.blogspot.com/2010/07/error-conditions-that-cannot-be-handled.html
    http://blog.whitehorses.nl/2009/11/03/error-handling-in-soa-suite-11g/
    Hope it helps!!
    Thanks
    AJ

  • How to get stack trace of an exception

    Hi,
    I want to get whole stack trace and show it in a new Frame instead of showing on command line.
    when I say,
    e.getMessage();
    it gives just first line, not rest of the part.
    Can anybody help me with that?
    Thanks in advance.

    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw);
    e.printStackTrace(pw);
    String stackTrace = sw.toString();

  • 1 distinct type of ORA- errors - "How to get error message"

    How do I configure Grid Control to send the full error message on the "Generic Alert Log Error Status" alert instead of just having it tell me there has been an error found?

    You need to add the rule:
    Click
    Preferences
    Rules
    Database Availability and Critical States, Click Edit
    Metrics, Add.
    Select: Generic Alert Log Error
    Continue ... etc .etc
    Hope this helps
    Daryl
    PS. I remove the Generic Alert Log Error Status -- dont need that extra email -- its useless.
    Note too that you have to clear these alerts manually via the "Clear Alert" button or do a whole wack of them via the Alerts->Warnings tab, the select all, clear.

Maybe you are looking for

  • Connect to Linksys Cable Gateway via AirPort Extreme Base Station?

    Thank you in advance for any replies. I have the following new setup: A G3 Blue tower running OS X 10.4.10 is successfully connected to the internet via a Linksys WCG200 Cable Gateway connected to RCN's cable internet service. The WCG200 unit has wir

  • MX440SE-T wont output to TV

    I have an mx 440 and it wont output to the tv. My graphics card has an s-video output, but XP wont even detect that the card is capable of twinview. any help?

  • BDC for Transaction FN8X

    Hi All, I am using FN8X (Business Operations) transaction to process contracts. I need to process many contracts at a time, for which I have decided to go for BDC. But during recording, I am getting an error message saying 'This process doesn’t suppo

  • An extension automatically installs every time i start firefox

    An extension from local system automatically installs every time I start Firefox after PC restart. I tried to disable it, remove it, but again after restart, it appears there. My question is how to disable addition of extensions and plugins from loca

  • Problem responding to events in fullscreen mode

    I made a fullscreen game and I'm trying to get it to respond to the mouse or keyboard input. The problem is it only responds a few second after I press the button. Does anyone know how I could speed up the response? All my code is posted below. EDIT: