Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 796085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:35:10+00:00 2026-05-14T22:35:10+00:00

ERROR: reference to IndexOutOfBoundsException is ambiguous, both class com.sun.star.lang.IndexOutOfBoundsException in com.sun.star.lang and class java.lang.IndexOutOfBoundsException

  • 0

ERROR:

reference to IndexOutOfBoundsException is ambiguous, both class com.sun.star.lang.IndexOutOfBoundsException in com.sun.star.lang and class java.lang.IndexOutOfBoundsException in java.lang match

CODE:

public void insertIntoCell(int CellX, int CellY, String theValue, 
                             XSpreadsheet TT1, 
                             String flag) throws IndexOutOfBoundsException {

    XCell oCell = null;
    oCell = TT1.getCellByPosition(CellX, CellY);

    if (flag.equals("V")) {
      oCell.setValue((new Float(theValue)).floatValue());
    } else {
      if (theValue!=null && theValue.length()>0 && theValue.length()!=0) { 
          oCell.setFormula("'"+(String)theValue.toString());
      } else {
          oCell.setFormula((String)theValue.toString());
      }
    }
  }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:35:11+00:00Added an answer on May 14, 2026 at 10:35 pm

    Fully qualify the exception type.

    public void insertIntoCell.. throws com.sun.star.lang.IndexOutOfBoundsException {
    }
    

    I’m presuming here that you do not intend to throw java.lang.IndexOutOfBoundsException, which is an unchecked RuntimeException, but I could be wrong.

    You can also use a single-type import declaration instead:

    import com.sun.star.lang.IndexOutOfBoundsException;
    //...
    
    public void insertIntoCell.... throws IndexOutOfBoundsException {
    }
    

    But this can potentially cause a lot more confusion down the pipe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am receiving an error on the following line of code: Object reference not
Undefined reference error refers to missing declaration or the definition or both? Compiler: GCC
With this code I have error: Object reference not set to an instance of
Possible Duplicate: Resolving a linker error: undefined reference to static class members This declaration:
Having this annoying error. I keep getting undefined reference to class::method This is the
We have a class LogManager in our Java project which looks like this: public
I am getting this ambiguous reference error with some software that came from a
Can you please tell me why this line of code gives error:- Object reference
why i got this error : Object reference not set to an instance of
I am getting the object reference error in this line: emp[count].emp_id = int.Parse(parts[0]); in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.