Nested THREADS!!!

hi frens,
i have made a thread say T1 for a class A which extends another class B. class B also has a thread T2. my problem is when i sleep thread T1, thread T2 is still running. but i want both of them to sleep. thread T2 is private so i cant access it from class A. how can i get my job done. pls help me. thanks alot....

actually i am writing a program for downloading.i have made a class with extends the package class which does the downloading purpose. it uses a thread for downloading. now i want to access that thread from my class. my problem is that thread is declared private which means i cant access it from my class and second i dont have the java file for that package class, so i cant even modify the super class. so it there anyway so that i can control the thread of my super class from my class. i hope i made that clear. any sort of helps are welcomed. thank you for ur attention.

Similar Messages

  • Duplicando registro tabela NAST após chamada J_1BNFE_CALL_RSNAST00

    Boa tarde pessoal,
    estava conversando com o Fernando nesta [Thread|; e resolvi abrir uma nova thread.
    Estava implementando a badi de impressão do danfe e notei um comportamento estranho.
    Após gerar uma NFe, é gerado um registro na NAST.
    Na sequencia, executo o FM J_1B_NFE_XML_IN para simular o aceite desta NFe, o que acarreta na chamada da badi de impressão e na minha badi tenho a chamada p/ o FM J_1BNFE_CALL_RSNAST00.
    Dentro deste FM, ele move alguns parâmetros de entrada para a NAST e chama o form einzelnachricht, que chama tnaprlesen_, optischearchivierung_, programmaufrufen_, protocolstore_ e finalmente o nastupdate_.
    Neste ponto do programa, a chave que tenho no header da tabela NAST é diferente da que já consta na tabela do bd.
    No BD tenho este registro na NAST:
    MANDT     321
    KAPPL     NF
    OBJKY     0003347752
    KSCHL     ZNFE
    SPRAS     E
    PARNR                                                                               
    PARVW                                                                               
    ERDAT     06/24/2009
    ERUHR     14:38:41
    e no programa, no form nastupdate_, tenho o header da NAST assim:
    MANDT
    KAPPL     NF
    OBJKY     0003347752
    KSCHL     ZNFE
    SPRAS     
    PARNR     
    PARVW     
    ERDAT     00000000
    ERUHR     000000
    Sendo assim, quando ele dá o update nast. ele dá sy-subrc = 4, e na sequencia, o código trata if sy-subrc ne 0, insert nast. Com isso tenho 2 registros na NAST pra mesma NF, um com o status VSTAT = 1, mas com o SPRAS/ERDAT/ERUHR não preenchidos e o outro, o "original", com tudo preenchido porém com o status VSTAT = 0.
    Olhando o Spool na SP01 eu vejo a NFe "impressa" apenas uma vez, o que está correto. Mas o que me incomoda é que ele acaba gerando registros duplicados.
    Segue meu código da BADI:
      IF  i_active-code EQ '100'         "NF-e autorizada
      AND i_active-printd IS INITIAL     "só imprimir automaticamente se ainda não foi impressa
      AND i_active-cancel IS INITIAL     "não faz sentido imprimir autom. se ela foi cancelada
      AND i_active-conting_s IS INITIAL. "não faz sentido imprimir autom. se ela foi alternada
                                         "p/conting. pois deverá ser cancelada
        CALL FUNCTION 'J_1BNFE_CALL_RSNAST00'
        EXPORTING
          I_ACTIVE = i_active
          I_DIMME  = 'X'
          I_PRINTER = vl_printer
        EXCEPTIONS
          no_printer = 1
          others = 2.
        COMMIT WORK.
        IF sy-subrc = 0.
          CALL FUNCTION 'J_1B_NFE_ERROR_PROTOKOLL'
          EXPORTING
            i_docnum = i_active-docnum.
        ENDIF.
      ENDIF.
    Para "resolver" esse pequeno problema (ao meu ver, não sei se está correto ou não este comportamento), criei um FM Z com o seguinte código:
    FUNCTION ZBR_J_1BNFE_CALL_RSNAST00.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_ACTIVE) TYPE  J_1BNFE_ACTIVE
    *"     VALUE(I_KAPPL) TYPE  NAST-KAPPL DEFAULT 'NF'
    *"     VALUE(I_NACHA) TYPE  NAST-NACHA DEFAULT '1'
    *"     VALUE(I_DIMME) TYPE  NAST-DIMME DEFAULT 'X'
    *"     VALUE(I_PRINTER) TYPE  RSPONAME OPTIONAL
    *"  EXCEPTIONS
    *"      PRINT_ERROR
    TABLES: nast.
    SELECT SINGLE *
        FROM nast
       WHERE kappl = i_kappl AND
             objky = i_active-docnum AND
             kschl = i_active-form AND
             nacha = i_nacha AND
             vstat = '0'.
    start printing
      nast-kappl = i_kappl.
      nast-objky = i_active-docnum.
      nast-kschl = i_active-form.
      nast-nacha = i_nacha.          "1 = print output
      "nast-ldest = i_printer.
      "nast-dimme = i_dimme.          "X = print immidiately
      PERFORM einzelnachricht IN PROGRAM rsnast00 USING sy-subrc.
      IF NOT sy-subrc IS INITIAL.
        MESSAGE i230(8b) with i_active-docnum RAISING print_error. "#EC *
      ENDIF.
    ENDFUNCTION.
    e na BADI, o chamei desta forma:
    CALL FUNCTION 'ZBR_J_1BNFE_CALL_RSNAST00'
        IN BACKGROUND TASK
        EXPORTING
          i_active = i_active
        EXCEPTIONS
          no_printer = 1
          others = 2.
    Desta maneira, não ocorreu a duplicação dos registros da NAST e a nota também foi impressa OK.
    A minha dúvida é se realmente o comportamento esperado utilizando o primeiro procedimento é duplicar o registro na NAST ou se pode ser que tenha algo errado no meu sistema(SAP_APPL 602 SP01) na hora da chamada da RSNAST00.

    parte 1
    Boa tarde pessoal,
    estava conversando com o Fernando nesta [Thread|; e resolvi abrir uma nova thread.
    Estava implementando a badi de impressão do danfe e notei um comportamento estranho.
    Após gerar uma NFe, é gerado um registro na NAST.
    Na sequencia, executo o FM J_1B_NFE_XML_IN para simular o aceite desta NFe, o que acarreta na chamada da badi de impressão e na minha badi tenho a chamada p/ o FM J_1BNFE_CALL_RSNAST00.
    Dentro deste FM, ele move alguns parâmetros de entrada para a NAST e chama o form einzelnachricht, que chama tnapr_lesen, optische_archivierung, programm_aufrufen, protocol_store e finalmente o nast_update.
    Neste ponto do programa, a chave que tenho no header da tabela NAST é diferente da que já consta na tabela do bd.
    No BD tenho este registro na NAST:
    MANDT     321
    KAPPL     NF
    OBJKY     0003347752
    KSCHL     ZNFE
    SPRAS     E
    PARNR                                                                               
    PARVW                                                                               
    ERDAT     06/24/2009
    ERUHR     14:38:41
    e no programa, no form nastupdate_, tenho o header da NAST assim:
    MANDT
    KAPPL     NF
    OBJKY     0003347752
    KSCHL     ZNFE
    SPRAS     
    PARNR     
    PARVW     
    ERDAT     00000000
    ERUHR     000000
    Sendo assim, quando ele dá o update nast. ele dá sy-subrc = 4, e na sequencia, o código trata if sy-subrc ne 0, insert nast. Com isso tenho 2 registros na NAST pra mesma NF, um com o status VSTAT = 1, mas com o SPRAS/ERDAT/ERUHR não preenchidos e o outro, o "original", com tudo preenchido porém com o status VSTAT = 0.
    Olhando o Spool na SP01 eu vejo a NFe "impressa" apenas uma vez, o que está correto. Mas o que me incomoda é que ele acaba gerando registros duplicados.
    continua
    Edited by: Jose Nunes on Jun 24, 2009 5:00 PM
    Edited by: Jose Nunes on Jun 24, 2009 5:01 PM

  • Erro de update no ECC PRD

    Pessoal,
    estou com o seguinte problema: tenho a nota de número 91820 que se encontra cancelada na Sefaz e no ECC.
    Entretanto, a equipe de Basis descobriu qua a nota está sofrendo tentativas de update no ECC.
    Verifiquei que não existe nenhum processo sendo executado no GRC e no PI que esteja acionando o update do ECC.
    Na SM13, do ECC, o erro está descrito como:
    Report: SAPLJ_1B_NFE
    Functional Module: J_1B_NFE_UPDATE_INVALID
    Status: Update was terminated
    Report: LJ_1B_NFEU13
    Row: 149
    Class: J1B_NFE
    Number: 060
    Error Details: J1B_NFE 060 DB error insert of record with key 0000091820
    Como resolver esse problema?
    Abs,
    Sérgio

    Bom dia Sérgio,
    Verifique na tabela /XNFE/BACKSTATUS no GRC, se você diz que está tudo ok nos sistemas então ela foi parar aí por um erro de comunicação entre o GRC e o ERP.
    Quem está "insistindo" na transmissão é o programa /XNFE/UPDATE_ERP_STATUS que roda escalonado no GRC para retransmissão ao ERP.
    Sugestão:
    - Verifique cada linha na tabela /XNFE/BACKSTATUS, pois após rodar o job acima ela deve ficar vazia.
    - Se tem vários registros nela, pode matar com SE14 de uma vez (faça backup dos dados no Excel, mas não tenha medo pois você pode reenviar o resultado para o R/3 rodando este mesmo programa informando a chave de acesso, na versão nova isto se faz com o /XNFE/UPDATE_ERP_STATUS_DIAL)
    - No R/3 monitore esta tabela J_1B_NFE_UPDATE_INVALID, ela é o log de tudo que o R/3 recusou em processar
    Veja mais sobre dados retidos na backstatus nesta thread:
    Duvidas /XNFE/UPDATE_ERP_STATUS
    Dúvida - Job /XNFE/UPDATE_ERP_STATUS
    Atenciosamente,
    Fernando Da Ró

  • Communication between multiple processes

    Hi there!
    I have once again a problem concerning paralel processing in ABAP.
    The problem is that:
    I want to write a programm which invokes a process that can recursive invoke another process and so on.
    Let me try to picture it out:
    -> means invokes
    Main Program -> Thread1
    Thread 1 -> Thread 2
    Thread 2 -> Thread 3
    Thread 2 -> Thread 4
    Thread 4 -> Thread 5
    Thread 5 -> Thread 6
    As you can see I have several Threads invoking another Thread. The structure of Threads invoking each other will be dynamic. Now I face the following problem:
    I want just a few threads to run at the same time (let's say for now 3) and there are dependencies between the Invoker and the invoked Thread (e.g. Thread 3 needs some information from Thread 2).
    How can I let my Main Program know that all the data is ready? Does the WAIT UNTIL statement also applies for these nested threads?
    How does Thread 5 e.g. know that there are already too much processes running and he has to wait?
    Is there a possibility how I can queue these processes?
    sth like:
    Thread 1 - Thread 2 - Thread 3 - Thread 4 - Thread 5 - Thread 6
    If prerequisites for Thread 3 are not fullfilled it would look like:
    Thread 1 - Thread 2 - Thread 4 - Thread 5 - Thread 6
    and so on...
    The problem is the communication over the bounds of Threads. This dynamic structure is neccessary due to the large data amount that I have to handle. Due to restrictions I can only use a function group and a report. No database tables or stuff like that is allowed.
    I hope I was able to point out my problem. If it was to unclear please let me know it, then I will try to specify it more.
    Thank you in advance for your help.
    Best Regards,
    Sebastian

    @ Sandeep:  Thanks for your answer I am going to have a look at that
    @ Thomas: These nested Calls would be useful because of the amount of data that has to be processed. Think about a Tree with over 200.000 entries. For each entry there is the requirement for Check if corresponding dataset is right, if necessary Adapt data and Update on the database.
    The approach with the nested threads would check a single node, looks whether there are child nodes and if so starts a thread for processing the child nodes. These would check each child node and if neccessary starts another thread and so on. Child nodes can only be changed if parent change was successful so I have the dependency right here.
    Yesterday I had another idea that should work:
    My Main Programm first checks the root node and then the direct childs of the root node (1st hierarchy level). Then invokes a thread for each child node which has again child nodes and for which changes applied (2nd hierarchy level. Each thread 'returns' a list of nodes for which once again the main program should invoke another thread and so on. (This would build up a queue for processing within the Main Program)
    It is a similar approach to the think with nested threads but the control structure is more clear and there is no nesting of threads neccessary.
    Thanks and Best Regards,
    Sebastian

  • Obter arquivo XML enviado

    Bom dia pessoal. Preciso obter o arquivo XML de uma nota enviada pelo GRC. Onde ela é armazenada? Como consigo pegar esse xml?

    Bom dia Edson, Bem vindo ao fórum
    Os XML's autorizados ficam armazenados no KPro e podem ser lidos com a função /XNFE/CORE_KPRO_XML_READ.
    Dê uma lida nestas threads que vai te dar uma boa base pra começar:
    /XNFE/CORE_KPRO_XML_READ - Problemas com download de documentos XML
    Check-list Semanal/Mensal
    Dúvidas sobre a solução de salvar os xml de entradas no GRC
    Consulta XML
    Atenciosamente, Fernando Da Ró

  • PL/SQL add procedure with nested table - Duplicate Thread

    Hi,
    I am trying to do a procedure to input information for one order and another for 2 orders.
    The information I have so far is as follows:
    Drop table Orders cascade constraints;
    Drop type item_type;
    Drop type Item_nested;
    Create or Replace Type item_type AS Object (
    Cat_code Varchar2(6),
    Amount_ord Number(3),
    Cost Number(5,2) );
    Create or Replace Type item_nested as table of item_type;
    Create Table Orders (
    Order_no Varchar2(8) constraint pkorder primary key,
    Customer_name Varchar2(30),
    AddressLine1 Varchar2(20),
    AddressLine2 Varchar2(20),
    AddressLine3 Varchar2(20),
    Town Varchar2(20),
    Postcode Varchar2(10),
    Country Varchar2(20),
    Order_items item_nested,
    Order_date Date)
    Nested Table Order_items
    Store as nested_items return as locator;
    This has so far worked but I have not managed the insert procedure.
    I am using Oracle SQL*plus
    Thanks
    SG
    Edited by: user10689875 on 11-Jan-2009 03:39

    Duplicate thread ->
    PL/SQL add procedure with nested table
    Please remove it & marked it as duplicate.
    Regards.
    Satyaki De.

  • Are static nested classes thread-safe?

    There doesn't seem to be any definitive answer to this. Given the following code, is it thread-safe?
    public class SomeMultiThreadedWebController {
    public HttpServletResponse someMethodToExecuteViaWebRequest(HttpServletRequest request) {
        simpleQueryBuilder("SELECT...").addParameter("asdf","asdf").createQuery(EMF.getEntityManager()).executeUpdate();
    protected static class SimpleQueryBuilder {
             private String queryString;
             private Map<String, Object> params = new HashMap<String, Object>();
             public SimpleQueryBuilder(String queryString) {
                  this.queryString = queryString;
             public SimpleQueryBuilder addParameter(String name, Object value) {
                  params.put(name, value);
                  return this;
             public Query createQuery(EntityManager em) {
                  Query query = em.createQuery(queryString);
                  for (Entry<String, Object> entry : params.entrySet()) {
                       query.setParameter(entry.getKey(), entry.getValue());
                  return query;
        public static SimpleQueryBuilder simpleQueryBuilder(String queryString) {
             return new SimpleQueryBuilder(queryString);
    }Forget whether or not someone would do this, as this is just an example. I'm really trying to get at whether or not the instance variables inside the static nested class are thread-safe. Thanks for any responses.

    Hello,
    I believe you understand what you're talking about, but you state it in a way that is very confusing for others.
    Let me correct this (essentially, incorrect uses of the terminology):
    I agree that thread-safe or not is for an operation, for a member, it has some sort of contextual confusion.
    Member has a much broader meaning in the [Java Language Specification|http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.4] . Even "class member" applies to both an attribute, a method, or an inner class or interface.
    I think you mean "member variable" of a class (aka "attribute" or "field"). By the way, static or not is irrelevant to the rest of the discussion.
    For an operation or a member, if there's only one thread could access it atomically in one moment, we could call it thread-safe.Mmm. I was tempted to say yes (I'm reluctant to commit myself). With an emphasis on "_The encapsulating class_ makes this member's usage thread-safe".
    Still, just synchronizing each operation on a member is not enough to make all usages "thread-safe":
    Consider a java.util.Vector: each add/get is synchronized, so it is atomic, fine.
    However if one thread adds several values, let's say 3, one by one, to a vector that initially contains 0 values, and another thread reads the vector's size() (another properly synchronized method), the reader thread may witness a size anywhere among 0, 1, 2, 3, which, depending on the business logic, may be a severely inconsistent state.
    The client code would have to make extra work (e.g. synchronizing on the vector's reference before the 3 adds) to guarantee that the usage is thread-safe.
    Thus any synchronized method(With the limit stated above)
    or immutable member (like primitive type) are thread-safe.
    Additionally for a member, if it's immutable, then it's thread-safe. You mean, immutable primitive type, or immutable object. As stated previously, an immutable reference to a mutable object isn't thread-safe.
    a static final HashMap still have thread-safe issue in practice because it's not a primitive.The underlined part is incorrect. A primitive may have thread-safety issues (unless it's immutable), and an object may not have such issues, depending on a number of factors.
    The put, get methods, which will be invoked probably, are not thread-safe although the reference to map is.Yes. And even if the put/get methods were synchronized, the client code could see consistency issues in a concurrent scenario, as demonstrated above.
    Additional considerations:
    1) read/write of primitive types are not necessarily atomic: section [ §17.7 of the JLS|http://java.sun.com/docs/books/jls/third_edition/html/memory.html#17.7] explicitly states that writing a long or double value (2 32-bits words) may not be atomic, and may be subject to consistency issues in a concurrent scenario.
    2) The Java Memory Model explicitly allows non-synchronized operations on non-volatile fields to be implemented in a "thread-unsafe" way by the JVM. Leading way to a lot of unintuitive problems such as the "Double-Checked Locking idiom is broken". Don't make clever guess on code execution path unless you properly synchronize access to variables across threads.
    Edited by: jduprez on Mar 4, 2010 9:53 AM

  • Quick Q: Are thread nested?

    consider this:
    Thread thread1 = new Thread(new Runnable(){
        Thread2.start();
    }).start();
    thread1.sleep(100000);Will thread 2 continue unimpeded?
    I would have assumed it would, as its kinda the point of threads as i understood them, but im having some unexpected behaviour, and clarification on this point will aid me with debugging.
    Thank you

    JamesBarnes wrote:
    Ahh i see, that makes sense.
    OK, with that in mind, i want a thread to perform a check every now and then (generally ~5minutes), would it be be bad practice to do the following?
    new Thread(new Runnable(){
    private void run(){
    while(true){
    if( timeElapsedSinceLastCheck > interval ){
    perform check and respond
    }).start();
    If you don't put a sleep() inside that loop, then, yes, very bad idea.

  • Error Msg: RemoteException occurred in server thread; nested exception is:

    Hi Everyone,
    I got the above msg and does anyone has any idea what could be the root of the problem? Attached below is extraction from the server log file.
    Thanks,
    Kelvin
    Server Log
    [#|2005-09-28T23:28:59.836+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.container.ejb|_ThreadID=21;|EJB5018: An exception was thrown during an ejb invocation on [SupplierTableFacadeBean]|#]
    [#|2005-09-28T23:28:59.836+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.container.ejb|_ThreadID=21;|
    javax.ejb.EJBException
         at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:2807)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:2713)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2521)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:819)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:137)
         at $Proxy89.createSupplier(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:167)
         at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
         at supplier._SupplierTableFacadeRemote_DynamicStub.createSupplier(_SupplierTableFacadeRemote_DynamicStub.java)
         at org.apache.jsp.process.supplier.addsupplier_005fprocess_jsp._jspService(addsupplier_005fprocess_jsp.java:141)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    Caused by: java.lang.NullPointerException
         at supplier.SupplierTableFacadeBean.createSupplier(SupplierTableFacadeBean.java:89)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         ... 44 more
    |#]
    -----------------------------------------------------------------------------------------------------------------------------------------------------

    I have attached my createSupplier method from the session bean. I hope it helps in finding the problem
    Regards,
    Kelvin
    public String createSupplier(String supid, String password, String name, String address,String contactno, String faxno, String email, String kcpersonnal, String kcpdesignation, String cpcno, String industry, String natureofbiz, String paidupcapital, String preferredcontract, Integer creditrating, String others) throws FinderException, UserException{
    SupplierTableLocal supplierTable = null;
    String key;
    boolean ok;
    //Checking for the minimum creation values.
    if ( supid.equals("") || password.equals("") || name.equals("")|| address.equals("")|| contactno.equals("") || faxno.equals("")|| email.equals("")|| kcpersonnal.equals("") || kcpdesignation.equals("")|| cpcno.equals("")|| industry.equals("")|| natureofbiz.equals("")||paidupcapital.equals("")) {
    throw new UserException("Please enter the userid, password, name, address, contactno, faxno, email, kcpersonnel, kcpdesignation, cpcno, industry, natureofbiz, paidupcapital.");
    //Checks if supplierid is unique.
    else{
    Collection list = supplierHome.findBySupid(supid);
    if( (list.size() != 0) ) {
    throw new UserException("SupplierID already exists.");
    //If SupplierID chosen is unique
    else {
    do{
    key = supid;
    //Check if the Primary Key has already been taken
    try{
    supplierTable = supplierHome.findByPrimaryKey(key);
    ok = true;
    catch (javax.ejb.FinderException ex) {
    ok = false;
    } while (ok);
    try{
    supplierTable = supplierHome.create(supid, password, name, address, contactno, faxno, email, kcpersonnal, kcpdesignation, cpcno, industry, natureofbiz, paidupcapital, preferredcontract, creditrating, others);
    catch (javax.ejb.CreateException e){
    return null;
    return key;
    }

  • Follow up on an old thread about memory utilization

    This thread was active a few months ago, unfortunately its taken me until now
    for me to have enough spare time to craft a response.
    From: SMTP%"[email protected]" 3-SEP-1996 16:52:00.72
    To: [email protected]
    CC:
    Subj: Re: memory utilization
    As a general rule, I would agree that memory utilzation problems tend to be
    developer-induced. I believe that is generally true for most development
    environments. However, this developer was having a little trouble finding
    out how NOT to induce them. After scouring the documentation for any
    references to object destructors, or clearing memory, or garbage collection,
    or freeing objects, or anything else we could think of, all we found was how
    to clear the rows from an Array object. We did find some reference to
    setting the object to NIL, but no indication that this was necessary for the
    memory to be freed.
    I believe the documentation, and probably some Tech-Notes, address the issue of
    freeing memory.
    Automatic memory management frees a memory object when no references to the
    memory
    object exist. Since references are the reason that a memory object lives,
    removing
    the references is the only way that memory objects can be freed. This is why the
    manuals and Tech-Notes talk about setting references to NIL (I.E. freeing memory
    in an automatic system is done by NILing references and not by calling freeing
    routines.) This is not an absolute requirement (as you have probably noticed
    that
    most things are freed even without setting references to NIL) but it accelerates
    the freeing of 'dead' objects and reduces the memory utilization because it
    tends
    to carry around less 'dead' objects.
    It is my understanding that in this environment, the development tool
    (Forte') claims to handle memory utilization and garbage collection for you.
    If that is the case, then it is my opinion that it shoud be nearly
    impossible for the developer to create memory-leakage problems without going
    outside the tool and allocating the memory directly. If that is not the
    case, then we should have destructor methods available to us so that we can
    handle them correctly. I know when I am finished with an object, and I
    would have no problem calling a "destroy" or "cleanup" method. In fact, I
    would prefer that to just wondering if Forte' will take care of it for me.
    It is actually quite easy to create memory leaks. Here are some examples:
    Have a heap attribute in a service object. Keep inserting things into
    the heap and never take them out (I.E. forgot to take them out). Since
    service objects are always live, everything in the heap is also live.
    Have an exception handler that catches exceptions and doesn't do
    anything
    with the error manager stack (I.E. it doesn't call task.ErrMgr.Clear).
    If the handler is activated repeatedly in the same task, the stack of
    exceptions will grow until you run out of memory or the task terminates
    (task termination empties the error manager stack.)
    It seems to me that this is a weakness in the tool that should be addressed.
    Does anyone else have any opinions on this subject?
    Actually, the implementation of the advanced features supported by the Forte
    product
    results in some complications in areas that can be hard to explain. Memory
    management
    happens to be one of the areas most effected. A precise explanation to a
    non-deterministic process is not possible, but the following attempts to
    explain the
    source of the non-determinism.
    o The ability to call from compiled C++ to interpreted TOOL and back
    to compiled C++.
    This single ability causes most of the strange effects mentioned in
    this thread.
    For C++ code the location of all variables local to a method is not
    know
    (I.E. C++ compilers can't tell you at run-time what is a variable
    and what
    isn't.) We use the pessimistic assumption that anything that looks
    like a
    reference to a memory object is a reference to a memory object. For
    interpreted
    TOOL code the interpreter has exact knowledge of what is a reference
    and what
    isn't. But the TOOL interpreter is itself a C++ method. This means
    that any
    any memory objects referenced by the interpreter during the
    execution of TOOL
    code could be stored in local variables in the interpreter. The TOOL
    interpreter
    runs until the TOOL code returns or the TOOL code calls into C++.
    This means
    that many levels of nested TOOL code can be the source of values
    assigned to
    local variables in the TOOL interpreter.
    This is the complicated reason that answers the question: Why doesn't a
    variable that is created and only used in a TOOL method that has
    returned
    get freed? It is likely that the variable is referenced by local
    variables
    in the TOOL interpreter method. This is also why setting the
    variable to NIL
    before returning doesn't seem to help. If the variable in question is a
    Array than invoke Clear() on the Array seems to help, because even
    though the
    Array is still live the objects referenced by the Array have less
    references.
    The other common occurrence of this effect is in a TextData that
    contains a
    large string. In this case, invoking SetAllocatedSize(0) can be used
    to NIL
    the reference to the memory object that actually holds the sequence of
    characters. Compositions of Arrays and TextData's (I.E. a Array of
    TextData's
    that all have large TextDatas.) can lead to even more problems.
    When the TOOL code is turned into a compiled partition this effect
    is not
    noticed because the TOOL interpreter doesn't come into play and
    things execute
    the way most people expect. This is one area that we try to improve
    upon, but it is complicated by the 15 different platforms, and thus
    C++ compilers,
    that we support. Changes that work on some machines behave
    differently on other
    machines. At this point in time, it occasionally still requires that
    a TOOL
    programmer actively address problems. Obviously we try to reduce
    this need over
    time.
    o Automatic memory management for C++ with support for multi-processor
    threads.
    Supporting automatic memory management for C++ is something that is
    not a very
    common feature. It requires a coding standard that defines what is
    acceptable and
    what isn't. Additionally, supporting multi-processor threads adds
    its own set of
    complications. Luckily TOOL users are insulated from this because
    the TOOL to C++
    code generator knows the coding standard. In the end you are
    impacted by the C++
    compiler and possibly the differences that occur between different
    compilers and/or
    different processors (I.E. Intel X86 versus Alpha.) We have seen
    applications that
    had memory utilization differences of up to 2:1.
    There are two primary sources of differences.
    The first source is how compilers deal with dead assignments. The
    typical TOOL
    fragment that is being memory manager friendly might perform the
    following:
    temp : SomeObject = new;
    ... // Use someObject
    temp = NIL;
    return;
    When this is translated to C++ it looks very similar in that temp
    will be assigned the
    value NULL. Most compilers are smart enough to notice that 'temp' is
    never used again
    because the method is going to return immediately. So they skip
    setting 'temp' to NULL.
    In this case it should be harmless that the statement was ignored
    (see next example for a different variation.) In more
    complicated examples that involve loops (especially long
    lived event loops) a missed NIL assignment can lead to leaking the
    memory object whose
    reference didn't get set to NIL (incidentally this is the type of
    problem that causes
    the TOOL interpreter to leak references.)
    The second source is a complicated interaction caused by history of
    method invocations.
    Consider the following:
    Method A() invokes method B() which invokes method C().
    Method C() allocates a temporary TextData, invokes
    SetAllocatedSize(1000000)
    does some more work and then returns.
    Method B() returns.
    Method A() now invokes method D().
    Method D() allocates something that cause the memory manager to look
    for memory objects to free.
    Now, even though we have returned out of method C() we have starting
    invoking
    methods. This causes us to use re-use portions of the C++ stack used to
    maintain the history of method invocation and space for local variables.
    There is some probability that the reference to the 'temporary' TextData
    will now be visible to the memory manager because it was not overwritten
    by the invocation of D() or anything invoked by method D().
    This example answers questions of the form: Why does setting a local
    variable to
    NIL and returning and then invoking task.Part.Os.RecoverMemory not
    cause the
    object referenced by the local variable to be freed?
    In most cases these effects cause memory utilization to be slightly
    higher
    than expected (in well behaved cases it's less than 5%.) This is a small
    price to pay for the advantages of automatic memory management.
    An object-oriented programming style supported by automatic memory
    management makes it
    easy to extended existing objects or sets of objects by composition.
    For example:
    Method A() calls method B() to get the next record from the
    database. Method B()
    is used because we always get records, objects, of a certain
    type from
    method B() so that we can reuse code.
    Method A() enters each row into a hash table so that it can
    implement a cache
    of the last N records seen.
    Method A() returns the record to its caller.
    With manual memory management there would have to be some interface
    that allows
    Method A() and/or the caller of A() to free the record. This
    requires
    that the programmer have a lot more knowledge about the
    various projects
    and classes that make up the application. If freeing doesn'
    happen you
    have a memory leak, if you free something while its still
    being used the
    results are unpredictable and most often fatal.
    With automatic memory management, method A() can 'free' its
    reference by removing
    the reference from the hash table. The caller can 'free' its
    reference by
    either setting the reference to NIL or getting another
    record and referring
    to the new record instead of the old record.
    Unfortunately, this convenience and power doesn't come for free. Consider
    the following,
    which comes from the Forte' run-time system:
    A Window-class object is a very complex beast. It is composed of two
    primary parts:
    the UserWindow object which contains the variables declared by the
    user, and the
    Window object which contains the object representation of the window
    created in
    the window workshop. The UserWindow and the Window reference each
    other. The Window
    references the Menu and each Widget placed on the Window directly. A
    compound Window
    object, like a Panel, can also have objects place in itself. These
    are typically
    called the children. Each of the children also has to know the
    identity of it's
    Mom so they refer to there parent object. It should be reasonably
    obvious that
    starting from any object that make up the window any other object
    can be found.
    This means that if the memory manager finds a reference to any
    object in the Window
    it can also find all other objects in the window. Now if a reference
    to any object
    in the Window can be found on the program stack, all objects in the
    window can
    also be found. Since there are so many objects and the work involved
    in displaying
    a window can be very complicated (I.E. the automatic geometry
    management that
    layouts the window when it is first opened or resized.) there are
    potentially many
    different reference that would cause the same problem. This leads to
    a higher than
    normal probability that a reference exists that can cause the whole
    set of Window
    objects to not be freed.
    We solved this problem in the following fashion:
    Added a new Method called RecycleMemory() on UserWindow.
    Documented that when a window is not going to be used again
    that it is
    preferably that RecycleMemory() is invoked instead
    of Close().
    The RecycleMemory() method basically sets all references
    from parent to
    child to NIL and sets all references from child to
    parent to NIL.
    Thus all objects are isolated from other objects
    that make up
    the window.
    Changed a few methods on UserWindow, like Open(), to check
    if the caller
    is trying to open a recycled window and throw an
    exception.
    This was feasible because the code to traverse the parent/child
    relationship
    ready existed and was being used at close time to perform other
    bookkeeping
    operations on each of the Widgets.
    To summarize:
    Automatic memory management is less error prone and more productive but
    doesn't come totally for free.
    There are things that the programmer can do that assists the memory
    manager:
    o Set object reference to NIL when known to be correct (this
    is the
    way the memory is deallocated in an automatic system.)
    o Use methods like Clear() on Array and SetAllocatedSize()
    on TextData to
    that allow these objects to set their internal
    references to NIL
    when known to be correct.
    o Use the RecycleMemory() method on windows, especially very
    complicated
    windows.
    o Build similar type of methods into your own objects when
    needed.
    o If you build highly connected structures that are very
    large in the
    number of object involved think that how it might be
    broken
    apart gracefully (it defeats some of the purpose of
    automatic
    management to go to great lengths to deal with the
    problem.)
    o Since program stacks are the source of the 'noise'
    references, try
    and do things with less tasks (this was one of the
    reasons that
    we implemented event handlers so that a single task
    can control
    many different windows.)
    Even after doing all this its easy to still have a problem.
    Internally we have
    access to special tools that can help point at the problem so that
    it can be
    solved. We are attempting to give users UNSUPPORTED access to these
    tools for
    Release 3. This should allow users to more easily diagnose problems.
    It also
    tends to enlighten one about how things are structured and/or point out
    inconsistencies that are the source of known/unknown bugs.
    Derek
    Derek Frankforth [email protected]
    Forte Software Inc. [email protected]
    1800 Harrison St. +510.869.3407
    Oakland CA, 94612

    I beleive he means to reformat it like a floppy disk.
    Go into My Computer, Locate the drive letter associated with your iPod(normally says iPod in it, and shows under removable storage).
    Right click on it and choose format - make sure to not have the "quick format" option checked. Then let it format.
    If that doesnt work, There are steps somewhere in the 5th gen forum( dont have the link off hand) to try to use the usbstor.sys to update the USB drivers for the Nano/5th gen.

  • ISE 1.2...Nest AuthZ rules?

    Is it possible to nest rules in ISE 1.2? 
    For example, rule 1 matches parent group, then rule 1.1 is a sub-group that applies policy 1, rule 1.2 matches another sub-group that applies policy 2. So on...
    Thanks.

    Yep, Policy Sets would do the trick! Good job on figuring out a solution to your own problem and thank you for taking the time to come back and share it with everyone. (+5 from me)
    You should probably mark the thread as "Answered" now :)
    Thank you for rating helpful posts!

  • Thread unserialized exception: NotSerializableException: java.lang.Thread

    hello experts,
    i have this exception coming; seems to be coming from some thread but i removed all the threads from my code, i thought its because of some object which is still unserialized, i am not sure whether this is because of one unserialized object or its because of more reasons, please have a look:
    Exception in client main: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.Thread
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.Thread
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:173)
         at BallServerImpl_Stub.getAllBallProxies(Unknown Source)
         at CopyOfManyMovingBalls.<init>(CopyOfManyMovingBalls.java:80)
         at CopyOfManyMovingBalls$2.run(CopyOfManyMovingBalls.java:294)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.Thread
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
         at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
         at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:155)
         ... 11 more
    this is coming  when i m accessing this method:
    class BallServerImpl extends UnicastRemoteObject
    implements BallServer
    * @return an enumeration of all Balls as proxy objects
    public Ball[] getAllBallProxies() throws java.rmi.RemoteException
         Ball[] locations1 = new Ball[hash.size()];
    java.util.Enumeration iter = hash.elements();
    int idx = 0;
    while (iter.hasMoreElements())
         BallImpl impl = (BallImpl)iter.nextElement();
    locations1[idx++] = new BallProxy(impl);
    return locations1;
    why this function is running fine when i m calling this from client unlike getAllBallProxies() nevertheless both are returning the same thing:
    * @return an enumeration of all Balls as remote references
    public Ball[] getAllBalls()
         Ball[] locations = new Ball[hash.size()];
    java.util.Enumeration iter = hash.elements();
    int idx = 0;
    while (iter.hasMoreElements())
    locations[idx++] = (Ball)iter.nextElement();
    return locations;
    the proxy Class:
    * The Proxybouncing ball.
    public class BallProxy implements Serializable,Ball {
    * The Real bouncing ball.
    public class BallImpl extends UnicastRemoteObject implements IBallRemote,Serializable
    *load of thanks as this is "SHOW STOPPER",
    jibbylala*
    Edited by: 805185 on Oct 25, 2010 8:33 PM
    Edited by: 805185 on Oct 25, 2010 8:39 PM
    Edited by: 805185 on Oct 25, 2010 9:21 PM
    Edited by: 805185 on Oct 25, 2010 9:25 PM
    Edited by: 805185 on Oct 25, 2010 9:27 PM
    Edited by: 805185 on Oct 25, 2010 9:46 PM

    that there was some thread there in BallProxy but i removed all from them and now testingIf you don't post the code people ask to see, you may never get a useful answer here.
    P.S i didn't know that threads are not SerializedThe Thread class is not Serializable. Precision please.
    Now i m updating the code, i needed the confirmationConfirmation of what?
    and now trying to avoid them.Them?
    But what if i need them.Them?
    Please make the effort to express yourself clearly. You've already been told you're not making much sense and you haven't done anything about it.
    how can we make serialized?The concept of serializing a Thread makes no sense whatsoever. You don't want to do it. You don't need to do it. You can't do it. It wouldn't work if you could do it.
    Somewhere or other you have a class member that is a reference to a Thread. Remove it or make it transient. If you post the code somebody may help you. If you don't, nobody can possibly do that.

  • How do I get an actor to wait for its nested actors to stop running before stopping itself?

    I'm developing a series of projects that are based on the Actor Framework and my actor dependency hierarchy is starting to get some depth. One of the issues I'm facing now is making sure that each actor will only stop running (and signal this via a Last Ack to a higher-level actor or via a notification to non-AF code that launches it) once all of its nested actors have stopped running.
    For instance, say I have a type of actor that handles communication with a microcontroller over USB - a USB Controller Actor. I might want to have an application-specific actor that launches USB Controller Actor to issue commands to the microcontroller. When shutting down, I want this top-level actor to send a Stop Msg to USB Controller Actor and then wait to receive a Last Ack back before sending a notification within a provided notifier to the non-AF application code, which can then finish shutting down completely.
    I'm sure that having actors wait for all nested actors to shutdown before shutting down themselves is an extremely common requirement and I'm confident National Instruments have made it possible to handle that in a simple, elegant manner. I'm just struggling to figure out what that is.
    The approaches I've experimented with are:
    Creating a pseudo "Stop" message for an actor that won't actually stop it running straight away, but instruct it to stop all nested actors, wait for their Last Acks and then shut itself down by sending Stop Msg to itself. This isn't elegant because it means the client will be forced to fire off these pseudo stop messages instead of Stop Msg to certain actors.
    Instantiating an internally-used notifier and overriding Stop Core.vi and Handle Last Ack Core.vi. The idea is that within Stop Core.vi, I send Stop Msg to each of the nested actors and then make it wait indefinitely on the internal notifier. Within Handle Last Ack Core.vi, I make it send a notification using this notifier which allows Stop Core.vi to continue and perform deinitialisation for the top-level actor itself. Figures 1 & 2 below show this approach. I wasn't confident that this would work since it assumed that it was possible for Stop Core.vi to execute and then Handle Last Ack Core.vi to concurrently execute some time after. These assumptions didn't hold and it didn't work. It would have been messy even if it had.
    Overriding Stop Core.vi, making it send Stop Msg to each nested actor and then waiting for an arbitrarily long period of time (100ms, 200ms, etc.). What if a nested actor takes only 10ms to shut down? What if takes 400ms?
    The figures below show how I implemented the second approach. Ignore the broken object wires - they only appear that way in the snippets.
    Figure 1 - Stop Core.vi from the second approach
    Figure 2 - Handle Last Ack Core.vi from the second approach

    tst wrote:
    It wasn't that hard to find - https://decibel.ni.com/content/thread/27138?tstart=0
    But with dozens of posts, I have no intention of rereading it now.
    Also, when crossposting, it's considered polite to add a link, so that people can see if the other thread has relevant replies.
    Thanks. I've only read the first page for now but I find this interesting (I'm not sure how to format non-reply quotes, sorry):
     "AristosQueue wrote:
    CaseyLamers1 wrote:
    I think that this would be a nice addition. I think how a program stops is just as important as how it starts.
    I think everyone who has worked on AF design agrees with this. Indeed, managing "Stop" was *the* thing that lead to the creation of the Actor Framework in the first place. The other issues (deadlock/hang avoidance and resource management) were secondary to just trying to get a clean shutdown.
    CaseyLamers1 wrote:
    I find the current code a bit lacking.
    My concern would be that the mixing of a verified stop and a regular stop could create confusion and lead to people having trouble during editting and testing with the project ending up locked (due to VIs left running which did not shutting down).
    Your concern is to some degree why no verified Stop exists in the AF already. We looked at each actor as an independent entity, and left it open to the programmer to add an additional managment layer for those applications that needed it. But over time, I have seen that particular management layer come up more often, which is why I am exploring the option."
    So that gives one of the reasons why this hasn't already been implemented but also points out that it's something quite a lot of people want.
    > Also, when crossposting, it's considered polite to add a link, so that people can see if the other thread has relevant replies.
    Noted. Here's the discussion: https://decibel.ni.com/content/message/104983#104983
    Edit: since there doesn't seem to be any NI-provided way of doing this yet, I suppose I'll try rolling my own at some point. The ideas posted in the discussion you linked seem pretty useful.

  • Nested MSO, slideshow inside MSO triggered by button, invisible on start, able to open/close

    Consider the following scenario:
    (albeit, this may not even be the right way to do this, or perhaps such functionality is not possible based on existing tools at this time, however, I thought I would post and see if anyone has a trick to share...)
    I have a slideshow on the page, it is set to auto play.
    I would like to hide it initially, and have it trigger with a button... and then let the user close it. Much like the "light box" effects we have all come to know from the web.
    Seems easy enough.
    However, in my first attempt to do this I did the following:
    1- create an OPEN button (F1)
    2- create a container box and a CLOSE button, grpup them (F2)
    3- turn them both into an MSO (M1)
    4- set the button in F1 to trigger F2 (open state)
    5- set the button in F2 to trigger F1 (close state)
    -> test, works.
    next step, slideshow!
    I grab 5 images, create a new MSO (M2).
    Turn it into a slideshow Folio Overlay...
    -> test, works.
    Now this is where it gets funky...
    MY FAIL 1- If I try to take M2 and then right click M1, there is NO paste into option.
    MY FAIL 2- If I click on the Object States Panel, and then Right click State 2 for M1, there is no "past into option"
    MY FAIL 3- If I try to "Alt+Ctrl+V" with M2 into State 2 for M1 it does not work.
    --> nor does any other scenario where I attempt to paste any MSO into another MSO
    I have even tried
    x- grouping the MSO slideshow with a non MSO element such as a frame, text boxt, image, ect..
    x- taking the 5 images and pasting them into the MSO seperate, and then trying to turn them into a new MSO inside State 2, which the new MSO button is greyed out and will not let me apply it.
    Possible solution I have come up with after looking over alot of Bob's stuff in the tutorials area
    (PS his videos and tut's realy help, its a differant kind of thinking going on here with DPS, I imagine it relates to how the C in the binary works and is translated by the InDesign GUI into app code... would be nice to just type in "function on_tap(){open_slideshow(vars);}"  lol silly programmer, this is primarily a tool for designers  ... but I do think its awesomeness, as a programmer, I dont even want to write code anymore after using DPS and Phone Gap...),
    so... here it is, not necessarily the most attractive...
    1- Make the slide show MSO, push to BACK, set to auto play and swipe allowed...
    2- place a large opaque box on top of the slideshow, group it with the OPEN button
    3- create a close button
    4- turn them into an MSO, now there is an 'open' button in state 1 on top of an opaque box that sends to state 2, and a 'close' button in state 2 that sends to state 1
    This seems to work, I have not tested it on all devices, the iPad will kind of do this wierd glitchy thing, as if it "knows" there is something moving underneath the opaque box. Depending on how I have positioned scrollable frames on top of these elements from a stacking perspective there can be some unexpected behavior. The best results I have had from more complex layouts is to get creative with positioning...
    any other suggestions, tips, tricks, would be appreciated
    ON a site note:
    POSSIBLE BUG:
    ANYTIME I try to take ANYTHING that is already using the FOLIO OVERLAY and right click the STATE in the STATES PANEL
    In Design total crash!!! The only time I can take a  FOLIO OVERLAY (FO) and "right click paste into" an MSO state is by clicking on the state on the stage, it can not be done from the panel, the panel only works with non "FO" items... Even though the state in the panel shows the "past into" option, if I do, *poof* instant app crash... FYI for anyone toying with this. Kudo's to Adobe for the outstanding "auto save" feature. It has saved me time, and there for in some strange way, has also saved some of my life.
    Here is what InDesign poops out when a "Folio object" is attempted to be "pasted into" an MSO via the MSO panel.
    Problem signature:
      Problem Event Name:          BEX
      Application Name:          InDesign.exe
      Application Version:          8.0.0.370
      Application Timestamp:          4f72c3ee
      Fault Module Name:          StackHash_0a9e
      Fault Module Version:          0.0.0.0
      Fault Module Timestamp:          00000000
      Exception Offset:          00000023
      Exception Code:          c0000005
      Exception Data:          00000008
      OS Version:          6.1.7601.2.1.0.768.3
      Locale ID:          1033
      Additional Information 1:          0a9e
      Additional Information 2:          0a9e372d3b4ad19135b953a78882e789
      Additional Information 3:          0a9e
      Additional Information 4:          0a9e372d3b4ad19135b953a78882e789

    @zagarskas – nested MSOs are currently NOT supported by Adobe.
    However we could build such a construct by using ExtendScript (Adobe's flavor of JavaScript).
    The problem with that is, that Buttons inside  a nested MSO will not work as expected. At least my testing is showing that.
    If you want nested MSOs without Buttons (inside the nested one) or if you like to experiment, see the following thread:
    http://forums.adobe.com/message/4573924#4573924
    But please, read the whole thread from a to z ;-)
    Uwe

  • Exception in thread "main" javax.mail.NoSuchProviderException: invalid prov

    HI,
    I am trying to read mails from my inbox i amgetting the ErrorC:\javamail>java
    Readmail
    Exception in thread "main" javax.mail.NoSuchProviderException: No provider for IMAP
            at javax.mail.Session.getProvider(Session.java:455)
            at javax.mail.Session.getStore(Session.java:530)
            at javax.mail.Session.getStore(Session.java:510)
            at Readmail.main(Readmail.java:24)My Code is    {
    String host = "hostname";
    String username = "user";
    String password = "password";
    // Create empty properties
    Properties props = new Properties();
    // Get session
    Session session = Session.getDefaultInstance(props,null);
    // Get the store
    Store store = session.getStore("IMAP");
    store.connect(host, username, password);
    // Get folder
    Folder folder = store.getFolder("Inbox");
    folder.open(Folder.READ_ONLY);
    // Get directory
    Message message[] = folder.getMessages();
    for (int i=0, n=message.length; i<n; i++)
       System.out.println(i + ": " + message.getFrom()[0]
    + "\t" + message[i].getSubject());
    // Close connection
    folder.close(false);
    store.close();
    I have also tried POP3 and MIME and SMTP
    Can anyone help me Thanks

    hi bshannon,
    I am getting the same error for others but for pop3 the error is as below
    Exception in thread "main" javax.mail.MessagingException: Connect failed;
      nested exception is:
            java.net.ConnectException: Connection refused: connect
            at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:148)
            at javax.mail.Service.connect(Service.java:275)
            at javax.mail.Service.connect(Service.java:156)
            at Readmail.main(Readmail.java:25)
    Caused by: java.net.ConnectException: Connection refused: connect
            at java.net.PlainSocketImpl.socketConnect(Native Method)
            at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
            at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
            at java.net.Socket.connect(Socket.java:452)
            at java.net.Socket.connect(Socket.java:402)
            at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
            at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
            at com.sun.mail.pop3.Protocol.<init>(Protocol.java:81)
            at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:201)
            at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:144)
            ... 3 more

Maybe you are looking for