Working with interface controllers....

Hi friends,
can u please explain me use of interface controller with simple example along with the code
Thanks in advance.
krishna chaitanya

please go through
[Dynpro Controllers and Interface concepts|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0ba2c45-0518-2a10-73be-9b785e10aef1]
[Sample Application using Interface views|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a137c339-0b01-0010-a688-a87b88706845]
nikhil

Similar Messages

  • AIR-LAP1242G-E-K9 do not work with AIR-CT5508-K9 while AIR-LAP1142N-E-K9 do

    Hello,
    we do have a site where we need to deploy AIR-LAP1142N-E-K9 and AIR-LAP1242G-E-K9 APs. We have two AIR-CT5508-K9 controllers with SW version                  6.0.188.0.
    AIR-LAP1142N-E-K9s work okay, as expected, we do not have any problems with them.
    However AIR-LAP1242G-E-K9s do not, there is a problem with establishing CAPWAP tunnel with the controller.The AP is seen on the controller for a while, with 0 time up-time, cannot change any settings on the AP via controller, and after a while it disapears from the controller, apears again and this repeats.
    The APs and controllers are connected to the LAN campus.
    Controllers via two 1G links configured as Etherchannel to WS-C6506-E VSS switch with s72033-ipservicesk9_wan-vz.122-33.SXI1.bin on it.
    APs to WS-C3750G-48PS with c3750-ipbasek9-mz.122-50.SE2.bin on it. 3750 is connected to the C6505 via two 1G links configured as Etherchannel.
    Below I copied the log I captured on 1242 and the controller. Highlighted ones are the ones which I think might bring a clue.
    I performed some troubleshooting steps.
    - As we have some other controllers available over WAN, I  tested the 1242 AP  with 2100, 4400 and also with the same model AIR-CT5508-K9 with SW version                  6.0.188.0 over WAN and this worked always okay.
    - I wanted to be sure that I eliminate any kind of out of sequence packet issue, so I brought down all redundancy L2 links so that the L2 path from the AP to the controller was only through one leg links.
    - I also brought the second controller down to eliminate potential issue with having two of them up.
    - The AP gets its IP from DHCP configured on the C6506 switch, I am always able to ssh to AP, so the IP connectivity does not seem to be an issue.
    - I have more 1242s, all behave in the same way. I also connected them to some other 3750 switches we have in the campus, always the same.
    - As this seems to be maybe a kind of ssl issue, I tried to play with controller settings, like enabling Accept... options  under Security/AP Policy,but this did not help.
    - I also tried to reboot the controller, no improvement.
    - The APs came from the factory, so in the beginning everything was factory default in them. They were always able to download the image from the controller in the very initial phase. I still do have some of them untouched, so I can perform any troubleshooting steps with the fresh one.
    I can reproduce this, can also send debugging logs if needed.
    Any idea on what could be wrong is highly appreciated.
    Thank you.
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    This Discussion has been converted into document:- https://supportforums.cisco.com/docs/DOC-23054
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    AIR-LAP1242G-E-K9 10.0.13.28 log
    *Mar  1 00:00:05.922: %SOAP_FIPS-2-SELF_TEST_IOS_SUCCESS: IOS crypto FIPS self test passed
    *Mar  1 00:00:07.536: %SOAP_FIPS-2-SELF_TEST_RAD_SUCCESS: RADIO crypto FIPS self test passed on interface Dot1 1Radio 0
    *Mar  1 00:00:07.672: %LWAPP-3-CLIENTEVENTLOG: Read and initialized AP event log (contains, 304 messages)
    *Mar  1 00:00:09.809: %LINK-3-UPDOWN: Interface FastEthernet0, changed state to up
    *Mar  1 00:00:09.874: %SYS-5-RESTART: System restarted --
    Cisco IOS Software, C1240 Software (C1240-K9W8-M), Version 12.4(21a)JA2, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2009 by Cisco Systems, Inc.
    Compiled Mon 02-Nov-09 18:42 by prod_rel_team
    *Mar  1 00:00:09.874: %SNMP-5-COLDSTART: SNMP agent on host wuen4028 is undergoing a cold start
    *Mar  1 00:00:09.964: %CAPWAP-5-CHANGED: CAPWAP changed state to DISCOVERY
    *Mar  1 00:00:09.967: bsnInitRcbSlot: slot 1 has NO radio
    *Mar  1 00:00:10.191: %SSH-5-ENABLED: SSH 2.0 has been enabled
    *Mar  1 00:00:10.191: %LINK-3-UPDOWN: Interface Dot11Radio0, changed state to up
    *Mar  1 00:00:10.430: %LINK-5-CHANGED: Interface Dot11Radio0, changed state to reset
    *Mar  1 00:00:10.818: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0, changed state to up
    *Mar  1 00:00:11.212: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to down
    *Mar  1 00:00:18.315: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0 assigned DHCP address 10.0.13.28, mask 2 55.255.255.0, hostname wuen4028
    *Mar  1 00:00:28.988: Logging LWAPP message to 255.255.255.255.
    *Mar  1 00:00:31.456: %CDP_PD-4-POWER_OK: Full power - NEGOTIATED inline power source
    *Mar  1 00:00:31.495: %LINK-3-UPDOWN: Interface Dot11Radio0, changed state to up
    *Mar  1 00:00:32.457: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to up
    *Mar  1 00:00:32.457: %SYS-6-LOGGINGHOST_STARTSTOP: Logging to host 255.255.255.255 started - CLI initiated
    *Mar  1 00:00:38.810: %CAPWAP-3-ERRORLOG: Did not get log server settings from DHCP.
    *Mar  1 00:00:47.811: %CAPWAP-3-ERRORLOG: Could Not resolve CISCO-CAPWAP-CONTROLLER
    *Mar  1 00:00:56.812: %CAPWAP-3-ERRORLOG: Could Not resolve CISCO-LWAPP-CONTROLLER
    *Mar  1 00:01:07.815: %CAPWAP-3-ERRORLOG: Selected MWAR 'wuen4001'(index 0).
    *Mar  1 00:01:07.815: %CAPWAP-3-ERRORLOG: Go join a capwap controller
    *Feb 11 07:52:24.000: %CAPWAP-5-DTLSREQSEND: DTLS connection request sent peer_ip: 10.0.13.5 peer_port: 5246
    *Feb 11 07:52:24.001: %CAPWAP-5-CHANGED: CAPWAP changed state to
    *Feb 11 07:52:25.441: %CAPWAP-5-DTLSREQSUCC: DTLS connection created sucessfully peer_ip: 10.0.13.5 peer_port:  5246
    *Feb 11 07:52:25.443: %CAPWAP-5-SENDJOIN: sending Join Request to 10.0.13.5
    *Feb 11 07:52:25.443: %CAPWAP-5-CHANGED: CAPWAP changed state to JOIN
    *Feb 11 07:52:25.445: %CAPWAP-3-ERRORLOG: Unencrypted non-discovery CAPWAP Control Message from 10.0.13.5
    *Feb 11 07:52:25.445: %CAPWAP-3-ERRORLOG: Invalid AC Message Type 4.
    *Feb 11 07:52:25.445: %CAPWAP-3-ERRORLOG: Failed to handle capwap control message from controller
    *Feb 11 07:52:25.445: %CAPWAP-3-ERRORLOG: Failed to process unencrypted capwap packet from 10.0.13.5
    *Feb 11 07:52:30.441: %CAPWAP-5-SENDJOIN: sending Join Request to 10.0.13.5
    *Feb 11 07:52:30.442: %CAPWAP-3-ERRORLOG: Unencrypted non-discovery CAPWAP Control Message from 10.0.13.5
    *Feb 11 07:52:30.443: %CAPWAP-3-ERRORLOG: Invalid AC Message Type 4.
    *Feb 11 07:52:30.443: %CAPWAP-3-ERRORLOG: Failed to handle capwap control message from controller
    *Feb 11 07:52:30.443: %CAPWAP-3-ERRORLOG: Failed to process unencrypted capwap packet from 10.0.13.5
    *Feb 11 07:52:47.644: %CDP_PD-4-POWER_OK: Full power - NEGOTIATED inline power source
    *Feb 11 07:53:23.999: %DTLS-5-SEND_ALERT: Send WARNING : Close notify Alert to 10.0.13.5:5246
    *Feb 11 07:53:24.000: %CAPWAP-3-ERRORLOG: Selected MWAR 'wuen4001'(index 0).
    *Feb 11 07:53:24.000: %CAPWAP-3-ERRORLOG: Go join a capwap controller
    *Feb 11 07:52:24.000: %CAPWAP-5-DTLSREQSEND: DTLS connection request sent peer_ip: 10.0.13.5 peer_port: 5246
    *Feb 11 07:52:24.001: %CAPWAP-5-CHANGED: CAPWAP changed state to
    *Feb 11 07:52:24.001: %DTLS-5-PEER_DISCONNECT: Peer 10.0.13.5 has closed connection.
    *Feb 11 07:52:24.001: %DTLS-5-SEND_ALERT: Send WARNING : Close notify Alert to 10.0.13.5:5246
    *Feb 11 07:52:24.002: %CAPWAP-3-ERRORLOG: Invalid event 38 & state 3 combination.
    *Feb 11 07:52:24.123: %CAPWAP-3-ERRORLOG: Dropping dtls packet since session is not established.
    wuen4028#
    AIR-CT5508-K9 10.0.13.5 log
    *Feb 11 09:00:54.824: %DTLS-3-HANDSHAKE_FAILURE: openssl_dtls.c:2171 Failed to c
    omplete DTLS handshake with peer 10.0.13.28
                                               *Feb 11 08:59:53.798: %DOT1X-3-MAX_EA
    P_RETRIES: 1x_auth_pae.c:2862 Max EAP identity request retries (3) exceeded for
    client 00:1f:3b:93:dd:4f
    *Feb 11 08:59:51.197: %DOT1X-3-MAX_EAP_RETRIES: 1x_auth_pae.c:2862 Max EAP ident
    ity request retries (3) exceeded for client 00:c0:a8:e1:b1:71
    --More-- or (q)uit
    *Feb 11 08:59:21.212: %RRM-3-RRM_LOGMSG: rrmChanUtils.c:292 RRM LOG: Airewave Di
    rector: Could not find valid channel lists for 802.11bg
    *Feb 11 08:58:39.766: %DTLS-3-HANDSHAKE_FAILURE: openssl_dtls.c:2171 Failed to c
    omplete DTLS handshake with peer 10.0.13.28
                                               *Feb 11 08:57:06.131: %RRM-3-RRM_LOGM
    SG: rrmChanUtils.c:292 RRM LOG: Airewave Director: Could not find valid channel
    lists for 802.11bg
    *Feb 11 08:56:24.504: %DTLS-3-HANDSHAKE_FAILURE: openssl_dtls.c:2171 Failed to c
    omplete DTLS handshake with peer 10.0.13.28
                                               *Feb 11 08:55:09.693: %DOT1X-3-MAX_EA
    P_RETRIES: 1x_auth_pae.c:2862 Max EAP identity request retries (3) exceeded for
    client 00:1f:3b:93:dd:4f
    *Feb 11 08:54:51.040: %RRM-3-RRM_LOGMSG: rrmChanUtils.c:292 RRM LOG: Airewave Di
    rector: Could not find valid channel lists for 802.11bg
    *Feb 11 08:53:56.493: %DOT1X-3-MAX_EAP_RETRANS: 1x_ptsm.c:426 Max EAP retransmis
    sions exceeded for client 00:1f:3b:93:dd:4f
    *Feb 11 08:53:34.497: %DTL-3-OSARP_DEL_FAILED: dtl_arp.c:1380 Unable to delete a
    n ARP entry for 10.0.13.28 from the operating system. ioctl operation failed
    *Feb 11 08:52:35.936: %RRM-3-RRM_LOGMSG: rrmChanUtils.c:292 RRM LOG: Airewave Di
    rector: Could not find valid channel lists for 802.11bg
    *Feb 11 08:52:26.492: %DOT1X-3-MAX_EAP_RETRANS: 1x_ptsm.c:426 Max EAP retransmis
    sions exceeded for client 00:1f:3b:93:dd:4f
    *Feb 11 08:50:07.680: %DOT1X-3-MAX_EAP_RETRANS: 1x_ptsm.c:426 Max EAP retransmis
    sions exceeded for client 00:1f:3b:93:e6:57
    *Feb 11 08:48:37.458: %DOT1X-3-MAX_EAP_RETRIES: 1x_auth_pae.c:2862 Max EAP ident
    ity request retries (3) exceeded for client 00:1f:3b:93:e6:57
    *Feb 11 08:47:37.438: %DOT1X-3-MAX_EAP_RETRANS: 1x_ptsm.c:426 Max EAP retransmis
    sions exceeded for client 00:1f:3b:93:e6:57
    *Feb 11 08:47:34.438: %DOT1X-3-MAX_EAP_RETRIES: 1x_auth_pae.c:2862 Max EAP ident
    ity request retries (3) exceeded for client 00:16:44:1d:0f:53
    *Feb 11 08:46:32.422: %DOT1X-3-MAX_EAPOL_KEY_RETRANS: 1x_ptsm.c:407 Max EAPOL-ke
    y M3 retransmissions exceeded for client 00:16:44:1d:0f:53
    *Feb 11 08:46:06.790: %DOT1X-3-MAX_EAP_RETRIES: 1x_auth_pae.c:2862 Max EAP ident
    ity request retries (3) exceeded for client 00:1f:3b:95:61:bd
    *Feb 11 08:46:06.789: %DOT1X-3-ABORT_AUTH: 1x_bauth_sm.c:447 Authentication abor
    ted for client 00:1f:3b:95:61:bd
    *Feb 11 08:46:06.210: %DOT1X-3-MAX_EAP_RETRIES: 1x_auth_pae.c:2862 Max EAP ident
    ity request retries (3) exceeded for client 00:1f:3b:93:e6:57
    *Feb 11 08:45:34.304: %DOT1X-3-MAX_EAP_RETRIES: 1x_auth_pae.c:2862 Max EAP ident
    ity request retries (3) exceeded for client 00:1f:3b:95:61:bd
    *Feb 11 08:45:34.303: %DOT1X-3-ABORT_AUTH: 1x_bauth_sm.c:447 Authentication abor
    ted for client 00:1f:3b:95:61:bd
    *Feb 11 08:45:01.298: %RRM-3-RRM_LOGMSG: rrmChanUtils.c:292 RRM LOG: Airewave Di
    rector: Could not find valid channel lists for 802.11bg
    *Feb 11 08:44:38.076: %SIM-3-PORT_UP: sim.c:9547 Physical port 2 is up!.
    *Feb 11 08:44:38.037: %SIM-3-PORT_UP: sim.c:9547 Physical port 1 is up!.
    --More-- or (q)uit
    *Feb 11 08:44:38.009: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'cliWebInitParms.cfg'
    *Feb 11 08:44:37.980: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'rrcEngineInitParms.cfg'
    *Feb 11 08:44:37.980: %CNFGR-3-INV_COMP_ID: cnfgr.c:2105 Invalid Component Id :
    Unrecognized (81) in cfgConfiguratorInit.
    *Feb 11 08:44:37.928: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'rfidInitParms.cfg'
    *Feb 11 08:44:37.915: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'dhcpParms.cfg'
    *Feb 11 08:44:37.903: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'bcastInitParms.cfg'
    *Feb 11 08:44:37.834: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'rrmInitParms.cfg'
    *Feb 11 08:44:27.331: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'apfInitParms.cfg'                                            
    *Feb 11 08:44:27.226: %MM-3-MEMBER_ADD_FAILED: mm_dir.c:903 Could not add Mobili
    ty Member. Reason: IP already assigned, Member-Count:1,MAC: 00:00:00:00:00:00, I
    P: 0.0.0.0
    *Feb 11 08:44:27.023: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'mmInitParms.cfg'
    *Feb 11 08:44:27.013: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'aaaapiInitParms.cfg'
    *Feb 11 08:44:27.011: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'pemInitParms.cfg'
    *Feb 11 08:44:26.898: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'dot1xInitParms.cfg'
    *Feb 11 08:44:26.868: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'capwapInitParms.cfg'
    *Feb 11 08:44:26.718: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'spamInitParms.cfg'
    *Feb 11 08:44:25.650: %SSHPM-3-FREAD_FAILED: sshpmlscscep.c:1395 Error reading f
    ile /mnt/application/lscca_pem.crt
    *Feb 11 08:44:06.435: %SYSTEM-3-FILE_READ_FAIL: nvstore.c:422 Failed to read con
    figuration file 'sshpmInitParms.cfg'  

    Thanks for such quick response and suggestions.
    Yes, I seem not to to be 100% perfect as for the list of troubleshooting steps I took.
    I had already tried the two commands you mentioned. I tried again, this time with some other 1242, but these do not help.
    Yes, I was already thinking that this could be in theory a licensing issue. The controller is bougth with 25 licenses.
    In the beginnign I had one 1142 on it and tried to enable 1242s which did not work. Now I have five 1142s on it, as this worked okay, I guess it could not be a licensing issue.
    I think that I can see in the log files that the machines communicate to each other, L2 or L3 paths seem to be working okay. I forgot to mention that I am using option 43 on the DHCP server, so the AP clearly finds its way to the controller. What's more both APs and the controllers are in the same VLAN, so they are in the same broadcast domain.
    Below is sho ver from the AP. The AP seems to have Certificate type - manufacture installed, so I guess there should not be a problem with the certificate, especially knowing that the AP works with other controllers over WAN.
    My guess these messages seen on AP especially "Invalid event 38 & state 3 combination" might tell us what's wrong.
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-parent:"";
    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
    mso-para-margin:0cm;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman";
    mso-ansi-language:#0400;
    mso-fareast-language:#0400;
    mso-bidi-language:#0400;}
    *Feb 11 07:52:24.001: %CAPWAP-5-CHANGED: CAPWAP changed state to
    *Feb 11 07:52:24.001: %DTLS-5-PEER_DISCONNECT: Peer 10.0.13.5 has closed connection.
    *Feb 11 07:52:24.001: %DTLS-5-SEND_ALERT: Send WARNING : Close notify Alert to 10.0.13.5:5246
    *Feb 11 07:52:24.002: %CAPWAP-3-ERRORLOG: Invalid event 38 & state 3 combination.
    *Feb 11 07:52:24.123: %CAPWAP-3-ERRORLOG: Dropping dtls packet since session is not established.
    Cisco IOS Software, C1240 Software (C1240-K9W8-M), Version 12.4(21a)JA2, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2009 by Cisco Systems, Inc.
    Compiled Mon 02-Nov-09 18:42 by prod_rel_team
    ROM: Bootstrap program is C1240 boot loader
    BOOTLDR: C1240 Boot Loader (C1240-BOOT-M) Version 12.4(13d)JA, RELEASE SOFTWARE (fc2)
    AP9caf.ca00.1c78 uptime is 17 minutes
    System returned to ROM by power-on
    System image file is "flash:/c1240-k9w8-mx.124-21a.JA2/c1240-k9w8-mx.124-21a.JA2"
    This product contains cryptographic features and is subject to United
    States and local country laws governing import, export, transfer and
    use. Delivery of Cisco cryptographic products does not imply
    third-party authority to import, export, distribute or use encryption.
    Importers, exporters, distributors and users are responsible for
    compliance with U.S. and local country laws. By using this product you
    agree to comply with applicable laws and regulations. If you are unable
    to comply with U.S. and local laws, return this product immediately.
    A summary of U.S. laws governing Cisco cryptographic products may be found at:
    http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
    If you require further assistance please contact us by sending email to
    [email protected].
    cisco AIR-LAP1242G-E-K9    (PowerPCElvis) processor (revision A0) with 24566K/8192K bytes of memory.
    Processor board ID FCZ135082GH
    PowerPCElvis CPU at 262Mhz, revision number 0x0950
    Last reset from power-on
    LWAPP image version 6.0.188.0
    1 FastEthernet interface
    1 802.11 Radio(s)
    32K bytes of flash-simulated non-volatile configuration memory.
    Base ethernet MAC Address: 9C:AF:CA:00:1C:78
    Part Number                          : 73-11479-01
    PCA Assembly Number                  : 800-30493-01
    PCA Revision Number                  : A0
    PCB Serial Number                    : FOC13484GYY
    Top Assembly Part Number             : 800-29589-03
    Top Assembly Serial Number           : FCZ135082GH
    Top Revision Number                  : A0
    Product/Model Number                 : AIR-LAP1242G-E-K9
    Configuration register is 0xF
    AP9caf.ca00.1c78#

  • Can anybody help me to build an interface that can work with this code

    please help me to build an interface that can work with this code
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.FileReader;
    public class Translate
    public static void main(String [] args) throws IOException
    if (args.length != 2)
    System.err.println("usage: Translate wordmapfile textfile");
    System.exit(1);
    try
    HashMap words = ReadHashMapFromFile(args[0]);
    System.out.println(ProcessFile(words, args[1]));
    catch (Exception e)
    e.printStackTrace();
    // static helper methods
    * Reads a file into a HashMap. The file should contain lines of the format
    * "key\tvalue\n"
    * @returns a hashmap of the given file
    @SuppressWarnings("unchecked")
    private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
    BufferedReader in = null;
    HashMap map = null;
    try
    in = new BufferedReader(new FileReader(filename));
    String line;
    map = new HashMap();
    while ((line = in.readLine()) != null)
    String[] fields = line.split("
    t", 2);
    if (fields.length != 2) continue; //just ignore "invalid" lines
    map.put(fields[0], fields[1]);
    finally
    if(in!=null) in.close(); //may throw IOException
    return(map); //returning a reference to local variable is safe in java (unlike C/C++)
    * Process the given file
    * @returns String contains the whole file.
    private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException
    BufferedReader in = null;
    StringBuffer out = null;
    try
    in = new BufferedReader(new FileReader(filename));
    out = new StringBuffer();
    String line = null;
    while( (line=in.readLine()) != null )
    out.append(SearchAndReplaceWordsInText(words, line)+"\n");
    finally
    if(in!=null) in.close(); //may throw IOException
    return out.toString();
    * Replaces all occurrences in text of each key in words with it's value.
    * @returns String
    private static String SearchAndReplaceWordsInText(Map words, String text)
    Iterator it = words.keySet().iterator();
    while( it.hasNext() )
    String key = (String)it.next();
    text = text.replaceAll("\\b"key"
    b", (String)words.get(key));
    return text;
    * @returns: s with the first letter capitalized
    String capitalize(String s)
    return s.substring(0,0).toUpperCase() + s.substring(1);
    }... here's the head of my pirate_words_map.txt
    hello               ahoy
    hi                    yo-ho-ho
    pardon me       avast
    excuse me       arrr
    yes                 aye
    my                 me
    friend             me bucko
    sir                  matey
    madam           proud beauty
    miss comely    wench
    where             whar
    is                    be
    are                  be
    am                  be
    the                  th'
    you                 ye
    your                yer
    tell                be tellin'

    please help me i don t know how to go about this.my teacher ask me to build an interface that work with the code .
    Here is the interface i just build
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.awt.*;
    import javax.swing.*;
    public class boy extends JFrame
    JTextArea englishtxt;
    JLabel head,privatetxtwords;
    JButton translateengtoprivatewords;
    Container c1;
    public boy()
            super("HAKIMADE");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setBackground(Color.white);
            setLocationRelativeTo(null);
            c1 = getContentPane();
             head = new JLabel(" English to private talk Translator");
             englishtxt = new JTextArea("Type your text here", 10,50);
             translateengtoprivatewords = new JButton("Translate");
             privatetxtwords = new JLabel();
            JPanel headlabel = new JPanel();
            headlabel.setLayout(new FlowLayout(FlowLayout.CENTER));
            headlabel.add(head);
            JPanel englishtxtpanel = new JPanel();
            englishtxtpanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,40));
            englishtxtpanel.add(englishtxt);
             JPanel panel1 = new JPanel();
             panel1.setLayout(new BorderLayout());
             panel1.add(headlabel,BorderLayout.NORTH);
             panel1.add(englishtxtpanel,BorderLayout.CENTER);
            JPanel translateengtoprivatewordspanel = new JPanel();
            translateengtoprivatewordspanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,40));
            translateengtoprivatewordspanel.add(translateengtoprivatewords);
             JPanel panel2 = new JPanel();
             panel2.setLayout(new BorderLayout());
             panel2.add(translateengtoprivatewordspanel,BorderLayout.NORTH);
             panel2.add(privatetxtwords,BorderLayout.CENTER);
             JPanel mainpanel = new JPanel();
             mainpanel.setLayout(new BorderLayout());
             mainpanel.add(panel1,BorderLayout.NORTH);
             mainpanel.add(panel2,BorderLayout.CENTER);
             c1.add(panel1, BorderLayout.NORTH);
             c1.add(panel2);
    public static void main(final String args[])
            boy  mp = new boy();
             mp.setVisible(true);
    }..............here is the code,please make this interface work with the code
    public class Translate
    public static void main(String [] args) throws IOException
    if (args.length != 2)
    System.err.println("usage: Translate wordmapfile textfile");
    System.exit(1);
    try
    HashMap words = ReadHashMapFromFile(args[0]);
    System.out.println(ProcessFile(words, args[1]));
    catch (Exception e)
    e.printStackTrace();
    // static helper methods
    * Reads a file into a HashMap. The file should contain lines of the format
    * "key\tvalue\n"
    * @returns a hashmap of the given file
    @SuppressWarnings("unchecked")
    private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
    BufferedReader in = null;
    HashMap map = null;
    try
    in = new BufferedReader(new FileReader(filename));
    String line;
    map = new HashMap();
    while ((line = in.readLine()) != null)
    String[] fields = line.split("
    t", 2);
    if (fields.length != 2) continue; //just ignore "invalid" lines
    map.put(fields[0], fields[1]);
    finally
    if(in!=null) in.close(); //may throw IOException
    return(map); //returning a reference to local variable is safe in java (unlike C/C++)
    * Process the given file
    * @returns String contains the whole file.
    private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException
    BufferedReader in = null;
    StringBuffer out = null;
    try
    in = new BufferedReader(new FileReader(filename));
    out = new StringBuffer();
    String line = null;
    while( (line=in.readLine()) != null )
    out.append(SearchAndReplaceWordsInText(words, line)+"\n");
    finally
    if(in!=null) in.close(); //may throw IOException
    return out.toString();
    * Replaces all occurrences in text of each key in words with it's value.
    * @returns String
    private static String SearchAndReplaceWordsInText(Map words, String text)
    Iterator it = words.keySet().iterator();
    while( it.hasNext() )
    String key = (String)it.next();
    text = text.replaceAll("\\b"key"
    b", (String)words.get(key));
    return text;
    * @returns: s with the first letter capitalized
    String capitalize(String s)
    return s.substring(0,0).toUpperCase() + s.substring(1);
    }... here's the head of my pirate_words_map.txt
    hello               ahoy
    hi                    yo-ho-ho
    pardon me       avast
    excuse me       arrr
    yes                 aye
    my                 me
    friend             me bucko
    sir                  matey
    madam           proud beauty
    miss comely    wench
    where             whar
    is                    be
    are                  be
    am                  be
    the                  th'
    you                 ye
    your                yer
    tell                be tellin'

  • Does the new Ipod Nano work with AUDI Music Interface

    Getting a new Audi A4 with music interface and wanted to know if this will work with Ipod Nano or do I need Ipod Classic or Touch?

    hi
    Yes it does. just bought a Bose. But make sure you have no cover on your Nano as it will not connect!

  • Does the iPod Classic work with USA SPEC interfaces

    I am very intrested in purchasing a iPod Classic and a USA SPEC PA11-CHR iPod interface to connect the iPod to the factory radio in my truck. The problem is that nobody seems to know if the new iPod Classic will work with this interface, not even USA SPEC. Does anyone have any experiece with this? I have heard that the new iPod Nano's work with this interface, but not like they should. Any info on the Classic and its compatability with this interface would be greatly appreciated.

    I'm currently using an integration system from NEO car audio in my Mazda 3(which I'm sure all our integration kits are some variation of the same exact unit), not a cheep upgrade either. And I'm having the same lockout issues, "connected to accessory". I somehow managed to bypass it once, and get back to the main menu, but have yet to do it since that one accidental time. The system worked PERFECT with my 60G 5th gen. Apple should have made it a little more clear that they were going to attempt to control every aspect of our lives once we purchased the new ipod. Hey look, guess since they started using PC parts they thought it would be ok to become just like Windows "you will do it our way or not at all"
    I will return my 160g classic as well, and go back to my 60g Video. I may consider buying the 160 again later down the road, once Apple has stopped taking what ever drugs they are on that’s impaired their judgment to the point of stupidity. They even disabled the video out, you have to purchase their "NEW" video cable in order to hook the classic up to your tv or av system.
    MORE THAN UPSET!!!
    Apple get a grip! If you start down this road, you will loose the large following that has taken YEARS for you to gather. Are you sure you want to start this now?

  • EPMA 11.1.2.1 (Interface Tables) Working with Shared Upper Level Members

    Hi Everyone,
    I am building a hierarchy with interface tables in which I specify a shared member. In the interface table, I assign a null datastorage and a 0 for the ISPrimary to designate the shared member. The stored member has a datastorage of storedata and an ISPrimary of 1. The sort order for the shared member is set at 999999 and the sort order for the stored member is 6.
    We have an org hierarchy that goes Division->Business Group->Department. Please reference the member that is highlighted for the two questions I have below.
    I just made up some hierarchy names and placed in parenthesis what the member name would look like in our real hierarchy.
    Example Hierarchy:
    Organization
    |--Main_Hierarchy
    |--|--Division1 (DV_XYZ)
    |--|--|--BusinessGroup1 (BG_ABCD)
    |--|--|--|--Department1 (DP_1234)
    |-Alternate Rollup
    *|--|--Division2 (DV_ABC) [stored]*
    |--|--|--BG_123
    |--|--|--|--DP_9999
    |--|--|--|--DP_9876
    |--|--Research Division (DV_ZZZ)
    *|--|--|--Division2(DV_ABC) [shared]*
    I have 2 issues with this setup.
    1) When I run an import into the shared library, I see the shared member with children underneath it (the same children that are under the stored member) Is this supposed to look like that, or is there an additional configuration that I need to make? When I look in the application library, I see it correctly with the shared members having no children, but the shared library shows the shared members with children.
    2) When I run a deploy to the application, the application library shows the hierarchy correctly, but Planning and the Essbase Outline reversed the members (The stored member comes in as shared and the shared member comes in as stored in essbase and planning, but the application library shows it the correct way). Just wondering if someone could suggest a starting point for me to try and troubleshoot this issue.

    Is this an essbase only application? It seems like the property is defaulting to stored and then flipping the initial stored member to shared because Essbase isn't interpreting the deployment correctly. I would try using ShareData as the datastorage property (I think that is the correct spelling). Also, I believe the correct way to set IsPrimary is Y/N and not 0/1.
    If that did not work I would try the following in this order:
    1 - I would first extract the dimension in question using the file generator and confirm that the properties are indeed correct.
    2 - If they were correct. I would toggle the dimension from shared->local->shared. EPMA is still a little nutty and this will fix a fair amount of issues as it will 'refresh' the application's version of the dimension. I would then deploy
    3 - deploy from EPMA->Planning only (no essbase creation), then deploy to essbase separately after ensuring the property represents itself in planning. If it is essbase only - create the outlnie instead of refresh.
    4 - create a duplicate app in EPMA and deploy the copy of the app - and see if it has the same problem
    Try that and see how it goes.

  • Will the lightning to 30 pin adapter work with the irig midi interface?

    will the lightning to 30 pin adapter work with the irig midi interface?  Want to record guitar with garage band on ipad mini. need quick/easy way to connect USB to ipad mini

    From both? Interesting. I like that though. I am looking for the controls to be on the iPhone rather than the stereo as it ***** finding songs this way. And yeah, $39.00 is a lot for this, and it is only roughly 8" long. Oh well, I will need it, so I will have to buy it. Thanks for the message back!

  • Interface not working with mavericks 10.9.3

    is there anything apple can do i have pro fire 610 on mavericks upgrade os x 10.9.3 but driver no good and no updates help!!

    Try uninstalling all the software and driver(s) from the interface manufacturer and restart your mac. Then plug your interface in and see if it will work.
    I have a (different manufacturer) audio USB interface which never worked with any of the drivers from the manufacturer, with either Mountain Lion or Mavericks. Support at the manufacturer kept sending me beta drivers, none would work. I uninstalled everything and my Mac's generic audio capablilties were enough to "see" the interface and use it.

  • Audio INTERFACE that works with Garage Band??

    Any suggestions for a good inexpensive audio interface? Fast Track is awful.... Something about 250 or under?
    Want to plug guitar into device, device into MAC - and lay down tracks.

    ZoohGirl wrote:
    Do the second two in the top row work with Garage Band
    there isn't such a thing as "working with GB", if it works on a mac it will work with GB
    and ProTools?
    i know very little about protools, though they tend to be more proprietary
    can we plug them in (to guitar and MAC) and roll?
    yes
    Or is a mic needed??
    "needed", no. there are both 1/4" as well as XLR jacks, as you can see in the pics. you can use either.

  • My firewire port works with ext hd but not with audio interface

    2010 Imac 21.5 running 10.8.5. My firewire port works with ext hd but not with audio interface. The local authorized Apple tech said that I need a new motherboard, but my firewire ext drive works perfectly. I don't understand. Thanks.

    You must go to the website of the audio interface manufacturer and look for, download and install updated drivers for the audio device you are using.
    This is not, neccessarily, an Apple issue.

  • I am running 10.8 and I am trying to get a E-mu 1x1 midi/usb connector to work with my keyboards. It's not working with any keyboard at all. I believe it is a Mainstage/Mac issue. Mainstage can recognize the the interface but it won't work.

    I am running 10.8 and I am trying to get a E-mu 1x1 midi/usb connector to work with my keyboards. It's not working with any keyboard at all. I believe it is a Mainstage/Mac issue. Mainstage can recognize the the interface but it won't work.

    Here are two screen shots to show you what I am seeing.  The first screen shot shows it allowing me to select (highlighted in blue) my admin user (which is what I am locced in as).  The second screen shot shows it allowing me to select the "Guest" user (highlighted in blue).  However when I click on the user "Orion" nothing happens.  It will not change to highlight that user.

  • IChat AV doesn't work with M-Audio Firewire audio interface

    I saw similar topics to this but none dealing with a Firewire audio interface and none with exactly the same problem.
    Every other piece of software I use works with the M-Audio Firewire Solo, except for iChat AV. When it is the selected output device and I start a video chat with someone, I get just horrible, loud static when the person on the other end speaks.
    Running 10.4.10 on a Macbook Pro (2.16 GHz Intel Core 2 Duo).
    Does anyone know of incompatibility issues with iChat and Firewire interfaces?

    In Audio MIDI Setup (In applications/Utilities) the setting for my Mic is 44100khz 1Ch 16bit.
    The Internal Audio connection also shows up at 44100Khz 2Ch 16bit
    Are you looking in the same place or in the device itself ?
    I would set it in the Audio MIDI Setup and then make sure it responds in System Preferences > Sound > Input tab.
    Once the Blue bar moves to at least halfway there I would then check iChat > Preferences > Video Section to see if the green bar under the Vido pics is moving.
    4:25 PM Friday; September 7, 2007

  • External audio controllers that work with FCP

    Is FCP cabable of working with external audio control interfaces such as the kind that work with Logic?
    If so, any recommendations on which ones work well?
    Cheers,
    Jesse.

    take a look at the Mackie MCU (control surface only) or the Tascam FW1082 (control surface/mixer hybrid)
    ... or any product that support the Mackie Control protocol or Logic Control should work.
    smaller, interesting interfaces at the moment include
    the FireOne http://www.tascam.com/details;8,14,104.html
    and the AlphaTrack http://www.frontierdesign.com/Products/AlphaTrack
    larger more extensible setups would include
    the Tascam FW1884 http://www.tascam.com/catalogue;47,14.html
    with additional FE-8 units for up to 128 tracks http://www.tascam.com/products/fe-8.html

  • Presonus interfaces - do they work with the latest Macs?

    A few months ago there was much discussion as to the causes of some F/W 400 interfaces not working with the latest F/W 800 only Maca. Something to do with a particular chipset, I believe. There's a firmware update on Presonus' website: can anyone tell me if this resolves the issue, and if so, should it be OK to run a firewire hard drive off the same port?
    Many Thanks,
    Richard Vernon.

    I have the Inspire, and there doesn't seem to be a firmware update. The issue with the Firewire chipset exists, it doesn't send enough power to the Inspire so it won't sync with the computer. I can only get around it by daisy-chaining the Inspire through an externally powered FW harddisk (which I unmount as soon as the Inspire is synced).

  • My audio interface not working with my IMac

    My audio interface not working with my IMac

    Have you tried > Apogee Electronics > Apogee Support & Product Downloads

Maybe you are looking for

  • Battery, heat, and ringer issues

    I recently purchased the Iphone 4s.. this is my first iphone I did the update that Apple sent out to help the battery and it seems like it worse then before the update??  My phone has been off the charger for 45 minutes, I sent 1 text message, and ha

  • How to adjust resolution for P55t-B5340

    Help! I bought this wonderful computer from Costco and have only been using it for a couple of days. The screen resolution recomendation is 3840 x 2160, it's BEAUTIFUL the big (or small) problem is menu bars like the ones in PhotoShop, and a lot of t

  • Approved!!

    After attempting last year and being denied, I tried again today. I was approved for the Amazon Rewards card with a 2K CL I'm super pumped! What a great day!

  • GL Problem in ET & RTCW

    OK, Bye now I'm getting a bit P@*&ed Off !. If I run my games from scratch and set up all the options through the menus I have no initial problems. When I exit and reload the game I get the following error message: ET 2.55 win-x86 May 27 2003 ----- F

  • Negative stock indicator

    Hi, Can anyone tell me the path for negative stock indicator? regards,