Initiating variables with private constructor fails

Goodday all,
At the moment I'm working on a little class that reads the input from the console screen. The class looks like this (I omitted a few unrelevant methods):
public class SomeClass {
  private static BufferedReader bin = null;
  // private constructor; another method (not shown here) returns an instance
  private SomeClass() {
    bin = new BufferedReader(new InputStreamReader(System.in));//somehow this doesn't work ??????
  //public method
  public final String readLine(String message) {     
          String feedback = "";
          try {
               if(bin==null) say("variable bin is null"); //bin is indeed null, just don't know why
               else feedback = bin.readLine();
          catch (IOException e) {
               e.printStackTrace();
          return feedback;
}Executing this code will result in output "variable bin is null". When I try debugging it, I see that the variable bin will remain null when the constructor is called.
Placing the initiation of 'bin' in another method will make things work, but I want to know why it doesn't work in the constructor. It seems as a fair piece of code ;).

private static BufferedReader bin = null;Why is it static?
// private constructor; another method (not shown here) returns an instance
private SomeClass() {
bin = new BufferedReader(new InputStreamReader(System.in));//somehow this doesn't work ??????
}'Somehow it fails?' It doesn't even compile!
Executing this code will result in output "variable bin is null". When I try debugging it, I see that the variable bin will remain null when the constructor is called.Your constructor doesn't even compile, so I find it hard to believe it ever executed.

Similar Messages

  • Why can't classes with private constructors be subclassed?

    Why can't classes with private constructors be subclassed?
    I know specifying a private nullary constructor means you dont want the class to be instantiated or the class is a factory or a singleton pattern. I know the workaround is to just wrap all the methods of the intended superclass, but that just seems less wizardly.
    Example:
    I really, really want to be able to subclass java.util.Arrays, like so:
    package com.tassajara.util;
    import java.util.LinkedList;
    import java.util.List;
    public class Arrays extends java.util.Arrays {
        public static List asList(boolean[] array) {
            List result = new LinkedList();
            for (int i = 0; i < array.length; i++)
                result.add(new Boolean(array));
    return result;
    public static List asList( char[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Character(array[i]));
    return result;
    public static List asList( byte[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Byte(array[i]));
    return result;
    public static List asList( short[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Short(array[i]));
    return result;
    public static List asList( int[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Integer(array[i]));
    return result;
    public static List asList( long[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Long(array[i]));
    return result;
    public static List asList( float[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Float(array[i]));
    return result;
    public static List asList( double[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Double(array[i]));
    return result;
    // Now that we extend java.util.Arrays this method is not needed.
    // /**JCF already does this so just wrap their implementation
    // public static List asList(Object[] array) {
    // return java.util.Arrays.asList(array);
    public static List asList(Object object) {
    List result;
    Class type = object.getClass().getComponentType();
    if (type != null && type.isPrimitive()) {
    if (type == Boolean.TYPE)
    result = asList((boolean[])object);
    else if (type == Character.TYPE)
    result = asList(( char[])object);
    else if (type == Byte.TYPE)
    result = asList(( byte[])object);
    else if (type == Short.TYPE)
    result = asList(( short[])object);
    else if (type == Integer.TYPE)
    result = asList(( int[])object);
    else if (type == Long.TYPE)
    result = asList(( long[])object);
    else if (type == Float.TYPE)
    result = asList(( float[])object);
    else if (type == Double.TYPE)
    result = asList(( double[])object);
    } else {
    result = java.util.Arrays.asList((Object[])object);
    return result;
    I do not intend to instantiate com.tassajara.util.Arrays as all my methods are static just like java.util.Arrays. You can see where I started to wrap asList(Object[] o). I could continue and wrap all of java.util.Arrays methods, but thats annoying and much less elegant.

    Why can't classes with private constructors be
    subclassed?Because the subclass can't access the superclass constructor.
    I really, really want to be able to subclass
    java.util.Arrays, like so:Why? It only contains static methods, so why don't you just create a separate class?
    I do not intend to instantiate
    com.tassajara.util.Arrays as all my methods are static
    just like java.util.Arrays. You can see where I
    started to wrap asList(Object[] o). I could continue
    and wrap all of java.util.Arrays methods, but thats
    annoying and much less elegant.There's no need to duplicate all the methods - just call them when you want to use them.
    It really does sound like you're barking up the wrong tree here. I can see no good reason to want to subclass java.util.Arrays. Could you could explain why you want to do that? - perhaps you are misunderstanding static methods.
    Precisely as you said, if they didn't want me to
    subclass it they would have declared it final.Classes with no non-private constructors are implicitly final.
    But they didn't. There has to be a way for an API
    developer to indicate that a class is merely not to be
    instantiated, and not both uninstantiable and
    unextendable.There is - declare it abstract. Since that isn't what was done here, I would assume the writers don't want you to be able to subclass java.util.Arrays

  • Private inner class with private constructor

    I read that if constructor is public then you need a static method to create the object of that class.
    But in the following scenario why I am able to get the object of PrivateStuff whereas it has private constructor.
    I am messing with this concept.
    public class Test {
          public static void main(String[] args) {          
               Test t = new Test();
               PrivateStuff p = t.new PrivateStuff();
          private class PrivateStuff{
               private PrivateStuff(){
                    System.out.println("You stuff is very private");
    }

    A member (class, interface, field, or method) of a reference (class, interface, or array) type or a constructor of a class type is accessible only if the type is accessible and the member or constructor is declared to permit access:
    * Otherwise, if the member or constructor is declared private, then access is permitted if and only if it occurs within the body of the top level class (§7.6) that encloses the declaration of the member or constructor. [Java Language Specification|http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.6.1]
    Your main method is within the body of the top level class, so the type (the inner class) and method are accessible.
    eg:
    class ImInTheSameSourceFileAsInnerAccessTest {
        public static void main(String[] args) {          
            InnerAccessTest t = new InnerAccessTest();
            InnerAccessTest.PrivateStuff p = t.new PrivateStuff();
    public class InnerAccessTest {
          public static void main(String[] args) {          
               InnerAccessTest t = new InnerAccessTest();
               PrivateStuff p = t.new PrivateStuff();
          private class PrivateStuff{
               private PrivateStuff(){
                    System.out.println("You stuff is very private");
    }Result:
    $ javac -d bin src/InnerAccessTest.java
    src/InnerAccessTest.java:4: InnerAccessTest.PrivateStuff has private access in InnerAccessTest
    InnerAccessTest.PrivateStuff p = t.new PrivateStuff();
    ^
    src/InnerAccessTest.java:4: InnerAccessTest.PrivateStuff has private access in InnerAccessTest
    InnerAccessTest.PrivateStuff p = t.new PrivateStuff();
    ^
    2 errors
    Edited by: pm_kirkham on 20-Jan-2009 10:54 added example of 'in the same source file'

  • Class with private constructor can be extended or not

    Hi All,
    I have a doubt.
    if a class has private constructor and there are some methods in this class.Can this class be extended and if yes how can we call its method in subclass?
    Thanks
    Sumit

    Karanjit wrote:
    If a class contains only private constructors, then it cannot be extended.Err... not the whole story!
    public class Sabre20090603a
        static class Fred extends Sabre20090603a
            Fred()
                super();
        private Sabre20090603a()
    }

  • Constructor not initializing variables

    Hi,
    I have a little dilemma with initializing variables. I have an abstract class that provides an abstract initialize method. It calls this first in its constructor. Now all concrete classes that extend from this abstract class must implement this initialize method. This method will initialize all the variables needed by the concrete class. However, these variables return null. Its best if I coded an example scenario:
    ###### Abstract Class #######
    public abstract class AbstractClass {
    protected Date date = null;
    protected AbstractClass(Date date) {
    initialize();
    this.date = date;
    protected abstract void initialize();
    ##### Concrete class #####
    public class ConcreteClass extends AbstractClass {
    protected Map test = null;
    public ConcreteClass(Date date) {
    super(date);
    System.out.println( "test 1 = " + test);
    test = new HashMap();
    System.out.println( "test 2 = " + test);
    protected void initialize() {
    test = new HashMap();
    Now if I instantiated the ConcreteClass, I would expect to get this output:
    test 1 = java.util.HashMap@123456f
    test 2 = java.util.HashMap@654321f
    However I get this:
    test 1 = null
    test 2 = java.util.HashMap@654321f
    Now why would test 1 = null? Didn't it already get initialized after the call to super?
    Any help would be appreciated. Thanks!
    -los

    I have a more detailed scenario:
    ###### Abstract Class #######
    public abstract class AbstractClass {
    protected Date date = null;
    protected AbstractClass(Date date) {
    initialize();
    this.date = date;
    protected abstract void initialize();
    ##### Concrete class #####
    public class ConcreteClass extends AbstractClass {
    protected Map test = null;
    public ConcreteClass(Date date) {
    super(date);
    System.out.println("3: this class = " + this);
    System.out.println( "4: test 1 = " + test);
    test = new HashMap();
    System.out.println( "5: test 2 = " + test);
    protected void initialize() {
    System.out.println( "1: class = " + this)
    test = new HashMap();
    System.out.println( "2: test = " + test);
    The output comes out to be:
    1: class = ConcreteClass@fec107
    2: test = java.util.HashMap@123ews
    3: this class = ConcreteClass@fec107
    4: test 1 = null
    5: test 2 = java.util.HashMap@des312
    As you can see, the initialize method does indeed get called for the concrete class... and the test variable gets initialized. So I'm not sure what happened...
    -los

  • Instantiate class with a private constructor

    How do you call a class that happens to have a private constructor. how would one instantiate such a class? Generally constructors are supposed to be public.
    But in many cases the constructor for a class can be private, so how to call such a class?

    khurrumnas wrote:
    I dont think you would need to provide such a method (newInstance()), its there for you already in Class Class, so its suffice to just call
    newInstance() to get an instance of class that happens to have a private constructor, in the simplest case.False, as jverd rightly mentioned. Example: public class Foo {
        public static void main(String[] args) {
            Exception expectedException = null;
            try {
                Bar b = (Bar) Class.forName("Bar").newInstance(); // throws Exception
            } catch (Exception e) {
                expectedException = e;
            assert expectedException instanceof IllegalAccessException;
    class Bar {
        private Bar() {}
    }As mentioned several times now, one can get around this restriction, but it's considered poor form to do so.
    ~

  • Initializing Vectors with objects.

    Hi all,
    I am investigating a problem and have narrowed down to a section of code where the Vector.get() method returns an empty string instead of null when the key queried doesn�t exist. I know I can alter the code to check for null or empty string but I wanted to find out why?
    I am not sure if initializing a Vector variable with an existing object is the cause� Here is a line from the code:
    Vector result = oracleWrapper.getCodeList (regionCode); //This call returns a vector.In test I ran this code a million times but couldn�t recreate it� but in production, after a few days (since the server bounce (JRun 4x)) of normal behaviour, it just starts returning empty string instead of null for keys that don�t exist in the Vector! Restarting the server is the solution for now!
    What I want to find out:
    1. Is initializing Vectors like in the snippet above fine?
    2. Are there any known issues similar to this scenario?
    3. Is call to a constructor explicitly required to guarantee its integrity?
    Thanks a mill,
    Jay

    True and I have already removed the Vector from my list of suspects because this problem only happens after a few days of normal functioning and the vector still contains an incomplete string when the error starts. I am on the look for statements that may be resulting in memory leaks and temporarily have a Properties object in my list of suspects along with a few StringBuffers.
    The code has a statement Properties props = null; and then after a few lines a value from a Vector object is put into it!
    props= (Properties) result.elementAt(idx);I have load tested it but cant get it to break!
    I have spent way too long on this and may be rewriting it would have been quicker! But can�t :(
    I am soo stuck.

  • Final class and private constructor

    Whats the difference in a final class and a class with private constructot?
    If we can make a class non-extendable by just giving private constructor then whats the advantage of final class? (I know final is very useful for many other things but just want to get info in this contaxt)

    You can extend a class with a private constructor,I'm not sure about that. The compiler will complain.
    KajThat depends on the signature of the private constructor.
    If it's the no-arg constructor and you don't declare another constructor which you explicitly call from your derived class you will indeed get an error.
    If however you never call it (and there's no way it can implicitly get called) from a derived class there should be no problem.
    class Private1 {
         private int q;
         private Private1() {
         public Private1(int i) {
              q = i;
         public void print() {
              System.out.println(q);
    public class Public1 extends Private1 {
         public Public1() {
              super(1);
         public static void main(String[] args) {
              new Public1().print();
    }for example compiles and runs perfectly.
    But remove the call "super(1);" from the constructor and it will fail to compile.

  • How to convert the Variable with soap header to non soap variable.

    I am working on a customized flow simialr to ProcessSalesorderFulfillmentJMSCOnsumer and Requestor ABCS. I dont have the PIP codes for the Requestor adn JMS Consumer. i built my own Requester ABCS and JMS Consumer. When i am trying to send message from JMS Consumer to Requestor ABCS in a variable with a SOAP:Env and SOAP:body inside.
    Becoz of this i was not able to put a condition in my bpel flows. If i put a condtion on this variable like switch inputvariable:part:OrderType='NEW' and it was failing with selection failure. I tried copying the variable to a new variable and then to check the condition still it does not work for me. How do i convert the SOAP Message Variable to Non SOAP Message Variable.
    Can i know the message put by SIebel in JMS Queue was it SOAP converted adn then how they are going to handle in Process Sales order Requestor ABCS.

    HI,
    In JMS Consumer of order to cash pip, Instead of using a schema reference they use a Envolpe.zxsd file which will take care of conversion adn then other artibutes are mapped in a transformation file.
    Please take an export of jms consumer in jdeveloper and reverse engineer the code of JMS COnsumer Service.
    Envelope_To_ListOfSWIOrderIO is the xsl whcih converts the message in AIA Queue to a message in a SOAP. Please look into the transformation.
    Thanks,
    Venugopal sss Raja

  • Error in JMS receiver adapter: "Error creating initial context with environment"

    Hello,
    I have some trouble with a JMS receiver adapter (access to JMS-provider with JNDI).
    The message in adapter monitoring is:
    A channel error occurred. Detailed error (if any) :
    com.sap.aii.adapter.jms.api.connector.ConnectorException: Fatal Error looking up connection factoryJMSQueueConnectionFactory, for profile: ConnectionProfile of channel: CC_JMS_RCV_XLIMI00001on node: 503473150 having object id: 5b424f2f79b6350ca636ab35d528cfdd:
    ConnectorException: Error creating initial context with environment: java.naming.provider.url=wcsefdev.example.com:9064; java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory; for profile: ConnectionProfile of channel:
    CC_JMS_RCV_XLIMI00001on node: 503473150 having object id: 5b424f2f79b6350ca636ab35d528cfdd: javax.naming.NoInitialContextException:
    Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory<br> at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory
    (JndiConnectorImpl.java:152)<br> ....
    Message processing failed. Cause:
    com.sap.aii.adapter.jms.core.fsm.DFA$InvalidTransitionException: No transition found from state: ERROR, on event: process_commence for DFA: CC_JMS_RCV_XLIMI00001:5b424f2f79b6350ca636ab35d528cfdd
    The third party assured me that the specified JNDI parameters are right and everything is configured on their site, so it should work...
    Might there be a problem with the JMS drivers?
    Regards,
    Marcus

    Hi Marcus,
    Have a look at below thread
    Connecting to PI 7.11 JMS Queue from other PI 7.11 Server

  • BizTalk Server 2013 SFTP Adapter with private key - Did not poll any files

    Hello, 
    We have a requirement to connect SFTP secure site with the private key and polling files.   Initially I have
    tested BizTalk Server 2013 SFTP Adapter receiver Port using  Bitvise SSH SFTP Server tool and it was working perfectly in our local network environment( with public private key authentication).
    However when we connected to Client SFTP server with private key authentication, It successfully connected to SFTP Server but
    did not poll any files from SFTP Site.  I added only one file to SFTP Server ( 145 kb file) for testing purpose.
    However BizTalk Server 2013 SFTP Send Adapter is working well with the same configuration.
    I could not find any errors in Event viewer also.  I can download\upload file using WinSCP tool .
    So I downloaded nSoftware SFTP Adapter trial version and deployed on server. nSoftware SFTP adapter  is also working find
    without any issues for Client SFTP Site.
     This is the configuration on SFTP Receive Adapter
    This is how SFTP Server download folder permission configured. I have got this details using WinSCP tool. 
    <o:p></o:p>
    Appreciate your help on this.<o:p></o:p>
    Thanks<o:p></o:p>
    PrabathD<o:p></o:p>

    BizTalk Adapter for SFTP is where the polling logic is implemented. It is not part of the SFTP Client logic. any SFTP Client is for User Interaction and you do what you want/when you want.
    The BizTalk Receive however is for purposes of automation and the adapter polls the receive location using the credentials every polling interval to check for the files matching the filter. When it find a file, it will read and publish to message box or
    submit to pipeline for processing. Your setting the polling interval to 0 (ZERO) might actually be disabling the polling.
    Set your poll interval to a non-zero value and check the behavior.
    Regards.

  • How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?, How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?

    How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?, How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?

    Hi Libby,
    Select all three columns of data. All three must be 'regular' columns, not Header columns, and the X values must be in the leftmost column.
    Click the Charts button and choose the Scatter chart.
    The resulting chart will initially show only the first and second columns of data, and the selection will have been reduced to show this.
    Click the gear icon at the top left of the selection and choose Share X Values.
    You should see a result similar to this:
    Notes:
    The values on my sample table contain a random element, so they have changed from thhe first image to the second.
    The chart is as created by Numbers, with two edits:
    Data points have been connected with curves, using the Chart nspector.
    The curves were selected and their stroke increased to 2pts, using the stroke formating button in the format bar.
    Regards,
    Barry

  • Calling an rss script with rs.exe fails to result in a report pdf from VB6 w/ ShellEx.

    Sql 2008 R2
    Calling an rss script with rs.exe fails to result in a report pdf from VB6 w/ ShellEx. 
    If I call rs.exe with the various parameters from the command prompt I  have success(other than rs.exe using the temp folder, which is a different issue).  But when I try to execute the same process from a Visual Basic 6.0 application utilizing
    the ShellEx api call, the report creation and output to PDF format do not occur.   There is no error raised.
    Yes, I wish I could use a newer dev tool but that isn't an option right now. I think this should work.  Can ya'll tell me what I'm doing wrong?
    sArgs = "-i " & Chr(34) & "'C:\Program Files\Dura Supreme\OrderEntry\RunOrdReports.rss'" & Chr(34) & _
    " -s 'http://walnut/reportserver' -v 'DuraOrderNum=" & _
    Chr(34) & sOrdDuraID & Chr(34) & "' -e Exec2005 -t"
    ShellEx Chr(34) & "C:\Program Files\Dura Supreme\OrderEntry\rs.exe" & Chr(34), EShellShowConstants.essSW_SHOWNORMAL, sArgs
    TIA,
    Jim M.

    ShellEx Chr(34) & "C:\Program Files\Dura Supreme\OrderEntry\rs.exe" & ....
    Hello Jim,
    The path for rs.exe includes spaces, you should set it in hyphen, as you already did for file "RunOrdReports.rss" in variable "sArgs2
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • User defined Variable with multiple value

    Hi Experts,
    customer requirement is the following:
    Build a layout in which to have in Lead Column the cost center characteristics, but not all cost center in master data but only those chosen by user with manual input. To achieve this goal i have created a variable of type characteristics (associatd to cost center CH) with replacement type "user defined values", then i have put this var in planning level. I have created a layout with Cost Center in Lead Column and set "all possible ch combination" in additional setting.
    Thanks to the varable created, the user can enter Cost Center value, but the problem is that he cannot select more than one single cost center value, for example:
    User want to see in layout CosCen1 and CosCen4, by now he can set variable in order to see the entire range from CosCen1 to CosCen4 (included all intermediate Cost Center) or to see only one between those 2 Cost Center, but it's not possible (or better i don't know how to..) to select both cost center and display the layout with ONLY those 2 Cost Center in Lead Column (CosCen1 and CosCen4).
    In other word, is it possible to set a variable with more than one single value without using range from-to?
    If not, does exist an alternative?
    Thanks in advance.
    Fabio

    Hi Fabio,
    It works as follows.
    let's say you have 3 multiple single lines for your cost center variable.
    once you are in the folder, select any single value & the layout is ready for planning with the corresponding cost center.
    now, select the "Cost center variable row" in the header of the folder within section "Name of Variable" & click on "Trash Can" icon to "Delete Selection" of variable.
    this basically deletes all the entered selections (3 entries) & displays for all.
    It works this way, because we don't have "resriction of values required by user".
    if am not wrong & correct me if am wrong,
    overall, this is nothing but equal to "planning level not restricted with any variable".
    I just tested this & the flaw in this is that, it is not only displaying for all the initially entered 3 lines but it displays for each & every cost center irrespective of the variable selections.
    hope it is clear.

  • Import and Export variables with same name

    The nco3 throws and exception when a function has Import and Export variables with the same name.
    An example is BAPI_BATCH_CREATE.
    At the moment my solution is create a ZBAPI_BATCH_CREATE that wraps the original BAPI but  has diferent names for import and export variables (IBATCH and OBATCH for BATCH variable).
    Anyone has another more clean solution?
    VB.NET CODE:
    pFunct = foRFCDest.Repository.CreateFunction(fsFunctionName)
    This is the error message:
    SAP.Middleware.Connector.RfcInvalidStateException was unhandled
      Message=Lookup of function BAPI_BATCH_CREATE metadata failed for destination SAPTST
      Source=sapnco
      StackTrace:
           en SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadataClassic(String name)
           en SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadata(String name)
           en SAP.Middleware.Connector.RfcRepository.GetFunctionMetadata(String name)
           en SAP.Middleware.Connector.RfcRepository.CreateFunction(String name)
           en SapNetConnectorWrapper.FunctionBase..ctor(RfcDestination foDest, String fsFunctionName) en C:00_Compac201101_LibreriasSapNetConnectorWrapperFunctionBase.vb:línea 11
           en SapNetConnectorWrapper.BAPIS.Bapi_Batch_Create..ctor(RfcDestination foDest) en C:00_Compac201101_LibreriasSapNetConnectorWrapperBAPISBapi_Batch_Create.vb:línea 16
           en clsEtiquetadoTNPCommon.BLLEtiquetadoTNP.CrearLote(DynamicSqlEntity& foRegCabecera, DynamicSqlEntity& foRegNotificacion) en C:00_Compac201100_EtiquetadoTNP_PTEtiquetadoTNP_PTclsEtiquetadoTNPCommonBLLEtiquetadoTNP.vb:línea 515
           en clsEtiquetadoTNPCommon.BLLEtiquetadoTNP.CrearLotesPendientes() en C:00_Compac201100_EtiquetadoTNP_PTEtiquetadoTNP_PTclsEtiquetadoTNPCommonBLLEtiquetadoTNP.vb:línea 602
           en WAEtiquetadoTNP.Form1.Timer1_Tick(Object sender, EventArgs e) en C:00_Compac201100_EtiquetadoTNP_PTEtiquetadoTNP_PTWAEtiquetadoTNPForm1.vb:línea 25
           en System.Windows.Forms.Timer.OnTick(EventArgs e)
           en System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
           en System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           en System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
           en System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
           en System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           en System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           en System.Windows.Forms.Application.Run(ApplicationContext context)
           en Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
           en Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
           en Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
           en WAEtiquetadoTNP.My.MyApplication.Main(String[] Args) en 17d14f5c-a337-4978-8281-53493378c1071.vb:línea 81
           en System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           en System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           en Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           en System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           en System.Threading.ThreadHelper.ThreadStart()
      InnerException: SAP.Middleware.Connector.RfcInvalidParameterException
           Message=Cannot add BATCH to FUNCTION BAPI_BATCH_CREATE: an element with that name already exists
    Source=sapnco
           StackTrace:
                en SAP.Middleware.Connector.RfcContainerMetadata`1.AddElement(T element)
                en SAP.Middleware.Connector.RfcFunctionMetadata.AddParameter(RfcParameterMetadata parameterMetadata)
                en SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadataClassic(String name)
           InnerException:

    Hi Raul
    Even I am getting the same error for below BAPI
    Lookup of function BAPI_FAMILY_CREATE metadata failed for destination
    Inner Exception: Message     "Cannot add EMPLOYEENUMBER to FUNCTION BAPI_FAMILY_CREATE: an element with that name already exists"     string
    I am using the new NCO 3.0.2.0 x64 version.
    Is there any other solution other than creation of Z BAPI.

Maybe you are looking for

  • How can I save a Numbers spreadsheet as a tab delimited file?

    Okay, I would like to save a Numbers spreadsheet as a tab delimited file. But of course I can't do that, since Numbers only saves as a comma separated values file. Plan B: I can open up a CSV file created by Numbers in TextEdit, and I would like to F

  • Ipod cannot be restored

    A window popped up saying: ipod cannot be restored because it contains files that are used by another application. What does that mean and how can I get my songs back on my ipod?

  • Please Wait....... Problem

    Dear members, I am a very simple question but creating me a big problem. I need to send Mails to 10,000 peoples at same time retriving the email address of each from database. Theres no problem in sending mails. The main thing is, When i click on SUB

  • Is it possible to add a clickable link to the presentation area of a category

    Is it possible to add a clickable link to the presentation area of a category Websphere 61 Oracle 10g RequestCenter 2008.3 SP4 Ie 6 Hi: I am trying to add a clickable link to open a web page.  I would like it to be visible on the presentation area (t

  • How to Remove "carrier settings updates"

    Hello do you know how to remove carrier settings updates downloaded from Itunes? Thanks