PrintWriter methods throw NO exceptions!

Hi,
According to the PrintWriter javadoc:
"Methods in this class never throw I/O exceptions. The client may inquire as to whether any errors have occurred by invoking checkError()."
I think this sounds strange in Java language, since it has the Exceptions mechanism...does any one know the reason why it is like this?
Regards

With unchecked exception, it will still terminate my function mid-way!
Here is a concrete example:
public void method1() {
   try {
      ... open database then read 1 entry ...
      file.println("Entry is "+x);
      method2();
      ... close the DB connection properly.
   } catch(DBException ex) {
      ... deal with the DB failure accordingly
public void method2() {
   try {
      ... open a webconnection then read 1 webpage ...
      file.println("Webpage is" + y);
      ... now close the web connection
   } catch(webException ex) {
      ... deal with the Web failure in a web-specific way
}If println throws exception (checked or unchecked), then I must wrap method1 AND method2
in yet another try/catch block. Otherwise, the function will die halfway, and my database or web connection
will be in a funky state.
By not throwing any exception (unless OutOfMemory or other dire situation),
I can write method1 and method2 without worrying about it.
And then at the end, I just check to see if all the writes succeeded or not.

Similar Messages

  • Should this method throw an exception

    Hi,
    I have a method in a Database interface implementation class.
    updateField( String fieldname, String value ) throws InvalidFieldException { 
       if ( ! is_Valid ( fieldname, value  ) {
         throw  new InvalidFieldException();
    }This will check the value does not exceed a certain length and it's format is correct, else it won't apply the update and should let the user know to correct the format of the value string.
    is it good practice to have the method throw an InvalidFieldException() to return control to the calling method or how would you deal with an invalid field.
    I know/ have heard that exceptions are for "Unexpected" things and a user entering data in the wrong format would not be classed as "unexpected" so by this definition using Exceptions is not the way to go.
    Any ideas?

    This will check the value does not exceed a certain
    length and it's format is correct, else it won't
    apply the update and should let the user know to
    correct the format of the value string.
    is it good practice to have the method throw an
    InvalidFieldException() to return control to the
    calling method or how would you deal with an invalid
    field.There are two strategies, both work. Just don't mix them:
    - using contracts: clearly state that your method requires a certain range of values as an argument, and that everything outside this range will probably cause a problem. It's putting the responsibility of checking the argument's correctness to the caller, who anyway should know best how to provide the values and how to deal with wrong ones.
    - defensive programming: take everything they give you and check yourself - throwing an IllegalArgumentException. Might be more secure, but far more work. I advise only to use this way on public methods, especially if you're going to distribute your classes as a library for others to use.
    I know/ have heard that exceptions are for
    "Unexpected" things and a user entering data in the
    wrong format would not be classed as "unexpected" so
    by this definition using Exceptions is not the way to
    go.You're right, but there's a limit to what your method can do to fix the problem. If it can't do that by itself you need an escalation mechanism. Hence you can use an exception.

  • One method throw many exception

    7. Create three new types of exceptions. Write a class with a method that throws all three. In main( ), call the method but only use a single catch clause that will catch all three types of exceptions.
    Ok, I am learning java language from bruce eckel book. That is the exercise. I m having dificulties.
    How can one method throw more than one exception?
    class Satu extends Exception
       Satu() { }
    class Dua extends Exception
       Dua() { }
    class Tiga extends Exception
       Tiga() { }
    class ThisIsIt
       public void f() throws Satu, Dua, Tiga
          throw new Satu();
          throw new Dua();
          throw new Tiga();
    public class Enam
       public static void main( String[] args )
          try
          ThisIsIt a = new ThisIsIt();
          a.f();
          catch( Exception d )
          System.out.println( "Doing something here" );
    }That code won't even compile because :
    Enam.java:21: unreachable statement
    throw new Dua();
    ^
    Enam.java:22: unreachable statement
    throw new Tiga();
    Do I interpret that question wrong????

    The problem you have is that when the code comes to the first 'throw' command it will throw the exception and exit the method (like a return does) so the code after will never be reached. In order to test your code you need to put some 'if's around the throws or give it a parameter from the console. eg.class ThisIsIt
        public void f(int errorType) throws Satu, Dua, Tiga
            if (errorType ==1)
                throw new Satu();
            if (errorType ==1)
                throw new Tiga();
            if (errorType ==1)
                throw new Dua();
    }Ted.

  • Catching or Methods Throwing Exceptions

    Hi,
    I'm just wondering whats the difference between catching an exception and a method throwing an exception?
    I'm a bit confused on their purpose dealing with exceptions.
    catching an exception
    void p1()
              try{
                   p2();
              }catch(IOException ex){
         }method throwing an exception
    void p1() throws IOException
              p2();
         }

    one more stuff i need to add is that:
    When we declare a particular code within a try catch
    statement it means that that particular code is very
    much prone to an exception , i mean the programeer
    knows that code will throw a exception and hence we
    mention in try catch block.
    But in other case when we suffixed that particular
    method with throws clause it means the programmer is
    not sure ,that code might throw an exception,hence we
    put in throws clause.Not quite, the programmer always knows if a checked exception is being thrown, since the compiler requires it to be caught or having a throws clause. Unchecked (runtime) exceptions don't require a throws clause and the programmer must/can catch it if he wants to.

  • Is it possible to throw an exception from run method of a thread?

    Is it possible to throw an exception from "run method of a thread"(implemented as runnable implementation)?
    Is it advisable to do so?

    Is it possible to throw an exception from "run method
    of a thread"(implemented as runnable
    implementation)?Yes, an unchecked one. Runtime exceptions.
    Is it advisable to do so?If you mess up it happens automatically. But basically: no.

  • Limit the time of lookup and make the method to throw an Exception

    When I connect from
    Client
    Remote Desktop Client
    Server:
    SUN JAVA SYSTEM APPLICATION SERVER 9.0
    Initial Context object is initialized as per below coding,
    System.setProperty("org.omg.CORBA.ORBInitialHost", prop.getProperty("hostName"));
    System.setProperty("org.omg.CORBA.ORBInitialPort", prop.getProperty("portNumber"));
    InitialContext ctx = new InitialContext();
    while .lookup("globalJndiNameForSessionBean") method is invoked on the InitialContext object and if the server is not available, it is throwing non stop error.
    Please tell me wether I have to add any other Properties to limit the time of lookup and make the method to throw an Exception after two or three second, if the server is not available.

    What do you mean by 'non-stop error'? This can only happen if your code goes into a non-stop loop.
    The default TCP connect timeout is about 75 seconds, which in some circumstances is too long, but two or three seconds definitely isn't long enough. Ten to twenty would be more like it.
    I'm not aware of any system properties that limit the ORB connect timeout but then I'm not aware where the existing J2SE ORB system properties are documented. If anybody has ever found this please let us know.

  • Why Overridden method do not throw Broder exception

    Why Overridden method of derived class do not throw Broder exception than the method that is in base class

    Why Overridden method of derived class do not throw
    Broder exception than the method that is in base classWhat is a Broder Exception?
    I don't understand your question?
    You are asking something about overriding a method:
    http://java.sun.com/docs/books/tutorial/java/IandI/override.html

  • Exceptions - documentation on which methods throw exceptions ?

    Hi, does anyone know where I can find full documentation on iphone SDK methods
    The iphone SDK documentation seems to be incomplete.
    For instance, the discussion section of the SDK documentation for NSMutableArray addObject method doesn't mention anything about exceptions.
    However, the method could throw an exception (and this is mentioned in http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMu tableArray_Class/Reference/Reference.html)
    I'm assuming that alloc will not throw exceptions and that it will just return nil if no memory is available. However, I haven't found any documentation that states this.
    Does anyone have a pointer to Apple documentation for methods (that includes information on any (and all) exceptions thrown by the method and also includes information on possible return values for the method) ?

    There is this
    http://java.sun.com/products/jdbc/driverdevs.html
    I am pretty sure that there is little in the meta data stuff that has to be supported.

  • Why socket doesn't throw an exception

    Hello,
    I am using following code
    client:
          InetAddress addr = InetAddress.getByName("localhost");
          sock = new Socket(addr, 5551);
          in = new BufferedReader(
            new InputStreamReader(
              sock.getInputStream()));
          out = new PrintWriter(
            new BufferedWriter(
              new OutputStreamWriter(
                sock.getOutputStream())), true);server
    try{
      ServerSocket server = new ServerSocket(port);
      Socket socket = server.accept();
      BufferedReader in = new BufferedReader(
         new InputStreamReader(
           socket.getInputStream()));
      PrintWriter out = new PrintWriter(
        new BufferedWriter(
          new OutputStreamWriter(
           socket.getOutputStream())), true);
      while (true){
         String msg = in.readLine();
         System.out.println(msg);
    catch (SocketException  se){
      System.out.print(se.toString());
    catch (IOException e){
      System.out.print(e.toString());
    catch (Exception ex) {
      System.out.print(ex.toString());
    }When I close client, server is constantly writing null (msg is null). Why doesn't it throw an exception?
    Thank you.

    The moral of the story is avoid using Readers and Writers with Sockets. They swallow exceptionsThat's not so. It is PrintWriters and PrintStreams that swallow exceptions.
    @OP: there is no reason for your code to throw an exception. It keeps reading the socket and encountering EOF, signalled by the null return, at which point any sensible code should exit the loop and close the socket. However as you don't do that, you just read the socket and get the EOF again ...
    You would only get an exception, specifically an EOFException, if you were calling one of the readXXX methods that is specified to throw it. readLine() isn't one of those.

  • Throwing an exception from XSLT

    Just wanted to share a finding with the Oracle XDB community and possibly suggest an enhancement to the xdb product development team (care of MDRAKE).
    I had a scenario where I wanted to throw an exception from the XSLT.
    A little Googling revealed this helpful post:
    http://weblogs.asp.net/george_v_reilly/archive/2006/03/01/439402.aspx
    ...so I gave it a shot.
    In my XSLT, I have a <xsl:choose> block with the following <xsl:otherwise> block:
    <xsl:otherwise>
        <xsl:message terminate="yes">Unknown Document Type</xsl:message>                          
    </xsl:otherwise>I used a stub test to run this through, giving it a file which would exercise the exception:
    select xmltype(bfilename('XML_RESOURCES', 'data.xml'),0).transform(xmltype(bfilename('XML_RESOURCES', 'sanitize_xml.dev.xsl'),0))
    from dual;..and to my 'joy', I did get an exception:
    ORA-30998: transformation error: execution of compiled XSLT on XML DOM failedHmm...would of been nicer to get something like what Eclipse/Xalan pops out:
    file:/H:/eclipse_indigo_workspace/XSLT/sanitize_xml.xsl; Line #28; Column #59; Unknown Document Type
    (Location of error unknown)Stylesheet directed termination...i.e. my custom error message "Unknown Document Type" isn't output by Oracle.
    Just to be safe, I tried a file which would NOT exercise this xsl:otherwise block and it did run through OK.
    So, could XDB report a better error?
    Thoughts?

    SQL> VAR XSL VARCHAR2(4000)
    SQL> --
    SQL> begin
      2    :XSL :=
      3  '<?xml version="1.0" encoding="UTF-8"?>
      4  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      5     <xsl:output method="xml" indent="yes"/>
      6     <xsl:template match="/">
      7             <Result>
      8                     <xsl:choose>
      9                             <xsl:when test="Input=''1''">
    10                                     <Output>1</Output>
    11                             </xsl:when>
    12                             <xsl:when test="Input=''2''">
    13                                     <xsl:message>The value is 2</xsl:message>
    14                                     <Output>2</Output>
    15                             </xsl:when>
    16                             <xsl:when test="Input=''3''">
    17                                     <xsl:message terminate="no">The value is 3</xsl:message>
    18                                     <Output>3</Output>
    19                             </xsl:when>
    20                             <xsl:otherwise>
    21                                     <xsl:message terminate="yes">Invalid value</xsl:message>
    22                                     <Output>Bad Input</Output>
    23                             </xsl:otherwise>
    24                     </xsl:choose>
    25             </Result>
    26     </xsl:template>
    27  </xsl:stylesheet>';
    28  end;
    29  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> select XMLTRANSFORM(XMLTYPE('<Input>1</Input>'),XMLTYPE(:XSL))
      2    from dual
      3  /
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <Result>
      <Output>1</Output>
    </Re
    Elapsed: 00:00:00.01
    SQL> select XMLTRANSFORM(XMLTYPE('<Input>2</Input>'),XMLTYPE(:XSL))
      2    from dual
      3  /
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <Result>
      <Output>2</Output>
    </Re
    Elapsed: 00:00:00.00
    SQL> select XMLTRANSFORM(XMLTYPE('<Input>3</Input>'),XMLTYPE(:XSL))
      2    from dual
      3  /
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <Result>
      <Output>3</Output>
    </Re
    Elapsed: 00:00:00.01
    SQL> select XMLTRANSFORM(XMLTYPE('<Input>4</Input>'),XMLTYPE(:XSL))
      2    from dual
      3  /
    ERROR:
    ORA-30998: transformation error: execution of compiled XSLT on XML DOM failed
    no rows selected
    Elapsed: 00:00:00.01
    SQL>
    SQL>The actuall error is not unreasonalbe. The Execution did fail beacuse you terminated it.. Contacting Oralce Support may be a little excessive...
    Now with respect to message the question is where...
    We 'could' output into the same buffer as is used by DBMS_OUTPUT, but that has limits in terms of the amount of output that can be generated.
    We could write it to the trace file, but that may be difficulat for a developer to get to
    We could write it to a log file in the XDB repository, but where and how to name it...
    We could another parameter to XMLTransform, which would be a Message Buffer
    All of these are in effect enhancements..
    BTW I checked with XML Spy and they seem to ignore message too, so I'm wondering how widely used this is...
    We cannot add it to the output of the XSL since XMLTransform defines the output of the XML to be well formed XML, and adding a random set of text nodes would viloate that rule..

  • Class.forName() throws null exception in servlet

    Hi, just wondering if anyone having this similar problem:
    when i try to load a class using Class.forName() method inside a servlet, it throws null exception.
    1) The exception thrown is neither ClassNotFoundException nor any other Error, it's "null" exception.
    2) There's nothing wrong with the code, in fact, the same code has been testing in swing before, works perfectly.
    3) I have include all necessary jars/classes into the path, even if i haven't, it should throw ClassNotFoundException instead, not "null" exception.

    I have tried to detect any possible nullable variable, and it is able to run until line 15. The exception thrown is actually null only... not NullPointerException... which is why i have confused...
    the message i received is "PlugInException: null".
    The code is at follow:
    * Load plugin
    * @return ArrayList of plugins
    * @exception PlugInException PlugInException
    01 public ArrayList loadPlugin()
    02 throws PlugInException
    03 {
    04 PlugIn plugin;
    05 ArrayList plugins = new ArrayList();
    06
    07 for (int i = 0; i < configLoader.getPluginTotal(); i++)
    08 {
    09 try
    10 {
    11 if (debugger > 0)
    12 {
    13 System.out.print("Loading " configLoader.getPluginClass(i) "...");
    14 }
    15 if (Class.forName(configLoader.getPluginClass(i)) == null)
    16 {
    17 if (debugger > 0)
    18 {
    19 System.out.print(" not found");
    20 }
    21 }
    22 else
    23 {
    24 if (debugger > 0)
    25 {
    26 System.out.println(" done");
    27 }
    28 plugin = (PlugIn)(Class.forName(configLoader.getPluginClass(i)).newInstance());
    29 plugin.setContainer(container);
    30 plugins.add(plugin);
    31 }
    32 }
    33 catch (Exception e)
    34 {
    35 throw new PlugInException("PlugIn Exception: " + e.toString());
    36 }
    37 }
    38
    39 return plugins;
    40 }

  • How to throw bundled exceptions thrown by checkErrors()

    Hi,
    I call pl/sql to do update, and call checkErrors() , the code looks like following, but it doesn't display read friendly message on the screen. What is the right way to throw bundled exception from checkErrors() method?
    try{
    xxg2cGoalPk.startWf (conn,
    new BigDecimal(srpGoalHeaderId),
    new BigDecimal(userId),
    returnStatus,
    msgCount,
    msgData);
    int msgCount1 = 0;
    if(msgCount[0] != null){
    msgCount1 = Integer.parseInt(msgCount[0].toString());
    String returnStatus1 = returnStatus[0];
    String msgData1 = msgData[0];
    OAExceptionUtils.checkErrors(tx,msgCount1, returnStatus1, msgData1);
    catch(OAException e) {
    e.printStackTrace();
    throw new OAException(e.getDetailMessage(),OAException.ERROR);
    thanks
    Lei

    What Shiv said is only an alternative, but what you are using is correct.I haven't tested but as per javadoc of
    OAExceptionUtils.checkErrors(tx,msgCount1, returnStatus1, msgData1);
    will itself raise bundled exceptions. You need to write this line outside try/catch block.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • JNI Application running in ms-dos but throws an exception in applet

    Hi! I have a java application which calls a DLL using the JNI. This works perfect if I execute the java program from my command line (in ms-dos) But when I try to do it in an applet, it indeed runs and do everything ok, but at the end of the execution I get a EXECUTION_EXCEPTION.
    This is how is working:
    1.- jnidllmyclass, this is where I call the native method of my DLL
    2.- intermediate DLL which writes to files to c:\temporal and it calls several functions from other DLL
    3.- other DLL which writes more files (among other things)
    4.- applet class with a call to jnidllmyclass
    Now the DLL what does is to open a connection to a usb scanner, then send commands to it to scann somethings, save front and back images to c:\temporal (obviously, all of this is done in the user system, using certificates) and write other file and close the connection. This works! it write the images well and write everything... but after that the exception arises... I have doubt of what is it, because if it does all, what is causing the exception?
    Thanks for your help!

    Hi! Applet can access the DLL. The scanners works, but the C DLL throws an exception. Nevertheless, I've managed to see what was going on. When you click a JButton in a GUI, it enters only one to the actionlistener, but if this is done in an Applet, enters twice, so... the first time worked fine, but the second no because there was nothing to scann.
    This theme is a bit creepy, if you want help just ask! I give snippets, not just advices... I hate those people, so fell free to ask.
    Greetings!

  • FM used in background job throws an Exception-NO_BATCH

    Hi,
    I have one normal ABAP report with selection screen, where selection parameters are file names and they are used for uploading data from excel to internal table and then internal table to excel respectively.
    Now I want to put this as a background job. So I saved the variant and now while running the job there is an exception.
    Reason for the same as I could find out is:
    while uploading function module (KCD_EXCEL_OLE_TO_INT_CONVERT or ALSM_EXCEL_TO_INTERNAL_TABLE) is called, it has some front-end  services called.
    That is in case of first function module, it is CLPB_IMPORT which in turn calls WS_QUERY where GUI_EXIST is checked and there it throws an exception.
    And in the later case it is cl_gui_frontend_services class and its some method is called.
    So basically, frontend services are called in any case and I still want this as a background job.
    Can Anyone clear it conceptually?

    Hello Krupa,
    The rule is pretty much simple: <i>Anything that you do in batch / background, cannot have anything to do with the front-end / desktop.</i>
    The Excel sheet you use is an application that runs on the Frontend, right? So you cannot do it in batch. The reason, to put it crudely, is that a background job is run by a different workprocess altogether and that work process is not capable of accessing the front-end. Ideally, a background job should be run-able even without a GUI!!
    SO what you can do in a background job, is to operate on the files present on the application server (that is where the job runs).
    Hope that is clear. If not, get back.
    Regards,
    Anand Mandalika.
    Regards,
    Anand Mandalika.

  • NCo throws an Exception calling BAPI_MATERIAL_SAVEDATA?

    I've been successful in calling BAPIs from NCo (BAPI_CHARACT_CREATE, BAPI_CLASS_CREATE, BAPI_VENDOR_FIND, BAPI_VENDOR_GETDETAIL)....
    However when calling BAPI_MATERIAL_SAVEDATA, I always get the following Exception being thrown:
    Index was outside the bounds of the array.
       at SAP.Connector.Rfc.RfcStructureUtil.ToRfcStructure(Object obj, Byte[] dest, Type t, Encoding encoding, Boolean isUnicode, PropertyInfo[] propinfos, RfcStructInfo structInfo)
       at SAP.Connector.Rfc.RfcStructureUtil.GetITabFromList(SAPConnection conn, Object list, Type t, RfcStructInfo structInfo, Int32 itab)
       at SAP.Connector.Rfc.RfcClient.PrepareClientParameters(Type classType, MethodInfo m, Boolean isTQRfc, Object[] MethodParamsIn, RFC_PARAMETER[]& paramsIn, RFC_PARAMETER[]& paramsOut, RFC_TABLE[]& tables, ParameterMap[]& paramMaps)
       at SAP.Connector.Rfc.RfcClient.RfcInvoke(SAPClient proxy, String method, Object[] methodParamsIn)
       at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn)
       at SAP_MM_Test.SAPProxy1.Bapi_Material_Savedata(BAPI_MARA Clientdata, BAPI_MARAX Clientdatax, String Flag_Cad_Call, String Flag_Online, BAPI_MPOP Forecastparameters, BAPI_MPOPX Forecastparametersx, BAPIMATHEAD Headdata, String No_Dequeue, String No_Rollback_Work, BAPI_MPGD Planningdata, BAPI_MPGDX Planningdatax, BAPI_MARC Plantdata, BAPI_MARCX Plantdatax, BAPI_MVKE Salesdata, BAPI_MVKEX Salesdatax, BAPI_MARD Storagelocationdata, BAPI_MARDX Storagelocationdatax, BAPI_MLGT Storagetypedata, BAPI_MLGTX Storagetypedatax, BAPI_MBEW Valuationdata, BAPI_MBEWX Valuationdatax, BAPI_MLGN Warehousenumberdata, BAPI_MLGNX Warehousenumberdatax, BAPIRET2& Return0, BAPIPAREXTable& Extensionin, BAPIPAREXXTable& Extensioninx, BAPI_MEANTable& Internationalartnos, BAPI_MAKTTable& Materialdescription, BAPI_MLTXTable& Materiallongtext, BAPI_MFHMTable& Prtdata, BAPI_MFHMXTable& Prtdatax, BAPI_MATRETURN2Table& Returnmessages, BAPI_MLANTable& Taxclassifications, BAPI_MARMTable& Unitsofmeasure, BAPI_MARMXTable& Unitsofmeasurex) in C:\Dev\SAP_MM_Test\SAPProxy1.vb:line 220
       at SAP_MM_Test.Form1.Button1_Click(Object sender, EventArgs e) in C:\Dev\SAP_MM_Test\Form1.vb:line 114"     String
    I even tried calling the Method with all parameters set to Nothing and also get the same error.  I tested some of the other BAPI I listed will all Nothing parameters and it does not throw any exceptions.  Almost seems as if the Proxy generated classes did not get created properly or something?
    Has anyone else successfully called BAPI_MATERIAL_SAVEDATA from NCo 2.0?
    PS...I was successful in calling the BAPI from SE37 with the exact same data, therefore I know I have all the mandatory parameters specified (HeadData, ClientData, ClientDatax...etc)
    Anything obvious in the following code?:
    =======================================
         ' Connection String
         Dim cs As String = "ASHOST=10.83.180.239 SYSNR=10 CLIENT=110 USER=CMCHUG2 PASSWD=********"
         ' construct the proxy with connection string
         Dim proxy As New SAPProxy1(cs)
         ' Header Data
         Dim HeadData As New BAPIMATHEAD
         HeadData.Material = "000000000000000754"            ' Material NUmber (PAD to 18)
         HeadData.Ind_Sector = "U"                           ' Industry Sector
         HeadData.Matl_Type = "ERSA"                         ' Material Type (ERSA=Space Parts / HERS=Manufacturer Part)
         HeadData.Basic_View = "X"                           ' Need at least 1 view
         ' Client Data
         Dim ClientData As New BAPI_MARA
         ClientData.Matl_Group = "01"                        ' Material Group
         ClientData.Base_Uom = "EA"                          ' Base Unit of Measure
         ' Set the ClientData Indicator Table
         Dim ClientDataX As New BAPI_MARAX
         ClientDataX.Matl_Group = "X"
         ClientDataX.Base_Uom = "X"
         ' Short Description (TABLE)
         Dim ShortDesc As New BAPI_MAKTTable
         Dim sDescr As New BAPI_MAKT
         sDescr.Langu = "E"                                  ' Language
         sDescr.Matl_Desc = "Short Desc Test"               ' Short Description (Max 40)
         ShortDesc.Add(sDescr)
         Dim tblRet As New BAPIRET2
         Dim tblRetMsg As New BAPI_MATRETURN2Table
         proxy.Bapi_Material_Savedata(ClientData, ClientDataX, Nothing, Nothing, Nothing, Nothing, HeadData, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, tblRet, Nothing, Nothing, Nothing, ShortDesc, Nothing, Nothing, Nothing, tblRetMsg, Nothing, Nothing, Nothing)
    Exception Thrown Here!!!

    Reiner,
    Tried what you suggested, still get the same results.  This the 3rd development system I try this from. In all cases I generated proxies via drop and drop of the SaveData Method under StandardMaterial (BOR).  Since it was just generated the MetaData should be up to date?, good suggestion thought, I could see where that might be a problem going against different backends.
    My lastest attempt (I am quickly running out of ideas), was to generate a Standalone Proxy containing the SaveData method.  Same Results :{ 
    I was able to create Standalone Proxies for the other Business Objects I'm using (Characteristics, Class..etc) without a hitch. (Except for "Class", complaining about the Class name generated (Public Class Class...so I renamed to sapClass).  Using the Standalone Proxy Class I might try from Visual Studio 2005 to see if I get the same results.
    Also encountered another problem when trying to Add the whole BOR object StandardMaterial to the Proxy (so I would have access to a few of the Methods....this failed with some Java out of memory error....I would have to attempt this again to capture the exact error....when I get time I'll put that in another post).

Maybe you are looking for

  • When I plug my macbook retina into the tv with the hdmi port, all I see is a black screen with a white mouse How do I fix this?

    Recently I bought my macbook with retina display and when I plugged it into the television with using the HDMi cord it worked perfectly fine with the image on the television. But now I when I plug it in to the television it comes up with a black scre

  • Import PO with GR based

    Hello. We are Going for Import PO. We are creating the Import PO with Gr based Indicator. now Tax code is Zero. Customs clearing account is seprate.. from that A/c we will pay the Customs amount. So while doing the MIRO for Customs.(planned delivery

  • Synching error with different USB port

    I set up my iPhone and had no problems synching with iTunes. I then changed to a different USB port than the one I had originally used. I began to recieve the following error when I tryed to synch "0xE800001". I then switched to a different usb port

  • Notebooks in Forte Visual

    I am just starting to look at Forte Visual for C++ and am wondering how I might create a widget similar to the Java JTabbedPane container? Anyone developed something like this using Forte and the Motif widget set? grumpy

  • Screen is dim on my Mac Mini after installing 10.6.3 update

    Has anyone else encountered this problem? My Mac Mini was running just fine until I installed 10.6.3. After the reboot the display came up very dim. The icons and overall display are noticeably darker and playing a flash video (Hulu) results in an im