Serialisation problems

Hiya, im having a strange problem with serialisation which i cant work out. I have a class called chart, which holds x bar objects, which in turn hold x musicalNote objects, which are all serilizable. When i 'save' one of these objects, it fine, i can reload it back into my application and it works like it should. But today i saved and reloaded the same file a few times to make sure it was working, turned the computer off, turned it on an hour later and it wouldnt load up? Ive tried starting up new versions of the app, and will load up sometimes, closed eclipse and restarted it, same with my computer, and a file will load up fine, then radomonly it will decide it dosent want to loaded up again ever, without me making any changes to the code. I dont declare a serialVersionUID in any of my classes, could this have anyting to do with it? just want to know others experience with serialisation and ifs its a tempremental was of 'saving' a file for later use, of if if i should wirte my own output/input code to save the objects in a txt file or something else????
Thanks
dori

Sir_Dori wrote:
IOException when loading.
Ive done a test a found that if i add a new variable say
private String test;
to a class that is serialized, it wont load a serialized version of the class which dosent have this line, that makes sense to me. What should i do if i want to able to save files ( i want to write a few training chord charts which i will use while im still developing my app) and still be able to load them up after one of the serialized classes has had a slight modification. Freeze the design of the objects you are serializing, or provide a means to generate a new serialized object that captures any changes you have made to the object structure.

