Trouble with Complex Object example

From the 3.5 Tutorial.
I have all of the .xml files in d:\oracle\home\labs, the .cmd file to start the cache using the POF is in the same directory.
When I run the .cmd file, I get an
Illegal State Exception: Missing POF configuration
The POF configuration file is right there in the same directory with everything else.
Where is it looking for this?
Heres the .cmd file:
@echo off
setlocal
if (%COHERENCE_HOME%)==() (
set COHERENCE_HOME=d:\coherence
if "%java_home%"=="" (set java_exec=java) else (set java_exec=%java_home%\bin\java)
set COH_OPTS=%COH_OPTS% -server -cp %COHERENCE_HOME%\lib\coherence.jar;D:\home\oracle\labs\Golddigger\CacheTest\classes
set COH_OPTS=%COH_OPTS% -Dtangosol.coherence.cacheconfig=d:\home\oracle\labs\golddigger-cache-config.xml
"%java_exec%" %COH_OPTS% -Xms1g -Xmx1g com.tangosol.net.DefaultCacheServer %2 %3
%4 %5 %6 %7
:exit
Here's the cache configuration file:
<?xml version="1.0"?>
<!DOCTYPE cache-config SYSTEM "cache-config.dtd">
<cache-config>
<caching-scheme-mapping>
<cache-mapping>
<cache-name>*</cache-name>
<scheme-name>ExamplesPartitionedPofScheme</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<caching-schemes>
<distributed-scheme>
<scheme-name>ExamplesPartitionedPofScheme</scheme-name>
<service-name>PartitionedPofCache</service-name>
<serializer>
<class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
<init-params>
<init-param>
<param-type>String</param-type>
*<param-value>payloadPOFConfig.xml</param-value>*
</init-param>
</init-params>
</serializer>
<backing-map-scheme>
<local-scheme>
<!-- each node will be limited to 250MB -->
<high-units>250M</high-units>
<unit-calculator>binary</unit-calculator>
</local-scheme>
</backing-map-scheme>
<autostart>true</autostart>
</distributed-scheme>
</caching-schemes>
</cache-config>
And here is payloadPOFConfig.xml:
<?xml version="1.0"?>
<!DOCTYPE pof-config SYSTEM "pof-config.dtd">
<pof-config>
<user-type-list>
<!-- coherence POF user types -->
<include>coherence-pof-config.xml</include>
<!-- com.tangosol.examples package -->
<user-type>
<type-id>1002</type-id>
<class-name>com.oracle.coherence.handson.Payload</class-name>
</user-type>
</user-type-list>
<allow-interfaces>true</allow-interfaces>
<allow-subclasses>true</allow-subclasses>
</pof-config>

Yeah, I fixed that. The class was compiled with the JDeveloper internal JRE, the cache was started with an older version of Java that was lingering under java_home.
Now, I get a new error trying to write my Payload class to the cache...
(Wrapped) java.io.NotSerializableException: com.oracle.coherence.handson.Payload
     at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:210)
     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ConverterValueToBinary.convert(DistributedCache.CDB:3)
     at com.tangosol.util.ConverterCollections$ConverterMap.put(ConverterCollections.java:1541)
     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.put(DistributedCache.CDB:1)
     at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)
     at com.oracle.coherence.handson.WriteTest.main(WriteTest.java:31)
Caused by: java.io.NotSerializableException: com.oracle.coherence.handson.Payload
     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
     at com.tangosol.util.ExternalizableHelper.writeSerializable(ExternalizableHelper.java:2181)
     at com.tangosol.util.ExternalizableHelper.writeObjectInternal(ExternalizableHelper.java:2629)
     at com.tangosol.util.ExternalizableHelper.serializeInternal(ExternalizableHelper.java:2529)
     at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:206)
     ... 5 more
The Payload class is as follows:
package com.oracle.coherence.handson;
import com.tangosol.io.pof.PofReader;
import com.tangosol.io.pof.PortableObject;
import com.tangosol.io.pof.PofWriter;
import java.io.*;
public class Payload
implements PortableObject
private File fileInfo;
private byte[] contents;
private long size;
private String status = "Pending";
public Payload()
// Empty default constructor
public Payload(File fileInfo, byte[] contents, int size)
super();
this.fileInfo = fileInfo;
this.contents = contents;
this.size = size;
public void readExternal(PofReader pofReader)
throws IOException
this.setFileInfo((File) pofReader.readObject(0));
this.setContents((byte[]) pofReader.readByteArray(1));
this.setSize(pofReader.readInt(2));
this.setStatus(pofReader.readString(3));
public void writeExternal(PofWriter pofWriter) throws IOException
pofWriter.writeObject(0, this.getFileInfo());
pofWriter.writeByteArray(1, this.getContents());
pofWriter.writeLong(2, this.getSize());
pofWriter.writeString(3, this.getStatus());
Then a bunch of accessors and mutators for the variables.
I've been able to write both a File object and a byte[] to the cache as values, but it won't take this class.
What is not serializable in here?

