Expected expression error in X code.

Hi i am a newbie to app developing and the objective c language but i  have exhausted all my efforts in trying to find out whats causing this  error my code is as follows:
-(IBAction)back:(id)sender {
    if ([webView canGoBack] == YES)
    {[webView goBack];}    else {
        UIAlertView *alert = [[UIAlertView alloc]  (HERE IS WHERE X CODE DETECTS THE ERROR)
initWithTitle:@"Oops"  message:@"No previous questions!" delegate:<#(id)#>  cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
        [alert show];
-(IBAction)forward:(id)sender {
    if ([webView canGoForward] == YES){
        [webView goForward];}
    else {UIAlertView *alert = [[UIAlertView alloc] (X CODE ALSO DETECTS THE SAME ERROR HERE)
initWithTitle:@"Oops"  message:@"No subsequent searches!" delegate:<#(id)#>  cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
        [alert show];
@end
THANKS

Ignore my last post, just tried it and having that ,nil does not affect the compile.
This compiles with no errors
UIAlertView *alert = [[UIAlertView alloc]
                      initWithTitle:@"Oops"  message:@"No previous questions!" delegate:nil  cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];

Similar Messages

  • "ABAP Basics" Book - arithmetic expression error in the sample code

    Hi all,
    I have just started learning ABAP on mini SAP system (NW7.01) by following "ABAP Basics" book.
    This question might be a FAQ, but I have spent a few days searching a right answer without success.
    I appreciate if you could help me on this.
    On the page 162, there is a function module sample, which contains the line as following:
    e_amount = i_km * '0.3'.
    Here l_km (import) is type of i, and e_amount (export) is type of f.
    Though I do not think of any problem with this line, it throws an arithmetic expression error when executed directly for testing as well as when called from a program.
    When I tried a similar thing in a program, it was fine.
    However within a function module it throws this error.
    Thanks in advance.
    Terry

    Like I said before, I do not think any problem about the code itself.
    I suspect some environmental things?
    I should have mentioned SAP mini system NW7.01 is running on Vista Business?
    To be specifc, I receive this message:
    Arithmetic operations are only expected for operands that can be converted to numbers.
    (numeric operands). - (numeric operands). - - - -
    with the following function module:
    [code]
    FUNCTION ZPTB00_CALCULATE_TRAVEL_EXPENS.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_KM) TYPE REF TO  I
    *"  EXPORTING
    *"     VALUE(E_AMOUNT) TYPE REF TO  F
    *"  EXCEPTIONS
    *"      FAILED
    e_amount = i_km * '0.3'.
    IF sy-subrc <> 0.
      RAISE failed.
    ENDIF.
    ENDFUNCTION.
    [/code]

  • Workaround for "Expected expression but found end of line" error

    I have the following code
    tell application "Mail"
    set mymailList to {"[email protected]", "[email protected]", "[email protected]"}
    set myattachmentList to {"Macintosh HD:Users:SAM:Desktop:A1.xls", "Macintosh HD:Users:SAM:Desktop:A2.xls", "Macintosh HD:Users:SAM:Desktop:A3.xls"}
    set n to count items in mymailList
    set i to 0
    repeat n times
    set i to i + 1
    set var1 to item i of mymailList
    set var2 to item i of myattachmentList as alias
    set newmessage to make new outgoing message with properties {visible:true, subject:"Report", content:"Blah Blah Blah"}
    tell newmessage
    set sender to "Sam <[email protected]>"
    set visible to true
    make new to recipient at end of to recipients with properties {address:var1}
    tell content to make new attachment with properties {file name:var2} at after last paragraph
    end tell
    activate
    send newmessage
    end repeat
    end tell
    I would like to be able to paste the MailList and MailAttatchmentList values from a spreadsheet so that it would look something like this:
    tell application "Mail"
    set mymailList to {
    "[email protected]",
    "[email protected]",
    "[email protected]"
    set myattachmentList to {
    "Macintosh HD:Users:SAM:Desktop:A1.xls",
    "Macintosh HD:Users:SAM:Desktop:A2.xls",
    "Macintosh HD:Users:SAM:Desktop:A3.xls"
    set n to count items in mymailList
    set i to 0
    repeat n times
    set i to i + 1
    set var1 to item i of mymailList
    set var2 to item i of myattachmentList as alias
    set newmessage to make new outgoing message with properties {visible:true, subject:"Report", content:"Blah Blah Blah"}
    tell newmessage
    set sender to "Sam <[email protected]>"
    set visible to true
    make new to recipient at end of to recipients with properties {address:var1}
    tell content to make new attachment with properties {file name:var2} at after last paragraph
    end tell
    activate
    send newmessage
    end repeat
    end tell
    Is there something that I can put at the end of each value so that I avoid the "Expected expression but found end of line" error?
    Thanks!
    Sam

    You didn't need to post the entire script - just an example of the list format would have done
    Anyway, AppleScript uses option-return as a 'soft' return/line continuation character, so:
    set mymailList to {¬
    "[email protected]",¬
    "[email protected]",¬
    "[email protected]
    (where ¬ indicates an option-return) will work. I'm just not sure off hand how you'd automatically insert option-return characters coming out of Excel...

  • Hi, im getting an error message, "expected identifier"  and another one, "expected expression" when i try a c   program in xcode

    hi, im getting an error message, "expected identifier"  and another one, "expected expression" when i try a c   program in xcode

    You have errors in your C code. If you want anyone to be able to help you, you need to post the code. You also should tell us the version of Xcode you're using and the type of Xcode project you created for the C program.

  • Ssis execute process task error: process exit code was 1 while the expected was 0

    Hi Sir,
    in my SSIS Package(2012) i am using Execute Process Task which will call bat file.  bat file is located on UNC Path.i am having  the below script in the batch file.
     del \\servername\foldername\name.txt
     rcmd \\servername D:\name1.bat
     del \\servername\foldername\name2.txt
    xcopy \\servername\foldername\file.txt   \\server\foldername\outfilefolder
    i am getting the below error message:
    ssis execute process task error:  process exit code was 1 while the expected was 0
    i want know at what cases error exit code was 1?
    Thanks for your time.

    Hi prasad.alm,
    The error is generic and can be caused by various factors. Here are some suggestions for your reference:
    Manually run the executable to execute the batch file so that we can check whether the command lines in the batch file are correct or not.
    Check there are no duplicate/existing files in the destination folder.
    Try to run the package in 32-bit or 64-bit runtime mode.
    If the issue occurs when running a job, try to create a CmdExec type job step to call the excutable. If this job also fails, it might be an issue between executable and SQL Server Agent rather than the SSIS package itself.
    If the issue persists, enable logging for the package, and check if we can obtain more detailed error message for further analysis.
    Regards,
    Mike Yin
    TechNet Community Support

  • Error FF753 Tax code 01 not appear in any G/L account item with FM Active

    Hi
    We have fund management configured for one of the company code, while creating billing document through VF01/VF02 we are  getting the Error FF753 Tax code 01 not appear in any G/L account item.
    This error however does not appear when posting directly from FI with the same tax code.
    I have tried to change the message control in which case i am getting a dump pointing to PSM-FM.
    Please advise.
    Regards
    Sandeep

    Hi:
              If you could please refer to the contents of  OSS Note 112609 - How are tax codes transferred to conditions ?
    "Symptom
    If a billing document is transferred to accounting the system displays error messages. Transferring tax codes from tax conditions into the pricing conditions and discounts does not function as expected.
    Other terms
    FF805, FF747, FF753, MWSKZ, MWSK1, tax code
    Reason and Prerequisites
    The tax condition in the SD pricing procedure contains incorrect reference steps, there are several tax conditions in the pricing procedure of which the tax codes overwrite each other or a program error exists.
    Solution
    In the accounting document for a billing document, the different G/L account line items are provided with a tax code. The tax code of the G/L accounts is transferred from the tax condition(s) of the billing document. How are the tax codes of the tax conditions transferred into the other conditions of a billing document ?
    Basically:
    The conditions of a billing document are read from top to bottom. As soon as an active tax (inactive = ' ') is read, the system transfers the tax code of this tax into the non-tax conditions as follows:
        1. The reference steps (From-step, To-step) are read (the reference steps are defined in the pricing procedure).
        2. The tax code is transferred into all conditions, for which
        the step number of the condition lies in the pricing procedure between "From-step" and "To-step",
        the condition is not inactive (exactly: the inactive flag is not equal to A (Condition exclusion), M (Inactive due to manual entry), or X (Incorrect)),
        the condition is not statistical (if it is no invoice list condition),
        the condition is no tax condition.
    After the transfer of the tax code the system searches for the next active tax. If further taxes are found, their tax code is again transferred according to the above procedure. If the reference steps of different taxes overlap, tax codes that have already been transferred are overwritten. To all non-tax conditions which in the pricing procedure stand after the last tax condition the tax code of the last active tax condition is transferred if they are not statistical.
    Special features:
        1. If the "From-step" of a tax condition refers to a subtotal of the pricing procedure, the tax code of the tax is not only transferred into the conditions with step number between From-step and To-step but into all non-tax conditions for which
        the step number of the condition in the pricing procedure is lower than the "To-step" of the tax condition.
        the condition is not statistical (if it is no invoice list condition).
        the condition is not a tax condition.
        2. If the "To-step" of the tax condition is smaller than the "From-step", then the system sets "To-step = From-step".
    Notes:
        1. As of Release 4.0 the tax code is no longer transferred in pricing but only when the billing document is released to accounting.
        2. If you use several taxes and tax codes and Customizing is incorrect for the release of billing documents to accounting, among others the system may display error message FF747.
        3. If there are several taxes in the pricing procedure refer to Notes 72173 and 82091 for Releases 3.0D - 3.1G. For Release 3.1H, only note 82091 is relevant.
        4. For conditions which are transferred into accounting (thus not statistical, not inactive conditions) and do not contain a tax code, the system searches for a default tax code which in Accounting Customizing can be set depending on the company code (tax code for non-taxable transactions). This applies to releases up to and including Release 4.5B. For Release 4.6, refer to Note 385127."
    Regards

  • Runtime errors in T code J1IDEPOTSTOCK1.

    Hi Experts,
    I am getting runtime errors in T code J1IDEPOTSTOCK1.
    And  Error is
    Runtime Errors         PERFORM_PARAMETER_MISSING
    Except.                CX_SY_DYN_CALL_PARAM_MISSING
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYN_CALL_PARAM_MISSING', was not caught and therefore caused a runtime error.
    The reason for the exception is:
    A PERFORM was used to call the routine "START-OF-SELECTION" of the program "J_1IDEPOTSTOCK1"
    The current call contains 0 actual parameter(s),  but the routine "START-OF-SELECTION" expects more than 0 parameters.
    parameters.
    Please give me advice.
    Thanks in advance.

    HI
    You need to apply the code corrections as mentioned in the note as rightly said by the other member
    Note 893139 - PERFORM_PARAMETER_MISSING dump in J_1IDEPOTSTOCK1 report*
    regards
    Prashanth

  • ORA-00936:missing expression Error

    I have what I would think was a simple SQL for Excel; but for some reason I keep getting the ORA-00936 missing expression error message.
    The SELECT AND FROM of the SQL are no problem. It's the Where portion of the SQL statement where it messes up. I have many user input required parameters. But I tested out the same SQL statement in Toad for Oracle and it worked fine.
    I'm wondering at this point if it's just too much for Excel.
    Here's the code from the "Where" portion of the SQL that worked in Toad for Oracle. I believe I have to change some of the syntax to get it to work in Excel; and I'm wondering if anyone knows the true correct way to do this. Because I'm also wondering if that's where I'm going wrong.
    Anyway, here's the code:
    WHERE (    (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= :date1
                 AND a_compl_summary.entry_date <= :date2
            AND (   a_compl_summary.product_family LIKE :pf1
                 OR a_compl_summary.product_family LIKE :pf2
                 OR a_compl_summary.product_family LIKE :pf3
                 OR a_compl_summary.product_family LIKE :pf4
                 OR a_compl_summary.product_family LIKE :pf5
            AND (a_compl_summary.region = :r1)
            AND (   a_compl_summary.NAME = :c1
                 OR a_compl_summary.NAME = :c2
                 OR a_compl_summary.NAME = :c3
                 OR a_compl_summary.NAME = :c4
                 OR a_compl_summary.NAME = :c5
            AND (a_compl_summary.complaint = :yorn)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl1
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl2
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl3
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl4
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl5
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
                                                                              :dc1
            AND (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
           )

    But are the ":parameter1" okay, or do I need to change the syntax for Excel?
    Because when I change the[b] :parameter to just a ? it ends up working to a degree. When I have too many parameters Excel ends up bailing on me with a Debug, Send Error Report box popping up.

  • Expression Error (#:-1074001424) with Keithley 2000 DMM

    I wrote a program to that uses the Keithley DMM to check voltages on multiple channels, wait a period of time, and then check again. This cycle continues for the time specified.  I made this program on one laptop and it worked fine.  When I moved it over to a different laptop and a different Keithley DMM, then I started to see this issue.
    After stepping thru the program, It seems that the error comes from the "Configure Scan.vi".  The exact error message is:
    <ERR> ke2000 Error Query;
    instrument reports:
    -260,"Expression error"
    and the error code is: -1074001424.
    I searched for these myself and couldnt find anything helpful.  i changed a few things around and it seems that the "scan mode" parameter seems to be the problem.  It needs to be set to "internal" to read the channels on the additional scan card, but the program will return an error if it is not set to "none"... and when its set to "none" nothing happens.
    Please help me out! Thanks

    Nvm.... fixed it.  For the Configure Scan.vi, in some cases, one of the parameters, "Stop Channel", would be set to 1, when the starting channel was, by default, set to 1. Apparently this caused a conflict of some kind but I changed my program around so this doesnt happen anymore.

  • Designer syntax errors in correct code.

    I have added some trigger code to a bound item. The designer syntax checker finds errors in the code but the generated form runs correctly. It appears that the syntax checker doesn't like DECLARE. The code doesn't do anything and I believe it is fine but I would like to get the syntax checker to stop complaining about it. Any suggestions on how I might arrange things to stop the syntax error messages would be appreciated. Here is the offending code with error messages:
    DECLARE
    item_id     Item;
    BEGIN
    item_id := FIND_ITEM('M1.STATE');
    END;
    The Syntax Checker found the following errors:-
    PLS-00103: (Line 1) Encountered the symbol "DECLARE" when expecting one of the following:
    begin function package pragma procedure separate subtype type
    use <an identifier> <a double-quoted delimited-identifier>
    form current cursor external language
    The symbol "begin" was substituted for "DECLARE" to continue.
    PLS-00103: (Line 20) Encountered the symbol "end-of-file" when expecting one of the following:
    begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
    <an identifier> <a double-quoted d
    [2] error(s), [0] warning(s)

    This will not work correctly in 32-bit Windows (or 64-bit) The type of wParam *must* be WPARAM, the type of lParam *MUST* be LPARAM, and for a dialog handler the return type should be BOOL. The old _export keyword no longer exists, and is not needed in
    Win32. FAR is a macro with an empty body and its appearance in all places can be deleted. The quaint and confusing PASCAL keyword may still work, but it would be better to use the now-correct term CALLBACK. Since this is clearly antique Win16 code, there may
    be other problems dealing with size of integers. The types int, long, DWORD, UINT and others all represent 32-bit values. The return type for window handlers must have the return type LRESULT, and for dialog handlers, BOOL. All wParam and lParam types must
    be changed as I indicated. Note that for Win16, wParam was 16-bit and lParam 32-bit. For Win32, WPARAM, LPARAM and LRESULT are all 32-bit values, and for Win64 they are 64-bit values. Any place the code casts a pointer to an integer type, the code is inherently
    incorrect. You must use types like INT_PTR, UINT_PTR, DWORD_PTR and other _PTR-suffixed types for such casts; in Win32 these are pointer-sized integer types (32-bit) and in Win64 they are pointer-sized integer types (64-bit). Types like int, long, DWORD, etc.
    are 32-bit values in both Win32 and Win64. Converting code to run on Win32/64 from Win16 requires great caution, because the programming "standards" that were taught for Win16 did not plan on true platform portability, and programmers were taught
    terrible techniques such as declaring wParam as WORD and LPARAM as long. And casting pointers to ints and back. All of these techniques lead to disaster.

  • Error In Mediator: ORAMED-01101:[Filter Expression Error]

    Hi All,
    Logic in Mediator:
    If Target_ID is "A", route to "Queue_A",
    If Target_ID is "B", route to "Queue_B", etc etc.
    This list of values has been maintained in DVM like mentioned below.
    <description/>
    <columns>
    <column name="DEST_SYSTEM"/>
    <column name="DEST_QUE"/>
    </columns>
    <rows>
    <row>
    <cell>A</cell>
    <cell>Queue_A</cell>
    </row>
    Issue is: If target ID is blank, it throws error like
    <faultstring>oracle.tip.mediator.infra.exception.MediatorException: ORAMED-01101:[Filter Expression Error]Error evaluating filter expression.Possible Fix:Ensure that the filter expression is valid, otherwise Contact Oracle Support Services.</faultstring>
    Can anybody help that how to handle this type of error in mediator to send customized fault as "Target ID is blank, please pass the request again."
    Regards,
    Richa

    Hi Richa,
    Mediator doesn't provide any built-in exception-handling mechanism, the policy-based fault handler is the only way to catch and handle exceptions occurring in the Mediator
    Write Fault Policies to handle Mediator faults : Add following snippet
    > <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults"
    > name="medns:mediatorFault">
    > <condition>
    <test>$fault.code="ORAMED-01101"</test>> <action ref="my-mediator-fault-handler"/>
    > </condition>
    > </faultName>
    And write Fault Actions for the above like ...ora-rethrow-fault.....
    Hope it helps !!
    Regards,
    Abhinav Gupta

  • "not a GROUP BY expression" error when using EclipseLink

    I'm using EcliseLink 2.3.0
    The follow SQL can be executed successfully.
    select to_char(o.taskDate, 'YYYY/MM'), sum(o.plannedHrs) from TaskItem o group by to_char(o.taskDate, 'YYYY/MM');
    But the JPQL has an error when it gets excuted.
    select FUNC('to_char', o.taskDate, 'YYYY/MM'), sum(o.plannedHrs) from TaskItem o group by FUNC('to_char', o.taskDate, 'YYYY/MM')
    ERROR LOG:
    Local Exception Stack:
    Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00979: not a GROUP BY expression
    Error Code: 979
    Call: SELECT to_char(TASK_DATE, ?), SUM(PLANNED_HRS) FROM ORA47111.S_PROJ_PLAN_ITEM GROUP BY to_char(TASK_DATE, ?)
         bind => [2 parameters bound]
    Query: ReportQuery(referenceClass=TaskItemDAO sql="SELECT to_char(TASK_DATE, ?), SUM(PLANNED_HRS) FROM ORA47111.S_PROJ_PLAN_ITEM GROUP BY to_char(TASK_DATE, ?)")
         at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:644)
         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535)
         at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1702)
         at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:566)
         at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
         at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
         at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:264)
         at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:646)
         at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2592)
         at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:2535)
         at org.eclipse.persistence.queries.ReportQuery.executeDatabaseQuery(ReportQuery.java:846)
         at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:829)
         at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1056)
         at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:390)
         at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1144)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2863)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1501)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1483)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1457)
         at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:485)
         at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:742)
         at projapis.projrollup.beans.ManagedTaskItemDAOBean.calcResourcePlannedHrsInMonth(ManagedTaskItemDAOBean.java:329)
         at projapis.projrollup.beans.ManagedTaskItemDAOBean.main(ManagedTaskItemDAOBean.java:522)
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00979: not a GROUP BY expression
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:931)
         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:607)
         ... 22 more
    Any suggestion?
    Thanks a lot.
    Edited by: sgao on Jul 19, 2011 11:13 PM

    Hello,
    Unfortunately it is the driver complaining about the SQL that is generated, but I see no major difference from the SQL in the exception:
    SELECT to_char(TASK_DATE, ?), SUM(PLANNED_HRS) FROM ORA47111.S_PROJ_PLAN_ITEM GROUP BY to_char(TASK_DATE, ?)
    and the SQL you state works other than it looks like JPQL not SQL: select to_char(o.taskDate, 'YYYY/MM'), sum(o.plannedHrs) from TaskItem o group by to_char(o.taskDate, 'YYYY/MM');
    Does it work if the SQL in the exception is executed as a native query? Since this the driver complaining about what looks correct, I would look at the driver/database versions to see if there is a later version that might have a bug that has been fixed.
    Best Regards,
    Chris

  • I am set up mac mini and when I test the mail server by sending a mail from administrator to administrator I get the error message 'Diagnostic-Code: X-Postfix; connect to 127.0.0.1[127.0.0.1]:10024: Connection    refused'. Can any one suggest a solution

    I set up mac mini and when I test the mail server by sending a mail from administrator to administrator I get the error message 'Diagnostic-Code: X-Postfix; connect to 127.0.0.1[127.0.0.1]:10024: Connection    refused'. Can any one suggest a solution

    Thanks. Where could I possibly look for a firewall rule. I knowingly did not creat any. My system has internet coming to a Modem which then is connected to a wireless router. I have computers connecting to the router through cable as well as wireless. One of these computers has been our  mailserver using Mercury and Pegasus and that computer has a static IP address. The Mac Mini also has been assigned a different srtatic IP address. I have only set up user account, none of them an email account as I initially expect them to receive only internal mails. Is it necessary that I must set up an email id for each user while setting up the user account. My server id is server.local. So would the email id for local users be [email protected]?

  • Why "illegal start of expression" error?  Please help!

    Hello great java minds. Could you please tell me why I get "illegal start of expression" errors for the following headers? Thanks for your wisdom!!
    Lines generating this error:
    public static String getName()--and--
    public static void displayResults()Here is my first class (that includes this code):
    import java.io.*;
    import java.util.*;
    public class ProductSurvey
         public static void main(String [] args)
              ProductData myData = new ProdcutData();
              String name = getName();
              openFile();
              myData.setName(name);
              myData.dataRetrieve(name);
              myData.updateAverages(rating1totalLow, rating2totalLow, rating3totalLow, rating1totalMed, rating2totalMed, rating3totalMed, rating1totalHigh, rating2totalHigh, rating3totalHigh, inc1total, inc2total, inc3total);
              mydata.setRating2ave1lower3(rating2lower1than3, lower1than3Total);
              displayResults();
              public static String getName()
                   System.out.println("Please enter income and product info file name:  ");
                   Scanner keyboard = new Scanner(System.in);
                   String name = keyboard.next();
                   return name;
              public static void openFile();
                   File fileObject = new File(name);
                   while ((! fileObject.exists()) || ( ! fileObject.canRead()))
                        if( ! fileObject.exists())
                             System.out.println("No such file");
                        else
                             System.out.println("That file is not readable.");
                             System.out.println("Enter file name again:");
                             name = keyboard.next();
                             fileObject = new File(name);                    
              public static void displayResults()
                   System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
                   System.out.println("*Average (rounded) product ratings, by income bracket, are as follows: ");
                   System.out.println(myData.toString());
                   System.out.print("\n*Total number of persons in Income Bracket $50000-$74999 ");
                   System.out.print("that rated all three products with a score of 5 ");
                   System.out.println("or higher: " + myData.getHighRaters());
                   System.out.print("\n*Average (rounded) rating for Product 2 by ");
                   System.out.println("persons who rated Product 1 lower than Product 3: " + myData.rating2ave1lower3);
    }Here is the backup class (just for your reference):
    import java.util.*;
    import java.io.*;
    class ProductData
              private String name;
              private int lineCount;
              private double inc1total;
              private double inc2total;
              private double inc3total;
              private int rating1totalLow;
              private int rating2totalLow;
              private int rating3totalLow;
              private int rating1totalMed;
              private int rating2totalMed;
              private int rating3totalMed;
              private int rating1totalHigh;
              private int rating2totalHigh;
              private int rating3totalHigh;
              private int highRaters;
              private double lower1than3Total;
              private int rating2lower1than3;
              private long rating2ave1lower3;
              private long rating1averageLow;
              private long rating2averageLow;
              private long rating3averageLow;
              private long rating1averageMed;
              private long rating2averageMed;
              private long rating3averageMed;
              private long rating1averageHigh;
              private long rating2averageHigh;
              private long rating3averageHigh;
              public ProductData()
                   name = null;
                   lineCount = 0;
                   inc1total = 0;
                   inc2total = 0;
                   inc3total = 0;
                   rating1totalLow = 0;
                   rating2totalLow = 0;
                   rating3totalLow = 0;
                   rating1totalMed = 0;
                   rating2totalMed = 0;
                   rating3totalMed = 0;
                   rating1totalHigh = 0;
                   rating2totalHigh = 0;
                   rating3totalHigh = 0;
                   highRaters = 0;
                   lower1than3Total= 0;
                   rating2lower1than3 = 0;
                   rating1averageLow = 0;
                   rating2averageLow = 0;
                   rating3averageLow = 0;
                   rating1averageMed = 0;
                   rating2averageMed = 0;
                   rating3averageMed = 0;
                   rating1averageHigh = 0;
                   rating2averageHigh = 0;
                   rating3averageHigh = 0;     
              public void setName(String newName)
                   String name = newName;
              public void dataRetrieve(String name)
                   try
                        BufferedReader inputStream = new BufferedReader(new FileReader(name));
                        String trash = "No trash yet";
                        while ((trash = inputStream.readLine()) !=null)
                             StringTokenizer st = new StringTokenizer(trash);
                             int income = Integer.parseInt(st.nextToken());
                             int rating1 = Integer.parseInt(st.nextToken());
                             int rating2 = Integer.parseInt(st.nextToken());
                             int rating3 = Integer.parseInt(st.nextToken());
                             if(rating1<rating3)
                                  lower1than3Total++;
                                  rating2lower1than3 = rating2lower1than3 + rating2;
                             if(income<50000)
                                  rating1totalLow = rating1totalLow + rating1;
                                  rating2totalLow = rating2totalLow + rating2;
                                  rating3totalLow = rating3totalLow + rating3;
                                  inc1total++;
                             else if(income<75000)
                                  rating1totalMed = rating1totalMed + rating1;
                                  rating2totalMed = rating2totalMed + rating2;
                                  rating3totalMed = rating3totalMed + rating3;
                                  inc2total++;
                                  if((rating1>=5) && (rating2>=5) && (rating3>=5))
                                       highRaters++;
                             else if(income<100000)
                                  rating1totalHigh = rating1totalHigh + rating1;
                                  rating2totalHigh = rating2totalHigh + rating2;
                                  rating3totalHigh = rating3totalHigh + rating3;
                                  inc3total++;
                             lineCount++;
                        inputStream.close();
                   catch(IOException e)
                        System.out.println("Problem reading from file.");
              public void updateAverages(int rating1totalLow, int rating2totalLow, int rating3totalLow, int rating1totalMed, int rating2totalMed, int rating3totalMed, int rating1totalHigh, int rating2totalHigh, int rating3totalHigh, long inc1total, long inc2total, long inc3total)
                   rating1averageLow = Math.round(rating1totalLow/inc1total);
                   rating2averageLow = Math.round(rating2totalLow/inc1total);
                   rating3averageLow = Math.round(rating3totalLow/inc2total);
                   rating1averageMed = Math.round(rating1totalMed/inc2total);
                   rating2averageMed = Math.round(rating2totalMed/inc2total);
                   rating3averageMed = Math.round(rating3totalMed/inc2total);
                   rating1averageHigh = Math.round(rating1totalHigh/inc3total);
                   rating2averageHigh = Math.round(rating2totalHigh/inc3total);
                   rating3averageHigh = Math.round(rating3totalHigh/inc3total);
              public long setRating2ave1lower3(int rating2lower1than3, double lower1than3Total)
                   long rating2ave1lower3 = (rating2lower1than3/lower1than3Total);
                   return rating2ave1lower3;
              public String toString()
                   return ("\nIncome level $26000-$49999:" + "\n" + "-Product 1: "
                         + rating1AverageLow + "-Product 2: " + rating2AverageLow
                         + "-Product 3: " + rating3AverageLow + "\n" + "\n" + "Income level $50000-$74999:" + "\n" + "-Product 1: "
                         + rating1AverageMed + "-Product 2: " + rating2AverageMed
                         + "-Product 3: " + rating3AverageMed + "\n" + "\n" + "Income level $75000-$100000:" + "\n" + "-Product 1: "
                         + rating1AverageHigh + "-Product 2: " + rating2AverageHigh
                         + "-Product 3: " + rating3AverageHigh);
              public int getHighRaters()
                   return highRaters;
    }

    You're trying to define those methods inside another method (the "main" method, in this case). Don't do that.

  • Unable to resolve 'class' or 'interface' expected compile error

    Any help would be appreciated - I can't resolve the following compile errors:
    E:\j2sdk1.4.0\bin\RandomApp3\src\RandomApp3.java:85: 'class' or 'interface' expected private void initComponents() {
    E:\j2sdk1.4.0\bin\RandomApp3\src\RandomApp3.java:97: 'class' or 'interface' expected }
    E:\j2sdk1.4.0\bin\RandomApp3\src\RandomApp3.java:97: 'class' or 'interface' expected }
    3 errors
    here is the source:
    import javax.swing.JOptionPane;
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.util.Random;
    public class RandomApp3 extends javax.swing.JApplet {
    public RandomApp3() {
    public static void main(String args[]) {
    /** Creates a new instance of RandomApp3 */
    public class RandInt {
    private Random randNum;
    //constructor for RandInt class
    public RandInt(int endInt) {
    int randNum;
    int range;
    int[] lottery = new int[5];
    for (int x = 0; x <=49; x++) {
    range = (int) (Math.floor(Math.random()*5 + 1));
    lottery[range]++;
    /** Initializes the applet RandomApp3 */
    public void initComponents() {
    try {
    java.awt.EventQueue.invokeAndWait(new Runnable() {
    public void run() {
    initComponents();
    } catch (Exception ex) {
    ex.printStackTrace();
    /** This method is called from within the init() method to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    panell = new java.awt.Panel();
    getContentPane().add(panell, java.awt.BorderLayout.CENTER);
    // </editor-fold>
    // Variables declaration - do not modify
    private java.awt.Panel panel1;
    // End of variables declaration
    /** This method is called from within the init() method to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    panel1 = new java.awt.Panel();
    getContentPane().add(panel1, java.awt.BorderLayout.CENTER);
    // </editor-fold>
    // Variables declaration - do not modify
    private java.awt.Panel panel1;
    // End of variables declaration
    }

    Re-posted with code tags. This may show that there is an extra } just before initComponents()
    public class RandomApp3 extends javax.swing.JApplet {
    public RandomApp3() {
    public static void main(String args[]) {
    /** Creates a new instance of RandomApp3 */
    public class RandInt {
    private Random randNum;
    //constructor for RandInt class
    public RandInt(int endInt) {
    int randNum;
    int range;
    int[] lottery = new int[5];
    for (int x = 0; x <=49; x++) {
    range = (int) (Math.floor(Math.random()*5 + 1));
    lottery[range]++;
    /** Initializes the applet RandomApp3 */
    public void initComponents() {
    try {
    java.awt.EventQueue.invokeAndWait(new Runnable() {
    public void run() {
    initComponents();
    } catch (Exception ex) {
    ex.printStackTrace();
    /** This method is called from within the init() method to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    panell = new java.awt.Panel();
    getContentPane().add(panell, java.awt.BorderLayout.CENTER);
    // </editor-fold>
    // Variables declaration - do not modify
    private java.awt.Panel panel1;
    // End of variables declaration
    /** This method is called from within the init() method to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    panel1 = new java.awt.Panel();
    getContentPane().add(panel1, java.awt.BorderLayout.CENTER);
    // </editor-fold>
    // Variables declaration - do not modify
    private java.awt.Panel panel1;
    // End of variables declaration
    }

Maybe you are looking for