Serializing objects with the NIO API

I try to use the new IO API to implement a non-blocking multi-threaded server that communicates with client applications by exchanging serialized objects. I started from the code in the JavaWorld article at http://www.javaworld.com/javaworld/jw-09-2001/jw-0907-merlin.html .
With the new features of J2SDK 1.4.0, you don't have to create a separate thread per connected client. That is a big improvement.
But when I read an object with ObjectInputStream, I get a java.nio.channels.IllegalBlockingModeException.
Has anybody successfully implemented such a server since the release of the new io API?
Thanks.
Jean-Robert

The ObjectStream code is basically incompatible with non blockin I/O since you must block on the stream until a whole Object is available. You could roll something like this yourself, by reading bytes until there are enough available to build the next object and then getting that Object from the buffer and shipping it to your client thread. All of this is far more trouble than just using the Stream oriented I/O.
NIO and mutilple threads are a nightmare, the whole idea of non-blocking I/O is to avoid needing multiple threads. If you do use multiple threads you will need queues between them. See the Taming the NIO Circus topic for lots of discussion of NIO and its problems. The system seems more stable in JDK 1.5, but most people haven't even started using 1.4 for production yet.
Personally I avoid ObjectStreams. They are only useful between Java applications, if I want that I just use RMI and let Java do ALL the hard work. When I write a Socket based app, its probably because the other end is a mainframe of a C program. For that reason I send data as bytes, packaged up in packets, and encode as XML or ASN.1 so the other end can interpret it.

