Small problem with generics

Hi,
I'd like to get my generic (Hash)Map back from a textfile, for this I have written a method that reads the file and returns an Object. The only problem I have is that I get the error "java uses unchecked or unsafe operations , ..." with the following code:
Map<Character, TransVal> thisIsMyMap = (HashMap<Character, TransVal>) readFromFile("filename.dat");I thought it would be the same as parsing a String (guess not :-) ):
String s = (String) justAnObject;TransVal is a class that contains a BitSet and an Integer.
Any help plz?
(btw sorry for my english :-s )

The reason is that it cannot check, at runtime or at compile time whether or not the cast is valid. It will at runtime check the cast to HashMap (btw, use Map for both the cast and the variable), but it will not check that all the keys are Characters and that all the values are TransVals. What will happen is that somewhere where you actually use the map, if the assumption you are making here is incorrect, there will be a ClassCastException in what appears to be perfectly safe code. If you are positive that your cast is safe, either change the return type of readFromFile or put a @SuppressWarnings("unchecked") annotation on the method and use a java compiler that respects it (eclipse, 1.6, and maybe others, but not sun's 1.5 javac).

Similar Messages

  • I have a small problem with MSI GF4 MX 420

    Hi,
    I have a small problem with MSI G4MX420-T(S+C) ( MS-8878 ). Exactly with nVidia WDM Video Capture (universal), which  " can't be turned on " by Windows XP.
    I have also new drivers ...
    Could someone help me?
    Asus A7V333
    Athlon 1700+
    128 MB RAM
    Thanks !!!

    If you only have 10 seconds of content in a 15-second composition, then you need to either add more content or shorten your composition.
    You can shorten the composition by changing the duration in the composition settings.
    Since you're obviously very new to After Effects, I very strongly recommend that you start here to learn After Effects.

  • Some small problems with my new 3G iPhone

    Having some small problems with my new iPhone, nothing major, just annoying.
    1. When I plug my iPhone in to charge/sync my Adobe photoshop keeps trying to download the photos on my iPhone, which causes an error message from Adobe that it can't download and it stops all syncing and removes my iPhone from iTunes. I have to unplug and reinsert USB cable and sometimes it works ok and sometimes I have to reinsert again. Also when charging, it will disconnect, reconnect and the samething all over again, photoshop trying to get photos and an error message.
    2. Can't send e-mails via 3G? Only can get, have to connected to a WiFi to send e-mails, or is this normal?

    When your iPhone includes photos in the Camera Roll, it is also detected as a digital camera when connected to your computer, and whichever app you have selected to import photos will automatically launch to import the photos. If you haven't imported these photos, it is a good idea to do so as with any other digital camera. I import the photos followed by deleting the photos from the iPhone after the import process is complete. If I want any of the imported photos available on my iPhone for viewing, I add the photos to an existing album that is selected to be transferred to my iPhone under the Photos tab for my iPhone sync preferences, or add the photos to a new album followed by selecting the album under the Photos tab followed by a sync.
    If your iPhone's Camera Roll does not include any photos that have not been imported, Adobe Photoshop should not launch automatically when your iPhone is connected.
    I know how to disable the selected application for photo import from launching automatically regardless with a Mac, but not with Windows.
    Regarding the sending email problem, who is the email account provider and does the email account provider have an authenticated SMTP server?
    Most ISPs block the use of SMTP servers that are outside of their network or not provided by the ISP being used for your internet connection unless the SMTP server is authenticated. When connected to the internet via AT&T's cellular network, it is no different in this regard. AT&T's SMTP server is included and available by default for use with an email account that does not have an authenticated SMTP server when connected to the internet via AT&T's cellular network, but you probably won't be able to use this SMTP server for sending messages with the account when connected to the internet with your ISP via an available wi-fi network - especially if the email account is provided by your ISP.
    I access two email accounts with the iPhone's mail client and both accounts have an authenticated SMTP server. I've never had any problems sending with either account regardless the ISP being used for an available wi-fi network, or when connected via AT&T's cellular network.

  • Problem with generics in general framework

    Hi,
    I've just started using generics and I've been able to solve most of my problems with type declarations etc, but I still have a few problems left.
    My current problem is in a class which has a map of classes which implements a generic typed interface (The interface is called Persister in the code below).
    The map is declared as:
    private Map<Class<?>, Persister<?>> persisters =
              new HashMap<Class<?>, Persister<?>>(); And the interface is declared as:
    interface Persister<T>My problem is that a method in the class which has the map should return a Collection of type T.
    Can that be done without supressing warnings?
    It's probably hard to understand what I mean (since I don't know the terminology) so here's a complete minimal example which illlustrates the problem. The problem is in the selectAll method in the DbFacade class.
    The lines:
         Persister persister = persisters.get(clazz);
         Collection<E> result = persister.selectAll(clazz);Needs to be altered but to what? (Or do I need to make more changes?)
    Thanks in advance
    Kaj
    ///////////////// Start of complete example
    import java.util.*;
    class ClientSample {
         public static void main(String[] args) {
              DbFacade facade = new DbFacade();
              //Works..
              Collection<Holiday> holidays = facade.selectAll(Holiday.class);
    class DbFacade {
         //Map with many different type of persisters,
         //one persister per class.
         private Map<Class<?>, Persister<?>> persisters =
              new HashMap<Class<?>, Persister<?>>();
         DbFacade() {
              persisters.put(Holiday.class, new HolidayPersister());
         //This is where I'm stuck
         //I don't want to add supresswarnings to this method, so what should I do?
         public <E> Collection<E> selectAll(Class<E> clazz) {
              //The following line gives:
              //Persister is a raw type. References to generic type
              //Persister<T> should be parameterized
              Persister persister = persisters.get(clazz);
              //The following line gives:
              //Type safety: The expression of type List needs unchecked
              //conversion to conform to Collection<E>
              Collection<E> result = persister.selectAll(clazz);
              return result;
    interface Persister<T> {
         List<T> selectAll(Class<T> clazz);
    abstract class AbstractPersister<T> implements Persister<T> {
    class HolidayPersister extends AbstractPersister<Holiday> {
         public List<Holiday> selectAll(Class<Holiday> clazz) {
              return null;
    class Holiday {
         //data
    }

    Well you can put in a type cast
    Persister<E> pesister = (Persister<E>) persisters.get(clazz);but you'll stil get a warning. Sometimes there's just no avoiding them. What, AFAIK, you can't tell the compiler is that each entry of the map contains a persister for the class mapped to it.
    All it knows that classes are mapped to Persisters.

  • Problems with Generics

    Ok, I have a problem with the <? extends NamedType> generic parameterized type, here are three example classes:
    public abstract class Base
         public abstract <? extends Base> getMe();
    public abstract class Spec
    extends Base
         public abstract <? extends Spec> getMe();
    public class Impl
    extends Spec
         public Impl()
              super();
         public Impl getMe()
              return this;
         public String toString()
              return "I live!";
    }And a main method in another class:
    public static void main(String[] args)
         Impl im = new Impl();
         Impl i = im.getMe();
         Spec s = Spec.getMe();
         Base b = Base.getMe();
         System.out.println("im = "+im);
         System.out.println("i = "+i);
         System.out.println("s = "+s);
         System.out.println("b = "+b);
    }And the compiler returns this:
    Base.java:3: <identifier> expected
            public abstract <? extends Base> getMe();
                             ^
    Base.java:3: > expected
            public abstract <? extends Base> getMe();
                                                    ^
    Spec.java:4: <identifier> expected
            public abstract <? extends Spec> getMe();
                             ^
    Spec.java:4: > expected
            public abstract <? extends Spec> getMe();
                                                    ^
    4 errorsPlease assist.

    It worked!
    I don't know why that didn't work in Eclipse, so:
    "Return types are compatible if the overriden method's return type is a subclass of the original method's return type."
    I also mistyped the main method, but this new one didn't change the original error:
    public static void main(String[] args)
         Impl im = new Impl();
         Impl i = im.getMe();
         Spec s = Spec.getMe();
         Base b = Base.getMe();
         System.out.println("im = "+im);
         System.out.println("i = "+i);
         System.out.println("s = "+s);
         System.out.println("b = "+b);
    }should be:
    public static void main(String[] args)
         Impl im = new Impl();
         Impl i = im.getMe();
         Spec s = i.getMe();
         Base b = s.getMe();
         System.out.println("im = "+im);
         System.out.println("i = "+i);
         System.out.println("s = "+s);
         System.out.println("b = "+b);
    }

  • Problem with Generic datasource from function

    I developed generic datasource from function module.
    But I have problem with the select options.
    First one is order number  OBJECT_ID type char 10. When I input Object_ID = 45755 , no data selected.
    When input 0000045755, one data record selected.
    But I called functiion CONVERSION_EXIT_ALPHA_INPUT to conevet the input data. And I found  45755 was converted to 0000045755, but no record selected.
         LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'OBJECT_ID'.
            MOVE-CORRESPONDING L_S_SELECT TO L_R_OBJECT_ID.
            APPEND L_R_OBJECT_ID.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = L_R_OBJECT_ID-high
      IMPORTING
       OUTPUT        = L_R_OBJECT_ID-high
             CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = L_R_OBJECT_ID-low
      IMPORTING
       OUTPUT        = L_R_OBJECT_ID-low
          ENDLOOP.
    Another problem is CREATED_AT, which type is DEC 15,  how could I handle it ?  input is yyyymmdd, I tried to add '000000', but can't select any data.
    Thanks for any help.

    code is :
    FUNCTION ZACTIVITY_PLAN_PARTNER.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZACTIVITY_PLAN_PARTNER OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    Example: DataSource for table SFLIGHT
      TABLES: CRMD_ORDERADM_H.
    Auxiliary Selection criteria structure
      DATA: L_S_SELECT TYPE SRSC_S_SELECT.
      DATA:   BEGIN OF ACTIVITY,
                       OBJECT_ID       type CRMT_OBJECT_ID_DB,
                       PROCESS_TYPE    type CRMT_PROCESS_TYPE_DB,
                       OBJECT_TYPE     type CRMT_SUBOBJECT_CATEGORY_DB,
                       CREATED_BY      type CRMT_CREATED_BY,
                       CREATED_AT      type CRMT_CREATED_AT,
               END OF ACTIVITY.
      DATA: ZACTIVITY   LIKE TABLE OF ACTIVITY WITH HEADER LINE,
            Zorder   LIKE TABLE OF ZORDER_S WITH HEADER LINE,
            d_start type c length 15,
            d_end type c length 15
    Maximum number of lines for DB table
      STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    counter
              S_COUNTER_DATAPAKID LIKE SY-TABIX,
    cursor
              S_CURSOR TYPE CURSOR.
    Select ranges
      RANGES: L_R_OBJECT_ID FOR CRMD_ORDERADM_H-OBJECT_ID,
              L_R_CREATED_AT FOR CRMD_ORDERADM_H-CREATED_AT,
              L_R_date for ZACTIVITY_PLAN_PARTNER-ZPLAN_DAT.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF I_INITFLAG = SBIWA_C_FLAG_ON.
    Check DataSource validity
        CASE I_DSOURCE.
          WHEN 'ZACTIVITY_PLAN_PARTNER'.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE E009(R3). ENDIF.
    this is a typical log call. Please write every error message like this
            RAISE ERROR_PASSED_TO_MESS_HANDLER.
        ENDCASE.
        APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
    Fill parameter buffer for data extraction calls
        S_S_IF-REQUNR    = I_REQUNR.
        S_S_IF-DSOURCE = I_DSOURCE.
        S_S_IF-MAXSIZE   = I_MAXSIZE.
        APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
      ELSE.                 "Initialization mode or data extraction ?
    First data package -> OPEN CURSOR
        IF S_COUNTER_DATAPAKID = 0.
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'OBJECT_ID'.
            MOVE-CORRESPONDING L_S_SELECT TO L_R_OBJECT_ID.
            APPEND L_R_OBJECT_ID.
         ENDLOOP.
    if  L_R_OBJECT_ID-option is initial.
      L_R_OBJECT_ID-option = 'EQ'.
      L_R_OBJECT_ID-sign ='I'.
      endif.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = L_R_OBJECT_ID-high
      IMPORTING
       OUTPUT        = L_R_OBJECT_ID-high
             CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = L_R_OBJECT_ID-low
      IMPORTING
       OUTPUT        = L_R_OBJECT_ID-low
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CREATED_AT'.
            MOVE-CORRESPONDING L_S_SELECT TO L_R_CREATED_AT.
            APPEND L_R_CREATED_AT.
          ENDLOOP.
          OPEN CURSOR WITH HOLD S_CURSOR FOR
          SELECT OBJECT_ID FROM CRMD_ORDERADM_H
                                  WHERE OBJECT_ID  IN  L_R_OBJECT_ID
                                  AND          CREATED_AT IN L_R_CREATED_AT    and
                                        PROCESS_TYPE EQ 'Z220'.
        ENDIF.                             "First data package ?
    Fetch records into interface table.
      named E_T_'Name of extract structure'.
        FETCH NEXT CURSOR S_CURSOR
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE E_T_DATA
                   PACKAGE SIZE S_S_IF-MAXSIZE.
        IF SY-SUBRC <> 0.
          CLOSE CURSOR S_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.

  • A small problem with my Zen Xtra 60 turned into a bigger problem. Help me save it

    What started as a small problem has grown to a big mess. My Zen xtra 60 GB unit started going to "Rebuilding Library" often. With 5000 Wma's on it, this rebuild was taking 30 minutes. So what I attempted to fix with reloading firmware to recognize the new Windows Media Player version, has left me with a dead unit.
    I have followed many of the solutions, that have been able to fix other peoples units, but to no avail. While my computer sees the unit, none of the firmware loads will see the player. I fixed what was said in the register. Went through the 4 options of the "Rescue Mode" on the player, followed several of the knowledge notes on procedures, including hooking unit up to a new Dell Laptop. Exactly the same problem happens on a different computer.
    I guess my first step is to get the computer to see the MP3 player when I run a firmware install.
    Tell me what to do to save my little player.
    Thanks Scott

    peschli wrote:
    . . . if I don't use [my 30GB Zen Xtra] for day, it re-builds my library and half of the songs are disappeared and also so the "memoryplace" . . .
    I've had a similar experience, but to a degree. I've found that if I don't use my <EM>40GB</EM> Zen Xtra for more than one day the player will "re-build" the library... but in my case once the library has been re-built it plays just fine; none of my songs or memory are lost.
    Why does the player have to "re-build" the library if the player is not used for a period of time?

  • Recursive mergeSort... small problem with infinate recursion.

    Basically, I have made a recursive mergeSort method, but there is a small problem...im getting stuck with an eternal recursion, which is obviously followed up swiftly by a stack flow error, problem is I cant see where im going wrong...
    The error reads, "Exception in thread "main" java.lang.StackOverflowError at part3.mergeSort(part3.java:56)"
    Heres the code... any help is highly appreciated, as I am new to java, and this is for university.
    public class part3
        public static void main(String[] args)
          // Declare array of unsorted values.
          int[] values = {1,3,5,7,9,2,4,6,8,10};
          // Display unsorted values on screen.
          System.out.println("Unsorted Values");
          for(int i= 0;i < values.length; i++)
               System.out.println(values);
    mergeSort(values, values.length);
    output(values);
    public static void mergeSort(int[] vals, int n)
    // Declare necessary values
    int lowCount, highCount;
    int[] low, high;
    int i, j, k;
    if (n > 1)
              low = new int[n];
              high = new int[n];
              for(i=0,j=0,k=0; i < n; i++)
                   if(vals[i] < low.length)
                        low[j] = vals[i];
                        j++;
                   else
                        high[k] = vals[i];
                        k++;
              lowCount = j;
              highCount= k;
              mergeSort(low, lowCount);
              mergeSort(high, highCount);
              for(i = 0; i < lowCount; i++)
                   vals[i] = low[i];
              for(i = 0; i < highCount; i++)
                   vals[i+lowCount] = high[i];
    public static void output(int[] data)
    for(int i = 0; i < data.length; i++)
         System.out.print(data[i] + " ");
              System.out.println();

    yes sorry, that was it, when i put that code in my class... i get an acception in thread main...
    heres the code i now have...
    I know i need to add a main method, but im completely unsure of what I need to put inside the main method, if you get what i mean...
    sorry for all the hassle... :(
    public class part3
         * Mergesort algorithm.
         * @param a an array of Comparable items.
        public static void mergeSort( Comparable [ ] a ) {
            Comparable [ ] tmpArray = new Comparable[ a.length ];
            mergeSort( a, tmpArray, 0, a.length - 1 );
         * Internal method that makes recursive calls.
         * @param a an array of Comparable items.
         * @param tmpArray an array to place the merged result.
         * @param left the left-most index of the subarray.
         * @param right the right-most index of the subarray.
        private static void mergeSort( Comparable [ ] a, Comparable [ ] tmpArray,
                int left, int right ) {
            if( left < right ) {
                int center = ( left + right ) / 2;
                mergeSort( a, tmpArray, left, center );
                mergeSort( a, tmpArray, center + 1, right );
                merge( a, tmpArray, left, center + 1, right );
         * Internal method that merges two sorted halves of a subarray.
         * @param a an array of Comparable items.
         * @param tmpArray an array to place the merged result.
         * @param leftPos the left-most index of the subarray.
         * @param rightPos the index of the start of the second half.
         * @param rightEnd the right-most index of the subarray.
        private static void merge( Comparable [ ] a, Comparable [ ] tmpArray,
                int leftPos, int rightPos, int rightEnd ) {
            int leftEnd = rightPos - 1;
            int tmpPos = leftPos;
            int numElements = rightEnd - leftPos + 1;
            // Main loop
            while( leftPos <= leftEnd && rightPos <= rightEnd )
                if( a[ leftPos ].compareTo( a[ rightPos ] ) <= 0 )
                    tmpArray[ tmpPos++ ] = a[ leftPos++ ];
                else
                    tmpArray[ tmpPos++ ] = a[ rightPos++ ];
            while( leftPos <= leftEnd )    // Copy rest of first half
                tmpArray[ tmpPos++ ] = a[ leftPos++ ];
            while( rightPos <= rightEnd )  // Copy rest of right half
                tmpArray[ tmpPos++ ] = a[ rightPos++ ];
            // Copy tmpArray back
            for( int i = 0; i < numElements; i++, rightEnd-- )
                a[ rightEnd ] = tmpArray[ rightEnd ];
    }

  • Small problem with applescript

    Hello Again,
    Every day I use a morning script to launch my programs I have to use... and some more things...
    Aldo I have a problem with Golive.
    When I try to type activate in the editor it makes a bigg A.
    Also with cut and past.
    and when i run the applescript-program it does all I need ( The golive part is at the end... but when I place it in the middle it's just stops.
    I get this fault message : Can't continue <event Coreactv>
    and i guess it has something to do with the A-ctivate
    Is this a bugg? Or can someone explain this?
    I would like to do more after launching Golive..
    tell application "Extensis Suitcase X1"
    activate
    end tell
    tell application "Mail"
    activate
    end tell
    tell application "Adobe Photoshop CS"
    activate
    end tell
    tell application "QuarkXPress Passport"
    activate
    end tell
    tell application "Adobe GoLive CS"
    Activate
    end tell

    Some apps don't respond well to tell blocks. I don't have that app to test, but you could try using something like launch "TextEdit" or tell app "Finder" to open posix file "/Applications/TextEdit.app" to improve your results. Sometimes an ignoring application responses block can help too.

  • Re: Satellite A200 - Problem with Generic AC Adapter

    I own an A200 running Windows 7; I've had it for a few years and the battery had degraded to the point where it only held a small amount of power, so I ran it on AC power pretty much all the time. However the plug at the end of the power cord (where it plugs into the computer) gradually became looser and looser to the point where I had to twist and turn it and wrangle it just so in order to get power to flow into the computer; the other day it stopped working completely.
    I went out and bought a third-party AC adapter ('Lite-On'); I'm in a foreign country, but the adapter had the same type of plug and the same power specs (same input range, same voltage output) as the busted adapter that had come with the computer. When I plug it in, all the power-supply LEDs light up and it seems to be working perfectly. When I start the computer, however, sometimes I'll get a screen that says 'Windows failed to start...possibly due to an interruption in the power supply' despite all the LEDs remaining solidly lit during startup. This only happens occasionally; what happens every single time is that within a minute or so all the LEDs will turn off and the computer will instantly shut down; the LEDs will then light back up again instantly. Sometimes this happens during the start-up process, and sometimes I'm able to get as far as logging onto Windows before it shuts down.
    Can someone please tell me what the problem might me?

    After reading your posting I also believe that this issue has nothing to do with AC power supply.
    There must be some other reason for these switch offs.
    In most case this behaviour is typical for overheating. In short period of time hardware reach critical temperature level and notebook simply switch off without any warning.
    You can do small test: start your notebook and enter BIOS settings. Leave it for a while and see if the same will happen again.
    As Akuma already wrote, try to clean the cooling vent and cooling grill.
    Problem is that dust blocks cooling grill and notebook cannot be cooled down properly.

  • I am having a small problem. with Media Go??

    I have a program call " Creative MediaSource Go!" but when click on it to open so i can do some setup, nothing happens. Is ee the hour glass then nothing happens. I already updated with creative. please can some one tell me wat i am missing yo get the "Creative MediaSource Go!" to open and run ??

    Having this problem too: IT'S REALLY REALLY ANNOYING!!! Anyone have an idea how to sort this?

  • Problem with Generic Sync after upgrade

    Hi guru,
    I have this problem:
    I have done a upgrade ME2.1 -> MI2.5 SP18.
    I have a simple Generic sync application that using a simple Function Module:
    <b>
    function Z_ME_TEST_CONNECTION.
    ""Interfaccia locale:
    *"  EXPORTING
    *"     VALUE(STATUS) LIKE  BWAFSYHEAD-STATUS
    *"  TABLES
    *"      INBOUND_CONTAINER STRUCTURE  BWAFCONT
    *"      OUTBOUND_CONTAINER STRUCTURE  BWAFCONT
      perform CALL_OFFLINE_ME_METHOD using 'TEST_CONNECTION'
                                            INBOUND_CONTAINER[]
                                            OUTBOUND_CONTAINER[].
      OUTBOUND_CONTAINER-FIELDNAME = 'RESULT_CONNECTION' .
      OUTBOUND_CONTAINER-LINENUMBER = 0 .
      OUTBOUND_CONTAINER-FIELDVALUE = 'OK'.
      append OUTBOUND_CONTAINER.
    endfunction.</b>
    When i synchronize my mobile client it returns back
    <b>"EWAF                 001Could not execute method Z_ME_TEST_CONNECTION"</b>
    Can anybody help me in resolving this?

    Hi Sivakumar, I have write the my FM in the BWAFMAPP and the RFC destination in MEMAPPDEST but i have tha same error.
    This is my simple method in my application:
    <b>public String testSync(String userName) {
              String errormessage = null;
              try {
    //        get user out of the SyncSettings
                String user = Configuration.getInstance().getProperty(PropertyKeys.SYNCSETTINGS_USER, userName);
                OutboundContainerFactory outfactory = OutboundContainerFactory.getInstance();
                if (outfactory == null) {
                   errormessage = "testSync->OutboundContainerFactory.getInstance failed";
                }  else {
                   OutboundContainer out = outfactory.createOutboundContainer(
                   VisibilityType.SEPARATED,
                   R3_METHOD_TEST_SYNC,
                   OutboundContainer.TYPE_REQUEST);
              // add the name that has been typed into the JSP
                   out.addItem(DC_I_USER_NAME, user.toUpperCase());
                  out.addItem(DC_I_NUMBER_OF_LINES,"0");
                   out.close();
              // Start Sync
                 SyncManager.getInstance().synchronizeWithBackend(VisibilityType.SEPARATED);
              catch (SyncException ex) {
                   errormessage = ex.getMessage();
              catch (IllegalArgumentException ex) {
                      errormessage = ex.getMessage();
              catch (Exception ex) {
                        errormessage = ex.getMessage();
              finally {
            System.out.println("testSync: errormessage="+errormessage);
              return errormessage;
         }</b>
    You have anathor idea?
    Thanks

  • Problem with Generic iView Lists in EP6

    Hi,
    We are in the process of migrating our portal from EP5 SP5 to EP6 SR1.  I have a page that has 9 iViews on it, and there are 5 of them that are generic iView lists.  In EP5, everything works great.  Each generic iView list returns the information relating to that iView.  But in EP6, I am running into a problem.
    When I am trying to load the same page, some of the iViews to not work.  So I recreated the query iViews using the SAP delivered "com.sap.pct.hcm.eeprofilegenericiviewlist" template in EP6.  I go back to the page and the same thing happens.  I try refreshing the page, and then more of the iViews work, but now another problem arises.
    Example:  I have an iView that displays the salary data of an employee, and another that displays the Home Address.  I refresh the screen and the Salary Data iView works fine, but the Home Address is now showing the Salary Data information.
    So, I'm at a loss as to what I should do.  I know that there is a lot of configuration for the iViews now under the Property Editor and I think that I might have something that is not set up properly.
    Is there documentation on what needs to be set up for the generic iView list if there are multiple generic iView list iViews on the screen? 
    I guess I should mention too that these iViews are in MSS and all work off of the Team Viewer.  The team viewer iView is based off the EP5 version of the par, not the EP6.  Could that be the problem?
    Hope this makes some sense.
    Thanks and best regards,
    Kevin
    Message was edited by: Kevin Schmidt

    Just thought I'd let people know I have solved the problem. 
    Even though I had created brand new iViews in EP6, they still act like EP5 iViews.  So after researching the help files, I changed the isolation method of all the iViews on the page from Embedded to URL.
    Food for thought!!
    Kevin

  • Small problems with Image Capture

    Hi,
    When I upload images from my camera, I have a few problems.
    When Image Capture automatically opens, there are two different windows, and I never know which one will open. One has choices like Delete and Eject camera. The other window only has choices like Rotate Right and Rotate Left. Is there a way to get the one with more choices to open every time?
    When I eject the camera (either by using the choice from the one window) or by quitting Image Capture and dragging the camera icon in the Trash, I seem to always get a Device Removal warning when I shut off the camera.
    Thanks,
    Allan

    The second problem may be cured by using 'reformat' of the memory card, in the camera.
    There may be some corruption in the flash memory; or it may be failing.
    The first issue, may be relieved if you can find the correct file plists for Image Capture; and
    trash those preferences. If the actual application is somehow damaged, it may be possible
    to re-install just that application through use of Pacifist (charlessoft, download) to extract
    just that item, from the computer's OS X install/restore disc. Without an 'archive & install.'
    Hopefully someone will have exact details from experience; since I've not had similar issues.
    Usually, I'd use a free image editor such as ToyViewer for Mac; and also Preview, to edit.
    Good luck & happy computing!

  • Small problem with the Nano 6G, and run workouts

    Hello! I have sensor Nike IPod Sport Kit, which is in the new Nano 6G is not needed, because the accelerometer (pedometer) is built into the player and is suitable for running. But buying a heart rate monitor transmitter i is upset that it should only be used with the sensor in the shoe. Because when I connect the transmitter Nike to player Nano 6G, and then connected transmitter heart rate monitor and want to start training, the player Nano 6G is looking sensor in the sneaker, although it could well do without him. Request to developers Apple fix this problem so that you can use the transmitter heart rate monitor with built-in accelerometer in the player Nano 6G.
    Sorry for the google-translator. Regards, Alex.

    Alex, exactly what I was looking for...
    I tryed to get info from Apple and Nike support but seems nobody knows what I'm tolking about.
    I hope Apple will fix it on 6th G even if they'll launch the 7th G.
    Max

Maybe you are looking for

  • In which table the initial balances will be stored when loading via api

    Hi all, I am doing initial balances migration... In which table the initial balances will be stored when loading though an api.. (pay_balance_upload.process). First I have loaded data in to pay_balance_batch_headers and pay_balance_batch_lines tables

  • Simple application installation fails

    We use Zenworks 7 with SLES and I want to install the Java editor "Eclipse" via a Zenworks application. The software has only to be copied to a folder in C:\Program Files and a link on desktop has to be created. No registry-key-install or something e

  • How to call windows help files .hlp from Java program

    Hai all everybody How to call windows Help file that is xxx.hlp files from java programs any help great!!!! regards veeru

  • How do I return a flawed itunes book?

    I purchased a iBook through the iTunes store for reading on my iPad. After I was midway through the book, I realised that the iBook did not include the maps that were included in the print edition of the book. That was bad enough - how can one regard

  • VAT Account Determination

    Dear All SD Gurus, We had assigned GL account for Vat Receivable with introduction of Business Place concept we defined the GL code in view J_1IT030K_V using T code SM30. My problem is that during Billing the system the GL defined in OB40 & not the o