Error while executing Hibernate query?

Hi:
I am using JSF,Hibernate amd Mysql in my project.
I have written update query as,
<code>
update payslipmaster set instrumentNo=3 where memberNo=3733
</code>
But at compile time it will be converted like,
update payslipmaster, set instrumentNo=3 where memberNo=3733
And error generated as follows,
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set instrumentNo=3 where memberNo=3733' at line 1
So can anybody help me to solve this issue?
Thank You,
Anup
Edited by: user11688398 on Jun 22, 2012 3:38 AM
Edited by: user11688398 on Jun 22, 2012 3:39 AM

Things are going quite wrong when you're invoking HQL queries to update stuff in stead of properly using model objects (entities). But for actual assistance, I suggest you check out the hibernate forum.
https://forum.hibernate.org/
but perhaps you may just want to start with the hibernate documentation, which is quite complete I can tell you.
http://docs.jboss.org/hibernate/orm/4.1/manual/en-US/html/
This part in particular:
http://docs.jboss.org/hibernate/orm/4.1/manual/en-US/html/ch11.html#objectstate-modifying

Similar Messages

  • Error while executing BEX query via FM

    Hi Friends,
    I am getting following error while executing a query via FM RRW3_GET_QUERY_VIEW_DATA.
    Please see the error screenshot as follows.
    the I_T_PARAMETERS entered are as follows.
    Please let me know what is missing.
    Thanks.
    Regards,
    Hrishikesh

    the key date variable 0DAT is normally filled by a SAP exit variable, but this may not be the case.  it could have been changed in the query designer,  check the query in query designer and see.
    Try passing 0DAT in the variable list with todays date

  • Error while executing the query

    Hi all,
    I am facing two errors while executing my query namely
    1)The validity interval has initial value as lower limit.
    2)Diagnosis
    Query  uses non-cumulative key figures. It requires calculation for non-cumulative values for more than 2000 periods in time. The most common reason for this is that the non-cumulative InfoCube has a very large validity interval and the query has no time restrictions. With exception aggregation AVERAGE (AV1 or AV2) in particular, this lack of time restriction would result in considerable memory and performance problems.
    System Response
    Query  cannot be executed in this way.
    Please suggest a possible reason for these errors.
    Thanks and Regards.
    Mudit Khanna

    Hi,
    See
    Refer Notes 496638,571364
    210432
    528202
    1318741
    208546
    and also see simila thread
    Problem getting data from BF cube in report (Non cummulative keyfigures)
    Thanks
    Reddy

  • Serious system error while executing the query: java.lang.OutOfMemoryError

    From ALSB, we are trying to insert records in a table, by calling the ALDSP webservice. It is working fine when the xml (ie., given as input to the ALDSP webservice) is small. But facing the following error when the input xml size is large.
    <ALDSP> <BEA-000000> <Product> <Serious system error while executing the query:
    {ld:ABC/Test}createTest:1
    java.lang.OutOfMemoryError: Java heap space
    We do not want to increase the heap size. Is there any other way we can solve this problem?

    In logical dataservice of ALDSP we have created a procedure called createTest, which is used to insert mulitple rows in the table. We have created a webservice for that logical DataService.
    Using the ALSB, we are calling the webservice -> createTest Operation and we are passing xml as input to that createTest function.
    Input xml:
    <ns1:createTest>
    <ns1:createTemps>
    <ns0:createTemp>
         <ns0:field1>1</ns0:field1>
              <ns0:field10>test1</ns0:field10>
    </ns0:createTemp>                
    <ns0:createTemp>
         <ns0:field1>2</ns0:field1>
              <ns0:field10>test2</ns0:field10>
    </ns0:createTemp>
         </ns1:createTemps>     
    </ns1:createTest>
    each ns0:createTemp represent a row that need to be inserted in the table.
    When the number of ns0:createTemp is less ( when the number of rows that need to be inserted is less) then no problem occurs, it is getting inserted properly. But when there are more number of ns0:createTemp then we are getting the following error
    <ALDSP> <BEA-000000> <Product> <Serious system error while executing the query:
    {ld:ABC/Test}createTest:1
    java.lang.OutOfMemoryError: Java heap space

  • ORA-27092 Error while executing any query from client

    Hello
    I am getting following error while executing any query from client remotly.
    IAMDBA@TEST_OAT.ABCD > select userid from dual;
    select userid from dual
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01116: error in opening database file 1
    ORA-01110: data file 1: '/u01/prod/system/system01.dbf'
    ORA-27092: size of file exceeds file size limit of the process
    Additional information: 131071
    Additional information: 286209
    But while local connection,its working.

    hi,
    ulimit command- Limit user resources
    su - oracle
    ulimit -n (this command will show you the current value for ulimit the default value is 1024)
    to increase its value:---
    ulimit -n <some value> ( this command will change value for current session only)
    example
    ulimit -n 101062
    once done check the value as:--
    ulimit -n( for verification)
    search in google for more explanation or revert back to me for any suggestions.... :)
    Edited by: varun4dba on Jan 31, 2011 4:09 PM

  • Error while executing a query

    Hi,
    While executing a query in portal it is giving internal server error.
    In the input screen help, we are searchign using wild card characters.I.e "  141",its giving internal server error,
    If we are giving the one value/no value the report is executing correctly.
    The input variable is a heirarchy variable. We tried to give it in the heirarchy format also. Still its not working.
    Could anybody help on this.
    Thanks

    u might be using "select * from <table name>", instead try this
    "select slno as slnod,title as titled.."
    http://www.javagalaxy.com

  • Error while executing Bex Query

    Hi all,
    i am getting error while executing the Bex Query.i am able to change and save the Query without any issues.
    Error:
    <internal error> Receiving from the BW server failed.BW server raised exception:SYSTEM_FAILURE
    Do you want to see more information?
    YES--->Syntax error in Program SAPLY05BW_ISA
    Details:
    Error Group
    RFC_ERROR_SYSTEM_FAILURE
    Message
    Syntax error in program SAPLY05BW_ISA
    What could be the problem?pl help me out!
    Thanks

    Hi,
    Try this:
    Execute the report RSFTP005 in BIW.
    With rgds,
    Anil Kumar Sharma .P

  • ORA-01008 Error while executing VO Query

    HI,
    I have a VO to get the heirarchy for the selected Business. On selecting appropriate business, ppr is fired to build up available heirarchies for that business. The query for VO is
    SELECT pos.name ||' ('||DECODE(pos.primary_structure_flag,'Y','Primary', 'N', 'Non-Primary','')||')' name , posv.org_structure_version_id org_structure_version_id
    FROM per_organization_structures pos,per_org_structure_versions posv
    WHERE pos.business_group_id = :1
    AND pos.organization_structure_id = posv.organization_structure_id
    AND pos.business_group_id = posv.business_group_id
    AND posv.date_to IS NULL
    While executing the query, it throws ORA-01008 exception saying "Not all Variables are bound". During debugging i saw that the selected business group id is available in AM before calling the VO execution.
    Any help will be appreciated.
    Thanks,

    Hi Tapash,
    The following is the information you have requested
    1. VO defn from the xml file
    <?xml version="1.0" encoding='windows-1252'?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <ViewObject
    Name="HierarchyVO"
    BindingStyle="Oracle"
    CustomQuery="true"
    RowClass="ge.oracle.apps.per.orghierarchy.poplist.server.HierarchyVORowImpl"
    ComponentClass="ge.oracle.apps.per.orghierarchy.poplist.server.HierarchyVOImpl"
    MsgBundleClass="oracle.jbo.common.JboResourceBundle"
    UseGlueCode="false" >
    <SQLQuery><![CDATA[
    SELECT pos.name ||' ('||DECODE(pos.primary_structure_flag,'Y','Primary', 'N', 'Non-Primary','')||')' name , posv.org_structure_version_id org_structure_version_id
    FROM per_organization_structures pos,per_org_structure_versions posv
    WHERE pos.business_group_id = :1
    AND pos.organization_structure_id = posv.organization_structure_id
    AND pos.business_group_id = posv.business_group_id
    AND posv.date_to IS NULL
    ]]></SQLQuery>
    <DesignTime>
    <Attr Name="_isCodegen" Value="true" />
    <Attr Name="_version" Value="9.0.3.12.53" />
    <Attr Name="_CodeGenFlagNew" Value="36" />
    </DesignTime>
    <ViewAttribute
    Name="Name"
    IsPersistent="false"
    Precision="44"
    Type="java.lang.String"
    AliasName="NAME"
    ColumnType="VARCHAR2"
    Expression="NAME"
    SQLType="VARCHAR" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="44" />
    </DesignTime>
    </ViewAttribute>
    <ViewAttribute
    Name="OrgStructureVersionId"
    IsPersistent="false"
    IsNotNull="true"
    Type="oracle.jbo.domain.Number"
    AliasName="ORG_STRUCTURE_VERSION_ID"
    ColumnType="VARCHAR2"
    Expression="ORG_STRUCTURE_VERSION_ID"
    SQLType="NUMERIC" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22" />
    </DesignTime>
    </ViewAttribute>
    </ViewObject>
    2. the method in AM
    public void getHierarchy(String strBusinessGrpId)
    try
    HierarchyVOImpl vo = getHierarchyVO1();
    Number BusinessGroupId = new Number("0");
    if(strBusinessGrpId!=null && !strBusinessGrpId.equals(""))
    BusinessGroupId = new Number(strBusinessGrpId);
    //vo.setWhereClause(null);
    //vo.setWhereClauseParam(0,BusinessGroupId);
    vo.executeQuery();
    catch(Exception e)
    throw new OAException(e.toString(),OAException.ERROR);
    } //end of getHierarchy
    3. calling code in CO
    if ("changeBusiness".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    String businessGrpId = pageContext.getParameter("BusinessGroup");
    Serializable[] parameters = { businessGrpId };
    mAM.invokeMethod("handleChangeBusiness", parameters);
    mAM.invokeMethod("getHierarchy", parameters);
    Thanks,
    Mohammadi

  • Error while executing BEx Query on Composite Provider

    Hi,
    We have a BW on-HANA system, patch level SAPKW73105.
    We have created a Composite provider based on the union of two DSOs, two infoobjects, one SPO, and there are a couple of joins with two other DSOs, on the top of that we built a BEx query.
    While executing the BEx query, sometimes (depending on the filter values), We got the following error message
    "Attribute engine failed;Error executing physical plan: exception 6900: AttributeEngine/Parallel/DimensionFilter.cpp engine failed; $function$=getValidFemsPA;"
    "Error 6,900 has occurred in the BWA/SAP HANA server"
    "Error reading the data of InfoProvider @3ZSDRPCP5"
    "Error while reading data; navigation is possible"
    "Row: 59 Inc: MAP_TREX_EXCEPTION Prog: CL_RSDRH_TREX_STORAGE"
    (Attached error message)
    Ii We browse the composite provider data using the "display data" option in the RSA1, data is displayed without issue, the problem only appears during the BEx query execution and only with some filter vaues.
    Any idea on how to fix the issue.
    Thanks,
    Federico

    He's on 7.3 EhP1, which is on SPS12 today. It got pretty stable by SP08, SP09. SP05 was pretty early on, and had a lot of bugs in the HANA views.
    7.4 is on SP07 like you say, and most of our customers run at least SP06 - before then, you had to apply a bucketload of SAP notes. I would recommend customers apply SP08 with care because it's a feature release so will have a bunch of new features, which will no doubt need corrections.

  • Error while executing BEx query made on Multiprovider having Virtual cube

    Hi All,
    We are getting an error message while executing a BEX query made on Multiprovide which consist of a Virtual Infocube infocube which extracts data from APO Live Cache, the error which we get is as below
    ''Error Reading the data of the infoprovider ZSS_R054
    Error in Substep
    Errors have occured while extracting data from datasource 9A_E2E_FC2
    Errors occured during parallel processing of query 4, RC:3
    Error while reading data; navigation is possible''
    And also when tried to execute from RSRT , it gets executed in debug mode in TRY and CATCHE
    Please let us know if anyone faced a similar situation or can suggest me what to do.
    Please suggest.
    Thanking you in advance.
    regards,
    ajay

    Hi Ajay,
    Try RSRV transaction, Select All Elementary Tests, Select query, now drag both these items on the right hand pane, select your query from this popup. and execute.
    Let us know what the result is.
    regards,
    Sree.

  • Error while executing SQL query -' Must Specify Table to select from'

    Hi all,
    While executing query using query generator
    it shows error message
    [Microsoft][SQL Native Client][SQL Server]Must specify table to select from.
    2). [Microsoft][SQL Nativ
    SELECT T1.ItemCode, T1.Dscription AS 'Item Description', T1.Quantity, T1.Price, T1.LineTotal,
    (Select SUM(T2.TaxSum) From PCH4 T2 Where T0.DocEntry=T2.DocEntry AND T2.staType=-90 AND T1.LineNum=T2.LineNum) as 'BEDAmt',
    (Select SUM(T2.TaxSum) From PCH4 T2 Where T0.DocEntry=T2.DocEntry AND T2.staType=-60 AND T1.LineNum=T2.LineNum) as 'ECSAmt',
    (Select SUM(T2.TaxSum) From PCH4 T2 Where T0.DocEntry=T2.DocEntry AND T2.staType=7 AND T1.LineNum=T2.LineNum) as 'HECSAmt',
    (Select SUM(T2.TaxSum) From PCH4 T2 Where T0.DocEntry=T2.DocEntry AND T2.staType=1 AND T1.LineNum=T2.LineNum) as 'VATAmt',
    (Select SUM(T2.TaxSum) From PCH4 T2 Where T0.DocEntry=T2.DocEntry AND T2.staType=4 AND T1.LineNum=T2.LineNum) as 'CSTAmt'
    FROM dbo.[OPCH] T0  INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN PCH4 T2 ON T2.DocEntry=T0.DocEntry
    WHERE T0.DocDate >='[%0]' AND  T0.DocDate <='[%1]' AND T0.DocType = 'I'
    GROUP BY T1.ItemCode,T1.Dscription,T1.Quantity, T1.Price, T1.LineTotal,T0.DocEntry,T1.DocEntry,T1.LineNum,T2.LineNum
    It's executing fine in MS SQL Server Studio Management.
    Please give y'r ideas to solve the problem.
    Jeyakanthan

    try this, it works fine in my B1:
    SELECT T1.ItemCode, T1.Dscription AS 'Item Description', T1.Quantity, T1.Price, T1.LineTotal,
    (Select SUM(T2.TaxSum) From PCH4 T2 Where T0.DocEntry=T2.DocEntry AND T2.staType=-90 AND T1.LineNum=T2.LineNum) as 'BEDAmt',
    (Select SUM(T2.TaxSum) From PCH4 T2 Where T0.DocEntry=T2.DocEntry AND T2.staType=-60 AND T1.LineNum=T2.LineNum) as 'ECSAmt',
    (Select SUM(T2.TaxSum) From PCH4 T2 Where T0.DocEntry=T2.DocEntry AND T2.staType=7 AND T1.LineNum=T2.LineNum) as 'HECSAmt',
    (Select SUM(T2.TaxSum) From PCH4 T2 Where T0.DocEntry=T2.DocEntry AND T2.staType=1 AND T1.LineNum=T2.LineNum) as 'VATAmt',
    (Select SUM(T2.TaxSum) From PCH4 T2 Where T0.DocEntry=T2.DocEntry AND T2.staType=4 AND T1.LineNum=T2.LineNum) as 'CSTAmt'
    FROM dbo.OPCH T0  INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN PCH4 T2 ON T2.DocEntry=T0.DocEntry
    WHERE T0.DocDate >='[%0]' AND  T0.DocDate <='[%1]' AND T0.DocType = 'I'
    GROUP BY T1.ItemCode,T1.Dscription,T1.Quantity, T1.Price, T1.LineTotal,T0.DocEntry,T1.DocEntry,T1.LineNum,T2.LineNum
    B1 don't like brackets!
    Regards

  • Internal Error while executing a query with varaints in BEX

    HI All,
    I am executing a query which has 4 variants. when I use the first 3 variants the query is working fine.....but when I try to execute the same query for the 4th variant....the system is giving an error message called Internal Error.....
    when I executed the same query with same variant...in RSRT transaction code...I was able to see the results....
    The error messages that I am getting as follows...
    <Internal Error> receiving from the BW Server Failed. BW server raised exception SYSTEM_FAILURE. DO you want to see more information...
    when I selected YES....I got the following message
    Error in a ABAP statement when processing an Internal Table.table.
    Error Group
    RFC_ERROR_SYSTEM_FAILURE
    when clicked on the OK button the following message is displayed....
    <Internal Error> Can not determine text elements for the current query.
    Can any one explain me what went wrong...is there any thing that I need to do in the BEX settings...are there any patches that needs to be installed...or any OSS notes available for this sort of errors...?
    Advance in thanks
    Dilse...
    Hash

    Hi Harish,
    Execute the query in RSRT and check whether you have any short dump is in ST22. This would give a clear idea at what might have gone wrong.
    Another thing is to check whether the code for the variable is fine in the user exit.
    Hope this helps.
    Bye
    Dinesh

  • 0ADHOC error while executing the query from Report Designer

    Hi All,
    When I am executing The Query from Report Designer,  am getting the below error.
    Please help me in this regard.
    The initial exception that caused the request to fail was:
    The Web template "0ADHOC" does not exist in the master system
    com.sap.ip.bi.base.exception.BIBaseRuntimeException: The Web template "0ADHOC" does not exist in the master system
    at com.sap.ip.bi.webapplications.runtime.service.template.impl.TemplateService.getTemplateContent(TemplateService.java:57)
    at com.sap.ip.bi.webapplications.runtime.jsp.portal.service.template.PortalTemplateAccessService.getTemplateContent(PortalTemplateAccessService.java:82)
    at com.sap.ip.bi.webapplications.runtime.preprocessor.Preprocessor.parseTemplate(Preprocessor.java:163)
    at com.sap.ip.bi.webapplications.runtime.xml.XmlTemplateAssembler.doInit(XmlTemplateAssembler.java:79)
    at com.sap.ip.bi.webapplications.runtime.template.TemplateAssembler.init(TemplateAssembler.java:133)
    Thanks,
    KVR

    Hi,
    The web template 0ADHOC is usually the standard web template for 3.x queries. The Report Designer executes the reports in java web, thus tries to find the template 0ADHOC in the 7.0 templates and does not find it. Check whether you have maintained the standard web template 0ADHOC for 7.0 reports also:
    Transaktion SPRO -> SAP Reference Image -> SAP NetWeaver -> Business Intelligence -> Settings for Reporting and Analysis -> Bex Web -> Set Standard Web Templates
    Best regards,
    Janine

  • Getting error while executing the query in query generator

    Hi all
    I need to execute on query where I set perameter ''delivery doc date'' but when I execute its giving me error
    Please help
    Error is :- 1) .[Microsoft][SQLSERVER NATIVE CLINT 10.0][SQL SERVER] MUST SPECIFY TABLE TO SELECT FROM ,2 [Microsoft][SQLSERVER NATIVE CLINT 10.0][SQL SERVER] STATMENT 'BLANKET AGREEMENT'(OOAT) (s) COULD NOT BE PREPARED .HELP
    SELECT ELECT T0.[CardName] PartyName, T1.[Dscription] as 'Item description', T0.[NumAtCard] as 'Customer Ref No',
    T1.[ShipDate] as  'Del Date', T0.[DocNum] as 'SO No', T0.[DocDate] as 'SO Date', T1.[Quantity],
      T1.[Price],T1.[Quantity]*T1.[Price] as 'Line total without tax', ISNULL( T1.[DelivrdQty],0) As DelivrdQty,
      ISNULL( T1.[DelivrdQty]*T1.[Price],0) as  'Delivered amount', T1.[OpenQty] as 'pending qty',
    ISNULL((select sum(a.ActualQtyDispUOM - a.IssuedReceivedQtyDispUOM ) from BMM_PNITEM A inner join bmm_PNFGALLOC B On A.PnRecordId = B.PNRecordId
    and A.LineId = b.LineId and A.Linetype =7 and (a.ActualQtyDispUOM - a.IssuedReceivedQtyDispUOM ) >0 and a.Status<>'C' and T1.ItemCode=A.ItemCode),0) as WIP,
    ISNULL((select sum(a.ActualQtyDispUOM - a.IssuedReceivedQtyDispUOM ) from BMM_PNITEM A inner join bmm_PNFGALLOC B On A.PnRecordId = B.PNRecordId
    and A.LineId = b.LineId and A.Linetype =7 and (a.ActualQtyDispUOM - a.IssuedReceivedQtyDispUOM ) >0 and a.Status<>'C' and T1.ItemCode=A.ItemCode),0)*T1.Price as Value
        FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry join OCRD T3 on t3.CardCode=t0.CardCode                 
    where T1.ShipDate between [%0]and [%1] and t3.groupCode in('115','116') ORDER BY T1.ShipDate

    hi
    you need to use parameters.
    try this:
    /*select from [dbo].[RDR1] T1*/
    DECLARE @FromDate datetime
    /*where*/
    set @FromDate =/* T2.ShipDate  */N'[%0]'
    /*select from [dbo].[RDR1] T1*/
    DECLARE @ToDate datetime
    /*where*/
    set @ToDate =/* T2.ShipDate  */N'[%0]'
    SELECT  T0.[CardName] PartyName, T1.[Dscription] as 'Item description', T0.[NumAtCard] as 'Customer Ref No',
    T1.[ShipDate] as  'Del Date', T0.[DocNum] as 'SO No', T0.[DocDate] as 'SO Date', T1.[Quantity],
      T1.[Price],T1.[Quantity]*T1.[Price] as 'Line total without tax', ISNULL( T1.[DelivrdQty],0) As DelivrdQty,
      ISNULL( T1.[DelivrdQty]*T1.[Price],0) as  'Delivered amount', T1.[OpenQty] as 'pending qty'
    ISNULL((select sum(a.ActualQtyDispUOM - a.IssuedReceivedQtyDispUOM ) from BMM_PNITEM A inner join bmm_PNFGALLOC B On A.PnRecordId = B.PNRecordId
    and A.LineId = b.LineId and A.Linetype =7 and (a.ActualQtyDispUOM - a.IssuedReceivedQtyDispUOM ) >0 and a.Status<>'C' and T1.ItemCode=A.ItemCode),0) as WIP,
    ISNULL((select sum(a.ActualQtyDispUOM - a.IssuedReceivedQtyDispUOM ) from BMM_PNITEM A inner join bmm_PNFGALLOC B On A.PnRecordId = B.PNRecordId
    and A.LineId = b.LineId and A.Linetype =7 and (a.ActualQtyDispUOM - a.IssuedReceivedQtyDispUOM ) >0 and a.Status<>'C' and T1.ItemCode=A.ItemCode),0)*T1.Price as Value
        FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry join OCRD T3 on t3.CardCode=t0.CardCode                 
    where T1.ShipDate between @FromDate and @ToDate and t3.groupCode in('115','116') ORDER BY T1.ShipDate

  • Error while executing the query in RSRT

    Hi to all,
    I am executing the query in client development system in RSRT.
    Error coming (Query could not open Genun  id is invalid)
    I shall be thankfull to you for this.
    Regards
    Pavneet Rana

    Hi,
    Plz check ur report and execute at the designer and take its technical name and go to RSRT. log out and log in and try..
    if not check ur authorisation.
    Regards....KP

Maybe you are looking for