Similar Messages

  • RMI - Serializing Object with the right constructor..?

    Hello, I am trying to usr RMI to send an object that I serialized but I have further porblems than that. The Object that I am using is called FileLineReader and it Extends Buffered Reader. SInce Buffered Reader is not Serializable, I implemented Serializable within FileLineReader, so that I can send it through the RMI.
    package musr.client.dbreader;
    import java.io.*;
    public class FileLineReader extends BufferedReader
              implements LineReader, java.io.Serializable {
    String pattern; // The string we are going to be matching.
    * Constructor
    * Passes the stream to our superclass
    public FileLineReader(Reader in) { super(in); }
    * This is the filter: call our superclass's readLine() to get the
    * actual lines, but only return lines that contain the pattern.
    * When the superclass readLine() returns null (EOF), we return null.
    public String matchLine(String pattern) throws IOException {
    String line;
    do { line = super.readLine(); }
    while ((line != null) && line.indexOf(pattern) == -1);
    return line;
    When I use this object to send it through RMI to the Server,
    (FileLineReader)inFile = (FileLineReader) obj.senddbFile(openFileTextField1.getText(),openFileTextField2.getText());
    I get an exception:
    GUI_RMI exception, error unmarshalling return; nested exception is: java.io.InvalidClassException: musr.client.dbreader.FileLineReader; no valid constructor.
    I am not sure what the problem is and I have been struggling with it for a while now. The constructor of BufferedReader takes one argument in so I have to pass FileLineReader an argument when I construct it. I think the RMI needs a constructor that takes no arguments and that causes problems. Is that true? In that case, I can't extend my class with BufferedReader.
    Or maybe the problem is somthing quite different. Anyone has any suggestions or comments, I'd appreciate help. Thanks Ivan

    You will have to create your own stream. (RMI is just a way to call reemote methods; it knows nothing about files or I/O.)
    1. You need a RemoteReader. This object should probably have 3 or so methods:
    Open(filename) Opens the file
    read reads a block from the file and returns it as a byte array.
    close()
    2. You need a RemoteInputStream object.
    o Instantiated on the client.
    o Makes calls to the RemoteReader.
    o Has some read methods and a close method.
    o Implements InputStream.
    With these two objects, you have enough underpinnings top - for example - wrap the RemoteINputStream in a BufferedReader or whatever you need.

  • Can I create a cert with the Java API only?

    I'm building a client/server app that will use SSL and client certs for authenticating the client to the server. I'd like for each user to be able to create a keypair and an associated self-signed cert that they can provide to the server through some other means, to be included in the server's trust store.
    I know how to generate a key pair with an associated self-signed cert via keytool, but I'd prefer to do it directly with the Java APIs. From looking at the Javadocs, I can see how to generate a keypair and how to generate a cert object using an encoded representation of the cert ( e.g. java.security.cert.CertificateFactory.generateCertififcate() ).
    But how can I create this encoded representation of the certificate that I need to provide to generateCertificate()? I could do it with keytool and export the cert to a file, but is there no Java API that can accomplish the same thing?
    I want to avoid having the user use keytool. Perhaps I can execute the appropriate keytool command from the java code, using Runtime.exec(), but again a pure java API approach would be better. Is there a way to do this all with Java? If not, is executing keytool via Runtime.exec() the best approach?

    There is no solution available with the JDK. It's rather deficient wrt certificate management, as java.security.cert.CertificateFactory is a factory that only deals in re-treads. That is, it doesn't really create certs. Rather it converts a DER encoded byte stream into a Java Certificate object.
    I found two ways to create a certificate from scratch. The first one is an all Java implementation of what keytool does. The second is to use Runtime.exec(), which you don't want to do.
    1. Use BouncyCastle, a free open source cryptography library that you can find here: http://www.bouncycastle.org/ There are examples in the documentation that show you how to do just about anything you want to do. I chose not to use it, because my need was satisfied with a lighter approach, and I didn't want to add a dependency unnecessarily. Also Bouncy Castle requires you to use a distinct version with each version of the JDK. So if I wanted my app to work with JDK 1.4 or later, I would have to actually create three different versions, each bundled with the version of BouncyCastle that matches the version of the target JDK.
    2. I created my cert by using Runtime.exec() to invoke the keytool program, which you say you don't want to do. This seemed like a hack to me, so I tried to avoid it; but actually I think it was the better choice for me, and I've been happy with how it works. It may have some backward compatibility issues. I tested it on Windows XP and Mac 10.4.9 with JDK 1.6. Some keytool arguments changed with JDK versions, but I think they maintained backward compatibility. I haven't checked it, and I don't know if I'm using the later or earlier version of the keytool arguments.
    Here's my code.
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.security.KeyStore;
    import java.security.KeyStoreException;
    import java.security.NoSuchAlgorithmException;
    import java.security.cert.CertificateException;
    import javax.security.auth.x500.X500Principal;
    import javax.swing.JOptionPane;
    public class CreateCertDemo {
         private static void createKey() throws IOException,
          KeyStoreException, NoSuchAlgorithmException, CertificateException{
         X500Principal principal;
         String storeName = ".keystore";
         String alias = "keyAlias";
         principal = PrincipalInfo.getInstance().getPrincipal();
         String validity = "10000";
         String[] cmd = new String[]{ "keytool", "-genKey", "-alias", alias, "-keyalg", "RSA",
            "-sigalg", "SHA256WithRSA", "-dname", principal.getName(), "-validity",
            validity, "-keypass", "keyPassword", "-keystore",
            storeName, "-storepass", "storePassword"};
         int result = doExecCommand(cmd);
         if (result != 0){
              String msg = "An error occured while trying to generate\n" +
                                  "the private key. The error code returned by\n" +
                                  "the keytool command was " + result + ".";
              JOptionPane.showMessageDialog(null, msg, "Key Generation Error", JOptionPane.WARNING_MESSAGE);
         KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
         ks.load(new FileInputStream(storeName), "storePassword".toCharArray());
            //return ks from the method if needed
    public static int doExecCommand(String[] cmd) throws IOException{
              Runtime r = Runtime.getRuntime();
              Process p = null;
              p = r.exec(cmd);
              FileOutputStream outFos = null;
              FileOutputStream errFos = null;
              File out = new File("keytool_exe.out");
              out.createNewFile();
              File err = new File("keytool_exe.err");
              err.createNewFile();
              outFos = new FileOutputStream(out);
              errFos = new FileOutputStream(err);
              StreamSink outSink = new StreamSink(p.getInputStream(),"Output", outFos );
              StreamSink errSink = new StreamSink(p.getErrorStream(),"Error", errFos );
              outSink.start();
              errSink.start();
              int exitVal = 0;;
              try {
                   exitVal = p.waitFor();
              } catch (InterruptedException e) {
                   return -100;
              System.out.println (exitVal==0 ?  "certificate created" :
                   "A problem occured during certificate creation");
              outFos.flush();
              outFos.close();
              errFos.flush();
              errFos.close();
              out.delete();
              err.delete();
              return exitVal;
         public static void main (String[] args) throws
              KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException{
              createKey();
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.io.PrintWriter;
    //Adapted from Mike Daconta's StreamGobbler at
    //http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4
    public class StreamSink extends Thread
        InputStream is;
        String type;
        OutputStream os;
        public StreamSink(InputStream is, String type)
            this(is, type, null);
        public StreamSink(InputStream is, String type, OutputStream redirect)
            this.is = is;
            this.type = type;
            this.os = redirect;
        public void run()
            try
                PrintWriter pw = null;
                if (os != null)
                    pw = new PrintWriter(os);
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line=null;
                while ( (line = br.readLine()) != null)
                    if (pw != null)
                        pw.println(line);
                    System.out.println(type + ">" + line);   
                if (pw != null)
                    pw.flush();
            } catch (IOException ioe)
                ioe.printStackTrace(); 
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.security.auth.x500.X500Principal;
    public class PrincipalInfo {
         private static String defInfoString = "CN=Name, O=Organization";
         //make it a singleton.
         private static class PrincipalInfoHolder{
              private static PrincipalInfo instance = new PrincipalInfo();
         public static PrincipalInfo getInstance(){
              return PrincipalInfoHolder.instance;
         private PrincipalInfo(){
         public X500Principal getPrincipal(){
              String fileName = "principal.der";
              File file = new File(fileName);
              if (file.exists()){
                   try {
                        return new X500Principal(new FileInputStream(file));
                   } catch (FileNotFoundException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                        return null;
              }else{
                   return new X500Principal(defInfoString);
         public void savePrincipal(X500Principal p) throws IOException{
              FileOutputStream fos = new FileOutputStream("principal.der");
              fos.write(p.getEncoded());
              fos.close();
    }Message was edited by:
    MidnightJava
    Message was edited by:
    MidnightJava

  • PB with the Scorm API

    Hi,
    I am facing a problem with the lms API in the standard scorm
    html file included in captivate 1.
    most of the scos I have created with Captivate 1 for one of
    my courses contain several animations.
    so I have modified the scorm.html template in order so that
    each animation is able to call a javascript which will replace the
    object tag. The javascript gives the name of the captivate movie
    that has to be loaded and displayed.
    the first movie runs well, and sends the usual api commands
    to the lms. at the end of the movie, a javascript is called, with
    the name of the next animation to be run.
    that works perfectly, but from that moment, the animations
    are not able to send api commands to the lms.
    of course, I intercept the LMSCommit and LMSFinish commands
    and the cmi.core.lesson_status is set to incomplete.
    but still the problem and I don't understand why.
    does anyone have a solution to solve this issue ?
    thanks for help
    oldJaypee

    Is there any debugging mode you can use in the LMS to see
    what's happening?
    Perhaps your second animation is re-initiating the
    LMS_initialize
    function, which could be throwing it off?
    Really hard to say if you can't see what's going on 'behind
    the scenes'.
    Erik
    oldJayPee wrote:
    > the first movie runs well, and sends the usual api
    commands to the lms. at the
    > end of the movie, a javascript is called, with the name
    of the next animation
    > to be run.
    > that works perfectly, but from that moment, the
    animations are not able to
    > send api commands to the lms.
    > of course, I intercept the LMSCommit and LMSFinish
    commands and the
    > cmi.core.lesson_status is set to incomplete.
    Erik Lord
    http://www.capemedia.net
    Adobe Community Expert - Authorware
    http://www.adobe.com/communities/experts/
    http://www.awaretips.net -
    samples, tips, products, faqs, and links!
    *Search the A'ware newsgroup archives*
    http://groups.google.com/group/macromedia.authorware

  • Create a Navigational Hierarchy for filtering with the Table API

    Hello,
    I've built a WAD report acourding to the how to document: "Create a Navigational Hierarchy for filtering with the Table API".
    It works great but i dont know How to make the hirarchey to show the key and the text.
    Please Advice.
    David

    Hi Kenneth,
    please have a look in the source of the executed Web Application. What is inside of the <div> with the id filter?
    You should also find a td tag with id hier_xyz with xyz the filter inside of the <div>-Tag with id filter.
    Also check whether you have a javascript error.
    Have a look on the Javascript function set_style. Perhaps you can paste it here, than I can have a look.
    Heike

  • RE: multiple named objects with the same name andinterface

    David,
    First I will start by saying that this can be done by using named anchored
    objects and registering them yourself in the name service. There is
    documentation on how to do this. And by default you will get most of the
    behavior you desire. When you do a lookup in the name service (BindObject
    method) it will first look in the local partition and see if there is a
    local copy and give you that copy. By anchoring the object and manually
    registering it in the name service you are programmatically creating your
    own SO without defining it as such in the development environment. BTW in
    response to your item number 1. This should be the case there as well. If
    your "mobile" object is in the same partition where the service object he is
    calling resides, you should get a handle to the local instance of the
    service object.
    Here is the catch, if you make a bind object call and there is no local copy
    you will get a handle to a remote copy but you can not be sure which one!
    It end ups as more or less a random selection. Off the top of my head and
    without going to the doc, I am pretty sure that when you register an
    anchored object you can not limit it's visibility to "User".
    Sean
    -----Original Message-----
    From: [email protected]
    [<a href="mailto:[email protected]">mailto:[email protected]]On</a> Behalf Of David Foote
    Sent: Monday, June 22, 1998 4:51 PM
    To: [email protected]
    Subject: multiple named objects with the same name and interface
    All,
    More than once, I have wished that Forte allowed you to place named
    objects with the same name in more than one partition. There are two
    situations in which this seems desirable:
    1) Objects that are not distributed, but are mobile (passed by value to
    remote objects), cannot safely reference a Service Object unless it has
    environment visibility, but this forces the overhead of a remote method
    call when it might not otherwise be necessary. If it were possible to
    place a copy of the same Service Object (with user visibility) in each
    partition, the overhead of a remote method call could be avoided. This
    would only be useful for a service object whose state could be safely
    replicated.
    2) My second scenario also involves mobile objects referencing a Service
    Object, but this time I would like the behavior of the called Service
    Object to differ with the partition from which it is called.
    This could be accomplished by placing Service Objects with the same name
    and the same interface in each partition, but varying the implementation
    with the partition.
    Does anyone have any thoughts about why this would be a good thing or a
    bad thing?
    David N. Foote
    Consultant
    Get Your Private, Free Email at <a href=
    "http://www.hotmail.com">http://www.hotmail.com</a>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

    David,
    First I will start by saying that this can be done by using named anchored
    objects and registering them yourself in the name service. There is
    documentation on how to do this. And by default you will get most of the
    behavior you desire. When you do a lookup in the name service (BindObject
    method) it will first look in the local partition and see if there is a
    local copy and give you that copy. By anchoring the object and manually
    registering it in the name service you are programmatically creating your
    own SO without defining it as such in the development environment. BTW in
    response to your item number 1. This should be the case there as well. If
    your "mobile" object is in the same partition where the service object he is
    calling resides, you should get a handle to the local instance of the
    service object.
    Here is the catch, if you make a bind object call and there is no local copy
    you will get a handle to a remote copy but you can not be sure which one!
    It end ups as more or less a random selection. Off the top of my head and
    without going to the doc, I am pretty sure that when you register an
    anchored object you can not limit it's visibility to "User".
    Sean
    -----Original Message-----
    From: [email protected]
    [<a href="mailto:[email protected]">mailto:[email protected]]On</a> Behalf Of David Foote
    Sent: Monday, June 22, 1998 4:51 PM
    To: [email protected]
    Subject: multiple named objects with the same name and interface
    All,
    More than once, I have wished that Forte allowed you to place named
    objects with the same name in more than one partition. There are two
    situations in which this seems desirable:
    1) Objects that are not distributed, but are mobile (passed by value to
    remote objects), cannot safely reference a Service Object unless it has
    environment visibility, but this forces the overhead of a remote method
    call when it might not otherwise be necessary. If it were possible to
    place a copy of the same Service Object (with user visibility) in each
    partition, the overhead of a remote method call could be avoided. This
    would only be useful for a service object whose state could be safely
    replicated.
    2) My second scenario also involves mobile objects referencing a Service
    Object, but this time I would like the behavior of the called Service
    Object to differ with the partition from which it is called.
    This could be accomplished by placing Service Objects with the same name
    and the same interface in each partition, but varying the implementation
    with the partition.
    Does anyone have any thoughts about why this would be a good thing or a
    bad thing?
    David N. Foote
    Consultant
    Get Your Private, Free Email at <a href=
    "http://www.hotmail.com">http://www.hotmail.com</a>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

  • Problems moving  an object with the selection tool

    Im working on CS2 and since last week I have a problem moving objects with the selection tool: To move the object I am obligate to select the object first, and then click at the edge/stroke of the object to drag it. Before that I could move the objects just by selecting somewhere in the object and then just drag it to some other place in one step. I think I maybe changed something in the general preferences....

    Ho thanks a lot Kurt!!!!! Indeed, that was the problem!!! Finally I can work normally again.... (the joker was me...but not on purpose)
    Thanks again!

  • BI Platform: Parameter object with the name "URL_PARAM"... does not exist

    Hi,
    I'm facing this issue with only one dashboard in BI4 Platform. When trying to view it through the BI Launch Pad, I get the following error:
    "Parameter object with the name "URL_PARAM" and the index "0" still does not exist in the parameter 1[...]".
    I've seen this thread where a similar thing was reported with NetWeaver platform.
    My client as well as server versions are Release 1.4 SP0 Patch2 (14.0.5).
    Also, although some of the pictures referenced in the dashboard are not in the Public Folders on BI4. Could it be that it's not able to reference the images and hence not be displaying the whole dashboard?
    Please let me know if anyone has a solution to this.
    Thanks!
    - Sakshi Dhakad

    Hi,
    So here are the versions we currently have:
    SAP BO Design Studio (64 bit) - 14.1.0
    SAP BO Design Studio 1.4 for BI Platform - 14.1.0.349
    And on checking on Central Management Console, I get this:
    SAP BO BI Platform 4.1 Support Pack 5 Patch 2
    Version: 14.1.5.1568
    Also, I'm not sure if I installed an add-on or the patch. Based on these versions, could you tell me how to fix the issue ?
    Thanks!

  • I BOUGHT LIGHTROOM 5 IN LAREDO TX AND I TRIED TO GET IN MONTERREY MEXICO THE SERIAL NUMBER WITH THE REDEMPTION CODE BUT APPEARS AN ERROR. MY PC IS WINDOWS 8. COULD SOMEBODY HELP ME?

    I BOUGHT LIGHTROOM 5 IN BEST BUY LAREDO TX AND I TRIED TO GET IN MONTERREY MEXICO THE SERIAL NUMER WITH THE REDEMPTION CODE FROM THE BOX, BUT APPEARS AN ERROR. MY PC IS WINDOWS 8, COULD SOMEBODY HELP ME??

    I don't know that you can purchase Adobe software in the US for installing and using outside of the US.
    Redemption Code Help
    http://helpx.adobe.com/x-productkb/global/redemption-code-help.html
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • [svn:osmf:] 13228: Updating ExamplePlayer to work with the latest API changes.

    Revision: 13228
    Revision: 13228
    Author:   [email protected]
    Date:     2009-12-30 04:33:34 -0800 (Wed, 30 Dec 2009)
    Log Message:
    Updating ExamplePlayer to work with the latest API changes.
    Modified Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/chromeless/ChromelessPl ayerElement.as
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextElement.as
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/traceproxy/TraceListene rProxyElement.as
    Added Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextDisplayObjectT rait.as
    Removed Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextViewTrait.as

    Revision: 13228
    Revision: 13228
    Author:   [email protected]
    Date:     2009-12-30 04:33:34 -0800 (Wed, 30 Dec 2009)
    Log Message:
    Updating ExamplePlayer to work with the latest API changes.
    Modified Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/chromeless/ChromelessPl ayerElement.as
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextElement.as
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/traceproxy/TraceListene rProxyElement.as
    Added Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextDisplayObjectT rait.as
    Removed Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextViewTrait.as

  • How to synchronize test schema objects with the prod schema objects.

    Hi,
    I have a requirement of synchronizing test schema objects with the production schema objects. Please let me know the below
    1. if there is a standardized method for such activity,
    2. if there are oracle utilities for this task.
    3. If i had to do this job manually, can you let me know the check list if any.
    Thanks
    Purushotham M

    http://www.oracle.com/technetwork/issue-archive/2012/12-sep/o52sqldev-1735911.html
    You could try database diff tool in sql developer(but there are some licence restrictions).
    I don't know your database version, you could try DBMS_COMPARISON package also.
    Look at this link http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_comparison.htm
    Other solution is to create db link between test and production database, and then you can try different types of queries like
    select table_name from user_tables
    minus
    select table_name from user_tables@db_link_to_other_database
    And you can do this for columns, indexes and so on.
    But you must have proper DDL scripts for this, to generate sync script.
    Also there is a question about work process, you are doing sync in reverse order(from production to test). Test db is for test, after test you go to production db with proper ddl and dml scripts, so these schemas shouldn't be different in the first place(talking about schema, not data here).

  • Formatted Search defined on an item added with the UI API

    Hello,
    I have added an Edit Text with the UI API on the Sales Orders form. It is visible and enable.
    I have linked a Formatted Search to this Edit Text.I have indicated to refresh the value on Supplier Name changed.
    I have linked the same formatted search to the Remarks field with the same conditions of launching.
    When I change the BP name, the formatted search on theremarks field is launched, but the formatted search on the Edit Text is not launched.
    Why the formatted search on the Edit Text is not launched when the condition for refresh is true?
    Thanks for your help.
    Best regards,

    Hi,
    This is a simple Edit Text which is not bound.
    I can launch manually the formatted search, but it is not launch automatically!
    It seems that SBO can't launch automatically FS on user forms and user items.
    I have tried to define a FS on the Fixed Asset master data form and you can only launch the Formatted search manually.

  • Planning 9.3 Duplicate member error: An object with the name 0000 already e

    Hi All
    I have 5 dimensions in my Planning applications namesly, Company, State, Product, Entity and Account
    Company hase members called 0000(default) and 1000, 1001 etc
    I also want add my Entity default member as 0000, but when I tried to add the memeber in my entity dimension I'm getting the Error : An object with the name 0000 already exists: Please help me to fix this
    Thanks in Advance

    U won`t be able to add the duplicate item name to planning application untill it would be the 9.5 version.
    By the way, NotPlanning App`s nothing like as scanty - they has already an option "Allow duplicate item names" in 9.3 version..

  • Create an object with the name passed in as a string argument to a method

    Hi,
    I am sorry if it's too trivial for this forum , but I am stuck with the following requirements.
    I have a method
    void abc(String object_name, String key, String value)
    method abc should first check if there exists in memory a hashmap object with the name passed in as argument object_name.
    If yes ..just put the key and value there.
    if not , then create the hashmap object called <object_name> and insert the key/value there.
    Can anybody help me in the first step i.e, how to check if an object exists with the name passed in and if not then create it.
    Will getInstance method be of any help?
    Thanks in advance for your response.
    -Sub-java

    Dear Cotton.m,
    Thanks for your suggesstion. I will remember that.
    But somehow I have a strong belief that you still need to consult dictionary for exact meaning of the words like "upset" , "frustration" etc. Not knowing something in a language , that too as a beginner, does not yield frustration, but increases curiosity. And people like petes1234 are there to diminish that appetite.
    To clarify above, let me compare jverd's reply to my doubt with petes1234's.
    jverd said it cannot be done and suggested a work around (It was perfect and worked for me) While petes1234 , having no work in hand probably, started analysis of newbies mistakes.
    jverd solved my problem by saying that it cannot be done. petes1234 acted as a worthless critic in my opinion and now joined cotton.m.
    Finally, this is a java forum and I do not want to discuss human characteristics here for sure.
    My apologies if I had a wrong concept or if I chose a wrong forum to ask, where people like petes1234 or Cotton.m show their geekdom by pointing out "shortfalls" rather than clearing that by perfect examples and words.
    Again take it easy and Cotton.m , please do not use this forum to figure out others' frustration but be a little more focussed on solving others "Java related" problems :)
    -Sub-java

  • How to access the Requirements property (& subproperties) of steps and sequences with the TestStand API

    The concept of associating teststand objects to unit requirements for traceability purposes was added to TS 3.5, and I need to find out how to access the array of strings used to store unit requirements in step objects, sequence objects and sequencefile objects. The teststand help file points out that the requirements list of a sequencefile object is accessible using the PropertyObjectFile interface, and also points out that Requirements is a property of the sequence and step classes. Furthermore it implicitly states that the requirements property has a Links subproperty which is an array of strings, but that is pretty much the extent of the documentation on this new feature so far. There seems to be no expression function available to get to those requirements either.
    I know that this feature was added to allow TestStand to interface with RG, and I am planning on using RG, but I would also like to do things with the requirements information within TestStand.
    Anyone? 

    Are you talking about the Requirements Gateway?  It is a separate product from NI that will do what you are looking for.  I haven't used it so I am not sure of the API chain to make it work.  Take a look and see if that is what you were thinking of.
    Hope that this helps,
    Bob Young
    Sorry, I just re-read your original post and see that you are looking to also use the Requirements Gateway, so you obviously know about it.  I don't know what the API changes were that made it work so I am not going to be much help.
    Sorry about posting before getting the correct information from the original.
    Bob Young
    Message Edited by Bob Y. on 08-24-2006 04:54 PM
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

Maybe you are looking for