Is it possible to make a local class accessible in SE24 subclasses?

G'Day,
The scenario is simple: I have a global class created in SE24 with a local helper class defined in the local definitions/implementations sections. The issue is anything declared here is private; however I would like my local class to be available in the subclasses of the global class as well. In other words I want a protected local class.
ZCL_SUPER  --> contains local utility class LCL_HELPER
    |
    V
ZCL_SUB    --> needs to make use of LCL_HELPER's methods.
I've messed about with different definitions and FRIENDS but no joy.
I can think of two alternatives:
1. Write a protected wrapper method in zcl_super to expose each lcl_helper method to the subclasses. Annoying, cumbersome, defeats the object of using a local class in first place.
2. Define LCL_HELPER in an include which is added to all subclasses. This effectively makes it public as I no longer control where LCL_HELPER is used. (Unless I do funky stuff with packages which we don't do on this project).
Any better suggestions/ideas/workarounds?
Cheers,
Mike

Hi Naimesh,
Thanks for the input. Interesting idea about interfaces, I need to play around with this a little.
I don't agree what I'm trying to do would violate encapsulation. I'm after the same visibility level as other class component type. i.e. methods can be private, protected or public. Classes can be local or global - a protected class visible to subclasses would fit the principles quite well.
Consider a global class GADGET which has a protected attribute WIDGET, type ref to a local class. The widget's methods and attributes should really be separate because it is it's own entity, but at the same time it has no business in the wider SAP system. ==> Perfectly sensible use of a local class.
Now, this widget can turn, open, close, light up. So in a GADGET method I can say WIDGET->TURN( ). Create a subclass of GADGET and boom, all such code working with WIDGETs is broken. In some ways it makes local classes a little un-future-proof.
The bothersome thing about the workarounds is that they de-object-orient the two objects by forcing us to create protected methods TURN_WIDGET LIGHT_WIDGET OPEN_WIDGET etc. on the GADGET class. Which goes back to my original point that there's little benefit of creating a local class if we need to do this....
Or am I missing something?
Cheers,
Mike

Similar Messages

  • Is it possible to make an iWeb site accessible to mobile phones? (in Japan)

    Is it possible to make an iWeb site accessible to mobile phones? (I'm in Japan)
    I've tried making a tiny site but my own phone (au A5516T by Toshiba) can't display it.
    The URL is accepted but displays just a white blank screen.
    I can't see anything about it in this iWeb forum or iWeb Help. Which I guess means that either it's impossible or that it's so elementary I shouldn't have to ask!
    Is there some special code involved?
    Any hints much appreciated. Thanks.
    Simon

    Try these articles: Put Your Content in My Pocket -- "While these articles are specifically targeted at the iPhone, many of the ideas and concepts I’m presenting can be useful and effective with other mobile devices."...
    http://alistapart.com/articles/putyourcontentinmypocket
    http://www.alistapart.com/articles/putyourcontentinmypocketpart2/
    By the way, you can read that "Apple Meets With DoCoMo, Softbank On Launching iPhone in Japan" here:

  • MB_MIGO_BADI and use of local class of SAPLMIGO

    Hello
    I used the BADI MB_MIGO_BADI and methode LINE_MODIFY to change all i want on the ITEM. That's OK and all is working.
    But, because there is  a but...I'd like to check if the item fields are input fields, invisible fieds, etc, etc , exactly like on a loop at screen for example.
    For this, SAP use in standard in SAPLMIGO a local class named lcl_migo_screenmodification ( in include LMIGOSM3 of ECC5.0 ) with the methode get :
        get
          IMPORTING
            i_global_counter TYPE migo_global_counter   OPTIONAL
            i_field          TYPE migo_fieldname
            i_badi           TYPE abap_bool             OPTIONAL
          RETURNING
            value(r_status)  TYPE migo_fs_status,
    and this is perfect to know the attributes of each screen field, depending the status return.
    But, in the BADI, is it possible to use a local class during the run time of the MIGO  ? and HOW if possible ?
    thanks for your help

    Yep, this is exactly what class loaders are for. Create a URLClassLoader pointing to the specific URL you want the classes loaded from. Then use findClass on the ClassLoader to find a Class object, and newInstance on that Class object to get an instance of the class.
    Another thing you should do is completely empty out the user's classpath before running Java, so you know the only classes you're dealing with are the ones you're loading. Kinda hard for an applet, but controllable for an application.

  • Local class as a friend of a global class

    Hi guys,
    I'm just wondering if I could make a local class which is defined in the local section of a global class to its friend. I need this to check private attriutes and methods with abap unit.
    Regards Christian

    Hi Christian,
    Yo can define your ABAP Unit test class as a friend of the global class to be tested in the local class definition include of your global class. So, you have to add a line of code like
    CLASS  in the include where the definition of local ABAP Unit Class is in. Then you can call the private methods of your global class in the local abap unit class methods.
    Regards,
    Sükrü

  • Problem with local class, static private attribute and public method

    Hello SDN,
    Consider the following situation:
    1) I have defined a LOCAL class airplane.
    2) This class has a private static attribute "type table of ref to" airplane (array of airplanes)
    3) A public method should return the private static table attribute
    Problems:
    a) The table cannot be given as an EXPORTING parameter in the method because TYPE TABLE OF... is not supported and I get syntax errors. I also cannot define a dictionary table type because it is a local class.
    b) The table cannot be given as a TABLES parameter in the method because TABLES is not supported in the OO context.
    c) The table cannot be given as an EXPORTING parameter in the method defined as LIKE myStaticAttribute because my method is PUBLIC and my attribute is PRIVATE. ABAP syntax requires that all PUBLIC statements are defined before PRIVATE ones, therefore it cannot find the attribute to reference to with LIKE.
    I see only 2 solutions:
    a) Never ever use local classes and always use global classes so that I might define a dictionary table type of my class which I can then use in my class.
    b) Make the attribute public, but this goes against OO principles, and isn't really an option.
    Am I missing anything here, or is this simply overlooked so far?

    Hello Niels
    Since your class is local and, thus, only know to the "surrounding" application is does not really make sense to make it public to any other application.
    However, if you require to store instances of your local classes in internal tables simply use the most generic reference type possible, i.e. <b>OBJECT</b>.
    The following sample report shows how to do that. Furthermore, I believe it also shows that there are <u><b>no </b></u>serious inconsistency in the ABAP language.
    *& Report  ZUS_SDN_LOCAL_CLASS
    REPORT  zus_sdn_local_class.
    " NOTE: SWF_UTL_OBJECT_TAB is a table type having reference type OBJECT
    *       CLASS lcl_airplane DEFINITION
    CLASS lcl_airplane DEFINITION.
      PUBLIC SECTION.
        DATA:    md_counter(3)             TYPE n.
        METHODS: constructor,
                 get_instances
                   RETURNING
                     value(rt_instances)   TYPE swf_utl_object_tab.
      PRIVATE SECTION.
        CLASS-DATA: mt_instances    TYPE swf_utl_object_tab.
    ENDCLASS.                    "lcl_airplane DEFINITION
    *       CLASS lcl_airplane IMPLEMENTATION
    CLASS lcl_airplane IMPLEMENTATION.
      METHOD constructor.
        APPEND me TO mt_instances.
        DESCRIBE TABLE mt_instances.
        md_counter = syst-tfill.
      ENDMETHOD.                    "constructor
      METHOD get_instances.
        rt_instances = mt_instances.
      ENDMETHOD.                    "get_instance
    ENDCLASS.                    "lcl_airplane IMPLEMENTATION
    DATA:
      gt_instances      TYPE swf_utl_object_tab,
      go_object         TYPE REF TO object,
      go_airplane       TYPE REF TO lcl_airplane.
    START-OF-SELECTION.
      " Create a few airplane instance
      DO 5 TIMES.
        CREATE OBJECT go_airplane.
      ENDDO.
      gt_instances = go_airplane->get_instances( ).
      CLEAR: go_airplane.
      LOOP AT gt_instances INTO go_object.
        go_airplane ?= go_object.
        WRITE: / 'Airplane =', go_airplane->md_counter.
      ENDLOOP.
    END-OF-SELECTION.
    Regards
      Uwe<u></u>

  • Is possible to make Serializable a Connection object?

    Hi I would like to know if is possible to make Serializable a Connection Object, I would like to save the Connection object into a text file so other class can read it and execute a proper query. If is possible how can I do it?.
    Thanks.

    Actually, if a class isn't already Serializable, you can't make it become Serializable reliably. Consider the following case:
    class A
        int x = 0;
        public void setX(int new_x) { x = new_x; }
        public int getX() { return x; }
    class B extends A implements Serializable
        int y = 0;
        public void setY(int new_y) { y = new_y; }
        public int getY() { return y; }
    public static void main(String arg[]) throws Exception
        B b = new B();
        b.setX(10);
        b.setY(12);
        someObjectOutputStream.writeObject(b);
    }The problem with this is that the implementation of Serializable by class B does not affect class A. In the above example, the ObjectInputStream that obtains the instance of B will have a y value of 12, but an x value of 0 (not 10).
    Thus, unless the Connection object implemented Serializable to begin with, it can't become Serializable. And, as the above post has described, the implementers of the Connection object would not make it Serializable as the local Connection object uses underlying O/S resources which cannot simply be transformed into a byte array.

  • Native method in local class

    Hi there,
    this is a repost of my question but now in the right forum.
    I have a problem with a native method of a local class that hides a member class:
    public class SomeClass
         class MemberClass
              public native void bla();
              public void out()
                   System.out.println("A");
         public void foo()
              class MemberClass
                   public native void bla();
                   public void out()
                        System.out.println("B");
              MemberClass myClass = new MemberClass();
              myClass.out();
         public static void main(String[] args)
              SomeClass someClass = new SomeClass();
              someClass.foo();
    }The class MemberClass exist in two different ways. Every class has it's own out() method. The local class just hides the member class. Now I want to implement the native methods bla() of the two classes.
    If I call
    javac SomeClass.hI get
    SomeClass.class
    SomeClass$MemberClass.class
    SomeClass$1MemberClass.classwhich makes sense to me. We have one class file for the member class and one for the local class.
    If I use
    javah SomeClassthen I get
    JNIEXPORT void JNICALL Java_SomeClass_00024MemberClass_bla(JNIEnv *, jobject);in the header file for the member class. No header file for the local class was created.
    Therefore I call
    javah SomeClass$1MemberClassand I get another header file which is for the local class. But this header file declares the same native method:
    JNIEXPORT void JNICALL Java_SomeClass_00024MemberClass_bla(JNIEnv *, jobject);This is ambiguous... If I would implement the native method, then I couldn't even say for which one of the native methods it will be used. Maybe for both.. which wouldn't make any sense too.
    What is wrong here?
    Thank you for your thoughts :-)

    Interesting...From the JLS under "fully qualified name"
    [http://java.sun.com/docs/books/jls/third_edition/html/names.html#71701]
    "Every package, top level class, top level interface, and primitive type has a fully qualified name."
    From the javah docs
    javah [ options ] fully-qualified-classname
    And note this under the JNI spec for "FindClass"
    [http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/functions.html#wp16027]
    "The name argument is a fully-qualified class name or an array type signature "
    Does that mean that you can't use JNI to access a local class? Seems like I have seen posts that said that was possible.

  • Is it possible to make a type cast in TestStand?

    I've got the following problem.
    I use a receive function which waits for an undefined package. (struct package).
    The problem is i can't specify the module with the exaxt package.
    Generally in C i define a Pointer and create enough buffer for it. Is it the same in TestStand?
    Is it possible to make a type cast?
    for example:
    i've got these packages
    struct packet;
    struct  data;
    the function does not know which structure to receive.
    err = receive(buffer,maxlen);
    how do i specify the buffer variable?
    can i create a type "void" with a String to have enough buffer.
    and then to make a type cast, for example "Locals.dataobject = ((data)Locals.buffer)"
    any ideas?
    thx for help

    Unfortunately there is no way to do type-casts in TestStand. What you could do is write a wrapper-dll in C, that has for example two parameters for both possible structs. The dll then takes one of the parameters, does the typecast and passes it on to your original dll.
    From TestStand you can pass the struct(or better container in the "TestStand language") you want to use to the accoridng parameter of the wrapper-dll, leaving the other parameter empty or with some default-value.
    Hope this helps!
    André

  • Is it possible to make an interactive symbol?

    I'm trying to make a relay for use in multisim, and I don't quite understand how the symbol editor works, but is it possible to make an interactive symbol, like a switch that opens/closes ?
    I think I should be able to use spice data from a relay(modified) to get mine to work?
    [CODE]
    * !!!BEGIN-INTERACT
    *  : Ion           0.0048   ;
    *  : Ioff           0.0016 ;
    *  0        constant  S_OFF
    *  1        constant  S_ON
    *  0.0      VARIABLE   r1Cur
    *  .( Loading the relay 1B form ... ) cr
    *  : PWR_OFF
    *      S_OFF  ==>_*animation_state
    *  : PWR_ON
    *      S_ON   ==>_*animation_state
    *  PWR_OFF
    *  :BEGIN_PLOT
    *     PWR_OFF
    *  UT_DATA
    *     GET_INSTANCE Vsource ::V V  i  ==>_*r1Cur
    *      Ion    *r1Cur    f.<=   if
    *         PWR_ON
    *     else   Ioff *r1Cur  f.>=   if
    *         PWR_OFF
    *     endif endif
    * : BEGIN_ANALYSIS UPDATE_SETTINGS;
    * !!!END-INTERACT
    .SUBCKT DPDT_RELAY C1 C2 NO1 COM1 NC1 NO2 COM2 NC2 PARAMS: RCOIL=500 LCOIL=0.048 RON=1m
    RC C1 C3 RCOIL
    LC C3 C4 LCOIL
    XK4 C4 C5 COM2 NC2 RELAY (RON={RON} ROFF=1E12)
    XK2 C5 C6 COM1 NC1 RELAY (RON={RON} ROFF=1E12)
    XK3 C6 C7 NO2 COM2 RELAY (RON=1E12 ROFF={RON})
    XK1 C7 C2 NO1 COM1 RELAY (RON=1E12 ROFF={RON})
    .ENDS
    .SUBCKT RELAY 1 2 3 4 PARAMS: RON=1m ROFF=1E12
    V 1 2 0
    W0 3 4 V NC_contact
    .MODEL NC_contact ISWITCH (Ion=0.0048 Ioff=0.0016 Ron={RON} Roff={ROFF})
    .ENDS[/CODE]

    Thats precisely what I did, and made a symbol for it but it isn't working quite right so maybe the spice data is wrong.
    I originally made a circuit using 2xSPDT NO and 2xSPDT NC relays to make a DPDT. I used that spice data and had someone help me cut it down into a single model.
    This is what I ended up with.
    *## Multisim Component U1 ##*
    * !!!BEGIN-INTERACT
    *  2.0 constant high
    *  0.0 constant low
    *  2   constant max_states
    *  low VARIABLE volt
    *  :MAP_KEYBOARD_INPUT ++++K1 1 ++++k1 -1 ;
    *  : UPDATE_SETTINGS
    *     *animation_state max_states  low  high  STATE  volt
    *     GRADUAL_CHANGE_AT_RUN  
    *  :KEYBOARD_INPUT locals| shift_state |
    *     shift_state *animation_state max_states NEXT_STATE_WRAP
    *                                             ==>_*animation_state
    *     UPDATE_SETTINGS
    *  :GRADUAL_CHANGE_AT_RUN locals| ref value |
    *     value  SET_INSTANCE Vsource ::V  V2 dc
    *  :BEGIN_PLOT
    *     UPDATE_SETTINGS
    *  : INIT_IMOUSE_OPTION
    *    1 0 4 IMOUSE_SET
    *  : GET_IMOUSE_SUBCOMPS ( -- [iIdxN ... iIdx1] )
    *    1
    *  : ON_SUBCOMP_IMOUSE_EVENT locals| eEventType nOptions iSubCompIdx |
    *    eEventType 2 = if
    *      -1
    *      -1 KEYBOARD_INPUT
    *    else
    *      0
    *    endif
    *  ( Initialize the settings )
    *   UPDATE_SETTINGS
    *   INIT_IMOUSE_OPTION
    *  :BEGIN_ANALYSIS
    *    UPDATE_SETTINGS
    * !!!END-INTERACT
    .SUBCKT DPDT_Relay  COIL+ COIL- NO1 COM1 NC1 NO2 COM2 NC2 PARAMS: RCOIL=500 LCOIL=0.048 RON=1m
    RC C1 C3 RCOIL
    LC C3 C4 LCOIL
    XK4 C4 C5 COM2 NC2 RELAY (RON={RON} ROFF=1E12)
    XK2 C5 C6 COM1 NC1 RELAY (RON={RON} ROFF=1E12)
    XK3 C6 C7 NO2 COM2 RELAY (RON=1E12 ROFF={RON})
    XK1 C7 C2 NO1 COM1 RELAY (RON=1E12 ROFF={RON})
    .ENDS
    .SUBCKT RELAY 1 2 3 4 PARAMS: RON=1m ROFF=1E12
    V 1 2 0
    W0 3 4 V NC_contact
    .MODEL NC_contact ISWITCH (Ion=0.0048 Ioff=0.0016 Ron={RON} Roff={ROFF})
    .ENDS

  • Get a reference of a local class at another program

    Hello experts! Sorry if this has been asked before, but I couldn't find exactly what I'm searching for.
    Within function-pool MIGO (main program of transaction MIGO), there's a local class LCL_MIGO_KERNEL. This class has the private attribute PT_CHANGE_TAKEIT (which is an internal table).
    During the execution of MIGO, for a certain criteria, I would like to clear the contents of PT_CHANGE_TAKEIT. Since it's a private attibute, I have managed to create a new public method that just clears it. This method was defined and inplemented within ENHANCEMENT SPOTS available all over SAPLMIGO. My method is ZZ_CLEAR_PT_CHANGE_TAKEIT. So far so good.
    Now, I have to call this method. I have found no other ENHANCEMENT SPOTS in SAPLMIGO at a place where I would me able to make the call (eg, don't know if the criteria fits yet).
    Inside BADI MB_MIGO_BADI, method LINE_MODIFY, I have just what I need to know if I should clear PT_CHANGE_TAKEIT.
    However, inside here I don't have access to the instance of class LCL_MIGO_KERNEL (the instance itself is (SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL)
    So far I have managed to get a pointer to the instance with:
      FIELD-SYMBOLS: <lfs_kernel> TYPE ANY.
      ASSIGN ('(SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL')
        TO <lfs_kernel>.
    So I have the instance of the class, but how can I call my method ZZ_CLEAR_PT_CHANGE_TAKEIT?
    The command  call method <lfs_kernel>->zz_clear_pt_change_takeit.
    can't be done because ""<LFS_KERNEL>" is not a reference variable" as the sintax check tells me.
    I have tried stuff like
      CREATE DATA dref TYPE REF TO
                 ('\FUNCTION-POOL=MIGO\CLASS=LCL_MIGO_KERNEL').
      ASSIGN dref->* TO <ref>.
    but nothing works so far.
    I know if LCL_MIGO_KERNEL was a class from SE24 (not a local one), I could just create a field-symbol of that type instead of type ANY and it would work.
    Does anyone have an idea how that can be done?
    Thank you very much!

    I have managed to do what I needed by calling my method from other ENHANCEMENT SPOTS within SAPLMIGO and some extra coding on MB_MIGO_BADI, but unfortunately I couldn't do what I originaly wanted which was to call a method of a local class from another program, something that could be handy in other situations.
    If it's not lack of knowledge by myself and it really can't be done, I think the ABAP OO framework fell just short of having that flexibility, since I can get the field-symbol to point to the instance of the class, but just can't call the method because of syntax issues.
    Thanks!
    Well it seems you already solved, but I got curious and knew how this could be done, so I wanted to prove it and here it is:
    * This would be inside the Function group
    CLASS lcl_kernel DEFINITION.
      PUBLIC SECTION.
        METHODS:
          zz_clear_pt_change_takeit.
    ENDCLASS.                    "lcl_kernel DEFINITION
    CLASS lcl_kernel IMPLEMENTATION.
      METHOD zz_clear_pt_change_takeit.
        WRITE 'Dummy! I do nothing!'.
      ENDMETHOD.                    "zz_clear_pt_change_takeit
    ENDCLASS.                    "lcl_kernel IMPLEMENTATION
    START-OF-SELECTION.
    * This is just to create the reference. It corresponds to
    * (SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL in your example
      DATA: kernel  TYPE REF TO lcl_kernel.
      CREATE OBJECT kernel.
    *----------------- Now your program (which supposedly does not have
    *----------------- access to kernel or even lcl_kernel def)
    *----------------- would begin
      FIELD-SYMBOLS: <lfs_kernel> TYPE ANY.
      DATA: generic_ref           TYPE REF TO object.
      ASSIGN ('KERNEL')
        TO <lfs_kernel>.
      generic_ref = <lfs_kernel>.
      TRY.
          CALL METHOD generic_ref->('ZZ_CLEAR_PT_CHANGE_TAKEIT').
        CATCH cx_sy_dyn_call_illegal_method .
      ENDTRY.
    Apart from that, I wouldn't access a local class this way. There's a reason for blocking the access, one of them being that SAP could change local classes without notice thus breaking your program.

  • When is it best to use Local Classes..?

    Hi All,
           We all know that a global class creation is very helpful wherein the class can be reused by multiple programs.In contrast when is it best to use a local class within the program...?
    Can anyone please share the sample scenarios where we need to make use of a local class...?
    Cheers
    Nishanth

    Hi Nishanth,
    First of all, there will be a few cases when creating a local class in your program is mandatory. For example,
    if you're using an ALV Grid on your screen using the OO Approach, then you <b>must</b> declare a class locally in
    your program if you want to handle the events. You cannot use a subroutine in this case.
    Secondly, if you are looking for an explanation that is more introductory in nature, then the ABAP Programming
    help has got some good documentation. Here are the links which explain the concepts with an example as a
    transition from function groups to classes -
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    Regards,
    Anand Mandalika.

  • Is it possible to make a timer with AS3 which is accurate upto one millisecond.

    I am new to AS3. I have somehow developed a auditory and visual reaction timer by taking script from here and there. I know its not accurate and I also know that I will write it correctly when I have learned the script thoroughly,
    But I was checking the net about the timer class and various posts on it and  I am vexed with a question "if its possible to make an accurate timer with AS3?" can somebody please tell me for sure. and I will be grateful if I know how to make it correctly. I can post the code which I have written ( assembled ).

    the answer is, maybe. but for, for most coders, the answer is, no.
    getTimer() is accurate to within 1 ms.  but that allows you to determine time/elapsed time and does not call or execute code on a regular timed schedule. it can be used with the timer class or enterframe events to do some things accurately.
    however, the timer class is not accurate in the way beginning coders think.  it will, on average, allow calling a function at close to the designated interval if there are no performance issues with your swf.  it does not allow each function call to occur at a regular interval.

  • Is it possible to make a .MOV file "un-downloadable"

    Hi there...
    I have a weird question - is it possible to make an online video (.MOV file) "un-downloadable"?
    I work at a college and a professor wants to post some videos within the school's public site. But, because of his concern with copyright, he wants to make it so the videos are impossible to download to the viewers' local machines.
    Is there any type of setting or code that can be put within the .MOV file that would allow this to happen?
    Thank you so much for any feedback you have!
    g4   Mac OS X (10.4.8)  

    Any browser viewed QuickTime file will be "cached" (stored on the viewing computer). This is how browser work (they keep a copy of every page element) to help speed up viewing.
    QuickTime 7 (Mac and PC version) even allows the user to set the size of this cache so movies can be viewed while "off line".
    True "streaming media" (served with special streaming server software) is not cached on the viewing machine so no local copy is made. Streaming Server (QTSS) is free software available from Apple.
    What your school probably really wants is a way to prevent "copies" of your files being used. This is nearly impossible as anyone that views the file could use screen capture software to get a copy. Even the true streaming version.
    I use Snapz Pro.
    You could use some type of "log on" Web page to help limit the audience.
    You could also use "skin track" movies which make screen capture a bit of a chore.
    http://homepage.mac.com/kkirkster/MTV/
    My example will open in QuickTime Player. Even Pro users are prevented from saving or editing the file because it is protected by an AppleScript droplet "Save As Un-Editable" and modified for Tiger and QT 7.
    Hope this helps you decide a plan.

  • Java.io.InvalidClassException:local class incompatible?

    hello everyone:
    I deploy a J2EE application called A in a weblogic domain called A, it can run correctly;
    then I deploy another J2EE application called B, which is a new edition of A, in another weblogic domain called B, it can also run correctly;
    The two domains use the same server. I don't know whether this will cause problems like this.
    But the previous A can't run correctly and throw exceptions as follows in Java Console:
    java.io.InvalidClassException: com.longzhou.oa.docnet.dto.abstractdto.DnBaseRole; local class incompatible: stream classdesc serialVersionUID = 1264764439065723117, local class serialVersionUID = -6834466395328850197
         at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
         at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
         at java.io.ObjectInputStream.readClassDesc(Unknown Source)
         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.readArray(Unknown Source)
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
         at java.io.ObjectInputStream.readSerialData(Unknown Source)
         at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
         at com.longzhou.oa.applet.util.EjbLocator.getInputStream(EjbLocator.java:18)
         at com.longzhou.oa.applet.DnIO.getDnAllByID(DnIO.java:63)
         at com.longzhou.oa.applet.DnIO.loadGraph(DnIO.java:33)
         at org.enhydra.jawe.DnDefine.loadDn(Unknown Source:185)
         at org.enhydra.jawe.AbstractEditor.<init>(Unknown Source:130)
         at org.enhydra.jawe.PackageEditor.<init>(PackageEditor.java:60)
         at org.enhydra.jawe.JaWE.init(JaWE.java:195)
         at org.enhydra.jawe.DnApplet.jbInit(DnApplet.java:67)
         at org.enhydra.jawe.DnApplet.init(DnApplet.java:54)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.lang.NullPointerException
         at com.longzhou.oa.applet.DnIO.getDnFromDto(DnIO.java:731)
         at com.longzhou.oa.applet.DnIO.loadGraph(DnIO.java:34)
         at org.enhydra.jawe.DnDefine.loadDn(Unknown Source:185)
         at org.enhydra.jawe.AbstractEditor.<init>(Unknown Source:130)
         at org.enhydra.jawe.PackageEditor.<init>(PackageEditor.java:60)
         at org.enhydra.jawe.JaWE.init(JaWE.java:195)
         at org.enhydra.jawe.DnApplet.jbInit(DnApplet.java:67)
         at org.enhydra.jawe.DnApplet.init(DnApplet.java:54)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.Object
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
         at com.longzhou.oa.applet.util.EjbLocator.getInputStream(EjbLocator.java:18)
         at com.longzhou.oa.applet.InitModel.initEmpGroupList(InitModel.java:353)
         at org.enhydra.jawe.DnDefine._$1(Unknown Source:241)
         at org.enhydra.jawe.DnDefine.loadDn(Unknown Source:186)
         at org.enhydra.jawe.AbstractEditor.<init>(Unknown Source:130)
         at org.enhydra.jawe.PackageEditor.<init>(PackageEditor.java:60)
         at org.enhydra.jawe.JaWE.init(JaWE.java:195)
         at org.enhydra.jawe.DnApplet.jbInit(DnApplet.java:67)
         at org.enhydra.jawe.DnApplet.init(DnApplet.java:54)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.NotSerializableException: java.lang.Object
         at java.io.ObjectOutputStream.writeObject0(Unknown Source)
         at java.io.ObjectOutputStream.writeObject(Unknown Source)
         at com.longzhou.oa.util.EgovServlet.service(EgovServlet.java:332)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6981)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
         at java.lang.Thread.startThreadFromVM(Unknown Source)
    java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.Object
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
         at com.longzhou.oa.applet.util.EjbLocator.getInputStream(EjbLocator.java:18)
         at com.longzhou.oa.applet.InitModel.initSysRoleList(InitModel.java:371)
         at org.enhydra.jawe.DnDefine._$1(Unknown Source:242)
         at org.enhydra.jawe.DnDefine.loadDn(Unknown Source:186)
         at org.enhydra.jawe.AbstractEditor.<init>(Unknown Source:130)
         at org.enhydra.jawe.PackageEditor.<init>(PackageEditor.java:60)
         at org.enhydra.jawe.JaWE.init(JaWE.java:195)
         at org.enhydra.jawe.DnApplet.jbInit(DnApplet.java:67)
         at org.enhydra.jawe.DnApplet.init(DnApplet.java:54)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.NotSerializableException: java.lang.Object
         at java.io.ObjectOutputStream.writeObject0(Unknown Source)
         at java.io.ObjectOutputStream.writeObject(Unknown Source)
         at com.longzhou.oa.util.EgovServlet.service(EgovServlet.java:332)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6981)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
         at java.lang.Thread.startThreadFromVM(Unknown Source)
    Can anyone tell me the reason? Thanks

    "local class incompatible" error is due to the retrieving of serialized object, which might be dumping from memory to somewhere like database, file etc., that is of different edition of the class. Maybe an object A of AClass was stored in a database and lately the AClass changed to a new edition, let's call it A'Class, and they have something different, especially the serialVersionUID field. When the object A is retrieved from the database, which should be compatible with A'Class (be ware of that A'Class and AClass has the same name but of different edition), unfortunately, they don't, the error mentioned above occurs.
    So, I guess that although the app A and B uses different domain, if they uses the same database to store and retrieve something (here may refers to objects) of different edition and are run one after another, the compatible issues are going to occur.
    Separating app A from B as much as possible is not a good solution, but you could have a try.
    Hoping helpful, good luck!

  • I bought an iPhone 5 in Brazil, but i dropped it in the floor and now i need to fix it. is it possible to make in New York and how much would cost?

    i bought an iPhone 5 in Brazil, but i dropped it in the floor and now i need to fix it. is it possible to make in New York and how much would cost?

    If your iPod Touch, iPhone, or iPad is Broken
    Apple does not fix iDevices. Instead, they exchange yours for a refurbished or new replacement depending upon the age of your device and refurbished inventories. On rare occasions when there are no longer refurbished units for your older model, they may replace it with the next newer model.
    ATTN: Beginning July 2013 Apple Stores are now equipped to do screen repairs/replacements in-house on iPhone 5s. In some cases while you wait. According to Apple this is the beginning of equipping Apple Stores with the resources needed to do most repairs for iPhones, iPads, and iPod Touches that would not require major replacements. Later in the year the services may be extended as Apple Stores become equipped and staffed with the proper repair expertise. So, if you need a screen repaired or a broken screen replaced or have your stuck Home button fixed, call your local Apple Store to see if they are now doing these in-house.
    You may take your device to an Apple retailer for help or you may call Customer Service and arrange to send your device to Apple:
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Contacting Apple for support and service - this includes international calling numbers.
    iPod Service Support and Costs
    iPhone Service Support and Costs
    iPad Service Support and Costs
    There are third-party firms that do repairs on iDevices, and there are places where you can order parts to DIY if you feel up to the task. Start with Google to search for these.

Maybe you are looking for

  • Display shortcuts stop working

    Display shortcuts stop working. Reboot starts everything up again.

  • Unable to find RAID model type

    Hi Everyone, I am completely new to this Xraid and Xserve stuff. I have one of the old Xraid and I am trying to find out the model type for this raid. After looking at the back panel, only thing I found is this: 512MB/512MB 720GB/2x2GB /FC but nothin

  • Cotent Conversion Parameters at reciver side

    hi, i have file stucture like, <node>     <field1>aaa</field1>     <field2>bbb</field2>     <field3>ccc</field3>     <field4>ddd</field4>     <subnode1>          <field5>dd</field5>          <field6>ee</field6>     </subnode1>     <subnode2>         

  • Autoresponder to send mails to the customers at periodic intervals

    i am developing an auto responder application using jsp and mysql.i have designed the inteface to create a new autoresponder and put some messages into it. I don't have an idea regarding how these messges will be transferred to the customers at frequ

  • Flash menu bar's hyperlink doesn't work after imported into dreamweaver

    I have major problems when I tried to import a flash menu bar with hyperlink (created in flash) into dreamweaver. I have 5 buttons in the same flash banner file and each button is supposed to have its unique hyperlink. None of these 5 hyperlinks is w