[SOLVED] PyDev problems - trying to load xmlrpclib

I'm currently stuck trying to figure out why I can no longer debug my python3 program.  Whenever I try to start the debug session, I get the following:
Traceback (most recent call last):
File "/usr/share/eclipse/dropins/pydev/eclipse/plugins/org.python.pydev.debug_2.5.0.2012040618/pysrc/pydev_imports.py", line 3, in <module>
import xmlrpclib
ImportError: No module named xmlrpclib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/eclipse/dropins/pydev/eclipse/plugins/org.python.pydev.debug_2.5.0.2012040618/pysrc/pydev_imports.py", line 5, in <module>
import xmlrpc.client as xmlrpclib
File "/usr/lib/python3.2/xmlrpc/client.py", line 133, in <module>
from xml.parsers import expat
File "/usr/lib/python3.2/xml/parsers/expat.py", line 6, in <module>
from pyexpat import *
ImportError: /usr/lib/python3.2/lib-dynload/pyexpat.cpython-32mu.so: undefined symbol: XML_SetHashSalt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/eclipse/dropins/pydev/eclipse/plugins/org.python.pydev.debug_2.5.0.2012040618/pysrc/pydevd.py", line 3, in <module>
import pydev_imports
File "/usr/share/eclipse/dropins/pydev/eclipse/plugins/org.python.pydev.debug_2.5.0.2012040618/pysrc/pydev_imports.py", line 7, in <module>
import _pydev_xmlrpclib as xmlrpclib
SystemError: Objects/tupleobject.c:126: bad argument to internal function
I've tried
clearing out Eclipse config in homedir and creating a new workspace
going back and installing PyDev 2.4.0 (2.5.0 is now installed, as seen in the error messages),
installing PyDev via Eclipse's internal plugin installer instead of using the AUR package,
linking '/usr/bin/python' to '/usr/bin/python2' instead of python3 (because xmlrpclib is the Python2 version of the xmlrpc.{server,client} in Python3), and even
installing a completely new Arch partition from scratch (enough to get pydev working, of course) without success.
Since I was covering all bases without going into PyDev source code, I also tried a LinuxMint 12 partition and that, of course, worked.  Searching Google hasn't led to any solutions that I can find, either (mixed in with all the other attempts above, of course).
Can someone out there please recommend something else to try or perhaps even know what the exact problem is?  I suppose the next step would be to look at the PyDev source code, but I'm hoping I won't need to invest that much time into it (slightly hypocritical )...
Thanks for any help on this!
EDIT: forgot about simple steps to clear out Eclipse config files in homedir and creating a new workspace.
Last edited by Janax (2012-06-06 18:50:14)