Similar Messages

  • [REQ] Serialisation Problems identification

    When an object gets serialised, exceptions could occur, and many supplier plans are added to avoid
    such situation. I need of a 'serialisation' supplier plans identification mechanism..
    Is there a specific text pattern or logic that could be analized in the pex source files to identify such
    situation and reduce to the maximum the list of supplier plans required ?
    Thanks,
    J-Paul Gabrielli
    DTS
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Sir_Dori wrote:
    IOException when loading.
    Ive done a test a found that if i add a new variable say
    private String test;
    to a class that is serialized, it wont load a serialized version of the class which dosent have this line, that makes sense to me. What should i do if i want to able to save files ( i want to write a few training chord charts which i will use while im still developing my app) and still be able to load them up after one of the serialized classes has had a slight modification. Freeze the design of the objects you are serializing, or provide a means to generate a new serialized object that captures any changes you have made to the object structure.

  • Java 1.5 client with WLS 8.1 MBeans...

    Hi,
              I maintain http://www.hermesjms.com and am investigating a problem with Hermes, which uses a 1.5 VM, interrogating WLS MBeans with WLS on 1.4.
              This thread describes what users have seen and what I have also replicated:
              http://www.hermesjms.com/forum/viewtopic.php?t=126
              As you can see, setting -Djmx.serial.form=1.0 fixes the serialisation problem but I now get the InstanceNotFoundException.
              I invoke getMBean() from the getStatistics() method here:
              http://cvs.sourceforge.net/viewcvs.py/hermesjms/Hermes4/src/java/hermes/ext/weblogic/WebLogicJMSAdmin.java?view=markup
              Any kind soul out there know what the problem may be? I'm kinda confused...
              Many thanks,
              Colin.

    Hi Tom,
              When I upgrade to 9.0 client against 8.1 server I get the exceptions at the end of this mail. The server I am talking to is a single server, not in a cluster, and is just the out-of-the-box WLS 8.1 with a JMS server and some queues and topics configured.
              I don't get the ClassNotFoundException for WebLogicObjectName as this exists in weblogic.jar. Is there anything I need to do to WLS 8.1 to allow a 9.0 client to interop?
              Cheers,
              Colin.
              2005-08-04 08:25:41,753 [Timer-7] DEBUG hermes.ext.weblogic.WebLogicJMSAdmin - Constructed JMSDestination MBean name: mydomain:JMSServerRuntime=MyJMS Server,Location=myserver,Name=MyDistributed Queue,ServerRuntime=myserver,Type=JMSDestinationRuntime
              2005-08-04 08:25:41,773 [Timer-7] ERROR hermes.HermesWatchManager - Unexpected Exception
              weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception
                   at weblogic.management.internal.MBeanHomeImpl_814_WLStub.getMBean(Unknown Source)
                   at hermes.ext.weblogic.WebLogicJMSAdmin.getMBean(WebLogicJMSAdmin.java:329)
                   at hermes.ext.weblogic.WebLogicJMSAdmin.getStatistics(WebLogicJMSAdmin.java:155)
                   at hermes.ext.weblogic.WebLogicJMSAdmin.getDepth(WebLogicJMSAdmin.java:119)
                   at hermes.impl.HermesAdminAdapter.getDepth(HermesAdminAdapter.java:108)
                   at hermes.impl.DefaultHermesImpl.getDepth(DefaultHermesImpl.java:1187)
                   at hermes.HermesWatchManager.updateWatchStatistics(HermesWatchManager.java:202)
                   at hermes.HermesWatchManager.doUpdate(HermesWatchManager.java:170)
                   at hermes.HermesWatchManager.access$000(HermesWatchManager.java:38)
                   at hermes.HermesWatchManager$2.run(HermesWatchManager.java:84)
                   at java.util.TimerThread.mainLoop(Timer.java:512)
                   at java.util.TimerThread.run(Timer.java:462)
              Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
                   java.lang.ClassNotFoundException: weblogic.management.interop.WebLogicObjectName: This error could indicate that a component was deployed on a cluster member but not other members of that cluster. Make sure that any component deployed on a server that is part of a cluster is also deployed on all other members of that cluster
                   at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:191)
                   at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:155)
                   ... 12 more
              Caused by: java.lang.ClassNotFoundException: weblogic.management.interop.WebLogicObjectName: This error could indicate that a component was deployed on a cluster member but not other members of that cluster. Make sure that any component deployed on a server that is part of a cluster is also deployed on all other members of that cluster
                   at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:344)
                   at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:258)
                   at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:253)
                   at weblogic.rjvm.MsgAbbrevInputStream.resolveClass(MsgAbbrevInputStream.java:327)
                   at weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.resolveClass(ChunkedObjectInputStream.java:316)
                   at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
                   at java.io.ObjectInputStream.readClassDesc(Unknown Source)
                   at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
                   at java.io.ObjectInputStream.readObject0(Unknown Source)
                   at java.io.ObjectInputStream.readObject(Unknown Source)
                   at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
                   at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:120)
                   at weblogic.management.internal.MBeanHomeImpl_WLSkel.invoke(Unknown Source)
                   at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
                   at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
                   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
                   at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
                   at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
                   at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
                   at java.lang.Thread.startThreadFromVM(Unknown Source)
              2005-08-04 08:25:41,773 [Timer-7] DEBUG hermes.HermesWatchManager - closing Hermes WebLogic
              2005-08-04 08:25:41,783 [Timer-7] DEBUG hermes.impl.jms.ThreadLocalSessionManager - all sessions closed, closing Connection

  • Problem to serialise the soap message in a handler

    I'm using a sun web service with a handler on the server side.
    In this handler I want to analize the soap message.
    First I try to serialize it :
    public boolean handleRequest(MessageContext arg0) {
        SOAPMessageContext context = SOAPMessageContext) arg0;
        SOAPMessage mes = context.getMessage();
        Document doc= mes.getSOAPPart();
        OutputFormat format = new OutputFormat(doc);
        format.setLineSeparator(LineSeparator.Windows);
        format.setIndenting(true);
        format.setLineWidth(0);            
        format.setPreserveSpace(true);
        StringWriter sw = new StringWriter();
        XMLSerializer serializer = new XMLSerializer(sw , format);
        serializer.asDOMSerializer();
        serializer.serialize(doc);             
        System.out.println(sw.toString());
    }The result I get looks like that :
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope><soapenv:Header>
    Where are the namespaces ?
    This xml is not correct because the soapenv prefix is not bound.
    How can I get a correct xml from the SOAP message ?

    Hi,
    Is ZYBTT a new attribute? Have you changed the status of the attribute to implemented or released (in SWO1: Edit -> Change release status)?
    And actually I think that your syntax is wrong too (BOR world is different compared to classes). If you want to use an attribute, I think that the syntax should be something like this:
    SWC_GET_PROPERTY <Object> <Attribute> <AttributeValue>.
    Read more here:
    http://help.sap.com/saphelp_nw04/helpdata/en/c5/e4acef453d11d189430000e829fbbd/content.htm
    Regards,
    Karri

  • Problem During Creation of Production Order

    Dear Sirs
    Hope you all are well. I am facing a problem in PPDM during creation of Production Order which is that when I try to release the order System shows me material availability error for BOM items but when I check those material in MMBE(stock overview )all materials are available in UN-restricted use stock. I am facing this problem and not able to resolve it please help me out in it.
    Thanks
    Regards ,
    Haseeb Khan
    Senior Consultant

    Dear
    Did you maintain Work Schedulimng View of the Material ??
    Did you maintain any Production Storage Loaction in MRP2 view and same is appearing in Goods Movement Tab in CO11N screen with Movement Type 101 ??
    Did you maintain the Operation Control Key -pp03  which should have Auto GR check box marked in OP00 ?? Goto Operation Control key -Detail information -Check whther Auto GR is marked or not ??
    If you are using Serrial Number Profile and Serial Number , then Auto GR is not possible .Make sure that you are not haveing functionality because it does not support Auto GR fro serialised material and need to do it through MIGO/MB31/MB1C.
    Make sure that you have used PP03-Control key only at last operation not all the operations.You need to maintain PP03 at Routing level and call the function by Read PP Master data  at production order level   (co02-function read pp master data )
    Regards
    JH
    Edited by: Jiaul Haque on Feb 14, 2011 12:55 PM

  • Using bulk collect and for all to solve a problem

    Hi All
    I have a following problem.
    Please forgive me if its a stupid question :-) im learning.
    1: Data in a staging table xx_staging_table
    2: two Target table t1, t2 where some columns from xx_staging_table are inserted into
    Some of the columns from the staging table data are checked for valid entries and then some columns from that row will be loaded into the two target tables.
    The two target tables use different set of columns from the staging table
    When I had a thousand records there was no problem with a direct insert but it seems we will now have half a million records.
    This has slowed down the process considerably.
    My question is
    Can I use the bulk collect and for all functionality to get specific columns from a staging table, then validate the row using those columns
    and then use a bulk insert to load the data into a specific table.?
    So code would be like
    get_staging_data cursor will have all the columns i need from the staging table
    cursor get_staging_data
    is select * from xx_staging_table (about 500000) records
    Use bulk collect to load about 10000 or so records into a plsql table
    and then do a bulk insert like this
    CREATE TABLE t1 AS SELECT * FROM all_objects WHERE 1 = 2;
    CREATE OR REPLACE PROCEDURE test_proc (p_array_size IN PLS_INTEGER DEFAULT 100)
    IS
    TYPE ARRAY IS TABLE OF all_objects%ROWTYPE;
    l_data ARRAY;
    CURSOR c IS SELECT * FROM all_objects;
    BEGIN
    OPEN c;
    LOOP
    FETCH c BULK COLLECT INTO l_data LIMIT p_array_size;
    FORALL i IN 1..l_data.COUNT
    INSERT INTO t1 VALUES l_data(i);
    EXIT WHEN c%NOTFOUND;
    END LOOP;
    CLOSE c;
    END test_proc;
    In the above example t1 and the cursor have the same number of columns
    In my case the columns in the cursor loop are a small subset of the columns of table t1
    so can i use a forall to load that subset into the table t1? How does that work?
    Thanks
    J

    user7348303 wrote:
    checking if the value is valid and theres also some conditional processing rules ( such as if the value is a certain value no inserts are needed)
    which are a little more complex than I can put in a simpleWell, if the processing is too complex (and conditional) to be done in SQL, then doing that in PL/SQL is justified... but will be slower as you are now introducing an additional layer. Data now needs to travel between the SQL layer and PL/SQL layer. This is slower.
    PL/SQL is inherently serialised - and this also effects performance and scalability. PL/SQL cannot be parallelised by Oracle in an automated fashion. SQL processes can.
    To put in in simple terms. You create PL/SQL procedure Foo that processes SQL cursor and you execute that proc. Oracle cannot run multiple parallel copies of Foo. It perhaps can parallelise that SQL cursor that Foo uses - but not Foo itself.
    However, if Foo is called by the SQL engine it can run in parallel - as the SQL process calling Foo is running in parallel. So if you make Foo a pipeline table function (written in PL/SQL), and you design and code it as a thread-safe/parallel enabled function, it can be callled and used and executed in parallel, by the SQL engine.
    So moving your PL/SQL code into a parallel enabled pipeline function written in PL/SQL, and using that function via parallel SQL, can increase performance over running that same basic PL/SQL processing as a serialised process.
    This is of course assuming that the processing that needs to be done using PL/SQL code, can be designed and coded for parallel processing in this fashion.

  • Problem with saving/loading a file

    hi everyone,
    i hav a program that consists of animal that are jlabels with icons and i put these animals in an array and save them. when i save the file i catch this error message: sun.awt.image.ToolkitImage
    when i try to load the file i catch this error: writing aborted; java.io.NotSerializableException: sun.awt.image.ToolkitImage
    Now i got this :public class Animal extends JLabel implements MouseListener, Serializable{, for my animal class and every other class associated with the animal class also implements Serializable.
    i think its because im using an Image object in another serialised class. what can i do to fix this thing (Does it have anything to do with tooltiptext coz i got that for each jlabel). Any help is appreciated
    regards,
    gher111
    Message was edited by:
    prodigy111

    Most image implementations are not Seriliazable so if you have a field possibly in an outer class which refers to an object etc which contains an image you have a problem.

  • Problems consuming a web service in ABAP

    We wish to consume an external web service from ABAP but the provided WSDL file contains syntax not supported by SAP - namely "mixed content".  A response from Roman Glushkov      in forum thread [Call Sharepoint Web Service; seemed to offer a solution. 
    The WSDL file was edited as suggested by Roman and the Service Consumer proxy was successfully created from this edited version.  However, in our SAP release (Basis release 700 support pack SAPKB70018) the "untyped mapping" indicator is not shown anywhere so we are unable to set that for those elements that were set edited in the WSDL.
    The problem now is that when calling a method where the return parameters include one of these edited elements we get the error "SOAP:1,001 CX_ST_MATCH_TYPE:XSLT exception.System expected a value for the type g" presumably because SAP is trying to de-serialise the response rather than just return the data as an XML string.
    Does anyone know how to get this "untyped mapping" indicator or can anyone suggest another way to solve this mixed content issue?
    TIA
    Gareth

    Hi Tim
    I've sort of got further in that I I can now call the web service method without error but structure returned is empty even though I know the SOAP response has data. 
    What I did was to go back to the WSDL and re-write the type declaration bit to fully describe the response message.
    The appropriate portion of the original WSDL was;
          <s:element name="getActionListResponse">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="getActionListResult">
                  <s:complexType mixed="true">
                    <s:sequence>
                      <s:any />
                    </s:sequence>
                  </s:complexType>
                </s:element>
              </s:sequence>
            </s:complexType>
          </s:element>
    The response SOAP message was;
    <getActionListResponse xmlns="http://webcominc.com/">
         <getActionListResult>
              <RESULT xmlns="">
                   <RESULT>
                        OK
                   </RESULT>
                   <REASON />
                   <ACTION>
                        View
                   </ACTION>
                   <ACTION>
                        Change Status
                   </ACTION>
              </RESULT>
         </getActionListResult>
    </getActionListResponse>
    So I re-wrote the WSDL as follows;
    <s:element name="getActionListResponse">
       <s:complexType>
          <s:sequence>       
             <s:element minOccurs="0" maxOccurs="1" name="getActionListResult">
                 <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="RESULT">
                         <s:complexType>
                            <s:sequence>
                               <s:element name="RESULT" type="s:string" minOccurs="1" maxOccurs="1" />
                               <s:element name="REASON" type="s:string" minOccurs="1" maxOccurs="1" />
                               <s:element maxOccurs="unbounded" name="ACTION" type="s:string" minOccurs="0" />
                            </s:sequence>
                         </s:complexType>
                      </s:element>
                   </s:sequence>
                </s:complexType>
             </s:element>
          </s:sequence>
       </s:complexType>
    </s:element>
    Using this new version of the WSDL I recreated the ABAP Proxy but as I said this now returns an ABAP structure that is empty.  I'm new to WSDL so its very probable that my attempt at defining the response message is incorrect or maybe it is something to do with the fact that the response message has two elements called RESULT - one being the child of the other?
    Regards
    Gareth

  • Problem with WSDL

    Hai,
    I created an EJB Project , I created web services for Session beans . I deployed it . this web services are working very fine in navigator. but when i use this web services in a third party tool its giving problem.
    in that tool it recognize only one wsdl file. but in my case webAS is generating 3 wsdls
    - one WSDL that defines the concrete endpoint
    - one WSDL that defines the binding
    - one WSDL that defines the abstract interface (with operations and
    My requirement is to generate a singlw wsdl file using those 3 wsdls . please help me out to solve this problem.
    regards,
    Naga Raju

    Hi John,
    I don't have a direct solution for your problem.
    But, using Axis in conjunction with Castor, for serialisation/deserialisation, it was mandatory to server just the types schema to Castor (in a separate file) and import them into the everything encompassing wsdl. A, then used xml import statement follows, and might be useful to indirectly solve your wsdl problem too:
    <xsd:import namespace="urn:x.y.com"schemaLocation="file:///C:/projects/ws/x.y.xsd"/>
    Best Regards
    Gregor

  • Stored Procedure Concurrency Problem 10g

    dear all,
    Please any one could help on this my problem is appreciated.......
    i'm generating ticket numbers using stored procedure as below .
    i need to know followings .....(i'm using oracle 10g)
    1 .Does oracle stored procedure handle concurrency by default or does db manage concurrency when we using sps or do we have handle concurrency inside a stored procedure?
    2.when i generating ticket no using this stored procedure is there any concurrency issue when 100 clients are access it concurrently???
    3. Is there issue or bug in my java code??????????
    4.I have already used select for update statement but when i used that in db rowlocks are hanging and db become stuck .........
    SELECT serial_no into newSerial FROM SERIAL_TAB WHERE BR_CODE=xbranch AND SCH_CODE = xscheme for update;
    5. and in my where clause i pass branch and scheme eg:SELECT serial_no into newSerial FROM SERIAL_TAB WHERE BR_CODE=xbranch AND SCH_CODE =
    xscheme;
    when i run this sp oracle return the error 'more than one row return by query'
    but when run query seperately it will return exactly one row for same brach code and scheme code no duplicates.
    why this happen and it also happen to update statement it will ignore branch code and update for all schemes
    UPDATE SERIAL_TAB SET serial_no=newSerial WHERE BR_CODE=xbranch AND SCH_CODE = xscheme;
    what should i do ? sorry for my long question since i'm in deep trouble.....................
    could any one can help please................................
    in my java code i use transaction and setAutoCommit(false) when calling this sp
    public String getTicketNo(String br,String sch){
    //getconnection
    //setAutoCommit(False);
    //call sp get return value ;
    //commit;
    //if error rollback transaction
    create or replace PROCEDURE sp_generate_ticket (
    xbranch in varchar,
    xscheme in varchar ,
    xresult OUT VARCHAR
    ) AS
    BEGIN
    newSerial:=0;
    SELECT serial_no into newSerial FROM SERIAL_TAB WHERE BR_CODE=xbranch AND SCH_CODE = xscheme;
    newSerial:=newSerial+1;
    UPDATE SERIAL_TAB SET serial_no=newSerial WHERE BR_CODE=xbranch AND SCH_CODE = xscheme;
    --- do other operations -------------------------------------------------------------------------------------
    END;
    Best Regards,
    Pradeep.
    Edited by: user8958520 on Jan 1, 2012 10:02 PM

    user8958520 wrote:
    i need to know followings .....(i'm using oracle 10g)
    1 .Does oracle stored procedure handle concurrency by default or does db manage concurrency when we using sps or do we have handle concurrency inside a stored procedure?Oracle is a multi-user and multi-process system. It supports concurrency. It also requires the developer to design and write "+thread safe+" code. Its concurrency cannot address and fix design flaws in application code.
    2.when i generating ticket no using this stored procedure is there any concurrency issue when 100 clients are access it concurrently???That depends entirely on WHAT that procedure code does. And whether that code is thread safe.
    4.I have already used select for update statement but when i used that in db rowlocks are hanging and db become stuck .........
    SELECT serial_no into newSerial FROM SERIAL_TAB WHERE BR_CODE=xbranch AND SCH_CODE = xscheme for update;Horrible and utterly flawed approach. This forces serialisation. This means if that procedure is call by a 100 clients, only a SINGLE client can be serviced at a time. ALL OTHERS need to queue and WAIT.
    Serialisation kills database performance.
    What you have is a serious design flaw. Not an Oracle issue. And there is no magic solution to make this flawed approach work in a performant and scalable manner. This flaw introduces artificial contention. This flaw enforces serialisation. This flaw means that your application code WILL step on its own toes time and time again.
    The proper solution is to fix this design flaw - and not use poorly conceived procedures such as sp_generate_ticket that violates fundamental concurrency principles.

  • How to diagnose performance problems?

    Hi all,
    I'm trying to run some basic performance tests of our app with Coherence, and I'm getting some pretty miserable results. I'm obviously missing something very basic about the configuration, but I can't figure out what it is.
    For our test app, I'm using 3 machines, all Mac Pros running OSX 10.5. Each JVM is configured with 1G RAM and is running in server mode. We're connected on a gigabit LAN (I ran the datagram test, we get about 108Mb/sec but with high packet loss, around 10-12%). Two of the nodes are storage enabled, the other runs as a client performing an approximation of one of the operations we perform routinely.
    The test consists of running a single operation many times. We're developing a card processing system, so I create a bunch of cards (10,000 by default), each of which has about 10 related objects in different caches. The objects are serialised using POF. I write all these to the caches, then perform a single operation for each card. The operation consists of about 14 reads and 6 writes. I can do this about 6-6.5 times per second, for a total of ~120 Coherence ops/sec, which seems extremely low.
    During the test, the network tops out at about 1.2M/s, and the CPU at about 35% on the storage nodes and almost unnoticeable on the client. There's clearly something blocking somewhere, but I can't find what it is. The client uses a thread pool of 100 threads and has 100 threads assigned to its distributed service, and the storage nodes also have 100 threads assigned to their distributed services. I also tried giving more threads to the invocation service (since we use VersionedPut a lot), but that didn't seem to help either. I've also created the required indexes.
    Any help in diagnosing what the problem would be greatly appreciated. I've attached the config used for the two types of node below.
    Cheers,
    Colin
    Config for storage nodes:
    -Dtangosol.coherence.wka=10.1.1.2
    -Dtangosol.coherence.override=%HOME%/coherence.override.xml
    -Dtangosol.coherence.distributed.localstorage=true
    -Dtangosol.coherence.wkaport=8088
    -Dtangosol.coherence.distributed.threads=100
    <cache-config>
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>*</cache-name>
    <scheme-name>distributed-scheme</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>distributed-scheme</scheme-name>
    <service-name>DistributedCache</service-name>
    <backing-map-scheme>
    <local-scheme>
    <scheme-ref>distributed-backing-map</scheme-ref>
    </local-scheme>
    </backing-map-scheme>
    <autostart>true</autostart>
    <serializer>
    <class-name>runtime.util.protobuf.ProtobufPofContext</class-name>
    </serializer>
    <backup-count>1</backup-count>
    </distributed-scheme>
    <local-scheme>
    <scheme-name>distributed-backing-map</scheme-name>
    <listener>
    <class-scheme>
    <class-name>service.data.manager.coherence.impl.utilfile.CoherenceBackingMapListener</class-name>
    <init-params>
    <init-param>
    <param-type>com.tangosol.net.BackingMapManagerContext</param-type>
    <param-value>{manager-context}</param-value>
    </init-param>
    <init-param>
    <param-type>java.lang.String</param-type>
    <param-value>{cache-name}</param-value>
    </init-param>
    </init-params>
    </class-scheme>
    </listener>
    </local-scheme>
    <invocation-scheme>
    <service-name>InvocationService</service-name>
    <autostart>true</autostart>
    </invocation-scheme>
    </caching-schemes>
    </cache-config>
    Config for client node:
    -Dtangosol.coherence.wka=10.1.1.2
    -Dtangosol.coherence.wkaport=8088
    -Dtangosol.coherence.distributed.localstorage=false
    <cache-config>
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>*</cache-name>
    <scheme-name>distributed-scheme</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>distributed-scheme</scheme-name>
    <service-name>DistributedCache</service-name>
    <thread-count>100</thread-count>
    <backing-map-scheme>
    <local-scheme>
    <scheme-ref>distributed-backing-map</scheme-ref>
    </local-scheme>
    </backing-map-scheme>
    <autostart>true</autostart>
    <backup-count>1</backup-count>
    </distributed-scheme>
    <local-scheme>
    <scheme-name>distributed-backing-map</scheme-name>
    </local-scheme>
    <invocation-scheme>
    <service-name>InvocationService</service-name>
    <autostart>true</autostart>
    </invocation-scheme>
    </caching-schemes>
    </cache-config>

    Hi David,
    Thanks for the quick response. I'm currently using an executor with 100 threads on the client. I thought that might not be enough since the CPU on the client hardly moves at all, but bumping that up to 1000 didn't change things. If I run the same code with a single Coherence instance in my local machine I get around 110/sec, so I suspect that somewhere in the transport layer something doesn't have enough threads.
    The code is somewhat complicated because we have an abstraction layer on top of Coherence. I'll try to post the relevant parts below:
    The main loop is pretty straightforward. This is a Runnable that I post to the client executor:
    public void run()
    Card card = read(dataManager, Card.class, "cardNumber", cardNumber);
    assert card != null;
    Group group = read(dataManager, Group.class, "id", card.getGroupId());
    assert group != null;
    Account account = read(dataManager, Account.class, "groupId", group.getId());
    assert account != null;
    User user = read(dataManager, User.class, "groupId", group.getId());
    assert user != null;
    ClientUser clientUser = read(dataManager, ClientUser.class, "userId", user.getId());
    HoldLog holdLog = createHoldLog(group, account);
    account.getCurrentHolds().add(holdLog);
    account.setUpdated(now());
    write(dataManager, HoldLog.class, holdLog);
    ClientUser clientUser2 = read(dataManager, ClientUser.class, "userId", user.getId());
    write(dataManager, Account.class, account);
    NetworkMessage networkMessage = createNetworkMessage(message, card, group, holdLog);
    write(dataManager, NetworkMessage.class, networkMessage);
    read does a bit of juggling with our abstraction layer, basically this just gets a ValueExtractor for a named field and then creates an EqualsFilter with it:
    private static <V extends Identifiable> V read(DataManager dataManager,
    Class<V> valueClass,
    String keyField,
    Object keyValue)
    DataMap<Identifiable> dataMap = dataManager.getDataMap(valueClass.getSimpleName(), valueClass);
    FilterFactory filterFactory = dataManager.getFilterFactory();
    ValueExtractorFactory extractorFactory = dataManager.getValueExtractorFactory();
    Filter<Identifiable> filter = filterFactory.equals(extractorFactory.fieldExtractor(valueClass, keyField), keyValue);
    Set<Map.Entry<GUID, Identifiable>> entries = dataMap.entrySet(filter);
    if (entries.isEmpty())
    return null;
    assert entries.size() == 1 : "Expected single entry, found " + entries.size() + " for " + valueClass.getSimpleName();
    return valueClass.cast(entries.iterator().next().getValue());
    write is trivial:
    private static <V extends Identifiable> void write(DataManager dataManager, Class<V> valueClass, V value)
    DataMap<Identifiable> dataMap = dataManager.getDataMap(valueClass.getSimpleName(), valueClass);
    dataMap.put(value.getId(), value);
    And entrySet directly wraps the Coherence call:
    public Set<Entry<GUID, V>> entrySet(Filter<V> filter)
    validateFilter(filter);
    return wrapEntrySet(dataMap.entrySet(((CoherenceFilterAdapter<V>) filter).getCoherenceFilter()));
    This just returns a Map.EntrySet implementation that decodes the binary encoded objects.
    I'm not really sure how much more code to post - what I have is really just a thin layer over Coherence, and I'm reasonably sure that the main problem isn't there since the CPU hardly moves on the client. I suspect thread starvation at some point, but I'm not sure where to look.
    Thanks,
    Colin

  • Reports serialising when column sort attributes used

    If an Apex user has two sessions and runs the same report page in both, then if the report uses column sort attributes (rather than an ORDER BY in the SQL), the second is blocked by the first; once the first completes the second then runs and completes. This appears to be because the user preferences for column sorting are being updated each time, even if they have not been changed.
    This application demonstrates the problem:
    http://htmldb.oracle.com/pls/otn/f?p=15827:2
    Create 2 sessions using that URL. The page has a report based on ALL_OBJECTS with an item "Owner" to filter on. Enter "%" in the first session and press Enter and the report will run, taking about 1 minute. Meanwhile in the second session enter a specific owner (or just XXX) and press Enter. The second report will finish just after the first finishes, even though when run alone it only takes half a second or so.
    Is this a bug?

    Hi Tony,
    If you're using this on unauthenticated pages, then the sort preferences are stored per user for the APEX_PUBLIC_USER (or HTMLDB_PUBLIC_USER), which is potentially why you're seeing the serialisation/dead-locking.
    Could you perhaps use the suggestion by Scott in this thread -
    Re: Report sorting affected by other users
    To use the session ID as the APEX user (or anything else you prefer), to mitigate the potential for the deadlock? (It's worth trying and should take just a few seconds to test in your sample app?).
    John.

  • Problem in placing files in server

    Hello,
    I am working on applet to servlet communication. I have developed the code but I have problem in placing the files in the tomcat server. these are my files
    test.html
    test.class (applet)
    inter.class (bean implementing serializable interface)
    testser.class (servlet)
    I have placed test.html, test.class and inter.class in webapps/examples folder. I have placed testser.class in webapps/examples/web-inf/classes folder.
    So that i can now see the applet and applet pass values to bean. But my servlet is not called. Can any one help what is going wrong or where should i place the files?
    Thanks

    Hello,
    Here goes my source code files. All of them are working source files,
    I am a bit confused in placing them in the Tomcat server. Can anyone try and post the results please?
    i.e placing the files in the proper directories of the server.
    // Register.java
    import java.sql.*;
    public class Register implements java.io.Serializable
        // data members
        private String firstname;
        private String lastname;
        private final String CR = "\n";     // carriage return
        // constructors
        public Register()
        public Register(String afirstName, String alastName)
            firstname = afirstName;
            lastname = alastName;
              RegistrationServlet regser = new RegistrationServlet();
         public String getFirstName()
                 System.out.println("In getFirstName(): " + firstname);
              return firstname;  
        public String getLastName()
            return lastname;  
    // RegistrationApplet.html
    import java.awt.*;
    import java.applet.*;
    import java.net.*;
    import java.awt.event.*;
    import java.io.*;
    public class RegistrationApplet extends Applet implements ActionListener
         String browser;
         public void init()
              setLayout(null);
              setSize(438,536);
              label1.setText("First Name*:");
              add(label1);
              label1.setFont(new Font("Dialog", Font.BOLD, 12));
              label1.setBounds(48,60,116,27);
              add(textField1);
              textField1.setBounds(168,60,180,30);
              add(textField2);
              textField2.setBounds(168,96,180,30);
              label2.setText("Last Name*:");
              add(label2);
              label2.setFont(new Font("Dialog", Font.BOLD, 13));
              label2.setBounds(48,96,94,20);
              button1.setLabel("Submit");
              add(button1);
              button1.setBackground(java.awt.Color.lightGray);
              button1.setBounds(120,444,98,30);
              label11.setText("Applet to Servlet Communication");
              add(label11);
              label11.setFont(new Font("Dialog", Font.BOLD, 24));
              label11.setBounds(108,12,288,36);
              button1.addActionListener(this);
         public void actionPerformed(ActionEvent ae)
              if(ae.getSource().equals(button1))
                   firstname = textField1.getText().trim();
                   lastname = textField2.getText().trim();
                   try{
                   String toservlet = "http://localhost:8080/servlet/RegistrationServlet";
                   URL servleturl = new URL(toservlet);
                   URLConnection servletconnection = servleturl.openConnection();
                   servletconnection.setDoInput(true);
                   servletconnection.setDoOutput(true);
                   servletconnection.setUseCaches(false);
                   servletconnection.setDefaultUseCaches(false);
                   servletconnection.setRequestProperty("Content-type","application/octet-stream");
                   // sending the values to the serialised class "Register.java"
                   register  = new Register(firstname,lastname);
                   ObjectOutputStream outputtoservlet = null;
                   outputtoservlet = new ObjectOutputStream(servletconnection.getOutputStream());
                   outputtoservlet.writeObject(register);
                   outputtoservlet.flush();
                   outputtoservlet.close();
                   catch(Exception e)
                        System.out.println("in submit  "+e);
                        e.printStackTrace();
         String firstname;
         String lastname;
         java.awt.Label label1 = new java.awt.Label();
         java.awt.TextField textField1 = new java.awt.TextField();
         java.awt.TextField textField2 = new java.awt.TextField();
         java.awt.Label label2 = new java.awt.Label();
         java.awt.Button button1 = new java.awt.Button();
         java.awt.Label label11 = new java.awt.Label();
         String parameters;
         Register register = null;
    // RegistrationServlet.java
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.net.*;
    import java.io.*;
    public class RegistrationServlet extends HttpServlet
         public void doPost(HttpServletRequest req,HttpServletResponse res)
              ObjectInputStream inputFromApplet = null;
            Register aRegister = null;       
              try
                   inputFromApplet = new ObjectInputStream(req.getInputStream());
                   //"Reading data..."
                   System.out.println("Reading Data.......");
                 aRegister = (Register) inputFromApplet.readObject();
                   System.out.println("Completed Reading Data.......");
                   //close the connection after reading the data               
                   inputFromApplet.close();
                   // getting parameters from the serilized class "Register.java"
                   String first = aRegister.getFirstName();
                   String last = aRegister.getLastName();
                   ServletOutputStream sos = res.getOutputStream();
                   sos.println("First Name:"+first);
                   sos.println("Last Name:"+last);
              catch(Exception e)
                   System.out.println("in doPost()  "+e);
                   //e.printStackTrace();
    }Thanks

  • Problem in producing some xml strings

    Dear all,
    I got a problem in producing some xml string. I use the DocumentBuilderFactory and DocumentBuilder to build a xml document. Instead of saving to a file, I need to make it into a string then return it to the caller. I have tried to use the Transformer but the string returned contains the <?xml version=..../> line which I don't want it. What can I do?

    What you want to do is associate a stylesheet with the transformer instance you are using to place the DOM into string. The stylesheet with the appropriate instructions are get rid of the <?xml version=..>. You want to produce a stylesheet which has:
    <xsl:output omit-xml-declaration="yes"/>
    <xsl:template match="/">
    <xsl:copy-of select="node()"/>
    </xsl:template>
    <xsl:output> controls the serialisation of the xml document to the output source which in this case is a string. The <xsl:template> is required. It will copy the entire xml document to the output source. Without it the default templates are used, and the xml markup will not be included in the output source.
    Hope this helps.

  • RE: (forte-users) Serialisation

    Singh,
    Any message sent across partition boundaries is serialized. This includes
    method invokations, events and exceptions. The signature of the message
    itself is serialized, as well as the values of all parameters/attributes.
    Serializing a scalar value requires less overhead then serialising an
    object, however, the difference isn't as big as you might think. Objects
    have more attributes then just the value you're interested in and these
    attributes are serialised as well. Each object is an instance of a class and
    each class has a UUID, which is added to the serialized stream as well.
    However, methods are NOT serialised. What happens is this. Forte serializes
    an object into a stream containing only the values of the attributes
    (including nested attributes). This stream is given a header which sais of
    which class this object is an instance (the UUID is used for that). The
    receiving partition reads the serialized stream, finds the definition of the
    class (defined by UUID) in its own code, creates an instance of this class
    and fills the data out of the serialized stream into this new object.
    You can imagine what might happen if there is a mismatch between the
    class-definitions in both partitions. You either get
    serialization-deserialization errors, or the receiving partition complains
    that it doesn't even know the UUID of the received streamed object, or you
    get no errors at all and just have an object that displays different
    behaviour, depending what partition it's in.
    If there are no problems, then the main issue is the
    serializing-deserializing overhead. Note that the receiving partition has to
    instantiate a new object for every serialized object it receives and will
    therefore execute all code in the Init() method. This overhead is not
    required for scalar types, for which Forte only needs to reserve a small
    amount of memory space on the stack.
    Any call to a database is also a message sent across partitions and is
    therefore serialized. However, one partition is a Forte partition and the
    other one isn't. Therefore, Forte's internal serialization mechanism isn't
    used. Forte serializes the SQL-query into a format understood by the
    database (which is different for every vendor). Forte then receives a stream
    back which has a different format for every different database type. This
    stream is deserialized and written to attributes that Forte has reserved to
    contain the data. Whether these are scalar, datavalues or domains only
    impacts performance inside the Forte partition. It has no effect on the
    communication with the database.
    Pascal Rottier
    Atos Origin Nederland (BAS/West End User Computing)
    Tel. +31 (0)10-2661223
    Fax. +31 (0)10-2661199
    E-mail: Pascal.Rottiernl.origin-it.com
    ++++++++++++++++++++++++++++
    Philip Morris (Afd. MIS)
    Tel. +31 (0)164-295149
    Fax. +31 (0)164-294444
    E-mail: Rottier.Pascalpmintl.ch
    -----Original Message-----
    From: Singh [mailto:fortelistyahoo.com]
    Sent: Thursday, February 22, 2001 3:30 AM
    To: forte-userslists.xpedior.com
    Subject: (forte-users) Serialisation
    Hello All
    I have a question that has been bugging me for some
    time.
    We all know that it is better to use scalar data
    types, as opposed to objects, when passing data across
    a network.
    The reason, if I understand correctly, is that when
    you send an object across a network, the whole object
    (properties, attributes and methods) is deserialised
    into zero's and one's before being sent across and
    then serialised back into the object when it gets to
    the other side. This would take longer for an object
    since for a scalar value, just the value is
    deserialised and serialised.
    But when you are writing to a database from the tier
    before the database to the database, does it matter
    what type you use. The reason for saying this is that
    the values are serialised before they go across and
    then deserialised when they get to the base, in other
    words, they are sent as zero's and one's. For a scalar
    - just the value is sent across but for an object -
    does just the value go across or the complete object.
    If just the value of the object goes across, then it
    doesn't really matter whether a scalar or object is
    sent across.
    Am I correct in this assumption.
    Thanks in advance for your help.
    Regards,
    Singh
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

    Hi,
    I cannot get hold of Tech Note 10398..... can anyone email me a copy?
    Tx
    Etienne
    -----Original Message-----
    From: Klerk, Theo de [SMTP:Theo.de.Klerkcompaq.com]
    Sent: Wednesday, February 09, 2000 4:26 PM
    To: 'Jason de Cean'; 'Forte Users'
    Subject: RE: (forte-users) Serialisation
    There are a number of flags that will show you some of the required
    information in a log file (not within the application itself). Technote
    10398 has many more flags listed for a variety of obscure, useful, not so
    useful and exotic information:
    trc:cm:*:4 and *:8 - show packet serialisation, open, closes between
    partition communication
    trc:do:*:2 - proxy creation/deletion, exception events
    trc:do:*:5 - individual message tracing between proxies
    trc:do:*:8 - serialisation information
    Theo
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

Maybe you are looking for