Can't figure out why this won't work

Hi,
I'm working on a simple app that just checks to see if a word is a palindrome. So far it works up to the point where it reverses the word, but when I run my if -else statements to check if it is a palindrome or not, it will always say it isn't even if the word actually is a palindrome.
import java.io.*;
public class Main {
    public Main () {
    public static void main(String[] args){
    System.out.println("This program will see if a word is a palindrome.");
    System.out.println("Please enter a word: ");
    BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
    String word = null;
    String wordcopy;
    try {
        word = br.readLine();
    } catch (IOException err) {
        System.out.println("IO error while trying to read the word.");
        System.exit(1);
     wordcopy = PalindromeCheck(word);
     if (wordcopy == word){
        System.out.println("The word is a palindrome.");
     else if (wordcopy != word){
        System.out.println("The word is NOT a palindrome.");
               /* This is always 
               * the output to the user whether it is a palindrome or not
    public static String PalindromeCheck(String word) {
        char[] word1 = word.toCharArray();
        char[] word2 = new char[word1.length];
        int wordlength = (word1.length - 1);
        for (int i = wordlength, j = 0; i >= 0; i--, j++) {
            word2[j]=word1;
System.out.println(word2); /*Checks to make sure it reversed the word*/
return new String(word2);
Any ideas on why it does this would be great.
Thanks a bunch

if (wordcopy == word){Don't use the == operator to compare the contents of two strings, it doesn't do that. Use the equals method instead:if (wordcopy.equals(word)){And by the way, if you start withif (conditionX)then you don't need to follow on withelse (not conditionX)That second test is redundant. A plain old "else" would do there.

Similar Messages

  • Can't figure out why this won't position correctly, please help

    Hello,
    I am working on a site, and the right menu bar for some reason is lower than it should be. Here is the url to see what I mean: http://www.kyledake.com/testindex.html
    The menu bar with the schedule/twitter should be hugging the main menu running on the top. I checked the padding on my CSS and couldn't find any issues. Please help!

    Start by fixing your code errors.
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.kyledake.com%2Ftestindex.html
    Nancy O.

  • Can't figure out why tweener won't work after an loader is added to stage

    Hey all, I am working on an imageHolder class that will let me load an image into and then when the image has finished loading I want the default graphic that is a placeholder to fade out. Everything is working except one thing when the image has finished loading an is added to the stage I can't seem to get tweener to fade out the placeholder graphic. The weird part is that tweener in the onLoadComplete handler works for resizing the placeholder (and alpha as I did do a test with this also). Hope someone can help me shed some light on what my issue is.
    package com.jeremyseverson.display
         import caurina.transitions.*;
         import flash.display.Bitmap;
         import flash.display.Loader;
         import flash.display.Shape;
         import flash.display.Sprite;
         import flash.events.Event;
         import flash.net.URLRequest;
         public class ImageHolder extends Sprite
              private var placeHolder:Shape;
              private var loaderRef:Loader;
              private var urlRequest:URLRequest;
              private var _width:Number;
              private var _height:Number;
              private var _url:String;
              public function ImageHolder(url:String,w:Number,h:Number,color:uint)
                   _url = url;
                   _width = w;
                   _height = h;
                   placeHolder = new Shape();
                   placeHolder.graphics.beginFill(0x000000);
                   placeHolder.graphics.drawRect(-w/2,-h/2,w,h);
                   placeHolder.graphics.endFill();
                   placeHolder.graphics.beginFill(color);
                   placeHolder.graphics.drawRect((-w/2)+10,(-h/2)+10,w-20,h-20);
                   placeHolder.graphics.endFill();
                   addChild(placeHolder);
                   load(_url);
              private function load(url:String):void
                   loaderRef = new Loader();
                   urlRequest = new URLRequest(url);
                   loaderRef.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
                   loaderRef.load(urlRequest);
              private function onLoadComplete(evt:Event):void
                   var loaderRef:Loader = evt.target.loader as Loader;
                   loaderRef.contentLoaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
                   var bmp:Bitmap = loaderRef.content as Bitmap;
                   bmp.x = -bmp.width/2;
                   bmp.y = -bmp.height/2;
                   bmp.smoothing = true;
                   var scaleVal:Number = loaderRef.width / loaderRef.height;
                   var dWidth:Number = _width;
                   var dHeight:Number = _height;
                   if (scaleVal > 1) dHeight /= scaleVal;
                   if (scaleVal < 1) dWidth *= scaleVal;
                   loaderRef.width = dWidth;
                   loaderRef.height = dHeight;
                   Tweener.addTween(placeHolder,{width:dWidth,height:dHeight,time:1,onComplete:onTweenComplete});
              private function onTweenComplete():void
                   loaderRef.addEventListener(Event.ADDED_TO_STAGE, onLoaderAdded);
                   addChild(loaderRef);
              private function onLoaderAdded(evt:Event):void
                   this.setChildIndex(loaderRef,0);
                   loaderRef.removeEventListener(Event.ADDED_TO_STAGE, onLoaderAdded);
                   Tweener.addTween(placeHolder,{alpha:0});

    I should also note that the fade out does happen but it is just a quick cut. Does not matter what I set the time value for in the tween.

  • I'm having trouble buying a season pass for The Americans. I have purchased passes to Justified for the past 4 years with no problem. Can't figure out why this purchase won't work.

    I'm having trouble buying a season pass for The Americans. I have purchased passes to Justified for the past 4 years with no problem. Can't figure out why this purchase won't work.

    What is the problem that you are having ? If you are getting an error message then what does it say ?

  • I'm trying to make an in app purchase and it keeps telling me to come to the support page but I can't figure out why it won't let me do it

    I'm trying to make an in app purchase and it keeps telling me to come to the support page but I can't figure out why it won't let me do it

    And I have gone to the support and it was no help

  • Almost every time my daughter FaceTimes me, another person answers and he is getting very annoyed. I have checked my settings and can't figure out why this is happening.

    Almost every time my daughter FaceTimes me, another person answers and he is getting very annoyed. I have checked my settings and can't figure out why this is happening.

    Is she facetiming your phone number or email address, b/c email address should not do that.. Was there an old iPhone associated with your number or email?  I've seen texts show up on long "deactivated" devices..

  • I can't figure out why this page splits in live preview... but not in the browser?

    I've finally got my site up and it all runs great... except I can't figure out why this one page behaves like it's too wide.
    http://www.johnnez.com/mainbooks.html
    It comes apart in the Live Preview.... but not in the browser preview.
    Thanks for any tips...
    jn

    john nez wrote:
    HTML is a total incrutable mystery to me... a mystery inside a mystery inside a mystery!
    Sounds to me like you've almost cracked it!
    You have one error that could cause problems and that's the stray </blockquote> tag.  Just delete it.
    The alt="" text will show as an error on the validator but that's easy to fix and worth doing.
    Here's an easy article on that: http://www.456bereastreet.com/archive/200412/the_alt_and_title_attributes/
    In one of your CSS files (JonzheaderindexCSS.css) you have this:
    body {
    margin-top: 20px;
    padding: 0;
    color: #666;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    line-height: normal;
    background-attachment: fixed;
    background-color: #E1B852;
    background-image: url(../images/orange%20plaid.jpg);
    background-repeat: repeat;
    html { overflow-y: scroll; }
    It should be like this:
    html {
    overflow-y: scroll;
    body {
    margin-top: 20px;
    padding: 0;
    color: #666;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    line-height: normal;
    background-attachment: fixed;
    background-color: #E1B852;
    background-image: url(../images/orange%20plaid.jpg);
    background-repeat: repeat;
    It looks like you have that rule repeated further down the page like this:
    html { overflow-y: scroll; }
    There's an extra curly brace there (}) anyway, so it is badly formed but the whole rule and extra curly brace can go.
    You can fix those errors but I have a sneaky suspicion that it isn't gong to solve the issue you describe.
    Fix those issues anyway and post back.  Maybe if you can show a screen shot of what you are seeing in DW it might help?
    Martin
    PS: It's never a good idea to have file names on the web that have spaces in.  Your background rule has this:
    background-image: url(../images/orange%20plaid.jpg);
    That .jpg should be orangeplaid.jpg or orangePlaid.jpg or orange_plaid.jpg and the change should be reflected in the reference to the image so, orangePlaid.jpg should be:
    background-image: url(../images/orangePlaid.jpg);

  • [svn] 819: Can't figure out why this broke the build, but reverting it for further investigation

    Revision: 819
    Author: [email protected]
    Date: 2008-03-14 13:51:51 -0700 (Fri, 14 Mar 2008)
    Log Message:
    Can't figure out why this broke the build, but reverting it for further investigation
    Modified Paths:
    flex/sdk/trunk/build.xml

    Revision: 819
    Author: [email protected]
    Date: 2008-03-14 13:51:51 -0700 (Fri, 14 Mar 2008)
    Log Message:
    Can't figure out why this broke the build, but reverting it for further investigation
    Modified Paths:
    flex/sdk/trunk/build.xml

  • Every e-mail I get comes with a duplicate. I've tried looking at the different features of the program, but I can't figure out why this is happening. Help!

    This has been happening for several years now. After one of the updates, I started getting the duplicates. I've lived with problem for a long time because I could still get e-mails, if over abundantly. My e-mail volume has gone up and up, however, and I'm now getting 60 or 70 e-mails a day because of this problem. Can someone tell me how to fix this?

    I think I might have figured out what the problem is. I have inadvertently set up two Thunderbird accounts. When I followed your advice, I was able to open the pop folder. I also had a mail folder and opened it to find another pop folder. In both pop folders I found a popstate.dat file. When I went into account settings, I found that I had somehow set up two cbldw accounts. The one at the top said mail as incoming server. The second account showed pop as the incoming server. Now this is what perplexes me. Do I attempt to get rid of one of the accounts? I took both popstate.dat files out of the folders and put them on my desktop. When I went back into the two mail folders, behold, the popstate. dat files were still in the folder, having been altered at the time I took them out of the folders.
    I'm really in a quandary as to how to proceed. I'm not sure I can delete the second Thunderbird account without wrecking havoc on my primary e-mail source, and there are a few subtle differences in the two different preferences sections.
    Any helpful suggestions?

  • Can someone help me figure out why this didn't work?

    I recently gave my iMac to my nieces....I erased and reinstalled the osx from my disks that came with the program.
    They HAD one of the Mac Minis (an old one...g4 I think).
    When we started up the iMac, I used the Firewire connection to transfer all the data during setup. we transferred everything.
    So far, I have encountered the following problems:
    1. When I opened iPhoto for the first time, it says "the library needs to be upgraded, etc etc...." so I choose to upgrade it, but the application QUITS.
    2. When I try to open iTunes for the first time, it says the the iTunes library was created using an older version and cannot be read. The application quits.
    3. The iMac is currently running OS Tiger, and when I try to put the Snow Leopard disk in, I couldn't even double click it to start it in order to install it?
    I have not yet tried any other applications, but does anyone know how I can fix this? I have started all of my new macs using the firewire and I've never had a problem. I am assuming it's because it was such "old" versions of the programs that there is a problem?
    The only thing that I can think of, was to possibly erase and reinstall again, NOT use firewire, set the computer up without the mini, and then somehow bring her photos over to the iMac separately ? Can this be done ? Will I be able to start the iMac and use the same user settings (names, passwords, etc).
    Any help would be appreciated...this is the first time it didn't "just work" and I am lost !

    christine major wrote:
    The only thing that I can think of, was to possibly erase and reinstall again
    that might not be a bad idea. and, yes, you should use the +firewire method+ to migrate @ least some of the data using setup assistant (which launches automatically once you have reinstalled OS X). you should be able to safely migrate everything but applications. i would re-install 3rd party applications manually and, since you migrated the user data earlier, you will find that you won't have to re-enter any license numbers or settings.
    Pondini has a brilliant [walkthrough|http://web.me.com/pondini/AppleTips/Setup.html] for you. just deselect the applications @ the prompt.
    when the migration process is done, i would immediately +repair permissions+, then restart. next, i would run software update from the  menu and install any updates offered. repair permissions again and restart.
    @ this stage, you might want to try to upgrade to SL again.
    as for the iTunes library, the simplest way would again be to connect the two Macs with a firewire cable, boot the source Mac in _*Target Disk Mode*_ (TDM), and copy the entire iTunes folder (not just the iTunes music folder) from <MacintoshHD>/users/<yourname>/music on the source (Mini) to <MacintoshHD>/users/<yourname>/music on the target (overwriting the iTunes folder in place there). since you updated all software components earlier, you shouldn't see that error message again.
    the iPhoto library can be copied manually, too. again, using TDM, just drag and drop from source to target. see this user tip for locations: _*where important data is stored*_ (one correction to this link: iCal data is stored in ~/library/calendars).
    JGG

  • Can't figure out why this object = null

    I have a component which is used as an itemrenderer(in a
    datagrid). Inside the checkIfEditable() function it can't seem to
    find "img". It says it's null. I've got no clue why it would do
    that? If I look at the this.img variable during debugging it also
    says null.

    I fixed it by removing the HBox from the itemrenderer's
    component and doing like this:
    <mx:DataGridColumn headerText="" dataField="Open">
    <mx:itemRenderer>
    <mx:Component>
    <mx:HBox horizontalAlign="center" width="18">
    <local:OpenKastRenderer data="{data}"
    isEditable="{isEditable}"/>
    </mx:HBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    Altough now i get another error: Access of undefined property
    isEditable.(it's talking about {isEditable})
    I don't get why it says that, isEditable is defined as
    [Bindable]
    public var isEditable:int = new int();
    outside of any function and it's set by another component.
    EDIT: nevermind, i've made it static

  • Why are you not working? I can't figure out why this works in 1 doc, and not in another

    I'm trying to take info from a cell on 1 spreadsheet and have it populate into a different one (pending if checkbox is true or not). I've been able to do it with 2 files but for some reason this one isn't doing what I need. If the checkbox is unchecked the text should stay in the new spreadsheet cell, if it's checked I want the row removed, but for reason instead of removing the row it just places a 0 in the cell.
    This is what I want:
    Like I said it works great on the other doc, just not on this new one. (the 2 docs vary with some of the text, but in the second image I've "checkboxed" out some of the text)
    Please help!
    Thanks!
    Nikki

    You may have the wrong cell reference  (B2) in the second part of your formula. If B2 is empty, the result will be displayed as a 0. Did you mean to have A2 in both parts of the formula?
    SG

  • Can anyone figure out why this runs into an infinite loop?

    Hi,
    I have the following class, and if i run it, I encounter an infinite loop. I have pinpointed the problem and it is because of the lines:
    try {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            catch (Exception exp) {
                   System.err.println("Failed");
                exp.printStackTrace();
            }Here is the class. Any and all help is greatly appreciated. Thanks!
    package org.aemf.clinical.tol.gui.printing;
    import org.aemf.clinical.tol.model.TOLBion;
    import org.aemf.clinical.tol.model.Range;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.*;
    import java.awt.print.*;
    import java.awt.*;
    import java.util.Iterator;
    import java.util.ArrayList;
    * Created by IntelliJ IDEA.
    * User: arashn
    * Date: Feb 9, 2005
    * Time: 1:26:38 PM
    public class printTableTest implements Printable, Pageable {
         private PageFormat pf;
         private String[] headers = { "Heading 1", "Heading 2", "Heading 3"};
         private java.util.List bions = null;
         private ArrayList<Object[][]> data = new ArrayList<Object[][]>();
         public printTableTest(PageFormat format) {
              this.pf = format;
         public int getNumberOfPages() {
            return 1;
        public PageFormat getPageFormat(int pageIndex) throws IndexOutOfBoundsException {
            return pf;
         public void setBions(java.util.List b) {
              bions = b;
              for(int x=0; x < 3; x++) {
                   //TOLBion bion = (TOLBion) bions.get(x);
                   int ndx = 0;
                   //Object[][] tempData = new Object[bion.getNumRanges()][3];
                   Object[][] tempData = new Object[2][3];
              //     for (Iterator itr = bion.getRanges(); ndx < 2 && itr.hasNext(); ) {
                   for (; ndx < 2 ; ) {
                   // Range range = (Range)itr.next();
                        //tempData[ndx] = new Object[] { new Integer(range.getFrequency()), range.getLowerBound(), range.getUpperBound() };
                        tempData[ndx] = new Object[] { "col 1: " + x, "col 2: " + x, "col 3: " + x };
                        ndx++;
                   data.add(tempData);
        public Printable getPrintable(int pageIndex) throws IndexOutOfBoundsException {
            return this;
         public int print(Graphics g, PageFormat format, int pageIndex) throws PrinterException {
              if(pageIndex > 1) {
                   return Printable.NO_SUCH_PAGE;
                                                                              System.err.println("Page: " + pageIndex);
              JFrame frame = null;
              JTable tableView = null;
              Graphics2D g2 = (Graphics2D) g;
              //Object[][] data = new Object[3][3];
              g2.setColor(Color.black);
              g2.translate(format.getImageableX() + 72, format.getImageableY() + 72);
              for(int x=0; x < data.size(); x++) {
                   tableView = new JTable(new PrintTableModel(headers, data.get(x)));
                   frame = new JFrame();
                   JScrollPane scrollpane = new JScrollPane(tableView);
                   scrollpane.setPreferredSize(new Dimension(300, 80));
                   frame.getContentPane().setLayout(new BorderLayout());
                   frame.getContentPane().add(BorderLayout.CENTER,scrollpane);
                   frame.pack();
                   tableView.paint(g2);
                   g2.translate(0, - tableView.getTableHeader().getHeight());
                   tableView.getTableHeader().paint(g2);
                   g2.translate(0, format.getImageableHeight()/3);
              return Printable.PAGE_EXISTS;
         public static void main(String args[]) {
              PrinterJob printerJob = PrinterJob.getPrinterJob();
              try {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            catch (Exception exp) {
                   System.err.println("Failed");
                exp.printStackTrace();
             int INCH = 72;
              double LETTER_WIDTH = 8.5 * INCH;
              double LETTER_HEIGHT = 11 * INCH;
            Paper paper = new Paper();
              int margin = INCH/6; // << set your margins here
              double pageWidth = LETTER_WIDTH - 2 * margin;
              double pageHeigth = LETTER_HEIGHT - 2 * margin;
              paper.setImageableArea(margin, margin, pageWidth, pageHeigth) ;
              PageFormat format = printerJob.defaultPage();
              format.setPaper(paper);
            printTableTest pp = new printTableTest(format);
            pp.setBions(new ArrayList());
              printerJob.setPageable(pp);
              boolean doPrint = printerJob.printDialog();
              if (doPrint) {
                   try {
                        printerJob.print();
                   } catch (PrinterException exception) {
                        System.err.println("Printing error: " + exception);
             System.exit(0);
         private class PrintTableModel extends AbstractTableModel {
              private Object[][] data = null;
              private String[] headers = null;
              public PrintTableModel(String[] headers, Object[][] data) {
                   this.headers = headers;
                   this.data = data;
              public int getColumnCount() { return headers.length; }
              public int getRowCount() { return data.length; }
              public Object getValueAt(int row, int col) { return data[row][col]; }
              public String getColumnName(int column) { return headers[column]; }
              public Class getColumnClass(int col) { return getValueAt(0,col).getClass(); }
              public boolean isCellEditable(int row, int col) { return false; }
              public void setValueAt(Object aValue, int row, int column) { data[row][column] = aValue; }
    }

    I have managed to create an even simpler version which tries to print the same header 3 times. Again, if you remove the setLookAndFeel line, everything works out great.
    import javax.swing.table.*;
    import javax.swing.*;
    import java.awt.print.*;
    import java.awt.*;
    * Created by IntelliJ IDEA.
    * User: arashn
    * Date: Feb 9, 2005
    * Time: 1:26:38 PM
    public class printTableTest implements Printable, Pageable {
         private PageFormat pf;
         public printTableTest(PageFormat format) {
              this.pf = format;
         public int getNumberOfPages() {
            return 1;
        public PageFormat getPageFormat(int pageIndex) throws IndexOutOfBoundsException {
            return pf;
        public Printable getPrintable(int pageIndex) throws IndexOutOfBoundsException {
            return this;
         public int print(Graphics g, PageFormat format, int pageIndex) throws PrinterException {
              if(pageIndex > 1) {
                   return Printable.NO_SUCH_PAGE;
              System.err.println("Printing Page: " + pageIndex);
              Graphics2D g2 = (Graphics2D) g;
              g2.setColor(Color.black);
              g2.translate(format.getImageableX() + 72, format.getImageableY() + 72);
              DefaultTableColumnModel dtcm = new DefaultTableColumnModel();
              TableColumn tc = new TableColumn();
              tc.setHeaderValue("Heading 1");
              dtcm.addColumn(tc);
              tc.setHeaderValue("Heading 2");
              dtcm.addColumn(tc);
              tc.setHeaderValue("Heading 2");
              dtcm.addColumn(tc);
              JTableHeader tableHeader = new JTableHeader(dtcm);
              JScrollPane scrollpane2 = new JScrollPane(tableHeader);
              scrollpane2.setPreferredSize(new Dimension(300, 80));
              JFrame frame2 = new JFrame();
              frame2.getContentPane().add(BorderLayout.NORTH,scrollpane2);
              frame2.pack();
              for(int x=0; x < 3; x++) {                   
                   tableHeader.paint(g2);
                   g2.translate(0, format.getImageableHeight()/3);
              return Printable.PAGE_EXISTS;
         public static void main(String args[]) {
              PrinterJob printerJob = PrinterJob.getPrinterJob();
              try {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            catch (Exception exp) {
                   System.err.println("Failed");
                exp.printStackTrace();
             int INCH = 72;
              double LETTER_WIDTH = 8.5 * INCH;
              double LETTER_HEIGHT = 11 * INCH;
            Paper paper = new Paper();
              int margin = INCH/6; // << set your margins here
              double pageWidth = LETTER_WIDTH - 2 * margin;
              double pageHeigth = LETTER_HEIGHT - 2 * margin;
              paper.setImageableArea(margin, margin, pageWidth, pageHeigth) ;
              PageFormat format = printerJob.defaultPage();
              format.setPaper(paper);
            printTableTest pp = new printTableTest(format);
              printerJob.setPageable(pp);
              boolean doPrint = printerJob.printDialog();
              if (doPrint) {
                   try {
                        printerJob.print();
                   } catch (PrinterException exception) {
                        System.err.println("Printing error: " + exception);
             System.exit(0);
    }

  • My mail outbox wont go online.  Inboxes work fine.  Just upgraded my old iMac to OS 10.6.8, kept my internet provider, entered all the same numbers and settings so can't figure out why mail won't go out.  Help.  S.T.

    My eMail outbox won't go online.  I can't send eMail messages but I am currently receiving my messages.
    Just upgraded my older iMac to 10.6.8 but kept the same eMail addresses (Google), the same provider (Cricket Broadband), and entered all the same settings in Mail Preferences and Accounts as before.
    Any suggestions as how to get my outbox online so I can send mail?
    ST

    Hello,
    Who is your eMail provider, the part after the @ sign?
    In Mail's Window Menu, choose Connection Doctor, any red dots for status, if so what is the message?
    Then click the Show Details button & Check again.
    Mail: Can't send messages, "Cannot send message using the server smtp.xxxxx.com" alert appears...
    old: http://support.apple.com/kb/TS1482
    What SMTP setting do you have for gMail?
    Did you get rid of any old passwords in Keychain Access?

  • Can't figure out why this is happening ??

    Hello All,
    Oracle 11g and 9i on redhat5
    I am trying to run the following procedure:
    begin
    -- Call the procedure
    com.lex_tys_get_random(p_county => 15, p_how_many => 25);
    end;
    I get the following error message: (The schema is 'com')
    ERROR at line 5:
    ORA-06550: line 5, column 9:
    PLS-00302: component 'LEX_TYS_GET_RANDOM' must be declared
    ORA-06550: line 5, column 3:
    PL/SQL: Statement ignored
    When I remove the schema name in front, it does work successfully.
    begin
    -- Call the procedure
    lex_tys_get_random(p_county => 15, p_how_many => 25);
    end;
    *** procedure executed successfully.
    I have a synonym on this, but that's not the issue. With the schema name it fails, without it, it's fine... Appreciate your assistance.
    RB
    Edited by: ronthe11gdba on Sep 28, 2009 8:32 PM

    Does the user you are running com's procedure as have an object named com by any chance?
    SQL> create user com identified by com;
    User created.
    SQL> grant create session, create procedure, create public synonym to com;
    Grant succeeded.
    SQL> create user notcom identified by notcom;
    User created.
    SQL> grant create session, create procedure to notcom;
    Grant succeeded.
    SQL> connect com/com
    Connected.
    SQL> create procedure p (p_word in varchar2) as
      2  begin
      3     dbms_output.put_line('User com says '||p_word);
      4  end;
      5  /
    Procedure created.
    SQL> grant execute on p to notcom;
    Grant succeeded.
    SQL> create public synonym p for p;
    Synonym created.
    SQL> connect notcom/notcom
    Connected.
    SQL> create package com as
      2     procedure proc (p_word in varchar2);
      3  end;
      4  /
    Package created.
    SQL> create package body com as
      2  procedure proc (p_word in varchar2) is
      3  begin
      4     dbms_output.put_line('package com says '||p_word);
      5  end;
      6  end;
      7  /
    Package body created.
    SQL> set serveroutput on
    SQL> exec p('Hi There');
    User com says Hi There
    PL/SQL procedure successfully completed.
    SQL> exec com.p('Hi There');
    ERROR at line 1:
    ORA-06550: line 1, column 11:
    PLS-00302: component 'P' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignoredJohn

Maybe you are looking for