.class error in program

I keep getting an error on the lines with factorial(term). Not sure if I am writing that part correctly. I am trying to write an expression representing sin and cosine using a while loop for sin and do-while for cos. I have my results set up to print in another class. Any advice would be great.
public class NewMath
* computeSin uses the power series to compute the sin of x;
* @return sin(x)
* @param x is the angle in radians
public static double computeSin(double x)
double result = x;
// WHILE LOOP
int term= 3;
int sign= 1;
double numerator = Math.pow(x , term);
double denominator = factorial(int term);
while((numerator < Double.POSITIVE_INFINITY) && (denominator < Double.POSITIVE_INFINITY)){
result = result + Math.pow(x,term) / ( factorial(term)) * sign;
term = term + 2;
sign = -1 * sign;
return result;
* computeCos uses the power series to compute the cos of x;
* @return cos(x)
* @param x is the angle in radians
public static double computeCos(double x)
double result = 1;
//DO-WHILE loop
int term= 2;
int sign= 1;
double numerator = Math.pow(x , term);
double denominator = factorial(int term);
do{result= result + Math.pow(x, term) / (factorial(term) * sign);
                  term= term + 2;
                  sign = -1 * sign;  
while((numerator < Double.POSITIVE_INFINITY) && (denominator < Double.POSITIVE_INFINITY));
return result;
private double factorial(int x) {
if (x <= 1) return 1.0;
else return x * factorial(x - 1);
}

Advice:
When you post code, format it. After pasting the code, select it, and click the code button above the entry area. Then use the preview buttom to see that it's what you want.
When you have a problem, reduce the code to a small test case that exhibits the problem, and paste the exact error text(s) that occur with the posted code. Accompany that with a clearly written description of the problem, and the expected results.
It's not our job to find and define the problem, you need to do that prior to posting. We can't know what your environment is, so compiling your code may or may not produce the results you get.
Good programming to you.

Similar Messages

  • Workbook Migration-System error in program CL_RSR_XLS_VIEW and from ASSIGN_

    Hi Experts,
    We are migrating workbooks from 3.x to BI 7. While opening the workboon from BI 7 Analyzer we are getting the following System Error  and Disconnecting from BW server.
    'Program Error in class SAPMSSY1 method UNCAUGHT_EXCEPTION. System error in program CL_RSR_XLS_VIEW and from ASSIGN_QUERY_2_DP03'."
    We are at support pack level 17 and GUI - 710 with patch level 8.
    If you have experienced with the above errors. Please respond.
    Thanks
    DB

    Hi Naveen,
    In migration you will get all these errors related to Front end. First save the Existing 3.x workbook   so that the old version of the workbook will be saved into new Excel version (2003). now try to migrate the workbook , this time you will not get this error.
    The root cause for this problem would be all your workbboks have been created erlier in very old version of  Excel.
    Thanks
    DB

  • System error in program CL_RSMD_RS_0CALWEEK

    As of this morning we are getting an error (see below) when we run reports on the portal. Apparently all reports that refer to 0CALWEEK one way or another are crashing.
    The bizarre thing is that if I run the same reports in BEx analyzer, the reports don't crash ... the run just fine.
    Anyone ever experienced something like this?
    Any help or suggestions are appreciated.
    Thank you
    Marco
    500 Internal Server Error
    BEx Web Application
    Failed to process request. Please contact your system administrator.
    [Hide]
    Error Summary
    While processing the current request, an exception occured which could not be handled by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator.
    To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
    Root Cause
    The initial exception that caused the request to fail, was:
    Termination message sent
    ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
      MSGV1: SAPMSSY1
      MSGV3: UNCAUGHT_EXCEPTION
    com.sap.ip.bi.base.application.exceptions.AbortMessageRuntimeException: Termination message sent
    ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
      MSGV1: SAPMSSY1
      MSGV3: UNCAUGHT_EXCEPTION
    at com.sap.ip.bi.base.application.message.impl.MessageManager.addMessageInternal(MessageManager.java:148)
    at com.sap.ip.bi.base.application.message.impl.MessageManager.addMessage(MessageManager.java:113)
    Details: Full Exception Chain
    Messages
    ABEND: Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
    ABEND: System error in program CL_RSMD_RS_0CALWEEK and form VALUES_GENERATE-01 (see long text)

    I submitted a ticket for this issue and I got directions to apply OSS note 1018814.
    I don't know if this would solve your issue or not but based on our current situation here at my company, (version and SP level), the support person indicated that the OSS note he indicated was the best choice to fix it.

  • "method not found in class " error message !

    Dear People,
    I have an error message that says:
    "Clerk.java": Error #: 300 : method doTransaction(stan_ch15p622.Transaction) not found in class stan_ch15p622.Bank at line 36, column 12
    below is the Clerk class of the program.
    doTransaction() is defined below the constructor and is called at the
    bottom of the class.
    Thank you in advance
    Stan
    package stan_From_Ivor_Horton_ch15p622;
    public class Clerk implements Runnable
    private Bank theBank; // the employer. who the clerk works for
    private Transaction inTray; //holds a transaction
    public Clerk(Bank theBank)
    this.theBank = theBank;
    inTray = null; // no transaction initially
    //receive a transaction
    public void doTransaction(Transaction transaction)
    inTray = transaction;
    //The working clerk...
    public void run()
    while(true) // no transaction waiting ?
         while(inTray == null)
         try
         Thread.sleep(150); // then take a break
    catch(InterruptedException e)
         System.out.println(e);
         theBank.doTransaction(inTray);
         inTray = null;
    //you can check whether a clerk is busy by calling the isBusy() member
    // it returns true if the transaction is strill in progress
    public boolean isBusy()
    return inTray != null;
    }

    Dear Hambone3,
    Due to your help I was able to correct my error. I mispelled the
    method in the Bank class. I wrote "toTransaction" instead of
    "doTransaction".I have alwyas had a hard time interrpreting the
    error messages literally because many times I don't see the
    connection between the message and the error. Cold water over
    the brain is sometimes what I need.
    God bless you.
    Stan

  • Create_dynamic_table - error  "Load program not found"

    Hi experts,
    i have receive error "Load program not found" at CALL METHOD cl_alv_table_create=>create_dynamic_table
    Runtime Error          LOAD_PROGRAM_NOT_FOUND
    Exception              CX_SY_PROGRAM_NOT_FOUND
    Error analysis                                                                               
    An exception occurred. This exception is dealt with in more detail below     
    . The exception, which is assigned to the class 'CX_SY_PROGRAM_NOT_FOUND', was
    neither                                                                     
    caught nor passed along using a RAISING clause, in the procedure             
    "FB_TABLE_CREATE_STRING" "(FORM)"                                           
    Since the caller of the procedure could not have expected this exception     
    to occur, the running program was terminated.                               
    The reason for the exception is:                                             
    On account of a branch in the program                                        
    (CALL FUNCTION/DIALOG, external PERFORM, SUBMIT)                             
    or a transaction call, another ABAP/4 program                                
    is to be loaded, namely " ".                                                                               
    However, program " " does not exist in the library.                          
    I'm stuck in this annoying problem,,,can anyone help me?

    Hi Maroz,
    I know this is not best practise to post my question in some others,  but i have posted it separately earlier
    Dynamic ITAB from Excel
    I have created a dynamic ITAB from 1 Row of Excel Sheet
    LOOP AT ist_excel INTO w_excel WHERE row = 2. " Contains the Values provided in 2nd row of Excel
        APPEND w_excel TO row1.
      ENDLOOP.
      LOOP AT ist_excel INTO w_excel WHERE row = 3. " Contains the Values provided in 3rd row of Excel
        APPEND w_excel TO row2.
      ENDLOOP.
      LOOP AT ist_excel INTO w_excel WHERE row = 4." Contains the Values provided in 4th row of Excel Etc
        APPEND w_excel TO row3.
      ENDLOOP.
      LOOP AT row1 INTO w_excel.
        CLEAR wa_it_fldcat.
        wa_it_fldcat-fieldname = w_excel-value .
        wa_it_fldcat-datatype = 'C'.
        wa_it_fldcat-inttype = wa_details-type_kind.
        wa_it_fldcat-intlen = 40.
    *  wa_it_fldcat-decimals = wa_details-decimals.
        APPEND wa_it_fldcat TO it_fldcat .
      ENDLOOP.
    * Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fldcat
        IMPORTING
          ep_table        = new_table.
      ASSIGN new_table->* TO <dyn_table>.
    * Create dynamic work area and assign to FS
      CREATE DATA new_line LIKE LINE OF <dyn_table>.
      ASSIGN new_line->* TO <dyn_wa>.
    I followed the Link provided by to create a Dynamic ITAB
    Please guide me how to pass these Value from excel to Dynamic Internal Table
    Warm Regards
    Ramchander

  • System error in program CL_RSMD_RS_SPECIAL

    I have a query built on a Infoset, and the problem comes with 0FISCPER variable, when we try to do a input help (F4) in Bex. this happens only when I use fiscper on queries bulit on INFOSETS, and it works perfectly alright with all other cubes. We are on SP13. So do anyone know how to fix this issue, or a single OSS that can fix this issue.
    System error in program CL_RSMD_RS_SPECIAL and form
    IF_RSMD_RS~READ_META_DATA-02 (see long text)
    Message no. BRAIN299
    Diagnosis
    This internal error is an intended termination resulting from a program
    state that is not permitted.
    Procedure
    Analyze the situation and inform SAP.
    If the termination occurred when you executed a query or Web template,
    or during interaction in the planning modeler, and if you can reproduce
    this termination, record a trace (transaction RSTT).
    For more information about recording a trace, see the documentation for
    the trace tool environment as well as SAP Note 899572.
    and in portal, it gets to the point of variable screen and then throws a error msg.
    ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
    MSGV1: SAPMSSY1
    MSGV3: UNCAUGHT_EXCEPTION

    I was a lil late on this time
    However;i found a note below which exactly matches your infoset issue and 0fiscper,but i believe that SP-14 did the trick.
    any ways good luck
    Note 1058906 - GET_DIME_VALUES-02 in CL_RSMD_RS_SPECIAL
    Hope it Helps
    Chetan
    @CP..

  • System error in program SAPLRRI2 and form GET_QUERY_PROPERTIES-01

    Hi All,
    I'm configuring the integration between BW 7 SP 11 and Portal 7 SP11. I have problems in the IP functions.
    The following error ocurrs in QueryDesigner when trying to execute a Query that is on an <b>Agregation Level</b> :
    <i>The initial exception that caused the request to fail, was:
    Termination message sent
    ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
      MSGV1: SAPMSSY1
      MSGV3: UNCAUGHT_EXCEPTION
    com.sap.ip.bi.base.application.exceptions.AbortMessageRuntimeException: Termination message sent
    ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
      MSGV1: SAPMSSY1
      MSGV3: UNCAUGHT_EXCEPTION
    at com.sap.ip.bi.base.application.message.impl.MessageManager.addMessageInternal(MessageManager.java:148)
    at com.sap.ip.bi.base.application.message.impl.MessageManager.addMessage(MessageManager.java:113)
    ABEND: Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
    ABEND: System error in program SAPLRRI2 and form GET_QUERY_PROPERTIES-01- (see long text)</i>
    When I execute Querys that are on Infoproviders, everything is ok.
    Any Idea??
    Thnks a lot!!!
    Yolanda.

    Hi,
    Are you getting an ST22 dump in the backend, we used to get this kind of error in case of hierarchies, please check 2 things
    1. Agg level is active
    2. Check the query (option is available on query designer)
    thanks

  • System Error in program CL_RSR executing queries

    Hi,
    We have several queries created from multiprovider X and these queries are included in a workbook. Multiprovider is active and fine (I have used the programs RSCOMPCONS and RSR_MULTIPROV_CHECK return status OK).
    When I open the workbook the followings error messages are showed (before selection screen):
    - System error in class SAPMSSSY1 method: UNCAUGHT_EXCEPTION
    - System error in program CL_RSR and FORM GET_INITIAL_CHAVL_OFF-02-
    We are looking sap notes (we are in the new version 7.30, Support package 5) in order to solve this error but We don't find the solution.
    Please, could you help me?
    Thanks!

    Might require to collect the workbooks, queries along with the MP & perform a transport. Please collect the roles also. This must solve.

  • System Error in program SAPLRRS2 and form GET_SID-1 -(see long text)

    Hello all,
    One of the users is trying to run a report in Production using BEx analyser and gets the following error.
    BI Server error:
    Program error in class SAPMSSY1 method: UNCAUGHT_EXCEPTION
    System Error in program SAPLRRS2 and form GET_SID-1 -(see long text)
    I have already run the SAP Note 1237190 but there is no use as the error comes up again.
    Could any one please help to resolve this issue.
    Thanks
    Phani.

    Hi Dipika
    Thanks for the reply.
    But I dont think that note is applicable for this error as this error pops as soon as the selection screen is past and before the report is displayed.
    This is not happening with all the users though.
    Its a random problem only.
    Thanks
    Phani.

  • PSA deletion variant - Syntax error in program "SAPLRS_PSA_DEL_GUI

    Hi.
    Recently, we have implemented the note 1357168 to overcome the error "Object name &1 after the prefix has to start with ABC...XYZ".
    But after that if we maintain any PSA/Change log variant we are getting the below error Syntax error in program "SAPLRS_PSA_DEL_GUI.
    We have identified the class CL_RS_PSA_DEL_MASS_DELETION for that. but not able to figure it out what is the issue.
    please help.

    check this
    Note 1388321 - 7.01SP6:Short dump in maintaining PSA deletion variant

  • SE80 Dump - Syntax error in program CL_GUI_ALV_GRID

    Hi,
    We have applied 2 sap notes and after this there were some inactive objects.
    1353846 & 875986.If i go ST22 /SE 80 i am getting thes dumps.. I tried checking inactive object via SE38/Environment Se24/Environment i get the same dump..
    Unkowingly We did it in wrong sequence so de-implemented but still have some inactive objects how do we activate those class files.
    Already logged a ticket with SAP but curious to know if there is anyway to resolve this issue.
    Short text
         Syntax error in program "CL_GUI_ALV_GRID===============CP ".
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "CL_DD_AREA====================CP" had to b
          terminated because it has
         come across a statement that unfortunately cannot be executed.
         The following syntax error occurred in program
          "CL_GUI_ALV_GRID===============CP " in include
          "CL_SALV_BS_DATA===============CU " in
         line 10:
         "Type "IF_SALV_BS_DATA" is unknown"
         The include has been created and last changed by:
         Created by: "SAP "
          Error in the ABAP Application Program
         The current ABAP program "CL_DD_AREA====================CP" had to b
          terminated because it has
         come across a statement that unfortunately cannot be executed.
    Rgds
    Vara

    Hi Vara,
    it depends on what notes you applied, what release you are on. Frequently notes have preconditions (i.e. applying other notes) or some manual work must be done like modifying function interfaces.
    Go through the notes again, tell us the numbers.
    Regards,
    Clemens

  • Symtex error in program CL_RSR_RRKO_PARTITION and form CHECK_QCUBE-01-

    Hello Guru,
    I am getting the following error while doing any changes in a workbook in Bex analyzer:
    An error occured in the communication with BW server.
    Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
    Symtex error in program CL_RSR_RRKO_PARTITION and form CHECK_QCUBE-01-
    Due to the above error I can not save the data in  my workbook .
    Please give some solution.
    Thanks in advance.
    With regards,
    Anand

    Hello Raj,
    Thanks for your promt reply.
    I am getting the following error. Please let me know what is the solution
    Syntax error
    Description
    Program %_JJ_TEASTFRAME_CLASS
    Type " TN_KEYFL" is unknown.
    Thanks in advance.
    With regards,
    Anand

  • .class error

    Hi,
    I am trying to make a simple code where a main program calls a method in a class so that the total sum of all elements of an array is calculated. Here is my code:
    public class playingwithArrays
            static void sumArray(int [] arr){
                int sum = 0;
                    for(int i = 0; i<arr.length; i++){
                        sum+= arr;
    System.out.println ("Total sum of array is" + sum);
    This is the class where there is the method i want to access
    The class below is the main class:public class Start
    public static void main (STring[] args){
    int [] arr = new int [10];
    for (int i; i<arr.length; i++){
    arr[i] = (i+1);
    playingwithArrays summation = new playingwithArrays ();
    summation.sumArray(int arr[]);
    Where there is bold the compiler is giving me a .class error. Please can you help me as I am a beginner and I am trying to learn java!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    It's a good idea to follow standard conventions about nAmEs. PlayingWithArrays, not playingwithArrays.
    You define sumArray() as a static method. That means that it will not be associated with a particular instance of the PlayingWithArrays class. And so you can access it without having to create a new instance of the class.
    It's not actually wrong to say summation.sumArray(...), it's just that it looks odd. It would better be PlayingWithArrays.sumArray(...).
    The actual error is what you are passing as the argument. This method expects an array of int and that's what you should pass it. You don't need the int and [] business that goes into the declaration of a method, just use the variable.
    PlayingWithArrays.sumArray(arr);This will use a static method of the PlayingWithArrays class to print out the sum of the array elements.

  • SYNTAX_ERROR unable to log in to SAP system Syntax error in program "SAPMSE

    hi SAP Experts,
    I have applied Basis patch 12 and I scheduled the background.  Backgroud job was terminated. System became slow. Then I stopped the server and restarted.  Now, I am unable to log in to SAP GUI by entering Username and Password and getting syntax error.
    Syntax error in program "SAPMSEM1".
    What happened?
    Error in the ABAP Application Program
    The current ABAP program '????????????????????????????"
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    The following syntax error occured in program "SAPMSEM1" in include
    "CL_SALV_FORM_ELEMET==========CU" in
    line 13:
    "the type "IF_SALV_FORM_CONFIG" is unknown."
    The include has been created and last changed by:
    Created by: "SAP "
    Last Changed by: "SAP "
    I am unable to access any transction code.
    Please help me..
    Thanks in advance...
    Raju

    hi,
    Thanks for your response.
    i haven't take any back up.  can u pls tell me step by step procedure to implement the SP with TP.
    your answer will be helpful..
    Regards
    Raju

  • Unable to login in the system ---- Syntex Error is Program SAPLSFES

    Hi,
    We have Sol_Man 7(N/W 700) in Win2003 and MSSQL 2005.
    During Support pack SAPKB70014 application in our Soloution Manager, I have continued all the step in Dialog but today it shows a message that "Inform SAP system for tp termination".The SP application was running for almost 12-14hrs.
    Then I restart my SAP system.Now when I opening SAP GUI
    Message is comming
    ABAP Runtime Error   Error Code <no erorr name or code was mentioned >
    In bottom of the page messege is comming
    " Syntex Error is Program SAPLSFES "
    Login name & password not asking.
    I also found in the Slog that
    "WARNING:       Background job RDDIMPDP could not be started or terminated abnormally."
    In SAPIB70014
    2EETW000 sap_dext called with msgnr "1":
    2EETW000 -
    db call info -
    2EETW000 function:   db_xrtab
    2EETW000 fcode:      RT_MI_LOAD
    2EETW000 tabname:    SPROXHDR                     
    2EETW000 len (char): 1740
    2EETW000 key:        CLASCX_SERVICES_REGISTRY_SIPUBLIS8 CLASCX_SERVICES_REGISTRY_SIPUBLIS82F7E61BA8717B7CD295188A843F6CB8E97F12D39
    2EETW000 retcode:    1
    2EETW125 SQL error "1105" during "" access: "[1105] Could not allocate space for object 'dbo.SPROXHDR'.'SPROXHDR~HAS' in database 'SM1' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup."
    I also checked and found that TRBAT table contains only header information where as TRJOB table is empty.
    Also found tp.exe in Task Manager.
    I have already created a message with SAP.
    Please guide me in this regard.
    Regards,
    Partha

    WARNING: Background job RDDIMPDP could not be started or terminated abnormally."
    login into Client 000 and schedule the background job again.
    Could not allocate space for object 'dbo.SPROXHDR'.'SPROXHDR~HAS' in database 'SM1' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup."
    Check the database space also. i think there is some space problem also, you need to add some space or need to add datafile.
    Regards,
    Subhash

Maybe you are looking for