Similar Messages

  • Interfaces and methods with complex object

    In all the examples I have, the methods of an interface use only basic java datatypes (int, Character, ..)
    I want to pass a Vector that represents a list of objects from one of my own classes to an interface method.
    class Myclass ...
    private String p1;
    private int p2;
    myInterfaceMethod(..., Vector list, ...)
    // list is a vector of Myclass objects
    How do I know about Myclass when implementing the interface and how do I access p1 and p2 ?

    You can use any kind of "complex" object in your interface methods, all of them are objects at last.
    The other question seems to be a misunderstanding of interface implementation. When u "implement" an interface in a class, all that JVM does is to check that you actualy have one method (with code inside its body) for each method you defined previously in the interface.
    Think of an interface as a contract signed by a class. It's forced to implement each method definied in you interface. So, as the method is defined inside the class, you can access any data member of the class without doing anything "special". Do u catch it?

  • Having trouble with creating objects from instances created with ClassLoade

    Hi.
    I'm having a bit of trouble with casting an instance of an object from a custom ClassLoader. Don't worry - the code isn't for anything sinister - it's for one of those life simulation thingies, but I want to make it modular so people can write their own 'viruses' which compete for survival. You know the score.
    Anyway. I've got the beginnings of my main class, which seems to load the class data for all 'virus' classes in a folder called 'strains'. There is a abstract class called AbstractVirus which declares the method calls for how the viruses should behave and to get textual descriptions, etc. AbstractVirus is to be subclassed to create working virus classes and these are what my main class is trying to load instances of.
    Unfortuantely, I can't cast the instances into AbstractVirus objects. The error I've been getting is 'ClassCastException' which I presume is something to do with the fact that my ClassLoader and the Bootstrap ClassLoader aren't seeing eye-to-eye with the class types. Can anyone help? This line of programming is really new to me.
    My code for the main class is below:
    /* LifeSim.java */
    public class LifeSim {
      public LifeSim() {
        /* Get a list of all classes in the 'strains' directory and store non-
         * abstract classes in an array. */
        Class virusClasses[] = null;
        try {
          /* Get a reference to the file folder 'strains' and make sure I can read
           * from it. */
          java.io.File modulesFolder = new java.io.File("strains");
          if (!modulesFolder.isDirectory() || !modulesFolder.canRead()) {
         System.out.println("Failed to find accessible 'strains' folder");
         System.exit(-1);
          /* Get a list of all the class files in the folder. */
          String virusFiles[] = modulesFolder.list(new ClassFileFilter());
          if (virusFiles.length == 0) {
         System.out.println("No virus strains in 'strains' folder");
         System.exit(-1);
          /* Create an array of class objects to store my Virus classes. Ignore the
           * abstract class as I cannot instantiate objects directly from it.*/
          virusClasses = new Class[virusFiles.length];
          VirusClassLoader classLoader = new VirusClassLoader();
          int j = 0;
          for (int i = 0; i < virusFiles.length; i++) {
         String virusName = "strains/" + virusFiles;
         Class tempClass = classLoader.loadClass(virusName);
         if (tempClass.getName().compareToIgnoreCase("strains.AbstractVirus") != 0) {
         virusClasses[j++] = tempClass;
    } catch (ClassNotFoundException ncfe) {
    System.out.println("Failed to access virus class files.");
    ncfe.printStackTrace();
    System.exit(-1);
    /* TEST CODE: Create an instance of the first virus and print its class
    * name and print details taken from methods defined in the AbstractVirus
    * class. */
    if (virusClasses.length > 0) {
    try {
         // Print the class name
         System.out.println(virusClasses[0].getName());
         Object o = virusClasses[0].newInstance();
         strains.AbstractVirus av = (strains.AbstractVirus) o;
         // Print the virus name and it's description
         System.out.println(av.getQualifiedName());
         System.out.println(av.getDescription());
    } catch (InstantiationException ie) { ie.printStackTrace(); }
         catch (IllegalAccessException iae) { iae.printStackTrace(); }
    public static void main(String args[]) {
    new LifeSim();
    class ClassFileFilter implements java.io.FilenameFilter {
    public boolean accept(java.io.File fileFolder, String fileName) {
    if (_fileName.indexOf(".class") > 0) return true;
    return false;
    class VirusClassLoader extends ClassLoader {
    private String legalClassName = null;
    public VirusClassLoader() {
    super(VirusClassLoader.class.getClassLoader());
    public byte[] findClassData(String filename) {
    try {
    java.io.File sourcefile = new java.io.File(filename);
    legalClassName = "strains." + sourcefile.getName().substring(0,sourcefile.getName().indexOf("."));
    java.io.FileInputStream fis = new java.io.FileInputStream(sourcefile);
    byte classbytes[] = new byte[fis.available()];
    fis.read(classbytes);
    fis.close();
    return classbytes;
    } catch (java.io.IOException ioex) {
    return null;
    public Class findClass(String classname) throws ClassNotFoundException {
    byte classbytes[] = findClassData(classname);
    if (classbytes == null) throw new ClassNotFoundException();
    else {
    return defineClass(legalClassName, classbytes, 0, classbytes.length);
    Thank you in advance
    Morgan

    Two things:
    I think your custom ClassLoader isn't delegating. In general a ClassLoader should begin by asking it's parent ClassLoader to get a class, and only if the parent loader fails get it itself. AFAIKS you could do what you're trying to do more easilly with URLClassLoader.
    Second, beware that a java source file can, and often does, generate more than one class file. Ignore any class files whose names contain a $ character. It's possible you are loading an internal class which doesn't extend your abstract class.

  • Troubles with save object in request

    Hi All!
    I have trouble with saving EditCurrentRecord in request. In JDeveloper everything works fine. But when I try to run on iAS with Apache/Jserv I get jsp compilation error:
    java.lang.NoSuchMethodError: javax.servlet.ServletRequest: method setAttribute(Ljava/lang/String;Ljava/lang/Object;)V not found
    I have this problem with a lot of my pages.
    First time I thinks problem is in my code. By after removing every line of my custom code and leaving only JD code, I get the same error. Some pages works fine, another no! They are looks very simillary.
    I also take a look at servlet code. It's look great.
    Anybody have this problem?
    null

    Hi Dev,
    Please check the FG 'STRD', it should have FM for your requirement.
    Like FM 'TR_OBJECT_INSERT' or TR_OBJECTS_INSERT etc.
    Best Regards,
    Swanand

  • Web Services with Complex Objects (Urgent !!)

    Hi,
    My last post was on a problem using IBM-RAD (Service) and AXIS2 (Client) in "New to Java" Forum. That is one of the trial scenarios I'm working on nowadays. Hope, I'll get some useful reply soon.
    Now, I need a suggestion about the application I'm working upon. It is as follows:
    (i) The application (i.e. Service Class) takes some primitive,String and/or some bean object as input
    (ii) It returns a bean object [or an array (can use collection class also if possible) of bean objects].
    (iii) The bean properties are primitive,String , other bean objects, and/or some collection object(Vector / ArrayList etc.) i.e. it should handle complex objects.
    (iv) The Service should run on Websphere and Client on Tomcat.
    A pictorial representation is given below:
    [primitive/String/bean object (Input arg)]
    [(Contains  primitive/String/other bean objects/collection class)] Bean <---------> Service <----------------------- Client
    [Calls bean] |===============> Client
    [Returns bean (or array of beans / collection object)]
    I'm now trying (by building test applications) a combination of IBM-RAD (Service) and AXIS2 (Client), but facing problems in handling array of beans and/or collection classes either on Service or on the Client side.
    So, I need some suggestions on whether I'm going the right way, or need to change my approach (or technology). Any suggestion would be appreciated.
    Please reply ASAP, it is urgent.
    Thanks in advance,
    Suman

    no problem for me, so it's not urgent.
    Request for help denied.

  • How to create web services with complex objects as parameters

    Hi,
    Not sure if this is the right place, but...
    I'm using Netbeans 5.5 and trying to learn web services.
    Creating a simple web service with simple parameters like strings and integers is nice and easy. I'm now trying to take the next step, and create a web service with a more complex schema as a parameter.
    I've tried two approaches, and hit dead ends on both:
    (1) Define my complex schema as an xsd file, and then create a WSDL file. Creating the schema and saving it in my EFB project works fine; when I try to create a new WSDL file, the IDE gives me a button to import external schemas - which is where the problem is: the Browse simply won't find my newly created schema file.
    (2) Define a Java class (in this case, it's a fairly simple example containing a single ArrayList), and then use the IDE to generate a web service from Java. The IDE does this fine, but I now have no idea how to consume or test the web service - I don't know where to look for the WSDL that has presumably been generated, and I'm also a bit iffy over what answers to give the WSDL creator about port names etc.
    Ideally, I'd prefer to get approach 1 to work - can someone point me in the direction of a sensible tutorial for these things?
    (Happy to carry on using Netbeans 5.5 or to revert to Sun Studio Enterprise, which I was playing with before.)
    All help appreciated, Thanks

    - For NetBeans related questions, nbusers mailing list is more suited. It is often visited by NetBeans experts.
    http://www.netbeans.org/community/lists/top.html
    ...[email protected]
    The NetBeans users mailing list. General discussion of NetBeans use, this is the place to ask for help and to help others.... (There is a 'Subscribe' button next to the above that you can use to subscribe to the list).
    Can you try posting this question on nbusers list?
    - SJSE 8.1 is based on an older version of NB (NB5.0).
    You should definitely continue with NetBeans, since all development is now being done in NetBeans; all the major JSE modules have been moved to opensource at netbeans.org and are all being developed there. There are as yet no future plans to work on further releases for JSE.
    Please check out http://www.netbeans.org for more details.

  • Trouble with PIOS Printer example

    Hello gurus,
    I have a problem. I'm trying to run an example from the tutorial, the one that aply the PIOS Printer API, and it throws me an error (awfull by the way) like this:
    java.lang.ClassNotFoundException: com.sap.ip.me.api.pios.impl.connection.ConnectorImpl
    and also it said: RFID (unknown source). Now the example is trying to implemente a printer device not a RFID Reader, so i really dont know what is happening. Anybody can help me with this.
    I havent changed the code, so it is pretty much like this:
    Connector con = Connector.getInstance();
    DriverInfo[] df = con.listDrivers(ConnectionType.PRINTER);
    PrinterParameters pm = new PrinterParameters(df[0]);
    pm.setPrinterMode(PrinterParameters.GRAPHIC_MODE);
    gp = (GraphicPrinter)con.open(pm);
    String[] sfont = gp.getFontConfigurationManager().listFontNames();
    PrinterFont pf =gp.getFont(sfont[0]);
    gp.drawText(pf,10,10,"Test of my printer",0);
    gp.doPrint(1);
    gp.close();
    And the stack trace indicated me that the exception is raised at
    Connector con = Connector.getInstance();
    I've already register the app. at the webconsole and assign it to my user. and pretty much did everything the guide told me to do.
    Please its kind of urgent, somebody help me. I'll wait for your answer
    KR,
    MC

    It was the Client SP, im on NWDS 7 and the client i've installed on my laptop was MI 2.5 SP 13. it must be minimum SP 16

  • Having Trouble With Master Objects

    I'm pretty new to iWork, so I apologize for any noobie foolishness.
    I am trying to adapt the Business Report template in Pages '09. It uses a default logo graphic, and this graphic is selectable and replaceable.
    In the first instance, I selected it and replaced it with my own graphic. However, when creating a new page, Pages continued to reproduce the original placeholder graphic.
    So I got smarter, read the User Guide, and inserted a completely new version of my graphic in a different place (i.e., not in the placeholder), and followed the steps to make it a Master Object. BUT, when I created a new page, Pages did not automatically duplicate my new "Master Object", and continued to duplicate the old placeholder graphic in the same spot Apple designated.
    So my (at this point) obvious question is: are we actually stuck with only those Master Objects Apple gave us, or is there something I'm not doing that can make a template automatically produce user-defined Master Objects on new pages?
    To be fair, I have not tried to create a user-defined template yet, so perhaps my problem is just with the pre-installed ones, but still: I would hope these are easily modifiable.
    I'm on a deadline, so any help would be greatly appreciated. Thank you.

    I will walk you through making your own version of the template.
    1 Open a new document using the *Business Report template*.
    2 Don't change anything yet but open every section from the Sections pull down menu so you have a sequence of pages each with a page of a different section design.
    3 Make Master Objects selectable if they are not. Drag your logo to replace every instance of the template's logo and adjust to your liking.
    4. +Menu > View > Page Thumbnails+
    5. Select first Thumbnail in sidebar +Menu > Format > Advanced > Capture Pages… > Name : Type exactly the same name as the section "Letter" > It will ask you if you want to replace the existing section > Replace+ .
    6. Repeat this for each section until you have replaced them all.
    7. +Menu > File > Save as Template… > Save with a new name+
    8. +Menu > New from Templates > My Templates > Choose your new name template+
    You will now have a document that behaves the way you expected it to.
    Now:
    +Is this obvious?+ No.
    +Is this easy?+ No
    +Is it quick?+ No
    +Is it prone to errors?+ Yes
    +Why did Apple do it this way?+ Ask Apple.
    Anyway hope this helps.
    Peter

  • Trouble with multiple object animation

    I'm new to Flash Basic 8, and am getting very frustrated
    trying to make an animated gif to use as a background on my
    website.
    1. Do you really need to create a separate layer and motion
    guide for each object? I wanted to have some 20 or so stars falling
    along separate paths, maybe 2 or 3 per path, but it seems you can't
    have more than one object per path, and only one path per layer.
    2. It's okay if I have to create 20 regular layers and 20
    motion guide layers, however, after 3 layers I noticed the gif
    slows down on the website. I published the fla to an animated, loop
    continuously gif. I then set the background of my asp.net website
    to the gif. It starts out with the stars falling normally, but they
    start slowing down half way down. By the time the last ones reach
    the bottom they're barely moving at all. When the first ones begin
    again at the top, they speed back up to normal and begin slowing
    down again.
    Any help greatly appreciated - or I'm not buying this
    thing!

    LianaEnt;
    There are a number of ways an animation such as you describe
    could be
    approached--some primarily scripted, some using tweening or
    frame by frame
    animation. It's difficult to be more specific without more
    information. You
    might take a look at some of the flash help sites such as
    flashkit.com to
    see if you can find something similar you can study. The more
    things that
    are moving onscreen simultaneously and the larger the pixel
    size of the
    animation --the more likely it is that the animation can slow
    down both in
    gif and swf format. Adding a small silent streaming sound to
    your animation
    can cause the flash player to drop animation frames to allow
    the movie to
    appear to run faster, but this will only help if the final
    output is swf
    (not gif) of course... -Tom Unger

  • ArrayDeque as a stack doesn't work as expected with complex objects

    Trying to use ArrayDeque as a strorage for complex values <PSList<PSol>> (i.e. Arraylists of structured Values PSol), this doesn't work as expected. The code below should produce different values of pSLWk, being stored on bkStack, which are then to be retrieved by pop() to the variables pSL1, pSL2, pSL3.
    However, retrieval only ends up with three identical data sets (variables) pS1,pS2, pS3.
            public PSList<PSol> pSL;
            private ArrayDeque<PSList<PSol>> bkStack=new ArrayDeque<PSList<PSol>>();
            pSLWk=new PSList<PSol>();       // Constructor copies some Array (static field) to the PSLists
            pSL=new PSList<PSol>();
            pSLAux=new PSList<PSol>(pSLWk);   // Constructor copies from existing PSList
            pSLWk.checkResult("pSLWk prior to setDefaults - modifies pSLWk !");
            setDefaults();                                                            // Modifies pSLWk only
            pSLWk.checkResult(" pSLWk after setDefaults");              // .. got changes (o.k.)
            pSL.checkResult(" pSL after setDefaults");                  // .. unchanged  (o.k.)
            pSL.checkResult(" pSLAux after setDefaults");               // .. unchanged  (o.k.)
            bkStack.push(new PSList<PSol>(pSLWk));                      // store changes in bkStack
            pSLWk.getEl(77).setVal(new StringBuffer("4"));              // change pSLWk again (value 4 @ 77)
            pSLWk.checkResult("pSLWk, after PUSH, THEN modify 4@77");   // .. got change (o.k.)
            pSL.checkResult("pSL after setVal 77");
            bkStack.push(pSLWk);                      // store changes in bkStack
            pSLWk.getEl(80).setVal(new StringBuffer("8"));              // change pSLWk again (value 8 @ 80)
            pSLWk.checkResult("pSLWk after setVal 8@80");               // .. got change (o.k.)
            pSL.checkResult("pSL after setVal 80");
            bkStack.push(new PSList<PSol>(pSLWk));                      // store changes in bkStack
            pSL1=new PSList<PSol>(bkStack.pop());
            pSL1.checkResult("pSL1 after 1st pop");
    //      pSL1=bkStack.pop()                                          // Straightforward way doesn't work either...
            pSL2=new PSList<PSol>(bkStack.pop());
            pSL2.checkResult("pSL2 after 2nd pop");
            pSL3=new PSList<PSol>(bkStack.pop());
            pSL3.checkResult("pSL3 after 3rd pSLWk=..pop()");Here the result from the code above:
    debug:
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.>pSLWk prior to setDefaults - modifies pSLWk !
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2   63 <C.R.> pSLWk after setDefaults
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.> pSL after setDefaults
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.> pSLAux after setDefaults
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  463 <C.R.>pSLWk, after PUSH, THEN modify 4@77
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.>pSL after setVal 77
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSLWk after setVal 8@80
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.>pSL after setVal 80
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSL1 after 1st pop
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSL2 after 2nd pop
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSL3 after 3rd pSLWk=..pop()
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.>pSLWk prior to setDefaults - modifies pSLWk !
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2   63 <C.R.> pSLWk after setDefaults
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.> pSL after setDefaults
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.> pSLAux after setDefaults
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  463 <C.R.>pSLWk, after PUSH, THEN modify 4@77
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.>pSL after setVal 77
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSLWk after setVal 8@80
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.>pSL after setVal 80
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSL1 after 1st pop
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSL2 after 2nd pop
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSL3 after 3rd pSLWk=..pop()What's the problem with this ?
    Rem: I tried the simple approach as well:
    bkstack.push(pSLWk);
    ...

    Thank you for your comments, although I see we still don't have a common understanding of the problem.
    Firstly, I add the code for the PSList and the PSol classes, so you might find some problem with that:
         public class PSol     {
              private StringBuffer val;
              private int zI;
              private int sI;
              private int bI;
                        // == Konstruktor
              public PSol( StringBuffer v, int z, int s, int b )     {
                   this.val=v;
                   this.zI=z;
                   this.sI=s;
                   this.bI=b;
                        // == Getter,Setter
              public StringBuffer getVal()     {return val;}
              public int getZ()     {return zI;}
              public int getS()     {return sI;}
              public int getB()     {return bI;}
              public int getVSize()     {return val.length();}
              public void setVal(StringBuffer v)     {val=v;}
              public boolean hasVChar( StringBuffer ch, boolean delCh )     {
                   boolean bT=false;
                   StringBuffer fSt=getVal();
                   if (!(fSt.indexOf( ch.toString() )     == -1))     {
                        bT=true;
                        if (delCh)     {
                             setVal(fSt.deleteCharAt(fSt.indexOf( ch.toString() )));
                   return bT;
         }     // PSol
         public class PSList<E> extends ArrayList<PSol>     {
                   /**     Construktor 1: PSList(v,z,s,b) - makes list from single arrays
              private static final long serialVersionUID =  4711L;                         // ### JAVAC Warning! ###
            public PSList (String[] vS, int[] z, int[] s, int[] b) {
                   StringBuffer[] v=new StringBuffer[valDim];
                for (int i=0;i<valDim;i++)  {
                    v=new StringBuffer(vS[i]);
    //ArrayList<PSol> pSL=new ArrayList<PSol>;
                   for (int i=0; i<valDim; i++) {
                        this.add( new PSol( v[i], z[i], s[i], b[i] ) );
    /** Konstruktor2 : makes list from matrix array
    public PSList () {
    for (int j=0; j<nDim; j++) {
    for (int i=0; i<nDim; i++) {
    this.add( new PSol( new StringBuffer(sGuiArr[i][j]), i, j , i/locDim + (j/locDim)*locDim) );
                        /**     ------- Construktor 3 : PSList(PSList pS) - makes list as a copy of an existing one
    public PSList ( PSList<PSol> pX )     {
                   super (pX); // ArrayList-Constructor (Collection)
    // get Element <PSol>
    public PSol getEl ( int i )     {return get(i);}
         public int getCount()     {return size();}
         public int getTValLg()     {
                   int lg=0;
                   for (int i=0; i<getCount(); i++)     {
                        lg=lg + getEl(i).getVal().length();
                   return lg;
                        /**     ------- checkResult()     -     Check if alll elements are single char +dump
         public boolean checkResult(String messg)     {
                   boolean allOne=true;
                   for (int i=0; i<size(); i++)     {
                        if ( getEl(i).getVal().length() > 1 )     {
                             allOne=false;
                             System.out.print(" ");
                   else     {
                        System.out.print(getEl(i).getVal());
                   System.out.println("<C.R.>"+messg);
                   return allOne;
         }     // Class PSList
    Secondly, I don't really see what you mean by pointing out to 'only one "pSLWk" instance of PSList'. The variable pSLWk is the variable to be worked upon; after some change of the contents, I want to save this state of contents to the stack. When I pop that variable from the stack, I wouldn't want to restore it to pSLWK, but to some other variable, e.g. by public PSList<PSol> pSL1;
    pSL1=new PSList<PSol>(bkStack.pop());Again - to my understanding (which comes from old days of microprocessor coding... - there shouldn't be a need to know how the data came there, or what was the name of the variable who stored it there. And  : the implementation of ArrayDeque returns 'elements' of class E, not references !
    Thirdly, you're right, that the method of using a copy constructor for retrieval looks 'weird'. However - I had some other versions that didn't work either, e.g. the straightforward one, as I pointed out.
    And fourthly: yes, I'm almost sure that I'm messing up something somewhere. I went to this forum hoping to clarify that ... :)
    If you don't mind, could you please sketch a few lines of code, how to 'push' a complex variable to a ArrayDeque stack, and retrieve it - by 'pop()' - to some to other variable of the same class later ?
    Might make our discussion much easier, to see how things REALLY work.
    Thank you !                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problem with some characters in complex objects

    Hi all,
    I've built a webservice which returns a complex object with several fields inside. All fields are public and accessable via getter and setter methods.
    The problem is, that some of these fields contains numbers or underscores in their names.
    For example:
    public int field_a;
    or
    public String house3of4;
    When I try to import these webservice as a model in a Web Dynpro project, it doesn't work until I remove these characters.
    Is this a known problem or is there any solution for it?
    Thanks
    Thomas

    NLS_LANG in registry is "ARABIC_UNITED ARAB EMIRATES.AR8MSWIN1256"
    I use oracle form 10g for developer
    oracle form 9i for database
    when I build a form in client side and make a text with farsi characters, when I run the form,all characters shows me correct in farsi except four characters(گ چ ژ پ)

  • How to convert an array collection instance to a complex object for interaction with webservice

    Hi there,
    I have a stubborn problem that I am trying to work out the best way to solve the problem.  I am interacting with a WebService via HTTPService calling a method called find(String name) and this returns me a List of ComplexObjects that contain general string and int params and also lists of other Complex Objects.  Now using the code:
    ArrayCollection newOriginalResultsArray = new ArrayCollection(event.result as Array)
    flex converts my complex objects results to an arraycollection so that I can use it in datagrids etc.  Now up until this part is all good.  My problem is when getting a single instance from the results list, updating it by moving data around in a new datagrid for example - I want to interact with the webservice again to do an create/update.  This is where I am having problems - because these webservice methods require the complex object as a parameter - I am struggling to understand how I can convert the array collection instance back to my complex object without iterating over it and casting it back (maybe this is the only way - but I am hoping not).
    I am hoping that there is a simple solution that I am missing and that there is some smart cookie out there that could provide me with an answer - or at least somewhere to start looking. I guess if I have no other alternative - maybe I need to get the people who built the service to change it to accept an array - and let them do the conversion.
    Any help would be greatly appreciated.
    Bert

    Hi Bert,
    According to my knowledge you can use describeType(Object) method which will return an XML... That XML will contain Properties and values just iterate through the XML and create a new Object..   Probably u can use this method...
    public function getObject(reqObj:Object,obj:Object,instanceName:String,name:String=null,index:int=-1):Obj ect
                if(!reqObj)
                    reqObj = new Object();
                var classInfo:XML = describeType(obj);
                var className:String = instanceName;
                if(name!=null)
                    className=name+"."+className;
                if(index!=-1)
                    className=className+"["+index+"]";
                for each (var v:XML in classInfo..accessor)
                    var attributeName:String=v.@name;
                    var value:* = obj[attributeName]
                    var type:String = v.@type;
                    if(!value)
                        reqObj[className+"."+attributeName] = value; 
                    else if(type == "mx.collections::ArrayCollection")
                        for(var i:int=0;i<value.length;i++)
                            var temp:Object=value.getItemAt(i);
                            getReqObject(reqObj,temp,attributeName,className,i);
                    else if(type == "String" || type == "Number" || type == "int" || type == "Boolean")
                        reqObj[ className+"."+attributeName] = value; 
                    else if (type == "Object")
                        for (var p:String in value)
                            reqObj[ className+"."+attributeName+"."+p] = value[p];
                    else
                        getReqObject(reqObj,value,attributeName,className);
                return reqObj;
    Thanks,
    Pradeep

  • I am having trouble with some of my links having images. For example, Foxfire has a picture that looks like a small world. The links in question are blank.

    I am having trouble with my links/websites having images attached to them. The place where the image should be is blank. For example, AARP has an A for its image. My storage website has a blank broken box where the image should be. I forgot I had trouble and had to reset Foxfire, this problem occurred after that reset.

    cor-el,
    Mixed content normally gives the world globe image, unless you are using a theme that uses a broken padlock instead. Maybe the gray triangle means invalid? I came across that in a few themes (what is invalid was not made clear), but those were not using triangle shapes to indicate that.
    I came across that mention in one of the pages you posted:
    * https://support.mozilla.org/kb/Site+Identity+Button
    I cannot attach a screenshot because I have not seen a triangle of any kind in my address bar.

  • New LabHSM Toolkit - Agile development of complex event-driven maintainable LabVIEW applications with active objects / actors based on a universal Hierarchical State Machine / statechart template.

    Dear Fellow LabVIEW programmers:
    Most of the systems you deal with are reactive. It means that their
    primary function is constant interaction with their environment by
    sending and receiving events. But most likely, they can have something
    happening inside them too, even when they are not processing messages
    received from outside. So, such systems have to continuosly react to
    external and internal stimuli. Right? Moreover, most likely, they
    consist of subsystems that are reactive too and, in turn, can have
    their own "life", to an extent independent from other parts (with
    which they still communicate, of course). Reactive (event-driven)
    systems are more naturally modeled with active objects. So, why then
    should we try to model and code them with GOOP and its passive
    ("dead"!) objects?
    "Flat" State Machines have been known for decades to have severe
    limitations. It's been more than 20 years since Dr. Harel invented
    Hierarchical State Machines (statecharts) to fight those limitations.
    Then why does NI still tout the same old good Moore FSM as the
    ultimate tool for event-driven programming in LabVIEW in its $995
    State Diagram KIt?
    The LabHSM toolkit we are happy to present, makes it possible to
    easily create and then maintain complex event-driven applications in
    LabVIEW as a collection of HSM-driven active object VIs using a higher
    level of abstraction and agile software development methodologies.
    These active object VIs are created based on a universal Hierarchical
    State Machine ( HSM or statechart ) template. So. all your code looks
    similar regardless of its functionality!
    We all love just jump to code, right? However, to be good boys, we
    need to do design first. Then implement it in code. If the logic is
    modified we need to redo the design first and then redo the code. When
    using LabHSM where behavior information is abstracted into a separate
    HSM data file editable with a supplied editor, there is no need for
    coding separate from design any more. The modified behavior becomes
    code automatically as soon as the HSM file is saved. Design is code!
    The implementation basically follows Dr. Samek's Quantum Programming
    paradigm. (see http://www.quantum-leaps.com). However, as already
    mentioned, LabHSM stores the behavior information in a file separate
    from the code itself. It also adds state dependent priorities to
    events, a separate queue for public events/messages, and, of course,
    some LabVIEW specific code like capturing front panel user events and
    putting them into the private Events queue. Communication and
    instantiation functions are also rather specific for LabVIEW.
    It is available for UNLIMITED PERIOD trial. Please visit
    http://www.labhsm.com for details and download. The site also contains
    references which you may want to check to learn more about
    hierarchical state machines and active object computing.
    Since this is our debut we will appreciate any comments and
    suggestions. Our contact information is available on our site, of
    course.
    Have a G'day!

    Symtx is currently hiring the following position. Please contact me if interested.
    Amy Cable
    Symtx, HR
    [email protected]
    Symtx, the leading supplier of functional test equipment, hires the brightest & most talented engineering professionals to design & manufacture complex custom electronic systems for advanced technology leaders in the defense, aerospace, communications, medical, transportation & semiconductor industries. Symtx’ challenging & dynamic work environment seeks to fill openings with highly qualified electronic engineering design professionals.The ideal candidate will be responsible for defining the requirements, software design and code development, and integration of test control software for custom functional test systems. Candidate should be familiar with data acquisition concepts, instrument control, complex test, measurement and calibration algorithm development and definition and implementation of control interfaces to hardware. Prefer familiarity with instrument control via GPIB, VXI, MXI, RS-232 desirable. Requires BS/MSEE and 3 -7+ yrs of experience in one or several of the following test applications in a Windows NT/2000/XP environment using Labwindows CVI, TestStand, Labview, Visual Basic, C++ and knowledge of RF systems is a plus. Job responsibilities will include software design, development, integration, team leadership, and interfacing with customers( includes PDR’s & CDR’s).

  • Having trouble converting array to spreadsheet string, storing the file and coverting back to array with complex numbers

    I am working with a network analyzer. I have arrays made of 5 columns the first consisting of an integer and the next four consisting of complex numbers. I am converting the array into a spreadsheet string and then saving the file using the write characters to a file VI. That seems to work well as when I open the file in Excel all the data is there. However when I try to reverse the process, open file and convert back to array, I loose some of the data. Specifically the imaginary parts of my complex numbers are all going to zero. I have narrowed down the problem to be in the conversion from spreadsheet string to array and vice versa. I
    think the problem may be with the 'format' input to the VI. I do not have an adequate resource for this so I am not sure what to put in to accomplish my task. Any takers?

    Hi Biz
    I don't think there is a direct way of converting a complex number to a
    string, so when you convert the array to a spreadsheet string, the
    numbers would be converted to real data.
    However, you could try separating the real and imaginary parts using the
    "Numeric: Complex to Re/Im" function, and then store these - either in
    separate files or in adjacent columns/rows in the same file. Then, when
    you read in the data again, use the "Numeric: Re/Im to Complex" function
    to put the two "halves" together.
    If you actually want Excel to interpret the numbers as imaginary, then
    you'll probably want to create a string for each complex number of the
    form "Re + Im*i" (after separating the Re and Im parts), by using
    "String:Format into String" with 2 numeric inputs and the format string
    "%f+%fi".
    Reading the data back into Labview then would require splitting the
    string into the 2 pieces by using "Stringcan from String" with 2
    numeric outputs (smae precision as original numbers specified by the 2
    Default Value inputs) and the same format string "%f+%fi", and then using
    the above-mentioned "Numeric: Re/Im to Complex" function. It worked for
    me, so if you can't follow what I am describing, send me an email and I
    can email you what I did (LV 5.1.1).
    Paul
    Biz wrote:
    > Having trouble converting array to spreadsheet string, storing the
    > file and coverting back to array with complex numbers
    >
    > I am working with a network analyzer. I have arrays made of 5 columns
    > the first consisting of an integer and the next four consisting of
    > complex numbers. I am converting the array into a spreadsheet string
    > and then saving the file using the write characters to a file VI. That
    > seems to work well as when I open the file in Excel all the data is
    > there. However when I try to reverse the process, open file and
    > convert back to array, I loose some of the data. Specifically the
    > imaginary parts of my complex numbers are all going to zero. I have
    > narrowed down the problem to be in the conversion from spreadsheet
    > string to array and vice versa. I think the problem may be with the
    > 'format' input to the VI. I do not have an adequate resource for this
    > so I am not sure what to put in to accomplish my task. Any takers?
    Research Assistant
    School of Physiotherapy, Curtin University of Technology
    Selby Street, Shenton Park, Western Australia, Australia. 6008
    email: [email protected]
    Tel. +61 8 9266 4657 Fax. +61 8 9266 3699
    "Everyone who calls on the name of the Lord will be saved." Romans 10:12
    "For all have sinned and fall short of the glory of God, and are
    justified freely by his grace through the redemption that came by Christ
    Jesus." Romans 3:23-4

Maybe you are looking for

  • How to use classes in ABAP report

    I have classes 1. CL_HRRCF_CANDIDATE_BUPA_BL:- to get the name of the candiidate to get the add of the candiidate to get the telephone no of the candiidate 2. CL_HRRCF_CANDIDATE_INFOTYPE_BL to get the education data of the candiidate but i don't know

  • Year end closing (Balance carried forward

    Hi Please help.  Our company did not do a year close on debtors and vendors.  I realised it now with certain debtors, that their closing balance (June 2006) do not agree to the opening balance (July 2006). Can one do a closing on the sub-ledger (Debt

  • Lost iWeb Site .... need to import current site!

    HI My iWeb site info was lost after a destroyed computer incident. I didn't know about the domain file that should be backed up ... I do now... but I am left with a .Mac web site that I can't edit or import. What should I do? Are there products that

  • Mouse Right Click

    Hello all, How to track mouse right click in Oracle Forms? I have a form which has a popup menu, based on the item status i have to enable and disable some options in the popup menu. Any ideas? With Regards, Yathish

  • Help sony dcr-sr57 not working with imovie 09

    I have a Handycam sony dcr-sr57e PAL. It is a compatible camera for imovie 09 (http://support.apple.com/kb/HT3290?viewlocale=it_IT#7). But imovie don't recognize its files (mpeg 2). I can see mpeg2 files with quicktime X (i have mpeg2 component for q