Warning: cannot resolve "linux =3.5", a dependency of "virtualbox-modu

sudo pacman -S virtualbox-modules
resolving dependencies...
warning: cannot resolve "linux>=3.5", a dependency of "virtualbox-modules"
:: The following package cannot be upgraded due to unresolvable dependencies:
      virtualbox-modules
Do you want to skip the above package for this upgrade? [y/N] y
looking for inter-conflicts...
there is nothing to do
This is propably the problem while I have also problems with installation glibc....
How to solve it?

Seems like you have community-testing (repo containing (newer) virtualbox-modules) enabled but not testing (containing (newer) linux), which strikes me as odd. Edit: or you need to refresh databases first...
Last edited by Raynman (2012-08-04 22:58:56)

Similar Messages

  • Warning: cannot resolve "binutils =2.25", a dependency [Solved]

    I am not able to upgrade my laptop now.
    d@DArchLinux ~]$ sudo pacman -Syu
    :: Synchronizing package databases...
    core is up to date
    extra is up to date
    community is up to date
    multilib-testing is up to date
    multilib is up to date
    archlinuxfr is up to date
    :: Starting full system upgrade...
    resolving dependencies...
    warning: cannot resolve "binutils>=2.25", a dependency of "gcc-multilib"
    :: The following package cannot be upgraded due to unresolvable dependencies:
    gcc-multilib
    :: Do you want to skip the above package for this upgrade? [y/N] N
    error: failed to prepare transaction (unexpected error)
    [d@DArchLinux ~]$
    Last edited by Debasish Patra (2014-12-29 07:57:33)

    karol wrote:Since you're using multilib-testing repo, you have to enable testing repo too.
    My bad, I thought I was using the testing repo Thanks
    Last edited by Debasish Patra (2014-12-27 18:01:18)

  • [fixed] cannot resolve "linux 3.5", a dependency of ...

    Just received this error, it seems the '< should have been '<='?
    This results in a system which I cannot update, even ignoring open-vm-tools-modules makes pacman stop with an error.
    Ah, I now know what is wrong, the community repo was updated seconds after the core repo, resulting in multiple errors, first the old `open-vm-tools-modules` not being compatible with the new `linux`  package, so I ignored `open-vm-tools-modules`, and ran -Syu again (where the `community` repo was updated), resulting in the same problem, which was actually already fixed
    Running Syu without any ignores gives me new `linux` and new `open-vm-tools-modules` package, which work fine together
    Last edited by Spider.007 (2012-08-28 08:49:03)

    Seems like you have community-testing (repo containing (newer) virtualbox-modules) enabled but not testing (containing (newer) linux), which strikes me as odd. Edit: or you need to refresh databases first...
    Last edited by Raynman (2012-08-04 22:58:56)

  • KDE - warning: cannot resolve "system-config-printer =1.1.7-3"

    I'm trying to install KDE, fresh install, and this is what I get after: pacman -S kde
    resolving dependencies...
    warning: provider package was selected (freeglut provides glut)
    warning: cannot resolve "system-config-printer>=1.1.7-3", a dependency of "kdeadmin-system-config-printer-kde"
    warning: cannot resolve "system-config-printer>=1.1.7-3", a dependency of "kdeutils-printer-applet"
    :: the following package(s) cannot be upgraded due to unresolvable dependencies:
    kdeadmin-system-config-printer-kde kdeutils-printer-applet
    Do you want to skip the above packages(s) for this upgrade? [Y,n]
    I try different mirror and again same warning, is it safe to skip this package?
    Last edited by archiebald (2009-09-06 10:27:35)

    flamelab wrote:
    It's been fixed.Wait for your miror to sync.
    I use these:
    Server = http://mir.archlinux.fr/$repo/os/x86_64
    Server = ftp://mir2.archlinuxfr.org/archlinux/$repo/os/x86_64
    Server = ftp://ftp.ntua.gr/pub/linux/archlinux/$repo/os/x86_64
    Server = ftp://ftp.otenet.gr/pub/linux/archlinux/$repo/os/x86_64
    Server = http://www.mirrorservice.org/sites/ftp.archlinux.org/$repo/os/x86_64
    Server = http://archlinux.freeside.ru/$repo/os/x86_64
    I also use some of this mirrors (mir...)
    Thank you for information, I thought that it's something like that.

  • [SOLVED] cannot resolve dependency

    Whenever I try to install gnome I am getting error message - "Cannot resolve dependency " for some files. for example whenever I am trying to install adesklets the error msg is  :
    [devil@scorp ~]$ yaourt -S adesklets
    Password:
    resolving dependencies...
    warning: cannot resolve "ttf-bitstream-vera", a dependency of "adesklets"
    :: the following package(s) cannot be upgraded due to unresolvable dependencies:
          adesklets 
    Do you want to skip the above package(s) for this upgrade? [Y/n]
    looking for inter-conflicts...
    local database is up to date
    i have bitstream vera font installed.
    ???? whats the solution. Any help?
    Thanks.
    Last edited by scorpdevil (2010-05-31 07:33:31)

    my pacman.conf file ---------------------
    # /etc/pacman.conf
    # See the pacman.conf(5) manpage for option and repository directives
    # GENERAL OPTIONS
    [options]
    # The following paths are commented out with their default values listed.
    # If you wish to use different paths, uncomment and update the paths.
    #RootDir     = /
    #DBPath      = /var/lib/pacman/
    #CacheDir    = /var/cache/pacman/pkg/
    #LogFile     = /var/log/pacman.log
    HoldPkg     = pacman glibc
    # If upgrades are available for these packages they will be asked for first
    SyncFirst   = pacman
    #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
    #XferCommand = /usr/bin/curl %u > %o
    #CleanMethod = KeepInstalled
    # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
    #IgnorePkg   =
    #IgnoreGroup =
    #NoUpgrade   =
    #NoExtract   =
    # Misc options (all disabled by default)
    #UseSyslog
    #ShowSize
    #UseDelta
    #TotalDownload
    # REPOSITORIES
    #   - can be defined here or included from another file
    #   - pacman will search repositories in the order defined here
    #   - local/custom mirrors can be added here or in separate files
    #   - repositories listed first will take precedence when packages
    #     have identical names, regardless of version number
    #   - URLs will have $repo replaced by the name of the current repo
    # Repository entries are of the format:
    #       [repo-name]
    #       Server = ServerName
    #       Include = IncludePath
    # The header [repo-name] is crucial - it must be present and
    # uncommented to enable the repo.
    # The testing repositories are disabled by default. To enable, uncomment the
    # repo name header and Include lines. You can add preferred servers immediately
    # after the header, and they will be used before the default mirrors.
    #[testing]
    ## Add your preferred servers here, they will be used first
    #Include = /etc/pacman.d/mirrorlist
    [core]
    # Add your preferred servers here, they will be used first
    Include = /etc/pacman.d/mirrorlist
    [extra]
    # Add your preferred servers here, they will be used first
    Include = /etc/pacman.d/mirrorlist
    #[community-testing]
    ## Add your preferred servers here, they will be used first
    #Include = /etc/pacman.d/mirrorlist
    [community]
    # Add your preferred servers here, they will be used first
    Include = /etc/pacman.d/mirrorlist
    # An example of a custom package repository.  See the pacman manpage for
    # tips on creating your own repositories.
    #[custom]
    #Server = file:///home/custompkgs
    [archlinuxfr]
    Server = http://repo.archlinux.fr/x86_64
    mirrorlist
    # Czech Republic
    Server = ftp://ftp.sh.cvut.cz/MIRRORS/arch/$repo/os/x86_64

  • Cannot resolve "python", a dependency of "python-distutils-extra"

    Attempting to perform a full system upgrade on 32 bit archbang 2012.05, and when I `pacman -Syu`: this occurs
    Anyone know how to deal with this issue?
    $ sudo pacmatic -Syu
    Recent ML chatter:
    :: Synchronizing package databases...
    core is up to date
    extra is up to date
    community is up to date
    :: Starting full system upgrade...
    :: Replace libusb with core/libusbx? [Y/n] y
    :: Replace procps with core/procps-ng? [Y/n] y
    :: Replace udev with core/systemd-tools? [Y/n] y
    resolving dependencies...
    warning: cannot resolve "python", a dependency of "python-distutils-extra"
    :: The following package cannot be upgraded due to unresolvable dependencies:
    python-distutils-extra
    Do you want to skip the above package for this upgrade? [y/N] y
    warning: dependency cycle detected:
    warning: util-linux will be installed before its systemd-tools dependency
    looking for inter-conflicts...
    Targets (71): acl-2.2.51-2 arandr-0.1.6-1 attr-2.4.46-2 automake-1.12.1-1
    bash-4.2.029-1 binutils-2.22-7 bzip2-1.0.6-4 coreutils-8.17-1
    cryptsetup-1.4.2-2 curl-7.26.0-1 db-5.3.21-1 deadbeef-0.5.4-2
    device-mapper-2.02.95-6 dnsutils-9.9.1-1 e2fsprogs-1.42.3-1
    filesystem-2012.2-5 gcc-4.7.0-6 gcc-libs-4.7.0-6
    glib2-2.32.3-1 gmp-5.0.5-1 gpm-1.20.6-8 hwids-20120512-1
    initscripts-2012.05.1-3 isl-0.09-2 kmod-8-2 krb5-1.10.1-3
    libcap-2.22-3 libevent-2.0.19-1 libldap-2.4.31-2 libnl-3.2.9-1
    libpipeline-1.2.1-1 libssh2-1.4.2-1 libusb-1.0.9-1 [removal]
    libusb-compat-0.1.4-1 libusbx-1.0.11-2 linux-3.3.7-1
    linux-firmware-20120227-2 lvm2-2.02.95-6 lxappearance-0.5.2-1
    lxinput-0.3.2-2 lxterminal-0.1.11-2 man-pages-3.41-1
    mdadm-3.2.5-2 menu-cache-0.3.3-1 mkinitcpio-0.9.1-1
    mkinitcpio-busybox-1.20.1-1 mpfr-3.1.0.p10-1 oblogout-0.2-11
    openbox-3.5.0-7 openssl-1.0.1.c-1 pam-1.1.5-3 pciutils-3.1.9-2
    perl-5.16.0-2 pinentry-0.8.1-4 procps-3.2.8-5 [removal]
    procps-ng-3.3.3-1 python2-distutils-extra-2.32-1
    run-parts-4.3.1-1 shotwell-0.12.3-1 sudo-1.8.5.p2-1
    sysfsutils-2.1.0-8 syslog-ng-3.3.5-1 systemd-tools-184-2
    udev-182-1 [removal] usbutils-005-2 util-linux-2.21.2-1
    virtualbox-archlinux-additions-4.1.16-1
    virtualbox-archlinux-modules-4.1.16-1 volumeicon-0.4.6-4
    xfsprogs-3.1.8-2 zlib-1.2.7-1
    Total Installed Size: 390.46 MiB
    Net Upgrade Size: 3.42 MiB
    Proceed with installation? [Y/n] y
    (68/68) checking package integrity [----------------------] 100%
    (68/68) loading package files [----------------------] 100%
    (68/68) checking for file conflicts [----------------------] 100%
    error: failed to commit transaction (conflicting files)
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/__init__.py exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/__init__.pyc exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/auto.py exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/auto.pyc exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/__init__.py exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/__init__.pyc exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/build_extra.py exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/build_extra.pyc exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/build_help.py exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/build_help.pyc exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/build_i18n.py exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/build_i18n.pyc exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/build_icons.py exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/build_icons.pyc exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/clean_i18n.py exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/clean_i18n.pyc exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/pylint.py exists in filesystem
    python2-distutils-extra: /usr/lib/python2.7/site-packages/DistUtilsExtra/command/pylint.pyc exists in filesystem
    Errors occurred, no packages were upgraded.
    No pacnew files to update.

    I do not thing archbang is officially  archlinux distributions (you are on an archlinux forum). This error does not appear on the current archlinux distribution. My guess is that here is a confusion between python / python2 / python3. Just run pacman -Si to know (or the equivalent of pacman for archbang).
    I would suggest you to use the official archlinux instead of this fork, archlinux has much more support and users and I do not quite understand what archbang has to offer: Their homepage said that it is archlinux combined with openbox, but you can just do
    pacman -S openbox
    on arch; it does not seems to justify a fork (but please correct me if I am wrong).
    Last edited by olive (2012-06-17 22:00:23)

  • Cannot resolve "pambase", a dependency of "pam" [solved]

    ...thoughts?
    :: Starting full system upgrade...
    resolving dependencies...
    warning: cannot resolve "pambase", a dependency of "pam"
    :: The following package cannot be upgraded due to unresolvable dependencies:
    pam
    Do you want to skip the above package for this upgrade? [y/N]
    error: failed to prepare transaction (could not satisfy dependencies)
    :: pam: requires pambase
    EDIT: updating servers via reflector solved this.  Odd.
    Last edited by graysky (2012-06-14 10:33:34)

    I do not thing archbang is officially  archlinux distributions (you are on an archlinux forum). This error does not appear on the current archlinux distribution. My guess is that here is a confusion between python / python2 / python3. Just run pacman -Si to know (or the equivalent of pacman for archbang).
    I would suggest you to use the official archlinux instead of this fork, archlinux has much more support and users and I do not quite understand what archbang has to offer: Their homepage said that it is archlinux combined with openbox, but you can just do
    pacman -S openbox
    on arch; it does not seems to justify a fork (but please correct me if I am wrong).
    Last edited by olive (2012-06-17 22:00:23)

  • Installation of Archboot: cannot resolve "kernel26-lts"

    Hi,
    I'm trying to install the latest Archboot.  My existing host is using kernel 3.1.9-2 but Archboot seems to need kernel26.  When I try to install it with pacman, it says:
    warning: cannot resolve "kernel26-lts>=2.6.32.46-1", a dependency of "archboot"
    warning: cannot resolve "kerenl26-lts>=2.6.32", a dependency of "noveau-drm-lts"
    warning: cannot resolve "kernel26-lts<2.6.33", a dependency of "nouveau-drm-lts"
    Do I really need to install kernel26 items?  I'm hesitant because I really like the nice minimal system I have at the moment.
    tia!

    kernel26-lts has been renamed to linux-lts when Linux 3.0 became LTS, so your ArchBoot must be out of date...
    In fact "pacman -Si archboot | grep kernel" returns nothing.
    However:
    $ pacman -Si nouveau-drm-lts | grep kernel
    Depends On : kernel26-lts>=2.6.32 kernel26-lts<2.6.33
    This package is orphan, which must be the reason why it's not up to date.
    I suppose you could use abs to rebuild nouveau-drm-lts against kernel 3.0... Maybe .

  • Pacman -S snownews cannot resolve dependency perl-libxslt

    I am getting this dependency resolution error when I try to install snownews:
    resolving dependencies...
    error: cannot resolve dependencies for "snownews" ("perl-libxslt" is not in the package set)
    error: failed to prepare transaction (could not satisfy dependencies)
    :: snownews requires perl-libxslt

    Here is the latest PKGBUILD for snownews that fixes the dep-problem:
    # Maintainer: Sergej Pupykin <[email protected]>
    # Contributor: Christoph 'delmonico' Neuroth <[email protected]>
    pkgname=snownews
    pkgver=1.5.7
    pkgrel=3
    pkgdesc="Text mode RSS newsreader for Linux and Unix."
    url="http://kiza.kcore.de/software/snownews/"
    depends=('libxml2' 'ncurses' 'perl-xml-libxml' 'perl-xml-libxslt')
    arch=(i686)
    source=(http://kiza.kcore.de/software/snownews/download/$pkgname-$pkgver.tar.gz)
    md5sums=('75ffa004e755a233f49b1cdfcd9e3d85')
    build() {
      cd $startdir/src/$pkgname-$pkgver
      ./configure --prefix=$startdir/pkg/usr --charset=UTF-8
      make || return 1
      make install

  • [stupid]error: cannot resolve "libusb1", a dependency of "libdc1394"

    Hi!
    :: Starting full system upgrade...
    resolving dependencies...
    error: cannot resolve "libusb1", a dependency of "libdc1394"
    error: failed to prepare transaction (could not satisfy dependencies)
    :: libdc1394: requires libusb1
    I needed libdc1394 only for gstreamer-plugins-bad, so I removed those. Wanted to try out if I need them anyway. But... What if? Is this a bug, did I do something wrong or did I just update while the required version isn't up yet and should unset testing again?
    EDIT: Uh, sorry, yes, I guess that's just me not waiting for the files to be distributed to the servers I guess.
    EDIT2: At least looks like it, should wait & think instead of type and type. Me drinking to much coffee. Marking thread as "stupid" instead of "solved" now.
    Last edited by whoops (2009-05-03 23:18:02)

    I do not thing archbang is officially  archlinux distributions (you are on an archlinux forum). This error does not appear on the current archlinux distribution. My guess is that here is a confusion between python / python2 / python3. Just run pacman -Si to know (or the equivalent of pacman for archbang).
    I would suggest you to use the official archlinux instead of this fork, archlinux has much more support and users and I do not quite understand what archbang has to offer: Their homepage said that it is archlinux combined with openbox, but you can just do
    pacman -S openbox
    on arch; it does not seems to justify a fork (but please correct me if I am wrong).
    Last edited by olive (2012-06-17 22:00:23)

  • Warning "Cannot convert string" - linux jdk1.4

    when launching apps in jdk1.4 i get the following warnings: (any ideas anyone)
    Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding
    Warning: Cannot convert string "<Key>Home,_Key_Begin" to type VirtualBinding
    Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding
    Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type VirtualBinding
    Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type VirtualBinding
    Warning: Cannot convert string "<Key>KP_Enter,_Key_Execute" to type VirtualBinding
    Warning: Cannot convert string "Alt<Key>Return,Alt_Key_KP_Enter" to type VirtualBinding

    The command:
    xmbind --help
    gives an examplanation of what is happening:
    With no FILE specified, the file .motifbind in the user's home directory
    is used. If this file is not found, xmbind loads the default virtual key
    bindings.
    If you run:
    xprop -root | grep -i bind
    This will show your default bindings.
    To remove the defaults run:
    xprop -root -remove MOTIFDEFAULT_BINDINGS
    To check it worked again run:
    xprop -root | grep -i bind
    To give the bindings I have created a file in my home directory called '.motifbind'. When you run your java app, if the default bindings have been removed the app will cause motif to get the bindings from the '~/.motifbind' file.
    This is my file:
    ! ~/.motifbind file
    osfActivate : <Key>KP_Enter
    osfAddMode : Shift<Key>F8
    osfBackSpace : <Key>BackSpace
    osfBeginLine : <Key>Home
    osfCancel : <Key>Escape
    osfClear : <Key>Clear
    osfCopy : Ctrl<Key>Insert
    osfCut : Shift<Key>Delete
    osfDelete : <Key>Delete
    osfEndLine : <Key>End
    osfHelp : <Key>F1
    osfInsert : <Key>Insert
    osfLeft : <Key>Left
    osfMenu : Shift<Key>F10
    osfMenuBar : <Key>F10
    osfPageDown : <Key>Next
    osfPageLeft : Ctrl<Key>Prior
    osfPageRight : Ctrl<Key>Next
    osfPageUp : <Key>Prior
    osfPaste : Shift<Key>Insert
    osfPrimaryPaste:Meta<Key>Insert
    osfRight : <Key>Right
    osfSelect : <Key>Select
    osfUndo : <Key>Undo
    osfUp : <Key>Up
    osfDown : <Key>Down
    When you run your app the errors hopefully will not show.
    If you want to make a change to your '~./motifbind' file you will first need to remove the property, by now running:
    xprop -root -remove MOTIFBINDINGS
    and then running your app.

  • Cannot install virtualbox "Cannot resolve Kernel26 2.6.29"

    Hello,
    I'm trying to get virtualbox running but it doesn't want to install.
    This is what I get:
    [root@Baldr werner]# pacman -S virtualbox
    warning: provider package was selected (virtualbox-ose provides virtualbox)
    resolving dependencies...
    error: cannot resolve "kernel26<2.6.29", a dependency of "virtualbox-modules"
    error: failed to prepare transaction (could not satisfy dependencies)
    :: virtualbox-modules: requires kernel26<2.6.29
    Upgraded everything to the latest version with pacman -Syu so that couldn't be the problem.
    uname says i'm running kernel 2.6.29-ARCH so I really don't know what to do..
    Someone who can help me ?
    Last edited by WernerL (2009-04-14 18:49:29)

    kfgz wrote:Or install virtualbox_bin from http://repo.archlinux.fr
    I tried to install the version in this repository but pacman can't install it? :S
    [root@Baldr Downloads]# pacman -U virtualbox_bin-2.1.4-2-i686.pkg.tar.bz2
    loading package data...
    error: error while reading package virtualbox_bin-2.1.4-2-i686.pkg.tar.bz2: Truncated input file (need to skip 1522590 bytes)
    error: 'virtualbox_bin-2.1.4-2-i686.pkg.tar.bz2': libarchive error
    Ark opens the package fine though...

  • Error: cannot resolve "gtk-engines =2.14.2", [SOLVED]

    This is more or less self-explanatory.
    [duncan@duncan-arch ~]$ su
    Password:
    [root@duncan-arch duncan]# pacman -Su
    :: Starting full system upgrade...
    warning: gnome-mount: ignoring package upgrade (0.7-1 => 0.8-1)
    warning: gnome-volume-manager: ignoring package upgrade (2.22.1-1 => 2.22.3-1)
    warning: nautilus-cd-burner: ignoring package upgrade (2.22.0-1 => 2.22.1-1)
    resolving dependencies...
    error: cannot resolve "gtk-engines>=2.14.2", a dependency of "gnome-themes"
    error: failed to prepare transaction (could not satisfy dependencies)
    :: gnome-themes: requires gtk-engines>=2.14.2
    [root@duncan-arch duncan]#
    Last edited by Raccoon1400 (2008-06-03 11:26:17)

    Solved. The issue was fixed in today's updates.

  • Class error - cannot resolve symbol "MyDocumentListener"

    Hello,
    this is a groaner I'm sure, but I don't see the problem.
    Newbie-itis probably ...
    I'm not concerned with what the class does, but it would be nice for the silly thing to compile!
    What the heck am I missing for "MyDocumentListener" ?
    C:\divelog>javac -classpath C:\ CenterPanel.java
    CenterPanel.java:53: cannot resolve symbol
    symbol : class MyDocumentListener
    location: class divelog.CenterPanel
    MyDocumentListener myDocumentListener = new MyDocumentListener(); // define the listener class
    ^
    CenterPanel.java:53: cannot resolve symbol
    symbol : class MyDocumentListener
    location: class divelog.CenterPanel
    MyDocumentListener myDocumentListener = new MyDocumentListener(); // define the listener class
    ^
    2 errors
    package divelog;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.lang.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    import javax.swing.text.*;
    public class CenterPanel extends JPanel implements ActionListener
    { // Opens class
    static private final String newline = "\n";
    private JTextArea comments;
    private JScrollPane scrollpane;
    private JButton saveButton, openButton;
    private JLabel whiteshark;
    private Box box;
    private BufferedReader br ;
    private String str;
    private JTextArea instruct;
    private File defaultDirectory = new File("C://divelog");
    private File fileDirectory = null;
    private File currentFile= null;
    public CenterPanel()
    { // open constructor CenterPanel
    setBackground(Color.white);
    comments = new JTextArea("Enter comments, such as " +
    "location, water conditions, sea life you observed," +
    " and problems you may have encountered.", 15, 10);
    comments.setLineWrap(true);
    comments.setWrapStyleWord(true);
    comments.setEditable(true);
    comments.setFont(new Font("Times-Roman", Font.PLAIN, 14));
    // add a document listener for changes to the text,
    // query before opening a new file to decide if we need to save changes.
    MyDocumentListener myDocumentListener = new MyDocumentListener(); // define the listener class
    comments.getDocument().addDocumentListener(myDocumentListener); // create the reference for the class
    // ------ Document listener class -----------
    class MyDocumentListener implements DocumentListener {
    public void insertUpdate(DocumentEvent e) {
    Calculate(e);
    public void removeUpdate(DocumentEvent e) {
    Calculate(e);
    public void changedUpdate(DocumentEvent e) {
    private void Calculate(DocumentEvent e) {
    // do something here
    scrollpane = new JScrollPane(comments);
    scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    saveButton = new JButton("Save Comments", new ImageIcon("images/Save16.gif"));
    saveButton.addActionListener( this );
    saveButton.setToolTipText("Click this button to save the current file.");
    openButton = new JButton("Open File...", new ImageIcon("images/Open16.gif"));
    openButton.addActionListener( this );
    openButton.setToolTipText("Click this button to open a file.");
    whiteshark = new JLabel("", new ImageIcon("images/gwhite.gif"), JLabel.CENTER);
    Box boxH;
    boxH = Box.createHorizontalBox();
    boxH.add(openButton);
    boxH.add(Box.createHorizontalStrut(15));
    boxH.add(saveButton);
    box = Box.createVerticalBox();
    box.add(scrollpane);
    box.add(Box.createVerticalStrut(10));
    box.add(boxH);
    box.add(Box.createVerticalStrut(15));
    box.add(whiteshark);
    add(box);
    } // closes constructor CenterPanel
    public void actionPerformed( ActionEvent evt )
    { // open method actionPerformed
    JFileChooser jfc = new JFileChooser();
    // these do not work !!
    // -- set the file types to view --
    // ExtensionFileFilter filter = new ExtensionFileFilter();
    // FileFilter filter = new FileFilter();
    //filter.addExtension("java");
    //filter.addExtension("txt");
    //filter.setDescription("Text & Java Files");
    //jfc.setFileFilter(filter);
         //Add a custom file filter and disable the default "Accept All" file filter.
    jfc.addChoosableFileFilter(new JTFilter());
    jfc.setAcceptAllFileFilterUsed(false);
    // -- open the default directory --
    // public void setCurrentDirectory(File dir)
    // jfc.setCurrentDirectory(new File("C://divelog"));
    jfc.setCurrentDirectory(defaultDirectory);
    jfc.setSize(400, 300);
    jfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
    Container parent = saveButton.getParent();
    //========================= Test Button Actions ================================
    //========================= Open Button ================================
    if (evt.getSource() == openButton)
    int choice = jfc.showOpenDialog(CenterPanel.this);
    File file = jfc.getSelectedFile();
    /* a: */
    if (file != null && choice == JFileChooser.APPROVE_OPTION)
    String filename = jfc.getSelectedFile().getAbsolutePath();
    // -- compare the currentFile to the file chosen, alert of loosing any changes to currentFile --
    // If (currentFile != filename)
    // -- get the current directory name -------
    // public File getCurrentDirectory( );
    File f=new File(System.getProperty("user.dir"));
    fileDirectory = jfc.getCurrentDirectory();
    // -- remember the last directory used --
    if (defaultDirectory != fileDirectory)
    {defaultDirectory = fileDirectory;}
    try
    { //opens try         
    comments.getLineCount( );
    // -- clear the old data before importing the new file --
    comments.selectAll();
    comments.replaceSelection("");
    // -- get the new data ---
    br = new BufferedReader (new FileReader(file));
    while ((str = br.readLine()) != null)
    {//opens while
    comments.append(str);
    } //closes while
    } // close try
    catch (IOException ioe)
    { // open catch
    comments.append(newline +"Open command not successful:" + ioe + newline);
    } // close catch
    // ---- display the values of the directory variables -----------------------
    comments.append(
    newline + "The f directory variable contains: " + f +
    newline + "The fileDirectory variable contains: " + fileDirectory +
    newline + "The defaultDirectory variable contains: " + defaultDirectory );
    else
    comments.append("Open command cancelled by user." + newline);
    } //close if statement /* a: */
    //========================= Save Button ================================
    } else if (evt.getSource() == saveButton)
    int choice = jfc.showSaveDialog(CenterPanel.this);
    if (choice == JFileChooser.APPROVE_OPTION)
    File fileName = jfc.getSelectedFile();
    // -- get the current directory name -------
    // public File getCurrentDirectory( );
    File f=new File(System.getProperty("user.dir"));
    fileDirectory = jfc.getCurrentDirectory();
    // -- remember the last directory used --
    if (defaultDirectory != fileDirectory)
    {defaultDirectory = fileDirectory;}
    //check for existing files. Warn users & ask if they want to overwrite
    for(int i = 0; i < fileName.length(); i ++) {
    File tmp = null;
    tmp = (fileName);
    if (tmp.exists()) // display pop-up alert
    //public static int showConfirmDialog( Component parentComponent,
    // Object message,
    // String title,
    // int optionType,
    // int messageType,
    // Icon icon);
    int confirm = JOptionPane.showConfirmDialog(null,
    fileName + " already exists on " + fileDirectory
    + "\n \nContinue?", // msg
    "Warning! Overwrite File!", // title
    JOptionPane.OK_CANCEL_OPTION, // buttons displayed
                        // JOptionPane.ERROR_MESSAGE
                        // JOptionPane.INFORMATION_MESSAGE
                        // JOptionPane.PLAIN_MESSAGE
                        // JOptionPane.QUESTION_MESSAGE
    JOptionPane.WARNING_MESSAGE,
    null);
    if (confirm != JOptionPane.YES_OPTION)
    { //user cancels the file overwrite.
    try {
    jfc.cancelSelection();
    break;
    catch(Exception e) {}
    // ----- Save the file if everything is OK ----------------------------
    try
    { // opens try
    BufferedWriter bw = new BufferedWriter(new FileWriter(fileName));
    bw.write(comments.getText());
    bw.flush();
    bw.close();
    comments.append( newline + newline + "Saving: " + fileName.getName() + "." + newline);
    break;
    } // closes try
    catch (IOException ioe)
    { // open catch
    comments.append(newline +"Save command unsuccessful:" + ioe + newline);
    } // close catch
    } // if exists
    } //close for loop
    else
    comments.append("Save command cancelled by user." + newline);
    } // end-if save button
    } // close method actionPerformed
    } //close constructor CenterPanel
    } // Closes class CenterPanel

    There is no way to be able to see MyDocumentListener class in the way you wrote. The reason is because MyDocumentListener class inside the constructor itself. MyDocumentListener class is an inner class, not suppose to be inside a constructor or a method. What you need to do is simple thing, just move it from inside the constructor and place it between two methods.
    that's all folks
    Qusay

  • Compilation problem (cannot resolve symbol)

    I have searched the Forums for "cannot resolve symbol" and as usual, many posts with no answers or just advise that noone ever comes back to say works. I am trying to compile this code:
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.naming.*;
    import org.acme.*;
    public class HelloOpenEJB extends HttpServlet {
    String factory = "org.openejb.client.LocalInitialContextFactory";
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException {
    PrintWriter out = response.getWriter();
    try{
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, factory );
    InitialContext ctx = new InitialContext( p );
    //Lookup the bean using it's deployment id
    Object obj = ctx.lookup("/Hello");
    HelloHome ejbHome = (HelloHome) obj;
    //Use the HelloHome to create a HelloObject
    HelloHome ejbHome = (HelloHome)
    PortableRemoteObject.narrow(obj, HelloHome.class);
    //The part we've all been wainting for...
    out.println("<html>");
    out.println("<body>");
    out.println("<head>");
    out.println("<title>Hello World!</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>"+ ejbObject.sayHello() +"</h1>");
    out.println("</body>");
    out.println("</html>");
    } catch (Exception e){
    response.setContentType("text/plain");
    e.printStackTrace(out);
    I'm running this on a Linux box. When I compile, I get this:
    HelloOpenEJB.java:28: ejbHome is already defined in doGet(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
    HelloHome ejbHome = (HelloHome)
    ^
    HelloOpenEJB.java:29: cannot resolve symbol
    symbol : variable PortableRemoteObject
    location: class HelloOpenEJB
    PortableRemoteObject.narrow(obj, HelloHome.class);
    ^
    HelloOpenEJB.java:38: cannot resolve symbol
    symbol : variable ejbObject
    location: class HelloOpenEJB
    out.println(""+ ejbObject.sayHello() +"");
    ^
    3 errors
    I don't know why any of these errors are occuring, besides the obvious responses given back from javac, so can someone help? Thanks, Jeremy

    The error message "x already defined in y" means that you're trying to use a name that already exists in the current scope. In your case you have:
    HelloHome ejbHome = (HelloHome) obj;
    //Use the HelloHome to create a HelloObject
    HelloHome ejbHome = (HelloHome)
    PortableRemoteObject.narrow(obj, HelloHome.class);Here you are trying to declare two instances of HelloHome with the same name.
    The reason that you would get "cannot resolve symbol" is that you are trying to access a variable or class that you haven't declared or imported.

Maybe you are looking for

  • SAP GUI logon page  dispalyed in inverted way

    Dear All my system sap gui 7.20 logon page is displayed in inverted way (which means logon page is displayed as reverse way) please guide me solve this issue, any gui seetings are there? regrads sudheer koppala

  • Java has been disabled, how can I get it back?

    Java has been disabled, how can I get it back? It seems that Apple has decided that Java has two many security problems and has disabled it. I need Java to run GeoGebra. What can I do? I tried downloading the latest update from Oracle JRE-7u13.

  • Installing OS X Yosemite has changed my Macintosh HD type to Logical Volume Group

    I have just installed OS X 10.10 Yosemite on my late 2013 MacBook Pro with Retina Display, The installation has worked perfectly and my computer is now running fine. However after opening disk utility I have noticed where previously my HD would be na

  • Alternative scrollpane to load dynamic content

    I'm trying to load jpgs to my scrollpane dynamically. I noticed the compiled scrollpane component in flash 8 is very large in size (> 130kb) which i cannot afford to use. Instead I'm using the flash 6 scrollpane which is not precompiled and only seve

  • Sales Order/Item Population required in CIC

    Hi, Using T.Code QM01, we get in to a screen with Sales Order, Item, Delivery , Item. Once we give the details of the SO number or any other fields, it leads us to the Customer Feedback Notification Screen with Customer Details. Same kind of pop up w