Localized Accelorator Keys

Hi folks,
I have a problem with localization and accelerator keys. I am developing a localized Swing GUI where a user can set his preffered Locale and then all texts are translated.... That's all no prob. The problem is, that in JMenus the accelerator keys for items are displayed not according to the set default locale (e.g., en-US) but are displayed according to the OS user.language (in my case de [German]). Hence, the accel. keys read, e.g., '*Strg-N*' instead of '*Ctrl-N*' as expected for default locale en.
This is just a display problem, the functionality / the keys work fine, of course.
I guess my prob is (somehow) related to the awt.properties. When invoking, e.g., KeyEvent.getKeyModifiersText(keyStroke.getModifiers() (which I assume is called for JMenuItems to display the acc keys) I get the modifier key as string in German. These properties are loaded on startup? according to the OS user language. If i change my user language (e.g., with the jvm switch -Duser.language=en) everything is fine. When changing this system property inside Java Code (e.g. in my main-method) the awt.properties are already loaded (somehow) with the OS user.language. Hence, this option doesn't work.
Has anybody an idea / workaround how I get these modifier keys displayed localized. Is there perhaps a way to change the awt-property on runtime or, at least, to set the values of these properties, e.g. AWT.control?
Thanks!

The solution would be to set the user language or the locale before the Toolkit class gets loaded. This would generally be VERY early in the startup sequence, say the first lines of your main method. Because as soon as you start using any GUI related classes such as JFrame, the Toolkit class will also get loaded.
In my first attempt to solve your problem it didn't work even though I set the locale on the FIRST line of my main method. The problem was that my test class itself extended from JFrame, so the JFrame class got loaded before the main method executed. And loading JFrame means also loading Component means loading Toolkit means the resources got loaded with the default VM user language.
See the Toolkit class, where you can find the following code (I put a break point on this line):
resources = ResourceBundle.getBundle("sun.awt.resources.awt", CoreResourceBundleControl.getRBControlInstance());Find below a running example which solves your problem:
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.util.Locale;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
public class Accelerators {
    static void createAndShowGui() {
        JMenuBar bar = new JMenuBar();
        JMenu menu = new JMenu("File");
        bar.add(menu);
        menu.add(new JMenuItem(new AbstractAction() {
                putValue(Action.NAME, "Save");
                putValue(Action.ACCELERATOR_KEY, KeyStroke
                        .getKeyStroke("ctrl S"));
            public void actionPerformed(ActionEvent e) {
                JOptionPane
                        .showConfirmDialog(
                                null,
                                "Notice language of dialog caption & buttons.\nThese also depend on the user.language");
        JFrame f = new JFrame("Accelerators");
        f.getContentPane().add(bar, BorderLayout.NORTH);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setLocationRelativeTo(null);
        f.setSize(300, 300);
        f.setVisible(true);
    public static void main(String[] args) {
        // Locale.setDefault(Locale.US);
        Locale.setDefault(Locale.GERMAN);
        // or:
        // System.setProperty("user.language", "en");
        // System.setProperty("user.language", "de");
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGui();
}

Similar Messages

  • Do we transport locally restricted Key figures ?

    hello,
    Do we transport key figures/chars which we restrict locally? or we just transport the RKF?
    Is it good idea to restrict locally if its not going to be used too much rather than vreating whole bunch of RKF?
    and lastly how can we delete RKF if we dont need them?
    Thanks

    Yes, I agree: variables are very important and useful to good query creation, esp since you can have all these different types of variables.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/579b3c494d8e15e10000000a114084/content.htm
    Not sure about a 'must know' list, but few things that are useful are knowledge of judicious use of filters, variables and free chars; creation of global RKF, CKF and structures; decision choice between 2 queries or 1 query and 2 workbooks; trying to use seelctions, instead of restrictions (when selecting values for restricting chars) etc.
    Hope this helps...

  • Localized  Access Keys

    Hi,
    I have a component like <af:commandImageLink icon="/images/abc.png" accessKey="h"/> ,
    to localize the access key "h" can it be moved to resource bundle.
    If moved to resource bundle, will ADF match char in english to char in other language.
    Please advise.
    Thanks

    Hi,
    according to the published component tag documentation, the accessKey attribute supports EL. So the answer to your question should be "yes"
    Frank

  • 0COMP_CODE Local currency different than 0COMPANY currency

    Hello guys,
    We are implementing BCS for our client and the scenario for the same is as follows:
    We are using ECC 6.0, BW 3.5 with SEM 4.0., we have activated New GL Accounting in ECC 6.0. and have been able to bring in data from totals table FAGLFLEXT into BW.
    Now we need to bring in the data from BW to BCS cubes using the load from data stream method. We needed to bring all the three currency types (transaction, group and local) into the SEM BCS cube (0BCS_C10), so we have added all the 3 currencies in the data basis roles.
    When we run the load from data stream method, we get the following error for some items:
    Error message UCD1 032 (Local currency of company X is not correct).
    This message occurs for the company codes (0COMP_CODE) which not have the same currency as their related Company (0COMPANY).
    Could you please help us solving this "issue" ?
    Thank you in advance,
    Regards,
    Pascal MORIZUR

    Pascal,
    IMHO, the situation is a bit different.
    AFAIU, It doesn't matter which local currency is set for 0COMP_CODE in ECC.
    The BCS totals cube has three key figures for currencies. Each KF has attached to it a currency key. In your case this key doesn't correspond to local currency set for 0COMPANY.
    This causes the error.
    If I were you, I'd try to replace incoming local currency key by the proper currency key. The particular solution may depend on your details. Try to add an attribute of currency to 0COMP_CODE and to MOVE this attribute to local currency in mapping.
    Very straight forward but not flexible is to use a CONSTANT in mapping (if all the companies have the same local currency). If not - use also a condition which will determine for which company code which local currency to apply.
    Edited by: Eugene Khusainov on Apr 3, 2008 9:17 PM

  • Local Currency in the Consolidation

    Hi BCS Guru,
    Can you help me about this problem :
    In BCS (SEM 400, SAP_BW 3.5) I would like to use the local currency in the profit center for consolidation method .
    This local currency will be created in BW and synchronized ( tcode UGMD_SY_MD) in BCS.
    In order to do this, i had the infoobjet local currency in the profit center attributes in BW and regenerated the data model in BCS (tcode UCWB).
    In the workbench in BCS (tcode UCWB, Masterdata, Consolidation Units) the local Currency is defined twice ( one time in the in the tab DataEntry  and other time in the tab Other attribute )
    My problem is that i don’t know how to initialized the local Currency (defined as attributes in the tab DataEntry ) with the synchronization ( tcode UGMD_SY_MD) only the local Currency in the tab Other attribute is initialized .
    I need the local Currency (defined as attributes in the tab DataEntry) in the consolidation method so please could you help.
    Thanks
    Matihi

    Yes, Matihi,
    it's clear now. That local currency that is sitting in the DataEntry tab is a system default one. It's not the attribute you entered (attribute is on the Others tab).
    This local currency key is 0CURKEY_LC infoobject. If pressing F4 in the field for local currency of your PC brings nothing, then you need enter some values for this currency. The infoobject itself has a reference unit 0CURRENCY. 0CURKEY_LC will inherit all master data entered for 0CURRENCY.
    So, all you need is to populate 0CURRENCY with currencies you need.
    To do this use a usual way through SPRO t-code:
    SAP Netweaver - General settings - currencies. execute those functions that seem appropriate. First of all, certainly, "Check Currency Codes" option.
    Good luck and keep us posted!

  • [SOLVED] Can't boot from LUKS - No key available with this passphrase

    The problem
    Latest kbd package responsible for your keyboard layout may break some LUKS installs depending on the password used, as there are some keymaps which are broken, resulting in the user not being able to enter the password correctly.
    Relevant bug report: https://bugs.archlinux.org/task/36689
    The fix
    Find an old live image with the old kbd package (I had success with 2012.11.01)
    Boot the image
    Change to your preferred keymap using
    loadkeys
    Open your encrypted device with
    cryptsetup luksOpen /path/to/device devicename
    Mount the device and any other relevant mount points (such as /boot) and perform a chroot with
    arch-chroot
    Revert the kbd package. The latest working version is 1.15.5-4. If you didn't clean your cache, you should have a working version under
    /var/cache/pacman/pkg
    If not, either try finding the package manually, or build it using ABS.
    Once the package is installed, confirm the keymap works by running loadkeys again and entering any keys that may have been problematic.
    While still under chroot, rebuild the initramfs with
    mkinitcpio -p linux
    If this goes without any problems, you should be able to reboot to a working system.
    Ever since I updated my system about a week ago, I cannot boot it anymore.
    The root filesystem encrypted and since the update, I can't unlock it on boot anymore. Typing in my passphrase, I get the error No key available with this passphrase.
    One thing that comes to mind is that the passphrase contains non-standard characters (Š for example), and I'm not sure if that's what might be causing problems?
    Any ideas or tips on how can I debug this?
    Another thing I've noticed is that if I drop into a recovery shell, the special characters on my keyboard aren't properly mapped. Š will print out C and it's hexdump seems invalid.
    Edit:
    Just noticed this thread: https://bbs.archlinux.org/viewtopic.php?id=148562
    Will try to unlock it from a live distro. It doesn't seem to want to unlock with Arch live as the keymap seems wrong there as well.
    Last edited by Mr. Pjer (2013-09-07 00:19:27)

    Here's the list. The update was done on 31/8.
    [2013-08-31 18:14] [PACMAN] Running 'pacman -Syu'
    [2013-08-31 18:14] [PACMAN] synchronizing package lists
    [2013-08-31 18:14] [PACMAN] starting full system upgrade
    [2013-08-31 18:34] [PACMAN] removed python2-distribute (0.6.45-1)
    [2013-08-31 18:34] [PACMAN] removed python-distribute (0.6.45-1)
    [2013-08-31 18:34] [ALPM-SCRIPTLET] ==> Appending keys from archlinux.gpg...
    [2013-08-31 18:34] [ALPM-SCRIPTLET] gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
    [2013-08-31 18:34] [ALPM-SCRIPTLET] gpg: depth: 0 valid: 1 signed: 5 trust: 0-, 0q, 0n, 0m, 0f, 1u
    [2013-08-31 18:34] [ALPM-SCRIPTLET] gpg: depth: 1 valid: 5 signed: 65 trust: 0-, 0q, 0n, 5m, 0f, 0u
    [2013-08-31 18:34] [ALPM-SCRIPTLET] gpg: depth: 2 valid: 65 signed: 3 trust: 65-, 0q, 0n, 0m, 0f, 0u
    [2013-08-31 18:34] [ALPM-SCRIPTLET] gpg: next trustdb check due at 2014-01-22
    [2013-08-31 18:34] [ALPM-SCRIPTLET] ==> Locally signing trusted keys in keyring...
    [2013-08-31 18:34] [ALPM-SCRIPTLET] -> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2...
    [2013-08-31 18:34] [ALPM-SCRIPTLET] -> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8...
    [2013-08-31 18:34] [ALPM-SCRIPTLET] -> Locally signing key 44D4A033AC140143927397D47EFD567D4C7EA887...
    [2013-08-31 18:34] [ALPM-SCRIPTLET] -> Locally signing key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0...
    [2013-08-31 18:34] [ALPM-SCRIPTLET] -> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7...
    [2013-08-31 18:34] [ALPM-SCRIPTLET] ==> Importing owner trust values...
    [2013-08-31 18:34] [ALPM-SCRIPTLET] ==> Disabling revoked keys in keyring...
    [2013-08-31 18:34] [ALPM-SCRIPTLET] -> Disabling key BC1FBE4D2826A0B51E47ED62E2539214C6C11350...
    [2013-08-31 18:34] [ALPM-SCRIPTLET] ==> Updating trust database...
    [2013-08-31 18:34] [ALPM-SCRIPTLET] gpg: next trustdb check due at 2014-01-22
    [2013-08-31 18:34] [PACMAN] upgraded archlinux-keyring (20130525-2 -> 20130818-1)
    [2013-08-31 18:34] [ALPM-SCRIPTLET]
    [2013-08-31 18:34] [ALPM-SCRIPTLET] NOTE for argyllcms:
    [2013-08-31 18:34] [ALPM-SCRIPTLET] ----
    [2013-08-31 18:34] [ALPM-SCRIPTLET] ==> The documentaion is only available as html!
    [2013-08-31 18:34] [ALPM-SCRIPTLET] ==> You will find it in /usr/share/argyllcms/doc
    [2013-08-31 18:34] [ALPM-SCRIPTLET] ==> Color charts located in /usr/share/argyllcms/ref
    [2013-08-31 18:34] [ALPM-SCRIPTLET] ==> Since release 1.5.0 ColorHug support is enabled by default. The environment variable "ENABLE_COLORHUG" is not longer needed!
    [2013-08-31 18:34] [ALPM-SCRIPTLET] ==> Please add your argyllcms user to plugdev group! <==
    [2013-08-31 18:34] [PACMAN] upgraded argyllcms (1.5.1-2 -> 1.6.0-1)
    [2013-08-31 18:34] [PACMAN] upgraded linux-api-headers (3.8.4-1 -> 3.10.6-1)
    [2013-08-31 18:34] [ALPM-SCRIPTLET] Generating locales...
    [2013-08-31 18:34] [ALPM-SCRIPTLET] en_US.UTF-8... done
    [2013-08-31 18:34] [ALPM-SCRIPTLET] hr_HR.UTF-8... done
    [2013-08-31 18:34] [ALPM-SCRIPTLET] Generation complete.
    [2013-08-31 18:34] [PACMAN] upgraded glibc (2.17-6 -> 2.18-3)
    [2013-08-31 18:34] [PACMAN] upgraded bash (4.2.045-4 -> 4.2.045-5)
    [2013-08-31 18:34] [PACMAN] upgraded binutils (2.23.2-2 -> 2.23.2-3)
    [2013-08-31 18:34] [PACMAN] upgraded boost-libs (1.54.0-2 -> 1.54.0-3)
    [2013-08-31 18:34] [PACMAN] upgraded ca-certificates-java (20121112+nmu2-2 -> 20130815-1)
    [2013-08-31 18:34] [PACMAN] upgraded glib2 (2.36.3-3 -> 2.36.4-1)
    [2013-08-31 18:34] [PACMAN] upgraded wayland (1.2.0-1 -> 1.2.1-1)
    [2013-08-31 18:34] [PACMAN] upgraded gcc-libs (4.8.1-2 -> 4.8.1-3)
    [2013-08-31 18:34] [PACMAN] installed elfutils (0.155-1)
    [2013-08-31 18:34] [PACMAN] installed llvm-libs (3.3-1)
    [2013-08-31 18:34] [PACMAN] upgraded mesa (9.1.6-1 -> 9.2.0-1)
    [2013-08-31 18:34] [PACMAN] upgraded mesa-libgl (9.1.6-1 -> 9.2.0-1)
    [2013-08-31 18:34] [PACMAN] upgraded cairo (1.12.14-4 -> 1.12.16-1)
    [2013-08-31 18:34] [PACMAN] upgraded ttf-dejavu (2.33-4 -> 2.34-1)
    [2013-08-31 18:34] [PACMAN] upgraded chromium (28.0.1500.95-1 -> 29.0.1547.62-1)
    [2013-08-31 18:34] [PACMAN] upgraded curl (7.31.0-1 -> 7.32.0-1)
    [2013-08-31 18:34] [PACMAN] upgraded libarchive (3.1.2-1 -> 3.1.2-2)
    [2013-08-31 18:34] [PACMAN] upgraded cmake (2.8.11.2-1 -> 2.8.11.2-2)
    [2013-08-31 18:34] [PACMAN] upgraded cpupower (3.10-1 -> 3.10-2)
    [2013-08-31 18:34] [PACMAN] upgraded device-mapper (2.02.98-4 -> 2.02.100-1)
    [2013-08-31 18:34] [PACMAN] upgraded cryptsetup (1.6.1-2 -> 1.6.2-1)
    [2013-08-31 18:34] [PACMAN] upgraded poppler (0.24.0-1 -> 0.24.1-1)
    [2013-08-31 18:34] [PACMAN] upgraded cups-filters (1.0.35-4 -> 1.0.37-1)
    [2013-08-31 18:34] [PACMAN] installed python2-setuptools (1.0-1)
    [2013-08-31 18:34] [PACMAN] upgraded deluge (1.3.6-1 -> 1.3.6-3)
    [2013-08-31 18:34] [PACMAN] upgraded dhcpcd (6.0.4-1 -> 6.0.5-1)
    [2013-08-31 18:34] [PACMAN] upgraded python2-numpy (1.7.1-1 -> 1.7.1-2)
    [2013-08-31 18:34] [PACMAN] upgraded dispcalgui (1.2.7.0-1 -> 1.2.7.0-2)
    [2013-08-31 18:34] [PACMAN] upgraded ffmpeg (1:2.0-2 -> 1:2.0.1-1)
    [2013-08-31 18:34] [PACMAN] upgraded gtk3 (3.8.2-1 -> 3.8.4-1)
    [2013-08-31 18:34] [PACMAN] upgraded file-roller (3.8.3-1 -> 3.8.4-1)
    [2013-08-31 18:34] [PACMAN] upgraded gcc (4.8.1-2 -> 4.8.1-3)
    [2013-08-31 18:34] [PACMAN] upgraded gettext (0.18.3-1 -> 0.18.3.1-1)
    [2013-08-31 18:34] [PACMAN] upgraded libtiff (4.0.3-2 -> 4.0.3-3)
    [2013-08-31 18:34] [PACMAN] upgraded ghostscript (9.07-2 -> 9.09-1)
    [2013-08-31 18:34] [PACMAN] upgraded librsvg (2.37.0-2 -> 1:2.37.0-1)
    [2013-08-31 18:34] [PACMAN] upgraded libmng (1.0.10-4 -> 2.0.2-2)
    [2013-08-31 18:34] [PACMAN] upgraded gimp (2.8.6-1 -> 2.8.6-2)
    [2013-08-31 18:34] [PACMAN] upgraded perl (5.18.0-1 -> 5.18.1-1)
    [2013-08-31 18:34] [PACMAN] upgraded perl-error (0.17020-1 -> 0.17021-1)
    [2013-08-31 18:34] [PACMAN] upgraded git (1.8.3.4-1 -> 1.8.4-1)
    [2013-08-31 18:34] [PACMAN] upgraded glew (1.10.0-1 -> 1.10.0-2)
    [2013-08-31 18:34] [PACMAN] upgraded glfw (3.0.1-2 -> 3.0.2-1)
    [2013-08-31 18:34] [PACMAN] upgraded glm (0.9.4.4-1 -> 0.9.4.5-1)
    [2013-08-31 18:34] [PACMAN] upgraded gnupg (2.0.20-2 -> 2.0.21-1)
    [2013-08-31 18:34] [PACMAN] upgraded gpgme (1.4.2-2 -> 1.4.3-1)
    [2013-08-31 18:35] [PACMAN] upgraded grails (2.2.3-1 -> 2.2.4-1)
    [2013-08-31 18:35] [PACMAN] upgraded groff (1.22.2-3 -> 1.22.2-5)
    [2013-08-31 18:35] [PACMAN] upgraded gstreamer (1.0.9-1 -> 1.0.10-1)
    [2013-08-31 18:35] [PACMAN] upgraded gst-plugins-base-libs (1.0.9-1 -> 1.0.10-1)
    [2013-08-31 18:35] [PACMAN] upgraded imagemagick (6.8.6.4-1 -> 6.8.6.9-1)
    [2013-08-31 18:35] [PACMAN] upgraded intel-dri (9.1.6-1 -> 9.2.0-1)
    [2013-08-31 18:35] [PACMAN] upgraded iputils (20121221-2 -> 20121221-3)
    [2013-08-31 18:35] [PACMAN] upgraded isl (0.12-1 -> 0.12.1-1)
    [2013-08-31 18:35] [PACMAN] upgraded kbd (1.15.5-4 -> 2.0.0-1)
    [2013-08-31 18:35] [PACMAN] upgraded kdelibs (4.10.5-2 -> 4.11.0-1)
    [2013-08-31 18:35] [PACMAN] upgraded kmod (14-1 -> 15-1)
    [2013-08-31 18:35] [PACMAN] upgraded lib32-glibc (2.17-5 -> 2.18-3)
    [2013-08-31 18:35] [PACMAN] upgraded lib32-gcc-libs (4.8.1-2 -> 4.8.1-3)
    [2013-08-31 18:35] [PACMAN] upgraded libbsd (0.5.2-2 -> 0.6.0-1)
    [2013-08-31 18:35] [PACMAN] upgraded libfm (1.1.1-1 -> 1.1.2-1)
    [2013-08-31 18:35] [PACMAN] upgraded libgdiplus (2.10.9-1 -> 2.10.9-2)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-en-GB (4.0.4-1 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-common (4.0.4-2 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-base (4.0.4-2 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-calc (4.0.4-2 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-draw (4.0.4-2 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-gnome (4.0.4-2 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-impress (4.0.4-2 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-kde4 (4.0.4-2 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-math (4.0.4-2 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-postgresql-connector (4.0.4-2 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-sdk (4.0.4-2 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-sdk-doc (4.0.4-2 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libwpd (0.9.6-1 -> 0.9.9-1)
    [2013-08-31 18:35] [PACMAN] upgraded libreoffice-writer (4.0.4-2 -> 4.0.5-1)
    [2013-08-31 18:35] [PACMAN] upgraded libsamplerate (0.1.8-1 -> 0.1.8-2)
    [2013-08-31 18:35] [PACMAN] upgraded libwbclient (4.0.8-1 -> 4.0.9-1)
    [2013-08-31 18:35] [ALPM-SCRIPTLET] >>> Updating module dependencies. Please wait ...
    [2013-08-31 18:35] [ALPM-SCRIPTLET] >>> Generating initial ramdisk, using mkinitcpio. Please wait...
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> Starting build: 3.10.10-1-ARCH
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [base]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [udev]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [autodetect]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [modconf]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [block]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [keymap]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [encrypt]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [filesystems]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [keyboard]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> Generating module dependencies
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> Creating gzip initcpio image: /boot/initramfs-linux.img
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> Image generation successful
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> Starting build: 3.10.10-1-ARCH
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [base]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [udev]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [modconf]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [block]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: aic94xx
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: bfa
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: smsmdtv
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [keymap]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [encrypt]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [filesystems]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] -> Running build hook: [keyboard]
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> Generating module dependencies
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
    [2013-08-31 18:35] [ALPM-SCRIPTLET] ==> Image generation successful
    [2013-08-31 18:35] [PACMAN] upgraded linux (3.10.5-1 -> 3.10.10-1)
    [2013-08-31 18:35] [PACMAN] upgraded linux-headers (3.10.5-1 -> 3.10.10-1)
    [2013-08-31 18:35] [PACMAN] upgraded logrotate (3.8.5-1 -> 3.8.6-1)
    [2013-08-31 18:35] [ALPM] warning: /etc/lvm/lvm.conf installed as /etc/lvm/lvm.conf.pacnew
    [2013-08-31 18:35] [PACMAN] upgraded lvm2 (2.02.98-4 -> 2.02.100-1)
    [2013-08-31 18:35] [PACMAN] upgraded maven (3.0.5-1 -> 3.1.0-1)
    [2013-08-31 18:35] [PACMAN] upgraded net-snmp (5.7.2-7 -> 5.7.2-8)
    [2013-08-31 18:36] [PACMAN] upgraded nodejs (0.10.15-1 -> 0.10.17-1)
    [2013-08-31 18:36] [PACMAN] upgraded obex-data-server (0.4.6-7 -> 0.4.6-8)
    [2013-08-31 18:36] [PACMAN] upgraded openresolv (3.5.5-1 -> 3.5.6-1)
    [2013-08-31 18:36] [ALPM] warning: /etc/pacman.d/mirrorlist installed as /etc/pacman.d/mirrorlist.pacnew
    [2013-08-31 18:36] [PACMAN] upgraded pacman-mirrorlist (20130626-1 -> 20130830-1)
    [2013-08-31 18:36] [PACMAN] upgraded pcmanfm (1.1.1-1 -> 1.1.2-1)
    [2013-08-31 18:36] [ALPM] warning: /etc/php/php.ini installed as /etc/php/php.ini.pacnew
    [2013-08-31 18:36] [PACMAN] upgraded php (5.4.17-1 -> 5.5.3-1)
    [2013-08-31 18:36] [PACMAN] upgraded php-pear (5.4.17-1 -> 5.5.3-1)
    [2013-08-31 18:36] [PACMAN] upgraded poppler-glib (0.24.0-1 -> 0.24.1-1)
    [2013-08-31 18:36] [PACMAN] installed python-setuptools (1.0-1)
    [2013-08-31 18:36] [PACMAN] upgraded python-pip (1.4-1 -> 1.4.1-2)
    [2013-08-31 18:36] [PACMAN] upgraded python2-markupsafe (0.18-1 -> 0.18-2)
    [2013-08-31 18:36] [PACMAN] upgraded python2-mako (0.8.1-1 -> 0.8.1-2)
    [2013-08-31 18:36] [PACMAN] upgraded python2-pip (1.4-1 -> 1.4.1-2)
    [2013-08-31 18:36] [PACMAN] upgraded python2-zope-interface (4.0.5-1 -> 4.0.5-2)
    [2013-08-31 18:36] [PACMAN] upgraded sqlite (3.7.17-1 -> 3.8.0.1-1)
    [2013-08-31 18:36] [PACMAN] upgraded qt4 (4.8.5-1 -> 4.8.5-2)
    [2013-08-31 18:36] [PACMAN] upgraded redshift (1.7-6 -> 1.7-7)
    [2013-08-31 18:36] [PACMAN] upgraded reiserfsprogs (3.6.23-1 -> 3.6.24-1)
    [2013-08-31 18:36] [PACMAN] upgraded run-parts (4.3.4-1 -> 4.4-1)
    [2013-08-31 18:36] [PACMAN] upgraded smbclient (4.0.8-1 -> 4.0.9-1)
    [2013-08-31 18:36] [PACMAN] upgraded samba (4.0.8-1 -> 4.0.9-1)
    [2013-08-31 18:36] [PACMAN] upgraded serf (1.2.1-1 -> 1.3.0-1)
    [2013-08-31 18:36] [PACMAN] upgraded smartmontools (6.1-3 -> 6.2-1)
    [2013-08-31 18:36] [PACMAN] upgraded subversion (1.8.1-1 -> 1.8.1-2)
    [2013-08-31 18:36] [PACMAN] upgraded vim-runtime (7.3.1287-1 -> 7.4.0-2)
    [2013-08-31 18:36] [PACMAN] upgraded vim (7.3.1287-1 -> 7.4.0-2)
    [2013-08-31 18:36] [PACMAN] upgraded wicd (1.7.2.4-7 -> 1.7.2.4-9)
    [2013-08-31 18:36] [PACMAN] upgraded wicd-gtk (1.7.2.4-7 -> 1.7.2.4-9)
    [2013-08-31 18:36] [ALPM-SCRIPTLET] >>> This driver now uses SNA as the default acceleration method. You can
    [2013-08-31 18:36] [ALPM-SCRIPTLET] still fall back to UXA if you run into trouble. To do so, save a file
    [2013-08-31 18:36] [ALPM-SCRIPTLET] with the following content as /etc/X11/xorg.conf.d/20-intel.conf :
    [2013-08-31 18:36] [ALPM-SCRIPTLET] Section "Device"
    [2013-08-31 18:36] [ALPM-SCRIPTLET] Identifier "Intel Graphics"
    [2013-08-31 18:36] [ALPM-SCRIPTLET] Driver "intel"
    [2013-08-31 18:36] [ALPM-SCRIPTLET] Option "AccelMethod" "uxa"
    [2013-08-31 18:36] [ALPM-SCRIPTLET] EndSection
    [2013-08-31 18:36] [PACMAN] upgraded xf86-video-intel (2.21.14-1 -> 2.21.15-1)
    [2013-08-31 18:36] [PACMAN] upgraded xorg-xset (1.2.2-2 -> 1.2.3-1)
    I've just tried rebuilding the initramfs. It goes through without errors, but still won't accept my password on boot.

  • Linux-ck-ivybridge: key "88A032865EE46C4C" could not be looked up

    Hi Guys,
    Time for my weekly pacman update, and now I'm seeing this issue:
    :: Retrieving packages ...
    autojump-22.2.2-1-any 27.6 KiB 790K/s 00:00 [################################] 100%
    nodejs-0.10.34-1-x86_64 3.9 MiB 7.50M/s 00:01 [################################] 100%
    linux-ck-ivybridge-3.18.1-1-x... 54.3 MiB 10.9M/s 00:05 [################################] 100%
    linux-ck-ivybridge-headers-3.... 6.1 MiB 11.1M/s 00:01 [################################] 100%
    virtualbox-ck-host-modules-iv... 166.9 KiB 11.6M/s 00:00 [################################] 100%
    (46/46) checking keys in keyring [################################] 100%
    downloading required keys...
    error: key "88A032865EE46C4C" could not be looked up remotely
    error: required key missing from keyring
    error: failed to commit transaction (unexpected error)
    Errors occurred, no packages were upgraded.
    [root@Vaio-Saad ~]# pacman-key --lsign-key 5EE46C4C
    -> Locally signing key 5EE46C4C...
    ==> ERROR: 5EE46C4C could not be locally signed.
    Trying to sign/download the 5EE46C4C key fails too. Any ideas?
    Thanks

    5EE46C4C is graysky's key.
    https://wiki.archlinux.org/index.php/Un … es#repo-ck
    Did you read https://www.archlinux.org/news/gnupg-21 … n-keyring/ ?
    Try https://wiki.archlinux.org/index.php/Pa … mport_keys
    Last edited by karol (2014-12-18 08:28:45)

  • Export from remote machine(directory storing in local machine)

    Hi all,
    I have 10g(10.2.0.2) installed on my local linux machine and want to export a schema from a remote server(10.2.0.1).The schema is about 10GB,and there is not enough space in remote server to store the directory.if i use data pump ,ie expdp,can i store the directory in my local machine.if yes,how can i export and import using data pump.
    Thanks in Advance

    Yes, it's one of its key features. The location for an export data pump has to be a directory object which is created in the database and which points to something the database server itself can see. So that doesn't[i] necessarily mean the output file ends up 'where the database resides' -because if the database server has an NFS mount mapped, for example, it is possible for the directory object to reference it, and output sent to that directory object will therefore end up on the network share.
    But yes, data pump security is much enhanced over old-fashioned export, by design (it stops third parties exporting your valuable data to their local USB key and walking out of your front door with it!).
    You might find this article of use:
    http://www.dizwell.com/prod/node/36

  • Hostname is .local and Kerberos problems

    Hi
    Having problems with our new xserve. The computername as set in server admin is 'serverx' which is giving a local hostname of serverx.local. I have DNS running with one zone of <domainname>.org.uk, servername of serverx giving a FQSN or serverx.<domainname>.org.uk
    However i had an email out from the mailman mailing list asking for permission to allow a post to a mailing list and it had the link to click on as http://Serverx.local/mailman/.....
    Obviously i'd like this to be http://serverx.<domainname>.org.uk
    This also extends to the server's searchbase, which on the old server we migrated from was dc=<hostname>,dc=org,dc=uk which now is showing as dc=serverx,dc=local under opendirectory - settings - protocals
    The Open directory pane shows everything running apart from Kerberos which is stopped. If i try and kerberize the server using the realm name of <DOMAINNAME>.ORG.UK it whirrs away before returning me to the 'kerberize the open directory master' dialogue. Looking at the slapconfig log i get the errors...
    The KDC is not running error = 3
    failed to configure error = 3
    Is there a way to change this so that the domain name and seachbase are correct and how do i get the KDC to run so i can kerberize the server.
    Hope some of that makes sense...
    Thanks
    Quad 2GHz Intel Xserve   Mac OS X (10.4.9)   2GB ram

    I had similar issues with .local and trying to migrate away. I decided to manually massage a backup into the non-.local domain. It worked for me, but I will stress that you should make a copy of your backup to do this on.
    First, decide what new domain you want to use. If you're building on a private network, you can use a non-valid domain, like '.int' . Setup your DNS.
    Use Server Admin to make a backup of your OD Domain. Make a copy. Burn it to CD. We don't want the original to change.
    Kerberize to the new domain. Make a new backup and burn it to CD as well.
    Open a modifiable copy of the backup. In it are many files, most of them are straight text files of one flavor or another. Time to get dirty...
    Backup.ldif is the big file to work with. You must go in and change all of the olddomain.locals to newdomain.tla (this is pseudocode, please use your own domains where you see these two.) You must also change all of the dc=olddomain,dc=local to dc=newdomain,dc=tla . The fun about this file is that Apple wraps it manually, which makes search and replace tedious, as there will be some of these things at the end of lines. The good news is that they are far from random, so you can search for parts of the name (local is a good search) and find the next iteration. Here are a couple examples...
    ...dc=ol
    ddomain,dc=local
    ...dc
    =olddomain,dc=local
    ...dc=olddoma
    in,dc=local
    The key is to search and replace the whole thing at once. I used textedit and pasted the entire offending text into the find box, then replaced with the proper new dc= values. You need not worry about wrapping, the importer doesn't care. The key is to make sure that you get it all.
    Now do the same with all of the other files. I didn't touch authservermain, which already had the new Kerberos domain in it. I did modify these files...
    Backup.ldif
    authserverreplicas
    authserveroverflow.x
    DSLDAPv3PluginConfig.plist
    slapd_macosxserver.conf
    local.dump
    local.krb5realm
    Make sure to check the other files, as different configurations will yield info in different files.
    Once you are done with this, it's time to turn your nice pretty domain into a standalone. It appears that the archive and restore tools are much better in 10.4.x that older versions, so it actually works to restore things. There was one caveat. My standalone seemed to ignore the /etc/krb5adm.keytab, which then caused the conversion to Master domain to hang. Move to krb5adm.keytab.old it in case you need to restore.
    Make your server a Master again, this time with the new FQDN and search string.
    Import your modified backup. Your users should now be in place, although I lost my domain admins in the process.
    Finally, backup your domain, revert to standalone, toss the .keytab, convert to Master, and restore. This last step converts the bdb back into text, then back to the bdb. I was having a little strangeness until I did this step, which I believe clears up some cruft.
    Here are the benefits that I've seen in this process...
    - Passwords translate
    - migration is complete to new domain
    - easily restorable and/or recoverable
    Of course, your mileage may vary.

  • Custom field - Local Net Value Billing

    Hello,
    Could you please help me to understand how calculate correctly, in a query, the net value of billing in the system currency?
    I've created the custom field Local-Net Value = VBRP-NETWR * VBRK-KURRF.
    But, when i executed the query i had the following situations:
    - The correct value when the exchange rate is from EUR to another currency.
    - The value incorrectly when the exchange rate is from another currency to EUR, (the exchange rate, VBRK-KURRF, is expressed as a dividend).
    Thank you in advance.
    Best regards.
    Antonio

    Hi Antonio ,
    DATA: V_LA  type vbrk-netwr,
          V_FA type vbrk-netwr,
          rate type vbrk-kurrf.
    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
      EXPORTING
      CLIENT                         = SY-MANDT
        date                         = SY-DATUM
        foreign_amount               = V_FA              " Foreign Amount
        foreign_currency             = 'USD'             " Foreign Currency Key
        local_currency               = 'EUR'             " Local Currency Key
        RATE                         = Rate              " Exchange Rate
    IMPORTING
       LOCAL_AMOUNT                  = V_LA              " Local Amount
    IF sy-subrc = 0.
    *Map this V_LA  value to your final field .
    ENDIF.
    Regards,
    Maruthi
    Edited by: maruthi kona on Oct 25, 2011 10:27 PM
    Edited by: maruthi kona on Oct 25, 2011 10:28 PM

  • [SOLVED] Can't sign key with pacman-key

    I've been reading and digging all over the place but I can't seem to find anything on this.
    1. I have created my own keys for signing packages that I want to put in a local repo so I don't have to compile the same package over and over on all my machines.
    2. I have imported said key using sudo pacman-key --add rdjack21.pgp
    3. Used sudo pacman-key --lsign rdjack21 I get this output:
      -> Locally signing key rdjack21...
    ==> ERROR: rdjack21 could not be locally signed.
    4. Ok so lets sudo pacman-key --edit rdjack21  output:
    gpg> sign
    pub  rsa2048/3D1B5544
         created: 2014-11-30  expires: never       usage: SC 
         trust: ultimate      validity: ultimate
    Primary key fingerprint: B0D7 C728 31FA B2B0 6A3C  7086 DC7F DE0C 3D1B 5544
         Richard Jackson <[email protected]>
    Are you sure that you want to sign this key with your
    key "Pacman Keyring Master Key <pacman@localhost>" (645ECB0E)
    Really sign? (y/N) y
    gpg: signing failed: No pinentry
    gpg: signing failed: No pinentry
    gpg>
    5. To hack this and make pacman work with my local repo signed by the rdjack21 key I had to change the trust to ultimate but I do not like that solution. I would prefer to sign the key and move the trust back down to full which is where it should be.
    This is happening on all of my boxes not just one of them. I did find something on the web about "No pinentry" message above and the sugestion was to change the owner of the tty I'm using to be root for the signing to work but that did not work for me (su'ed to root first instead of running everything with sudo).
    While changeing the trust works that just feels wrong to me. I really should beable to sign the key.
    Last edited by rdjack21 (2014-12-01 01:50:05)

    Taking a clue post gnupg 2.1.0-4 upgrade breaks passphrase via STDIN I was able to solve the problem and I can now sign keys.
    The solution is add "pinentry-mode loopback" to /etc/pacman.d/gnupg/gpg.conf
    And create the file /etc/pacman.d/gnupg/gpg-agent.conf and put "allow-loopback-pinentry" in the file.
    Once that is done everythings works as expected!
    Marking this as solved.

  • [SOLVED] Pacman won't look up gpg keys

    Ever since I upgraded gnupg/gpgme today, pacman won't look up (or rather fail looking up) any missing GPG keys. Relevant part of pacman's output:
    debug: checking signature for /var/cache/pacman/pkg/privoxy-3.0.19-2-i686.pkg.tar.xz
    debug: 1 signatures returned
    debug: fingerprint: C06086337C50773E
    debug: summary: key missing
    debug: status: No public key
    debug: timestamp: 1328647189
    debug: exp_timestamp: 0
    debug: validity: unknown; reason: Success
    debug: key lookup failed, unknown key
    debug: signature is not valid
    debug: looking up key C06086337C50773E locally
    debug: key lookup failed, unknown key
    error: privoxy: key "C06086337C50773E" is unknown
    debug: looking up key C06086337C50773E remotely
    debug: key lookup failed, unknown key
    debug: looking up key 7C50773E remotely
    debug: key lookup failed, unknown key
    debug: gpg error: End of file
    error: key "C06086337C50773E" could not be looked up remotely
    error: failed to commit transaction (invalid or corrupted package (PGP signature))
    Errors occurred, no packages were upgraded.
    Failing to import the key directly through pacman, I tried
    pacman-key --recv-key C06086337C50773E
    which successfully added the key to my keyring.
    I could then install the package. I also tried switching to different keyserves, but without success.
    Everything pacman{, -key} related worked fine until the update, but I can't say for certain that it was the gnupg/gpgme update that broke something.
    Does anyone else have this issue or is there something wrong with my setup? I already thought of opening a bug report, but I want to make sure it's not my fault.
    btw: Hi, everyone :)
    Last edited by vehk (2012-03-28 07:54:28)

    This wasn't explicitly stated above, but to do the manual import with pacman-key, I had to prefix the fingerprint with 0x, as so:
    $ sudo pacman-key -r 0x5C2E46A0F53A76ED
    However, the default keyserver is giving me problems currently:
    $ sudo pacman-key -r 0x5C2E46A0F53A76ED
    Password:
    gpg: requesting key F53A76ED from hkp server keys.gnupg.net
    gpgkeys: HTTP fetch error 7: couldn't connect: End of file
    gpg: no valid OpenPGP data found.
    gpg: Total number processed: 0
    ==> ERROR: Remote key not fetched correctly from keyserver.
    So in the end, I used a different keyserver:
    sudo pacman-key -r 0x5C2E46A0F53A76ED --keyserver hkp://subkeys.pgp.net
    Hope that helps anyone else.

  • Cannot find a registry key to disable Annotations

    Hi,
    I am looking to disable Whiteboard for some of our users using registry key.
    I cannot seem to find the local registry key on the PC to disable Whiteboard. I prefer not to use the client policy 'AllowAnnotations'
    Thanks in advance.

    As far as I know this is in-band only and you need to use Set-CsConferencingPolicy. I don't believe there is a registry key for it. Here's a list of keys available for the client, but there isn't one for disabling/enabling annotations: http://lyncdup.com/2012/11/what-lync-2013-client-setting-are-held-in-the-registry/ 
    If this helped you please click "Vote As Helpful" if it answered your question please click "Mark As Answer" | Blog
    www.lynced.com.au | Twitter
    @imlynced

  • Running a task locally or invoking it once

    Hi,
    I want to run a quartz job on the entries of my cache deleting them if they apply to some constraint. I guess I can do that in 2 ways:
    1. run the quartz job on only 1 node which will call cache.invokeAll(filter, myProcessor). This node will send the entryProcessor to the other nodes that contain the relevant data.
    Question: How can I make sure a quartz job is run on only one node as all nodes are running the same code and use the same configuration? I don't want to specify the same quartz job an all nodes because then the job would be invoked once for each node. Do I need to define some sort of election policy for that? Or are there better ways to handle a similar situation where only one node of a cluster needs to trigger some action?
    2. run the quartz job on all nodes of the cluster. Each job will call cache.invokeAll(new KeyAssociatedFilter(filter), myProcessor) on every node. This will make sure the entryProcessor will only be executed on the own node's data. Will this work?
    Best regards
    Jan

    Jan,
    could you please describe your eviction criteria? If you want to remove the entries, then removing it by cache.removeAll() is the fastest approach, and for local only keys it automatically knows not to send to remote nodes, so you don't need the partition filter there.
    On the other hand, as you described your eviction criteria in an earlier post to require decision on the content of the entire cache, in which case the prefiltering should not have a partitioned filter.
    If your eviction criteria is the following: evict the number of keys from each category as the number of the surplus entries in the category, then PartitionFilter is not something you would want to use.
    Instead, you can first do an aggregation on the count of keys in each category to find out the number of keys to be removed. This can easily be done by a GroupAggregator and a Count:
    categorySizesByDiscriminator = cache.aggregate(GroupAggregator.createInstance("getCategoryDiscriminator", new Count()));where getCategoryDiscriminator is the name of the method (parentheses intentionally missing) which returns a different value for each category (was it getColor? ).
    After this you know how many entries the surplus is.
    You can now send a custom parallel aggregation which returns as many keys as the surplus from the category is from each node and throws away the unnecessary from the result (this is necessary because of the arbitrary distribution of the entries), something like this:
    import java.io.DataInput;
    import java.io.DataOutput;
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.Collections;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.LinkedList;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import com.tangosol.io.ExternalizableLite;
    import com.tangosol.io.pof.PofReader;
    import com.tangosol.io.pof.PofWriter;
    import com.tangosol.io.pof.PortableObject;
    import com.tangosol.util.ExternalizableHelper;
    import com.tangosol.util.InvocableMap;
    import com.tangosol.util.InvocableMap.EntryAggregator;
    import com.tangosol.util.InvocableMap.ParallelAwareAggregator;
    import com.tangosol.util.extractor.ReflectionExtractor;
    public class ByCategoryToBeEvictedKeyHarvester implements
              ParallelAwareAggregator, PortableObject, ExternalizableLite {
         public static class PerNodeResultElement implements PortableObject, ExternalizableLite {
              private String categoryDiscriminator;
              private int currentCountPerCategory;
              private List<Object> keys;
              private transient int toBeEvictedFromCategory;
              public PerNodeResultElement() {
                   super();
              private PerNodeResultElement(String categoryDiscriminator, int toBeEvictedFromCategory) {
                   super();
                   this.categoryDiscriminator = categoryDiscriminator;
                   this.currentCountPerCategory = 0;
                   this.keys = new ArrayList<Object>(toBeEvictedFromCategory);
                   this.toBeEvictedFromCategory = toBeEvictedFromCategory;
              private void addEntry(InvocableMap.Entry entry) {
                   if (toBeEvictedFromCategory < keys.size()) {
                        keys.add(entry.getKey());
                   ++currentCountPerCategory;
              @Override
              public void readExternal(PofReader reader) throws IOException {
                   categoryDiscriminator = reader.readString(0);
                   currentCountPerCategory = reader.readInt(1);
                   keys = (List<Object>) reader.readCollection(2, new ArrayList<Object>());
              @Override
              public void writeExternal(PofWriter writer) throws IOException {
                   writer.writeString(0, categoryDiscriminator);
                   writer.writeInt(1, currentCountPerCategory);
                   writer.writeCollection(2, keys);
              @Override
              public void readExternal(DataInput input) throws IOException {
                   categoryDiscriminator = ExternalizableHelper.readSafeUTF(input);
                   currentCountPerCategory = ExternalizableHelper.readInt(input);
                   int numKeys = ExternalizableHelper.readInt(input);
                   keys = numKeys > 0 ? new ArrayList<Object>(numKeys) : Collections.EMPTY_LIST;
                   while (numKeys > 0) {
                        keys.add(ExternalizableHelper.readObject(input));
                        --numKeys;
              @Override
              public void writeExternal(DataOutput output) throws IOException {
                   ExternalizableHelper.writeSafeUTF(output, categoryDiscriminator);
                   ExternalizableHelper.writeInt(output, currentCountPerCategory);
                   ExternalizableHelper.writeInt(output, keys.size());
                   for (Object key : keys) {
                        ExternalizableHelper.writeObject(output, key);
         private Map<String,Integer> toEvictByCategories;
         private String categoryDiscriminatorGetMethodName;
         private transient int toEvictAbove;
         public ByCategoryToBeEvictedKeyHarvester(
                   String categoryDiscriminatorGetMethodName, Map<String, Integer> toEvictByCategories, int toEvictAbove) {
              super();
              this.toEvictByCategories = toEvictByCategories;
              this.categoryDiscriminatorGetMethodName = categoryDiscriminatorGetMethodName;
              this.toEvictAbove = toEvictAbove;
         private static class PerCategoryCounter {
              private int elementsPerCategory = 0;
              private LinkedList<Collection<Object>> keys = new LinkedList<Collection<Object>>();
              void addPerNodeResultElement(PerNodeResultElement element) {
                   elementsPerCategory += element.currentCountPerCategory;
                   keys.add(element.keys);
         @Override
         public Object aggregateResults(Collection results) {
              Map<String, PerCategoryCounter> temp = new HashMap<String, PerCategoryCounter>();
              int numKeysToRemove = 0;
              for (Object result : results) {
                   Collection<PerNodeResultElement> perNodeResults = (Collection<PerNodeResultElement>) result;
                   for (PerNodeResultElement perNodeResultElement : perNodeResults) {
                        String categoryDiscriminator = perNodeResultElement.categoryDiscriminator;
                        PerCategoryCounter counter = temp.get(categoryDiscriminator);
                        if (counter == null) {
                             counter = new PerCategoryCounter();
                             temp.put(categoryDiscriminator, counter);
                        int oldCount = counter.elementsPerCategory;
                        counter.addPerNodeResultElement(perNodeResultElement);
                        int newCount = counter.elementsPerCategory;
                        if (newCount > toEvictAbove) {
                             numKeysToRemove += newCount - (oldCount < toEvictAbove ? toEvictAbove : oldCount);
              // we now have a current view of how many elements there are (sort of)
              // and hopefully enough keys to evict (if there were not really too many entries added since then)
              ArrayList keysToRemove = new ArrayList(numKeysToRemove);
              for (PerCategoryCounter perCategoryCounter : temp.values()) {
                   int elementsPerCategory = perCategoryCounter.elementsPerCategory;
                   Iterator<Collection<Object>> iter = perCategoryCounter.keys.iterator();
                   while (elementsPerCategory > toEvictAbove && iter.hasNext()) {
                        Collection<Object> keys = iter.next();
                        Iterator<Object> keyIter = keys.iterator();
                        while (elementsPerCategory > toEvictAbove && keyIter.hasNext()) {
                             keysToRemove.add(keyIter.next());
                             --elementsPerCategory;
              return keysToRemove;
         @Override
         public EntryAggregator getParallelAggregator() {
              return this;
         @Override
         public Object aggregate(Set entries) {
              final ReflectionExtractor extractor = new ReflectionExtractor(categoryDiscriminatorGetMethodName);
              Map<String,PerNodeResultElement> temp = new HashMap<String, PerNodeResultElement>();
              for (Object object : entries) {
                   InvocableMap.Entry entry = (InvocableMap.Entry) object;
                   String categoryDiscriminator = (String) entry.extract(extractor);
                   Integer toBeEvictedFromCategory = toEvictByCategories.get(categoryDiscriminator);
                   if (toBeEvictedFromCategory != null && toBeEvictedFromCategory > 0) {
                        PerNodeResultElement element = temp.get(categoryDiscriminator);
                        if (element == null) {
                             element = new PerNodeResultElement(categoryDiscriminator, toBeEvictedFromCategory);
                             temp.put(categoryDiscriminator, element);
                        element.addEntry(entry);
              return temp.values();
         @SuppressWarnings("unchecked")
         public void readExternal(PofReader reader) throws IOException {
              categoryDiscriminatorGetMethodName = reader.readString(0);
              toEvictByCategories = (Map<String, Integer>) reader.readMap(1, new HashMap<String, Integer>());
         @Override
         public void writeExternal(PofWriter writer) throws IOException {
              writer.writeString(0, categoryDiscriminatorGetMethodName);
              writer.writeMap(1, toEvictByCategories, String.class, Integer.class);
         @Override
         public void readExternal(DataInput input) throws IOException {
              categoryDiscriminatorGetMethodName = ExternalizableHelper.readSafeUTF(input);
              int numEntries = ExternalizableHelper.readInt(input);
              toEvictByCategories = new HashMap<String, Integer>();
              while (numEntries > 0) {
                   String key = ExternalizableHelper.readSafeUTF(input);
                   Integer value = ExternalizableHelper.readInt(input);
                   toEvictByCategories.put(key, value);
                   --numEntries;
         @Override
         public void writeExternal(DataOutput output) throws IOException {
              ExternalizableHelper.writeSafeUTF(output, categoryDiscriminatorGetMethodName);
              ExternalizableHelper.writeInt(output, toEvictByCategories.size());
              for (Map.Entry<String, Integer> entry : toEvictByCategories.entrySet()) {
                   ExternalizableHelper.writeSafeUTF(output, entry.getKey());
                   ExternalizableHelper.writeInt(output, entry.getValue());
    }You can send this aggregator and remove the entries afterwards with:
    String categoryDiscriminatorGetMethodName = "getColor"; // do I remember well?
    // this is the map which you populate based on the result of the first aggregation,
    // keys should be colors,
    // values should be the number of entries in the category in the entire cache minus the eviction limit (the number of entries you want to evict from the category)
    Map<String,Integer> toEvictByCategories = ...;
    Collection<Object> keysToRemove = cache.aggregate(AlwaysFilter.INSTANCE, new ByCategoryToBeEvictedKeyHarvester(categoryDiscriminatorGetMethodName, toEvictByCategories, toEvictAbove));
    cache.removeAll(keysToRemove);Best regards,
    Robert

  • Usr/bin/pacman-key: line 615: printf: write error: Broken pipe

    I've got some instances of same error from pacman which I think is abnormal when I tried to upgrade pacman-keyring via "pacman -Syu".
    usr/bin/pacman-key: line 615: printf: write error: Broken pipe
    What action should I take for the errors to maintain my system?
    Searching the web and this forum won't answer my question...
    The quotation of pacman.log of the upgrade sesson which evoked pacman-keyring upgrading is below:
    [2013-04-20 22:04] [PACMAN] Running 'pacman -Syu'
    [2013-04-20 22:04] [PACMAN] synchronizing package lists
    [2013-04-20 22:04] [PACMAN] starting full system upgrade
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Appending keys from archlinux.gpg...
    [2013-04-20 22:05] [ALPM-SCRIPTLET] gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
    [2013-04-20 22:05] [ALPM-SCRIPTLET] gpg: depth: 0 valid: 1 signed: 5 trust: 0-, 0q, 0n, 0m, 0f, 1u
    [2013-04-20 22:05] [ALPM-SCRIPTLET] gpg: depth: 1 valid: 5 signed: 64 trust: 0-, 0q, 0n, 5m, 0f, 0u
    [2013-04-20 22:05] [ALPM-SCRIPTLET] gpg: depth: 2 valid: 64 signed: 1 trust: 64-, 0q, 0n, 0m, 0f, 0u
    [2013-04-20 22:05] [ALPM-SCRIPTLET] gpg: next trustdb check due at 2014-01-22
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Locally signing trusted keys in keyring...
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2...
    [2013-04-20 22:05] [ALPM-SCRIPTLET] usr/bin/pacman-key: line 615: printf: write error: Broken pipe
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8...
    [2013-04-20 22:05] [ALPM-SCRIPTLET] usr/bin/pacman-key: line 615: printf: write error: Broken pipe
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Locally signing key 44D4A033AC140143927397D47EFD567D4C7EA887...
    [2013-04-20 22:05] [ALPM-SCRIPTLET] usr/bin/pacman-key: line 615: printf: write error: Broken pipe
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Locally signing key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0...
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7...
    [2013-04-20 22:05] [ALPM-SCRIPTLET] usr/bin/pacman-key: line 615: printf: write error: Broken pipe
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Importing owner trust values...
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Updating trust database...
    [2013-04-20 22:05] [ALPM-SCRIPTLET] gpg: next trustdb check due at 2014-01-22
    [2013-04-20 22:05] [PACMAN] upgraded archlinux-keyring (20130224-1 -> 20130406-1)
    [2013-04-20 22:05] [PACMAN] upgraded bash-completion (2.0-3 -> 2.1-1)
    [2013-04-20 22:05] [ALPM-SCRIPTLET] Generating locales...
    [2013-04-20 22:05] [ALPM-SCRIPTLET] en_US.UTF-8... done
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ja_JP.UTF-8... done
    [2013-04-20 22:05] [ALPM-SCRIPTLET] Generation complete.
    [2013-04-20 22:05] [PACMAN] upgraded glibc (2.17-4 -> 2.17-5)
    [2013-04-20 22:05] [PACMAN] upgraded binutils (2.23.2-1 -> 2.23.2-2)
    [2013-04-20 22:05] [PACMAN] upgraded m4 (1.4.16-2 -> 1.4.16-3)
    [2013-04-20 22:05] [PACMAN] upgraded bison (2.7-1 -> 2.7.1-1)
    [2013-04-20 22:05] [PACMAN] upgraded curl (7.29.0-2 -> 7.30.0-1)
    [2013-04-20 22:05] [PACMAN] upgraded expat (2.1.0-1 -> 2.1.0-2)
    [2013-04-20 22:05] [PACMAN] upgraded freeglut (2.8.0-2 -> 2.8.1-1)
    [2013-04-20 22:05] [PACMAN] upgraded gcc-libs (4.8.0-1 -> 4.8.0-2)
    [2013-04-20 22:05] [PACMAN] upgraded gcc (4.8.0-1 -> 4.8.0-2)
    [2013-04-20 22:05] [PACMAN] upgraded gpm (1.20.7-1 -> 1.20.7-2)
    [2013-04-20 22:05] [PACMAN] upgraded harfbuzz (0.9.14-1 -> 0.9.16-1)
    [2013-04-20 22:05] [PACMAN] upgraded isl (0.11.1-1 -> 0.11.2-1)
    [2013-04-20 22:05] [PACMAN] upgraded kmod (12-1 -> 13-1)
    [2013-04-20 22:05] [PACMAN] upgraded libldap (2.4.34-1 -> 2.4.35-1)
    [2013-04-20 22:05] [PACMAN] upgraded krb5 (1.11.1-1 -> 1.11.2-1)
    [2013-04-20 22:05] [PACMAN] upgraded lib32-glibc (2.17-4 -> 2.17-5)
    [2013-04-20 22:05] [PACMAN] upgraded lib32-gcc-libs (4.8.0-1 -> 4.8.0-2)
    [2013-04-20 22:05] [PACMAN] upgraded libcap (2.22-3 -> 2.22-4)
    [2013-04-20 22:05] [PACMAN] upgraded libpng (1.5.14-1 -> 1.5.15-1)
    [2013-04-20 22:05] [PACMAN] upgraded libtasn1 (3.2-1 -> 3.3-1)
    [2013-04-20 22:05] [ALPM-SCRIPTLET] >>> Updating module dependencies. Please wait ...
    [2013-04-20 22:05] [ALPM-SCRIPTLET] >>> Generating initial ramdisk, using mkinitcpio. Please wait...
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Building image from preset: 'default'
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Starting build: 3.8.7-1-ARCH
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [base]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [udev]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [autodetect]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [block]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [filesystems]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [keymap]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [keyboard]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [fsck]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Generating module dependencies
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Creating cat initcpio image: /boot/initramfs-linux.img
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Image generation successful
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Building image from preset: 'fallback'
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Starting build: 3.8.7-1-ARCH
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [base]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [udev]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [block]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [filesystems]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [keymap]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [keyboard]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] -> Running build hook: [fsck]
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Generating module dependencies
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Creating cat initcpio image: /boot/initramfs-linux-fallback.img
    [2013-04-20 22:05] [ALPM-SCRIPTLET] ==> Image generation successful
    [2013-04-20 22:05] [PACMAN] upgraded linux (3.8.5-1 -> 3.8.7-1)
    [2013-04-20 22:05] [PACMAN] upgraded orc (0.4.16-1 -> 0.4.17-1)
    [2013-04-20 22:05] [PACMAN] upgraded perl (5.16.3-1 -> 5.16.3-2)
    [2013-04-20 22:05] [PACMAN] upgraded psmisc (22.19-1 -> 22.20-1)
    [2013-04-20 22:05] [PACMAN] upgraded sqlite (3.7.16.1-1 -> 3.7.16.2-1)
    [2013-04-20 22:05] [PACMAN] upgraded sudo (1.8.6.p7-2 -> 1.8.6.p8-1)
    [2013-04-20 22:05] [PACMAN] upgraded systemd (198-2 -> 201-2)
    [2013-04-20 22:05] [PACMAN] upgraded systemd-sysvcompat (198-2 -> 201-2)
    [2013-04-20 22:05] [PACMAN] upgraded tar (1.26-2 -> 1.26-3)
    [2013-04-20 22:05] [PACMAN] upgraded wayland (1.0.6-1 -> 1.1.0-1)
    Thanks in advance!

    I just encountered the same issue with the latest update. I never had something similar to this:
    :: Retrieving packages ...
    archlinux-keyring-20130525-2-any 367,2 KiB 1023K/s 00:00 [################################################################] 100%
    linux-3.9.5-1-x86_64 45,5 MiB 1015K/s 00:46 [################################################################] 100%
    linux-headers-3.9.5-1-x86_64 5,6 MiB 1117K/s 00:05 [################################################################] 100%
    gnome-bluetooth-3.8.1-2-x86_64 835,0 KiB 955K/s 00:01 [################################################################] 100%
    gnome-documents-3.8.3-1-x86_64 305,0 KiB 1034K/s 00:00 [################################################################] 100%
    vlc-2.0.7-2-x86_64 7,6 MiB 1162K/s 00:07 [################################################################] 100%
    (6/6) checking keys in keyring [################################################################] 100%
    (6/6) checking package integrity [################################################################] 100%
    (6/6) loading package files [################################################################] 100%
    (6/6) checking for file conflicts [################################################################] 100%
    (6/6) checking available disk space [################################################################] 100%
    (1/6) upgrading archlinux-keyring [################################################################] 100%
    ==> Appending keys from archlinux.gpg...
    ==> Locally signing trusted keys in keyring...
    -> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2...
    usr/bin/pacman-key: line 615: printf: write error: Broken pipe
    -> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8...
    -> Locally signing key 44D4A033AC140143927397D47EFD567D4C7EA887...
    -> Locally signing key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0...
    -> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7...
    ==> Importing owner trust values...

Maybe you are looking for

  • ITunes upgrade installation cancelled - Can't uninstall or complete install

    Hi All I have tried upgrading to iTunes 9.0.3 today and it took forever to install. During the installation process I stopped the install which also took a long time to stop. I CtrlAltDeleted and stopped this task. The problem is, I can no longer acc

  • Upgrade ASAP roadmap content in Solution Manager

    Hello, Does anyone of you know how to upgrade the ASAP roadmap content in solution manager? Current we have solution manager 4.0, SP12. The version of the ASAP roadmap content is V3.6 (Dec. 2006). We currently found from the service marketplace the l

  • ABAP calculating in Include MV45AFZZ

    Hej. I am experiencing strange things with this bit of code.  This code is taking place in FORM userexit_save_document_prepare in include MV45AFZZ. And the result of the calculation is wrong, when I take the code and try it out in a new program, then

  • Catching System.exit() or How to avoid System.exit() - Third Party Tool ???

    Hi All, I am using a third party tool which is internally calling System.exit sometimes and my application got terminated most of the times. It is happening always when i call a particular method of that third party tool. Is there any way to catch or

  • Cant save a copy

    hi i get an error when trying to save a copy it tells me data cant be saved and to print a copy, i am told i need version 11 but it says no updates available.