I finally(!) found the solution!
Short explanation: The issue for me was that I had LD_LIBRARY_PATH set to my Oracle installation.
Long explanation: Library resolution problem since I had LD_LIBRARY_PATH pointing to my Oracle installation (I'm using cx_Oracle in Python as well):
$ ldd /usr/lib/python3.2/lib-dynload/pyexpat.cpython-32mu.so
linux-vdso.so.1 => (0x00007fffabda3000)
*** libexpat.so.1 => /u01/oracle/11.2.0/lib/libexpat.so.1 (0x00007f85bbb74000) ***
libpython3.2mu.so.1.0 => /usr/lib/libpython3.2mu.so.1.0 (0x00007f85bb74e000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f85bb532000)
libc.so.6 => /lib/libc.so.6 (0x00007f85bb191000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f85baf8c000)
libutil.so.1 => /lib/libutil.so.1 (0x00007f85bad89000)
libm.so.6 => /lib/libm.so.6 (0x00007f85baa94000)
/lib/ld-linux-x86-64.so.2 (0x00007f85bbeb4000)
I added the *** to highlight the line causing the issue.  There are several ways to fix this problem, but I took the one that hopefully will impact the entire system the least (that is, I'm assuming that Arch 'libexpat' is newer than Oracle's version and have Oracle's libraries find/use the Arch version, so hopefully no system issues).  Another way to do it would place '/usr/lib' in front of Oracle's entry in LD_LIBRARY_PATH, but that may affect other Oracle libraries as well.  Here is what I did:
$ cd $ORACLE_HOME/lib
$ sudo mv libexpat.so.1 libexpat.so.1.NOFIND
$ ldd /usr/lib/python3.2/lib-dynload/pyexpat.cpython-32mu.so
linux-vdso.so.1 => (0x00007fff8b5ff000)
*** libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007fd00a45f000) ***
libpython3.2mu.so.1.0 => /usr/lib/libpython3.2mu.so.1.0 (0x00007fd00a05b000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fd009e3e000)
libc.so.6 => /lib/libc.so.6 (0x00007fd009a9d000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fd009899000)
libutil.so.1 => /lib/libutil.so.1 (0x00007fd009695000)
libm.so.6 => /lib/libm.so.6 (0x00007fd0093a0000)
/lib/ld-linux-x86-64.so.2 (0x00007fd00a8b9000)
After this change, the pydev debugger launches and runs correctly!  Woohoo!
Last edited by Janax (2012-06-06 18:51:20)

Similar Messages

  • Problems trying to load a full version of office home and student 2010

    I am trying to load office 2010 but it will not load, It just keeps saying its a trial version. I rang microsoft and they told me I have to un install the trial version installed on my touchsmart 310-1025a.
    Apparently it is put on there at manufacture stage. Can anyone tell me how to uninstall the trial so that it will let me use my full version. thanks

    Hi,
    jacquitos wrote:
    I am trying to load office 2010 but it will not load, It just keeps saying its a trial version. I rang microsoft and they told me I have to un install the trial version installed on my touchsmart 310-1025a.
    Apparently it is put on there at manufacture stage. Can anyone tell me how to uninstall the trial so that it will let me use my full version. thanks
    This article from the  Microsoft knowlege base has a few different ways to uninstall it.  There is also a  Microsoft Fixit utility specifically for Office 2010.
    Best regards,
    erico
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Problems trying to load SCORM version of Presenter module with Macs

    Hi there
    I am thinking of using a Presenter module to provide orientation information to students. The module will have quizzes embedded in it. Because of this, I am planning to upload the Presenter file as a SCORM package to our Learning Management System.
    I am a little concerned about doing this as I have experienced difficulties at the client end in the past. I uploaded a Presenter module in a similar way a year ago. PC users had no trouble accessing the module, but Mac users did. They couldn't access the module but, luckily, in both cases, had access to PCs that they could use instead.
    When the Mac users tried to access the SCORM content through the LMS, they received a message that essentially said that the selected item contained no content. To my knowledge, both users had Flash installed on their Macs. This problem was not experienced by the PC users who were able to access the SCORM package without issue.
    I'm not certain whether this is a problem unique to our LMS, but I vaguely recall a colleague finding a problem to this solution (perhaps a patch?) that was Presenter, rather than LMS driven. Unfortunately, he's on extended leave so can't help out at the moment. Would appreciate your thoughts.
    Thanks
    Peta

    Hi there
    I am thinking of using a Presenter module to provide orientation information to students. The module will have quizzes embedded in it. Because of this, I am planning to upload the Presenter file as a SCORM package to our Learning Management System.
    I am a little concerned about doing this as I have experienced difficulties at the client end in the past. I uploaded a Presenter module in a similar way a year ago. PC users had no trouble accessing the module, but Mac users did. They couldn't access the module but, luckily, in both cases, had access to PCs that they could use instead.
    When the Mac users tried to access the SCORM content through the LMS, they received a message that essentially said that the selected item contained no content. To my knowledge, both users had Flash installed on their Macs. This problem was not experienced by the PC users who were able to access the SCORM package without issue.
    I'm not certain whether this is a problem unique to our LMS, but I vaguely recall a colleague finding a problem to this solution (perhaps a patch?) that was Presenter, rather than LMS driven. Unfortunately, he's on extended leave so can't help out at the moment. Would appreciate your thoughts.
    Thanks
    Peta

  • BPA Web Client Components Problem trying to load applet

    Hello!!! I installed BPA Repository and Oracle HTTP Server and I started up my server with y-serverlauncher.sh and after that, I started up the OHS with command:
    ./opmnctl startall
    The system is running in Oracle Linux 5.7 and Oracle BPA Suite 11.1.1.1
    My problem is when I try to open BPA through an URL http://server:7784/bpa/index_app.html.
    The message I am getting is:
    Java Plug-in 10.4.1.255
    Using JRE version 1.7.0_04-b22 Java HotSpot(TM) Client VM
    User home directory = C:\Users\Dennis Garces
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    Temporary directory: C:\Users\DENNIS~1\AppData\Local\Temp\
    Using default directory.
    Local download directory: C:\Users\Dennis Garces\ARIS71\DownloadClient/192.168.56.129
    Detecting proxy settings...
    [PROXY] host:
    [PROXY] port: -1
    [PROXY] used: false
    Warning: Help file /lib/oem02/biztalkodxgen_en_help.jar does not exist!
    Warning: Help file /lib/oem02/DevTools_en_help.jar does not exist!
    Fatal error: An error occurred while downloading required files.
    Unable to download /lib/jaxws-api.jar. File does not exist.
    Possible reasons include:
    - the URL you use to connect to the ARIS Client is not correct. Please contact your System Administrator if in doubt.
    - you do not have write access to the local download directory
    - there's no space left on your local hard disk drive.
    Trace level set to 5: all ... completed.
    Does anybody have any suggestions? I am installing as indicated in the BPA install guide, but I think I missed something.
    Thanks in advanced!!!!

    Update -
    One of the clients that IS connecting is running the latest: 1.5.0_09 which makes no sense based on the other behavior.
    Well we figured it out (I think). If you have 1.4.2_06 on the box, you can connect, it installs the applet and you get in. If you then upgrade or uninstall/reinstall 1.5, Discoverer still works. Now we haven't tested anything else other than just logging in so what ever might blow up on us is still in question.
    But what it looks to be is that the kick off for the install is failing under 1.5 and once it's on the system, using a newer version is just fine. Now without really knowing/understanding what's going on under the hood this is just an assumption. However I've repeated it on a couple XP machines so far.
    That is, have 1.5 on the box, fail to get to Discoverer. Uninstall, then install 1.4, get Discoverer loaded, then upgrade/reinstall 1.5 and move on.
    We did give JInitiator a try but had similar strangeness happen and gave up since the client machines should have a copy of 1.4 on them to begin with. It's a matter of ironing out the details with our app. Hopefully 1.5 will be compatable by the time we go live which isn't for some time yet.

  • I have problems trying to load latest upgrade

    Trying to update iPad with is6 but keep getting application error ?  Please help

    See
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect to your computer & click on the "Update your device using iTunes".
    Tip - You may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update to iOS 5/6.x, the next update can be installed via wifi (i.e., not connected to your computer).
     Cheers, Tom

  • Problems trying to load specific vendor CD's/DVD's

    Hi to all! I have a bit of a problem: Late 2006 I bought a Mac Book Pro, worked wonderfully. In 2008 bought another Mac Book Pro, and gave the other one to my wife. Last year I upgraded both to SL, which in itself was an adventure, but since then I've been experiencing several problems with the CD/DVD drive. The last problem, which motivates this cry for help, is that 2008 Mac Book Pro does not recognize original X-Plane Deluxe DVD purchased mid 2007, and keeps spitting it every time I insert it in the CD bay. 2006 Mac Book Pro does recognize X-Plane Deluxe DVD though. Is there any corrective action that I can do in order for the CD/DVD to accept these DVD's? Your comments shall be deeply appreciated.
    Regards,
    Jorge Yatim

    That program may need Rosetta installed on the 2008 MBP in order for X-Plane to run.

  • Can anyone help me solve my problem trying add GUI to Inventory program?

    Here is my code in which I am receiving a couple of errors.
    package inventory4;
    import java.util.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class Inventory4 extends JFrame implements ActionListener {
        private class MyPanel extends JPanel {
            ImageIcon image = new ImageIcon("Sample.jpg");
            int width = image.getIconWidth();
            int height = image.getIconHeight();
            long angle = 30;
            public MyPanel() {
                super();
            public void paintComponent(Graphics g) {
                super.paintComponent(g);
                Graphics2D g2d = (Graphics2D) g;
                g2d.rotate(Math.toRadians(angle), 60 + width / 2, 60 + height / 2);
                g2d.drawImage(image.getImage(), 60, 60, this);
                g2d.dispose();
        }//end class MyPanel
        int currentIndex; //Currently displayed Item
        Product[] supplies = new Product[4];
        JLabel name;
        JLabel number;
        JLabel title;
        JLabel quantity;
        JLabel price;
        JLabel fee;
        JLabel totalValue;
        JTextField nameField = new JTextField(20);
        JTextField numberField = new JTextField(20);
        JTextField titleField = new JTextField(20);
        JTextField quantityField = new JTextField(20);
        JTextField priceField = new JTextField(20);
        JPanel display;
        JPanel displayHolder;
        JPanel panel;
        public Inventory4() {
            setSize(500, 500);
            setTitle("Bob's CD Inventory Program");
    //make the panels
            display = new JPanel();
            JPanel other = new JPanel();
            JPanel picture = new MyPanel();
            JPanel centerPanel = new JPanel();
            displayHolder = new JPanel();
            display.setLayout(new GridLayout(7, 1));
    //other.setLayout(new GridLayout(1, 1));
    //make the labels
            name = new JLabel("Name :");
            number = new JLabel("Number :");
            title = new JLabel("Title :");
            quantity = new JLabel("Quantity :");
            price = new JLabel("Price :");
            fee = new JLabel("Restocking Fee :");
            totalValue = new JLabel("Total Value :");
    //Add the labels to the display panel
            display.add(name);
            display.add(number);
            display.add(title);
            display.add(quantity);
            display.add(price);
            display.add(fee);
    //Add the panels to the frame
            getContentPane().add(centerPanel, "Center");
            getContentPane().add(other, "South");
            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setVisible(true);
    class CD extends Product {
        String genre;
        double restockingFee;
        public CD(String genre, double restockingFee, int item, String title, double stockQuantity,
                double price) {
            //super(title,item, stockQuantity, price);
            this.genre = genre;
            this.restockingFee = restockingFee;
        // TODO Auto-generated constructor stub
        //returns the value of the inventory, plus the restocking fee
        public double getInventoryValue() {
            // TODO Auto-generated method stub
            return super.getItemPrice() + restockingFee;
        public String toString() {
            StringBuffer sb = new StringBuffer("Genre      \t").append(genre).append("\n");
            sb.append(super.toString());
            return sb.toString();
    //Inventory4.java
    class Product implements Comparable {
        private String title;   // class variable that stores the item name
        private int item;     // class variable that stores the item number
        private double stockQuantity;   // class variable that stores the quantity in stock
        private double price;     // class variable that stores the item price
        private String genre;
        public Product() {
            title = "";
            item = 0;
            stockQuantity = 0;
            price = 0.0;
            genre = "";
        public Product(String title, String genre, int item, double stockQuantity, double price) {
            this.title = title;
            this.item = item;
            this.stockQuantity = stockQuantity;
            this.price = price;
            this.genre = genre;
        public void setTitle(String title) {
            this.title = title;
        public String getTitle() {
            return title;
        public void setItem(int item) {
            this.item = item;
        public int getItem() {
            return item;
        public void setStockQuantity(double quantity) {
            stockQuantity = quantity;
        public double getStockQuantity() {
            return stockQuantity;
        public void setItemPrice(double price) {
            this.price = price;
        public double getItemPrice() {
            return price;
        public void setGenre(String genre) {
            this.genre = genre;
        public String getGenre() {
            return genre;
        public double calculateInventoryValue() {
            return price * stockQuantity;
        public int compareTo(Object o) {
            Product p = null;
            try {
                p = (Product) o;
            } catch (ClassCastException cE) {
                cE.printStackTrace();
            return title.compareTo(p.getTitle());
        public String toString() {
            return "CD Title: " + title + "\nGenre: " + genre + "\nItem #: " + item + "\nPrice: $" + price + "\nQuantity: " + stockQuantity + "\nValue with restocking fee: $" + (calculateInventoryValue() + (calculateInventoryValue() * .05));
    public class Inventory4 {
        Product[] supplies;
        public static void main(String[] args) {
            Inventory4 inventory = new Inventory4();
            inventory.addProduct(new Product("Mozart", "Classical", 1, 54, 11.50));
            inventory.addProduct(new Product("Beethoven", "Classical", 2, 65, 12.00));
            inventory.addProduct(new Product("Tiny Tim", "Classical", 3, 10, 1.00));
            System.out.println("Inventory of CD's:\n\n");
            System.out.println();
            inventory.showInventory();
            System.out.println();
            double total = inventory.calculateTotalInventory();
            System.out.println("Total Value is: $" + (total + (total * .05)));
        public void sortByName() {
            for (int i = 1; i < supplies.length; i++) {
                int j;
                Product val = supplies;
    for (j = i - 1; j > -1; j--) {
    Product temp = supplies[j];
    if (temp.compareTo(val) <= 0) {
    break;
    supplies[j + 1] = temp;
    supplies[j + 1] = val;
    //creates a String representation of the array of products
    public String toString() {
    String s = "";
    for (Product p : supplies) {
    s = s + p.toString();
    s = s + "\n\n";
    return s;
    //Using an array so adding an item requires us to increase the size of the array first
    public void addProduct(Product p1) {
    if (supplies == null) {
    supplies = new Product[0];
    Product[] p = supplies; //Copy all products into p first
    Product[] temp = new Product[p.length + 1]; //create bigger array
    for (int i = 0; i < p.length; i++) {
    temp[i] = p[i];
    temp[(temp.length - 1)] = p1; //add the new product at the last position
    supplies = temp;
    //sorting the array using Bubble Sort
    public double calculateTotalInventory() {
    double total = 0.0;
    for (int i = 0; i < supplies.length; i++) {
    total = total + supplies[i].calculateInventoryValue();
    return total;
    public void showInventory() {
    System.out.println(toString()); //call our toString method

    I re-entered the package and changed some of the code. I am building successfully, but getting a new msg: init:
    deps-jar:
    compile:
    run:
    java.lang.NoClassDefFoundError: Inventory5_5
    Caused by: java.lang.ClassNotFoundException: Inventory5_5
            at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    Exception in thread "main"
    Java Result: 1
    BUILD SUCCESSFUL (total time: 0 seconds) I may have to go ahead and submit it as is to get it in on time. Thank you very much for your help and your patience. Here is my last effort.package inventory4;
    import java.util.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    class inventory4 extends JFrame  {
        private class MyPanel extends JPanel {
            ImageIcon image = new ImageIcon("Sample.jpg");
            int width = image.getIconWidth();
            int height = image.getIconHeight();
            long angle = 30;
            public MyPanel() {
                super();
            public void paintComponent(Graphics g) {
                super.paintComponent(g);
                Graphics2D g2d = (Graphics2D) g;
                g2d.rotate(Math.toRadians(angle), 60 + width / 2, 60 + height / 2);
                g2d.drawImage(image.getImage(), 60, 60, this);
                g2d.dispose();
        }//end class MyPanel
        int currentIndex; //Currently displayed Item
        Product[] supplies = new Product[4];
        JLabel name;
        JLabel number;
        JLabel title;
        JLabel quantity;
        JLabel price;
        JLabel fee;
        JLabel totalValue;
        JTextField nameField = new JTextField(20);
        JTextField numberField = new JTextField(20);
        JTextField titleField = new JTextField(20);
        JTextField quantityField = new JTextField(20);
        JTextField priceField = new JTextField(20);
        JPanel display;
        JPanel displayHolder;
        JPanel panel;
        public inventory4() {
            setSize(500, 500);
            setTitle("Bob's CD Inventory Program");
    //make the panels
            display = new JPanel();
            JPanel other = new JPanel();
            JPanel picture = new MyPanel();
            JPanel centerPanel = new JPanel();
            displayHolder = new JPanel();
            display.setLayout(new GridLayout(7, 1));
    //other.setLayout(new GridLayout(1, 1));
    //make the labels
            name = new JLabel("Name :");
            number = new JLabel("Number :");
            title = new JLabel("Title :");
            quantity = new JLabel("Quantity :");
            price = new JLabel("Price :");
            fee = new JLabel("Restocking Fee :");
            totalValue = new JLabel("Total Value :");
    //Add the labels to the display panel
            display.add(name);
            display.add(number);
            display.add(title);
            display.add(quantity);
            display.add(price);
            display.add(fee);
    //Add the panels to the frame
            getContentPane().add(centerPanel, "Center");
            getContentPane().add(other, "South");
            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setVisible(true);
    class CD extends Product {
        String genre;
        double restockingFee;
        public CD(String genre, double restockingFee, int item, String title, double stockQuantity,
                double price) {
            //super(title,item, stockQuantity, price);
            this.genre = genre;
            this.restockingFee = restockingFee;
        // TODO Auto-generated constructor stub
        //returns the value of the inventory, plus the restocking fee
        public double getInventoryValue() {
            // TODO Auto-generated method stub
            return super.getItemPrice() + restockingFee;
        public String toString() {
            StringBuffer sb = new StringBuffer("Genre      \t").append(genre).append("\n");
            sb.append(super.toString());
            return sb.toString();
    //Inventory4.java
    class Product implements Comparable {
        private String title;   // class variable that stores the item name
        private int item;     // class variable that stores the item number
        private double stockQuantity;   // class variable that stores the quantity in stock
        private double price;     // class variable that stores the item price
        private String genre;
        public Product() {
            title = "";
            item = 0;
            stockQuantity = 0;
            price = 0.0;
            genre = "";
        public Product(String title, String genre, int item, double stockQuantity, double price) {
            this.title = title;
            this.item = item;
            this.stockQuantity = stockQuantity;
            this.price = price;
            this.genre = genre;
        public void setTitle(String title) {
            this.title = title;
        public String getTitle() {
            return title;
        public void setItem(int item) {
            this.item = item;
        public int getItem() {
            return item;
        public void setStockQuantity(double quantity) {
            stockQuantity = quantity;
        public double getStockQuantity() {
            return stockQuantity;
        public void setItemPrice(double price) {
            this.price = price;
        public double getItemPrice() {
            return price;
        public void setGenre(String genre) {
            this.genre = genre;
        public String getGenre() {
            return genre;
        public double calculateInventoryValue() {
            return price * stockQuantity;
        public int compareTo(Object o) {
            Product p = null;
            try {
                p = (Product) o;
            } catch (ClassCastException cE) {
                cE.printStackTrace();
            return title.compareTo(p.getTitle());
        public String toString() {
            return "CD Title: " + title + "\nGenre: " + genre + "\nItem #: " + item + "\nPrice: $" + price + "\nQuantity: " + stockQuantity + "\nValue with restocking fee: $" + (calculateInventoryValue() + (calculateInventoryValue() * .05));
    public class Inventory4 {
        Product[] supplies;
        public static void main(String[] args) {
            Inventory4 inventory = new Inventory4();
            inventory.addProduct(new Product("Mozart", "Classical", 1, 54, 11.50));
            inventory.addProduct(new Product("Beethoven", "Classical", 2, 65, 12.00));
            inventory.addProduct(new Product("Tiny Tim", "Classical", 3, 10, 1.00));
            System.out.println("Inventory of CD's:\n\n");
            System.out.println();
            inventory.showInventory();
            System.out.println();
            double total = inventory.calculateTotalInventory();
            System.out.println("Total Value is: $" + (total + (total * .05)));
        public void sortByName() {
            for (int i = 1; i < supplies.length; i++) {
                int j;
                Product val = supplies;
    for (j = i - 1; j > -1; j--) {
    Product temp = supplies[j];
    if (temp.compareTo(val) <= 0) {
    break;
    supplies[j + 1] = temp;
    supplies[j + 1] = val;
    //creates a String representation of the array of products
    public String toString() {
    String s = "";
    for (Product p : supplies) {
    s = s + p.toString();
    s = s + "\n\n";
    return s;
    //Using an array so adding an item requires us to increase the size of the array first
    public void addProduct(Product p1) {
    if (supplies == null) {
    supplies = new Product[0];
    Product[] p = supplies; //Copy all products into p first
    Product[] temp = new Product[p.length + 1]; //create bigger array
    for (int i = 0; i < p.length; i++) {
    temp[i] = p[i];
    temp[(temp.length - 1)] = p1; //add the new product at the last position
    supplies = temp;
    //sorting the array using Bubble Sort
    public double calculateTotalInventory() {
    double total = 0.0;
    for (int i = 0; i < supplies.length; i++) {
    total = total + supplies[i].calculateInventoryValue();
    return total;
    public void showInventory() {
    System.out.println(toString()); //call our toString method

  • Comcast just replaced my cable modem/wireless router.  All devices connect properly except my iPhone 4.  It shows itself to be connected to the network, but it does not load any web page.  Resetting the iPhone does not solve the problem.  Any suggestions?

    Comcast just replaced my cable modem/wireless router.  All devices connect properly except my iPhone 4.  It shows itself to be connected to the network, but it does not load any web page.  Resetting the iPhone does not solve the problem.  Any suggestions?

    Thank you for your response.
    I had rebooted the router (several times, actually), to no avail.
    I do not know the answer to whether MAC filtering is enabled on the router.  Have tried to find info about that, but unsuccessfully.  Router is an Arris TG852G, supplied by Comcast.  I would be surprised if MAC filtering were the issue, since in addition to the computer, we have successfully connected several other devices to the wifi, namely an iPad, a Android phone and a Kindle Fire - all able to access internet pages through the wifi, and all without a need to add the device to a MAC address whitelist.  To add to the mystery, the Comcast tech was able to connect his iPhone 4 to my network and access web pages.  He was unable to connect my iPhone, however, after trying for some time.
    I seem to recall reading somewhere that an iPhone cannot connect to a wireless "n" router, only "b" or "g".  The Arris router is described as a n/g/b compliant router, and as noted the Comcast tech was able to connect his iPhone, so don't know why that would be the issue here.
    By the way, my iPhone does connect wirelessly to my network at home.  This difficulty is at a second home.
    Any other thoughts would be appreciated.

  • I have used fire fox for a long time but have nothing but problems loading web sites..i think the time has come to uninstall firefox and go with internet explore..im tired of wasting my time trying to load web pages.

    Question
    i have used fire fox for a long time but have nothing but problems loading web sites..i think the time has come to uninstall firefox and go with internet explore..im tired of wasting my time trying to load web pages.

    does not solve problem..guess i'll have to get rid of firefox..never had problen before but to much hassle loading web sites.

  • HT1926 when trying to setup itunes on my pc i get the following message: there is a problem with this Windows installer package. A program required for this install to complete could not be run. How could I solve this problem?

    when trying to setup itunes on my pc i get the following message: there is a problem with this Windows installer package. A program required for this install to complete could not be run. How could I solve this problem?

    Repair your Apple software update.
    Go to START/ALL PROGRAMS/Apple Software Update. If it offers you a newer version of Apple Software Update, do it but Deselect any other software offered at the same time. Once done, try another iTunes install
    If you don't find ASU, go to Control Panel:
    START/CONTROL PANEL/Programs n Features/highlight ASU and click REPAIR,

  • My calendar is blocked. The server has a problem. I am trying everything, but since days I have no access to my agenda anymore. I am about to throw my MacBook Air out of the window :-( How can I solve this problem? My calendar does not react to anything!!

    My calendar is blocked since a few days, while I tried to upload a message in an event. In this weekend, i have not been able to get ANYbody at all online, to help me. I am desperate and feel absolutely idiot. Is anybody out there who can help me?.
    In the website it said:
    1. Open iCal - select "preferences" (I cannot select anything!)
    2. Select "accounts" (I have no clue what to do there)
    3. Re-enter " username and password (Where?)
    4. Exit iCal and start again (I did this, but don't get anywhere near a solution).
    5. Done (cry, cry, nothing changed for days now and I am about to throw everything out of my window :-))
    Thanks for some very useful and easy tips!
    Sjannie Hulsman

    Thanks mate ...
    yes I have an upgraded Iphoto 11 from 9.4.3 ........ unfortunately .... no it didn't solve the problem.  Of course my illiteracy is no help ..... but I did as you suggested and nothing changed at all.  When I highlight a photo I am unable to minimize it and despite changing folders (ie:photos to events) all that happens is that the events folder opens behind the opened photo.  The only solution is to go to "force quit" even though there is no sign to say "iphoto is not responding". and start again ..... very frustrating.  Appreciate any suggestion you have ...
    Nev

  • Hello, I just got an iPhone 4S and it seems that the bluetooth function in it doesn't work. I tried few times to pair it to other non Apple phones and it never worked. Does anyone has an idea how to solve the problem? Tks.

    Hello, I just got an iPhone 4S and it seems that the bluetooth function in it doesn't work. I tried few times to pair it to other non Apple phones but it never worked. Does anyone has an idea how to solve the problem? Tks.

    This is not a feature of iPhone, iPad or iOS.
    Bluetooth is supported for stereo headsets/speakers, handsfree telephone
    devices/headsets, some keyboards, some peer-to-peer apps from the
    app store and internet tethering where provided by the carrier.
    Other than this it will not connect to a phone/computer/device.  (thanks to ckuan for the wording)

  • Because you this loading firefox.exe like process from the beginning of the computer with a load from 38 to 42000 kb or like I can solve this problem

    because you this loading firefox.exe like process from the beginning of the computer with a load from 38 to 42000 kb or like I can solve this problem, atualmente when lighting the computer among the processes that are loaded when beginning the computer is a process of name firefox.exe with a load of between 30 and 50000 kb but I don't find to the registered firefox inside the programs to crgar from the beginning when entering for msconfig.exe my operating system is so far windows xp up-to-date sp3 and my firefox is 7.0.1 version in Spanish that is my native language.

    That seems very suspicious. Two suggestions.
    First, try Firefox's Safe Mode. This will let you work around problems with add-ons and perhaps help you identify things to remove so that Firefox goes back to normal.
    I recommend making a backup of your Firefox settings before starting in Safe Mode. To back up Firefox, see [https://support.mozilla.com/en-US/kb/Backing+up+your+information Backing up your information].
    Next, try starting Firefox in Firefox
    [http://support.mozilla.com/kb/Safe+Mode Safe Mode]. Be careful not to "reset" anything permanently if you didn't back up.
    Does that work? If so, you may need to disable your add-ons and just bring the most essential ones back to life until you discover the problem one.
    Second thought: malware. You could supplement your usual security scans with these:
    Malwarebytes Anti-malware : http://www.malwarebytes.org/mbam.php
    SUPERAntiSpyware : http://www.superantispyware.com/
    HouseCall : http://housecall.trendmicro.com/
    Hope this helps.

  • My iPad Mini iOS7 is showing only Apple Logo which happened during software update. I tried to restore using iTunes but it asking me to response from iPad. But my ipad only shows apple logo. How can i response? How to solve this problem?

    My iPad Mini iOS7 is showing only Apple Logo which happened during software update. I tried to restore using iTunes but it asking me to response from iPad. But my ipad only shows apple logo. How can i response? How to solve this problem?

    FORCE IPAD INTO RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port.
    DO NOT RELEASE BUTTON until you see picture of iTunes and plug
    5. Release Home button.
    ON COMPUTER
    6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
    7. Select "Restore iPad"...
    Note:
    1. Data will be lost if you do not have backup
    2. You must follow step 1 to step 4 VERY CLOSELY.
    3. Repeat the process if necessary.

  • I want to sync tasks in Outlook with my iPhone. I have tried Toodledo (not good) and Todo. Todo works, but it cuts off most of the text. I only get the beginning of my (long) lists. Any ideas how I can solve this problem?

    I want to sync tasks in Outlook with my iPhone. I have tried Toodledo (not good) and Todo. Todo works, but it cuts off most of the text. I only get the beginning of my (long) lists. Any ideas how I can solve this problem? I starting to regret that I switched to iPhone...

    Usually if you have some kind of hardware failure there is some beeping during POST or most motherboards now have LED indicators to produce and error message based on the type of failure
    So if its bad memory, not place properly, mismatched, processor not inserted properly, mismatched voltage or voltage connector not present etc it beeps or generates the error id.
    Power supplies can be tested for failure. There are some walk throughs for testing just them with a switch, paperclip or a jumper (I'd suggest not doing this if you are not familiar with the dangers of electricity).
    Memory can be tested with memory diagnostics programs like Memtest+
    Processors can overheat if the proper precautions have not been taken usually you will get a POST beep or error code for that.
    If the motherboard has no response then do the basics first:
    Check power connectors and power supply. Once you determine that is not the case move on to other items like graphics cards in all the way or memory.

Maybe you are looking for

  • Generic printing to networked dot matrix printer

    Hello -- I have a NEC MultiImpact 700XX2N (PR-D700XX2N) printer that prints carbon copy forms (switching printer not an option). It has a network interface (with an embedded print server, I believe) and networks fine, but there is no Mac driver. I ca

  • Yahoo sent mail not saved to server when using Mail only.

    Why does my Yahoo sent mail not get saved to the server when I use Apple's Mail program? (I have it saved in settings to keep sent mail on server).  I can see it in my Sent mail folder on Apple Mail but not on the yahoo server.  It's an IMAP account

  • When will I receive Success Kit from Oracle

    I cleared Oracle 10g Amin II exam exactly a month ago;Submitted the Hands on Course Form available at Pearson-Vue online.My exam results have been updated in Cert-view which certifies me as OCP 10g Administrator. But I have run out of my patience and

  • Problem with Pop up key list of values

    I have been looking at a problem with key popup list of values. I have some sql in a report region : select <columns>,"HTMLDB_ITEM.POPUPKEY_FROM_QUERY (47,resource_id,'select last_name,resource_id from rm_resource',30) "resource" , <other columns> fr

  • Can we call a java method from python

    Hi, Can we invoke a java application from python. If yes, can any of you post a sample python script. Also please specify any links if you find useful for this. I do not want to use either Jython or any others for this. I would like to do it particul