EJB QL - Free Text in Query Condition

Hi,
Is there a way to write free sql text in the where condition of an entity bean (CMP), not using the ejb ql ?
How can I control this part, and how can I also add compiler / optimizer directives in the statement when using entity beans (CMP).
Thanks,

Hello Ravi,
The EJB 2.0 specification has made it mandatory to have <method-params> tag within the ejb-jar.xml. Due to the absence of this tag, you are getting the error...
Please modify ejb-jar.xml and add an empty <method-params></method-params> tag for the findByAllAccounts and ejbSelectByTopAccounts methods. For example,
<query>
<description>This query retrieves all the accounts</description>
<query-method>
<method-name>findByAllAccounts</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>select distinct object(ua) from UserAccount ua</ejb-ql>
</query>
Notice the empty <method-params> tag added. Please do the same for the ejbSelectByTopAccounts method.
Another thing to be changed is the jsp:usebean tag in index.jsp and DisplayAccounts.jsp. In the mentioned files, replace jsp:usebean with jsp:useBean. Please notice the capital 'B'. JDK 1.4 has made this mandatory.
Futher more, as you would be aware, 10G onwards, the CMP beans accesses the database tables through the Toplink. Toplink is the default persistence manager now. To use the orion-ejb-jar.xml, please start the OC4J with the following command
java -Ddefault.cmp.pm=native_cmp -jar oc4j.jar
I would like to point out that the sample works fine in OC4J 904 developers preview without any of the above mentioned changes. The sample application has been certified in that version.
Thanks for pointing this problem out. We are making the necessary changes in the sample and the updated jar will be uploaded on OTN shortly.
Hope this helps,
Rajat

Similar Messages

  • Uploading a text file from webi filter area as part of the query condition

    Post Author: balasura
    CA Forum: Publishing
    Requirement : Uploading a text file from webi filter area as part of the query condition Hi, I am in a serious requirement which I am not sure available in BO XI. Can some one help me plz. I am using BO XI R2, webi I am generating a ad-hoc report, when I want to give a filter condition for a report, the condition should be uploaded from a .txt file. In the current scenario we have LOV, but LOV could hold only a small number of value, my requirement is just like a lov but the list of values will be available in a text file ( which could number to 2000 or 2500 rows). I would like to upload this 2500 values in the form of a flat text file to make a query and genrate report. Is it possible in BO XI? For Eg:- Select * from Shipment Where u201CShipment id = u2018SC4539u2019 or Shipment id = u2018SC4598u2019u201D The u201Cwhereu201D condition (filter) which has shipment id will be available in a text file and it needs to be loaded in the form of .txt file so that it will be part of the filter condition. Content of a .txt file could be this shipment.txt =============== SC4539 sc2034 SC2343 SC3892 . . . . etc upto 2500 shipment Ids I will be very glad if some could provide me a solution. Thanks in advance. - Bala

    Hi Ron,
       This User does not have the access to Tcode ST01.
       The user executed Tcode SU53 immediately following the authorization failure to see the authorization objects. The 'Authorization obj' is blank and under the Description it has 'The last Authorization check was successful' with green tick mark.
      Any further suggestions, PLEASE.
    Thanks.

  • How to query free text and how to efficiently process upper/lower case

    Hi friends,
    I'm now have two questions need your helps.
    1, i want to query free text base on oracle semantic, i tried create a Full Text Index on object like ‘CREATE INDEX di_obj_idx ON data_integration(to_char(triple.GET_OBJECT())) indextype is ctxsys.context’, but i got an error 'DRG-11304:function-based indexes are not supported by this indextype’. it seems that can't specified a column with functions. so any way for this?
    2, base on some reasons, we need to query something ignores upper/lower. of course, we can use upper/lower functions, but the performance is very low. what my question is is there any functions can be used in SEM_MATCH table function or any way can give me the higher performance?
    best regards,
    steven
    Sep 9,2009

    Hope this helps
    import java.io.*;
    public class Copy {
    public static void main(String[] args) throws IOException {
    File inputFile = new File("farrago.txt");
    File outputFile = new File("outagain.txt");
    FileReader in = new FileReader(inputFile);
    FileWriter out = new FileWriter(outputFile);
    BufferedReader buff = new BufferedReader(in);
    String c;
    while ((c = buff.readLine()) != null)
    out.write(c.toUpperCase());
    in.close();
    out.close();
    }

  • New Rows in WAD with Free text characteristic

    I have created an input ready query and one of the characteristic (based on InfoObject 0POSTXT) created is to enter a free text for the given row.  In row selection there are also few more characteristics with master data already created.
    If I use BEx I am in position to enter free text and choose relevant master data for remaining characteristic and plan for my key figures, Works perfectly fine.
    I have now created a new WAD template assigning the input ready query and when I execute the same I am not in position to enter the free text for my text characteristic.  In WAD Application I am forced to choose the value from the available F4 help otherwise I get the invalid value error.  So BEx works fine but not the WAD.
    Any ideas what piece of configuration I am missing?  Any help is highly appreciated.  I have already selected Key (in value Display), in access type of value selection I tried all options with no luck.
    Regards,
    Sachin

    Hello Sachin,
    enter values for characteristics without master data table is only possible in BEx Analyzer.
    Also in BI Planning Functions one can create values for characteristics without master data table.
    For the BEx Web Analyzer this is not implemented; this feature is on the list of possible further developments. It not yet clear whether and when features from the this list will be developed.
    Regards,
    Marc
    SAP NetWeaver RIG

  • Free Text Shopping cart WorkFlow

    Hi,
    I have to know if a shopping cart was created from a Free text item or from catalog before the WF starts (in a check funtion module).
    Is there any way to know if the shopping cart was created from free text or catalog?
    Thanks

    Hi,
    As per my understanding, you want to make decision, if it is Free text you need to start one work flow, else another workflow.
    This check you can do it in Starting conditions of the workflow. SWB_COND (Transaction).
    Go to SWB_COND, choose business object BUS2121, it will display all work flows which are event linkage activated.
    Now go to specific workflow which you need to start if it is Free text Shopping cart, if the condition is true workflow will start.
    If starting conditions are complex, suggest you to create new attribute and use the same in starting conditions.
    Hope this will be helpful, all the best.
    Regards,
    Mohan Vamsi

  • Extract infotype free text

    hi all,
    I would like to use adhoc query to extract free text from an infotype record. However, adhoc only has a 'text exists' field (Pxxxx-ITXEX), which only indicates whether text exists or not.
    Does anyone know if a custom field needs to be created in adhoc to extract this, and how I can do this?
    many thanks,

    thanks semvladigo, This error has gone now, great!
    However, now i'm getting a short dump in adhoc query instead
    Error analysis                                                                               
    An exception occurred that is explained in detail below.                                   
        The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not                  
         caught in                                                                               
    procedure "HR_ECM_ADD_MESSAGE" "(FUNCTION)", nor was it propagated by a RAISING            
         clause.                                                                               
    Since the caller of the procedure could not have anticipated that the                      
        exception would occur, the current program is terminated.                                  
        The reason for the exception is:                                                           
        You attempted to use a 'NULL' object reference (points to 'nothing')                       
        access a component.                                                                        
        An object reference must point to an object (an instance of a class)                       
        before it can be used to access components.                                                
        Either the reference was never set or it was set to 'NULL' using the                       
        CLEAR statement.

  • Free text

    Hi all,
    In the present script i need to include a free text between a description line  and first line item.client has given just that with out any more info.I am not aware of free text.please tell me how to achieve the requirement.

    Hi,
    Call PERFROM in script and define in driver program..
    eg:
    In script call PERFORM
    PERFROM free_text IN PROGRAM z_test
          USING &gv_cond&
          CHANGING &gv_text&
          ENDPERFORM.
    U ill have the value in &gv_text& dynamically based on the condition..
    now u print &gv_text& betn description & item.
    In driver Program Define the PERFORM free_text.
    FORM free_text using in_tab STRUCTURE itcsy
                                    out_tab STRUCTURE itcsy.
    READ TABLE in_tab INDEX 1.
    IF in_tab-value = '1'.
      READ TABLE out_tab INDEX 1.
       out_tab-value = 'GOOD MORNING'.
      MODIFY output_table INDEX 1.
    ENDIF.
    IF in_tab-value = '2'.
      READ TABLE out_tab INDEX 1.
       out_tab-value = 'GOOD AFTERNOON'.
      MODIFY output_table INDEX 1.
    ENDIF.
    IF in_tab-value = '3'.
      READ TABLE out_tab INDEX 1.
       out_tab-value = 'GOOD EVENING'.
      MODIFY output_table INDEX 1.
    ENDIF.
    ENDFORM.
    Hope its clear!!

  • Free Text / Catalog Shopping Cart

    Hi,
    I am unable to distinguish the logic required for Free Text and shopping cart  catalog.
    On what basis would i distinguish the logic to the workflow.
    Can anyone help me in this regards,
    I am facing the same issue for
    Cost centre Approval
    Prduct Category approval
    Spend limit Approval.
    For shopping Cart, How do i create the logic where there would be a distinguishing condition for the above mentioned approval process.
    kindly help me !
    shanky
    Edited by: shanky s on Jun 15, 2010 9:23 AM

    Hi,
    If you are using Application Controlled workflow then the starting conditions for each workflow are defined in transaction SWB_COND.
    The attribute &_EVT_OBJECT.EXISTFREETEXTLINEITEM& ( &EC Requirement Coverage Request.Free entry exists& ) can be used to to distinguish between free text items and catalog items. In this transaction you can search for the other attributes you wish to use in the start conditions. You can also see the list of attributes via transaction SWO1. Enter Object/Interface Type = BUS2121. Hit display and expand the attributes menu.
    Kind regards,
    Siobhan

  • SQL Server Free Text Search with multiple search words inside a stored procedure

    I am trying to do a free text search. basically the search string is being sent to a stored procedure where it executes the free text search and returns the result.
    If I search for red
    flag, I want to return the results that matches both red and flag text.
    Below is the query I use to return the results.
    select * from customer where FREETEXT (*, '"RED" and "flag"')
    This doesn't give me the desired result. Instead this one give the desired result.
    select * from customer where FREETEXT (*, 'RED') AND FREETEXT (, 'FLAG')
    My problem is since it's inside a stored procedure, I will not be able to create the second query where clause. I thought both query should return the same result. Am I doing something wrong here?

    I am moving it to Search.
    Kalman Toth Database & OLAP Architect
    IPAD SELECT Query Video Tutorial 3.5 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • MN04 not working for free text PO

    Hi All,
    I have maintained a condition record through MN04 in purchase organisation, company code and vendor combination. This condition record is working fine for regular purchase orders. But it is not working for free text PO's. Could you please guide me why is it so?
    I am maintaining same purchase organisation, company code and vendor combination for free text PO also. Question is why it is working for a purchase order with material inside it and why it is not working for purchase order with out material.
    Thank you all in advance

    Hi,
       Seems you are using a custom print program and form. I would suggest to change the program to SAPFM06P, form routine as "ENTRY_NEU" and the form as "MEDRUCK" in NACE transaction for the output type and check the scenario again. Also cross check the settings with the KBA: 1829682 - Output type is not determined in Purchase order
       If its getting triggered, then check the custom program and the form with the help of technical team.
    Regards,
    AKPT

  • Automatic PO creation of free text PR

    Hi!
    We have all our PRs in free text since we are not yet using material master. One of our purchase organization will only order from one vendor and they will enter that vendor and price in the PR. Is it possible to create a PO automatically from that PR without a material or source list?
    Sincerely
    Anders

    Hi
    Thank you very much. Is it possible to restrict the automatic creation to a certain purchase organization?
    If I understand you right:
    1) Create PR with item category D Service
    2) Activate automatic PO creation in ML91
    That will create POs for all PRs created as a service?
    Sincerely
    Anders

  • Automatic PO from PR [free text base procurement ]

    Hi SAP gurus ,
    I have following question ,
    I am not using material master , it is a free text base procurement .
    even there are no contracts in place .
    Purchasing is only PR - PO w.r.t. & without respect to PR  - GR - IV . etc.
    How can I create a Automatic PO w.r.t. PR ?
    Can anybody please advice?
    Thanks ,
    Prasad

    Hello,
    1. Check auto PO tick in Vendor Master record.
    2. Create Info record for material group which you are going to use in PR. This is important for net price, purchasing group and tax code which will be mandatory in PO.
    3. Assign Source of supply as this info record in PR.
    4. Create auto PO in ME59N t- code.
    Regards,
    Shailesh Mackwan

  • I have an iPhone 4S and my friend has two ipods with two Apple ID's.  Why can't he receive messages on "Message" on one and he uses a free text app on the other which receives messages from my phone just fine.

    My friend has two ipods.  Two Apple ID's and on one ipod he has a free text app on it and only Message on the other.  He cannot receive a message from my iphone 4S on the one with Message, but receives it fine on the one with the free text app.
    He can also receive a message from my iPad on the one with Message.
    My question is how can he recieve a text from my iPhone to the ipod which has a different Apple ID than the other but does not have a free text app?
    Also on the ipod he has the free text app he has not upgraded to ios7 and won't.

    Are the use the correct email address for the contact? Those are listed in Settings>Messages>Send and Receive. When Messaging somene the iOS devices used the email address (or phone number if applicable) listed in the Contact app for that person.
    Thus, it appears the you Contact apps only has that one email address listed for the person you are trying to Message.
    If he can send you a Messages can you reply to it? If so save the sender to your Contact app.

  • Exchange Server Information Store has encountered an error while executing a full-text index query

    Hi Team need help
    Exchange 2013 EAC doesnt show the databases and it gives message
    "Your request couldn't be completed. Please try again in a few minutes."
    Its a 9 Node DAG and I stopped and diabled Search and Search Host controller on all of them
    in the event viewer see a lot of Event id 1012
    Log Name:      Application
    Source:        MSExchangeIS
    Date:          4/1/2013 9:23:48 AM
    Event ID:      1012
    Task Category: General
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      ex1301.dagdc.com
    Description:
    Exchange Server Information Store has encountered an error while executing a full-text index query ("and(or(itemclass:string("IPM.Note*", mode="and"), itemclass:string("IPM.Schedule.Meeting*", mode="and"), itemclass:string("IPM.OCTEL.VOICE*",
    mode="and"), itemclass:string("IPM.VOICENOTES*", mode="and")), subject:string("SearchQueryStxProbe*", mode="and"), folderid:string("48A300C7FBA4DA408B80EB019A1CE94900000000000E0000"))"). Error
    information: System.TimeoutException: Failed to open a channel.
       at Microsoft.Exchange.Search.OperatorSchema.PagingImsFlowExecutor.ExecuteServiceCall(IProcessingEngineChannel& serviceProxy, Action`1 call, Int32 retryCount)
       at Microsoft.Exchange.Search.OperatorSchema.PagingImsFlowExecutor.ExecuteSearchFlow(String flowName, Dictionary`2 inputData)
       at Microsoft.Exchange.Search.OperatorSchema.PagingImsFlowExecutor.<ExecuteInternal>d__18.MoveNext()
       at Microsoft.Exchange.Search.OperatorSchema.PagingImsFlowExecutor.<ExecuteSimple>d__a.MoveNext()
       at Microsoft.Exchange.Server.Storage.FullTextIndex.FullTextIndexQuery.ExecutePagedFullTextIndexQuery(Guid databaseGuid, Guid mailboxGuid, Int32 mailboxNumber, String query, CultureInfo culture, Guid correlationId, QueryLoggingContext loggingContext,
    PagedQueryResults pagedQueryResults)
       at Microsoft.Exchange.Server.Storage.StoreCommonServices.StoreFullTextIndexHelper.ExecuteFullTextIndexQuery(Context context, MailboxState mailboxState, QueryParameters queryParameters, PagedQueryResults pagedQueryResults, ExchangeId searchFolderId,
    SearchExecutionDiagnostics diagnostics)
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="MSExchangeIS" />
        <EventID Qualifiers="49156">1012</EventID>
        <Level>2</Level>
        <Task>1</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2013-04-01T16:23:48.000000000Z" />
        <EventRecordID>192599</EventRecordID>
        <Channel>Application</Channel>
        <Computer>ex1301.dagdc.com</Computer>
        <Security />
      </System>
      <EventData>
        <Data>and(or(itemclass:string("IPM.Note*", mode="and"), itemclass:string("IPM.Schedule.Meeting*", mode="and"), itemclass:string("IPM.OCTEL.VOICE*", mode="and"), itemclass:string("IPM.VOICENOTES*",
    mode="and")), subject:string("SearchQueryStxProbe*", mode="and"), folderid:string("48A300C7FBA4DA408B80EB019A1CE94900000000000E0000"))</Data>
        <Data>System.TimeoutException: Failed to open a channel.
       at Microsoft.Exchange.Search.OperatorSchema.PagingImsFlowExecutor.ExecuteServiceCall(IProcessingEngineChannel&amp; serviceProxy, Action`1 call, Int32 retryCount)
       at Microsoft.Exchange.Search.OperatorSchema.PagingImsFlowExecutor.ExecuteSearchFlow(String flowName, Dictionary`2 inputData)
       at Microsoft.Exchange.Search.OperatorSchema.PagingImsFlowExecutor.&lt;ExecuteInternal&gt;d__18.MoveNext()
       at Microsoft.Exchange.Search.OperatorSchema.PagingImsFlowExecutor.&lt;ExecuteSimple&gt;d__a.MoveNext()
       at Microsoft.Exchange.Server.Storage.FullTextIndex.FullTextIndexQuery.ExecutePagedFullTextIndexQuery(Guid databaseGuid, Guid mailboxGuid, Int32 mailboxNumber, String query, CultureInfo culture, Guid correlationId, QueryLoggingContext loggingContext,
    PagedQueryResults pagedQueryResults)
       at Microsoft.Exchange.Server.Storage.StoreCommonServices.StoreFullTextIndexHelper.ExecuteFullTextIndexQuery(Context context, MailboxState mailboxState, QueryParameters queryParameters, PagedQueryResults pagedQueryResults, ExchangeId searchFolderId,
    SearchExecutionDiagnostics diagnostics)</Data>
        <Binary>5B444941475F4354585D000084000000FF09000000000000000268000000808A00100000000080CA00100000000080B200100000000080D200100000000030FF001000000000309F00100000000030DF001000000000B09D001000000000B0DD001000000000B0ED001000000000B08D001000000000B095001000000000B0A5001000000000</Binary>
      </EventData>
    </Event>

    Hi,
    Please reenable and start the search engine service and try again.
    The simillar case for your reference:
    http://social.technet.microsoft.com/Forums/en-US/exchangesvrgeneral/thread/4f43ef50-b71f-4ab3-8ced-70f1c36c5509
    Hope it is hlepful.
    Fiona Liao
    TechNet Community Support

  • Problem to get ResultSet when it is used a Date type in the query condition

    hello ,
    I having a bit of nightmare getting a ResultSet how result of one simple Query for a table when the condition WHERE involve a Date type.
    To change the String value in a date to use in the query condition, I tried both:
    String strDate = "dd/mm/yyyy";
    (1.) java.sql.Date sqlDate = new java.sql.Date(strDate.getTime() )
    (2.) SimpleDateFormat formatter = new SimpleDateFormat(strDate) ; sqlDate = formatter.parse(strDate);
    and finally I use this code to get the ResultSet:
    sql = "SELECT * FROM myTable Where (idCli = " + cd_Cli + " And dateReg = " + sqlDate + ")";
    statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
    resultSet = statement.executeQuery(sql);
    boolean ok = resultSet.last();
    totNumberOfRegistration = resultSet.getRow();
    But In both the cases I get a empty resultSet.
    I shoul like if someone would look my code to say me where it is the mistake...
    thank you
    tonyMrsangelo
    P.S. I tryed using PrepareStatement too to get the ResultSet, but in that case I couldn't use the ResultSet because executing the statement resultSet.last() I get the error: "Result set type is TYPE_FORWARD_ONLY"

    In a database like Oracle, you need to use a function like TO_DATE; other databases may have something similar.
    However, the proper way to do this is to use a PreparedStatement. Then you can say
    PreparedStatement ps = conn.prepareStatement("update SOMETABLE set SOME_DATE=? where SOME_ID=?");
    ps.setDate(1, new java.sql.Date(someJavaUtilDate.getTime()));
    ps.setInt(2, theId);
    ps.executeUpdate();

Maybe you are looking for

  • Lookout modbus plus performanc​e

    I'm running 9 Schneider Electric PLCs Compact 265 connected to Lookout v5 PC via modbus plus. I have cyclic stalls of transport, each 50 secs or so, which last for 3 or even more seconds. I've tried all the settings there are on modbus object in Look

  • Storage Thread Count

    I'm trying to write up advice for Storage node thread count. Obviously, this is dependent of the machines - we have 48G 8processor machines, running 20 x2G Storage nodes and 2 x 2G Proxy nodes. My understand is that when you don't have a cache-store

  • Taglibs in oc4j

    Hello, I'm trying to build a small webapplication in JSP that is showing a table in a browser. I'm using a tag from the Business Components Data Tags library. So in the JSP-page I have: <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %> <jbo:Appli

  • How do I turn off autocomplete in the browser bar?

    With the newest update for firefox, the browser bar now autocompletes website names for you. How do I turn this off? I prefer the older way where if you don't insert www. it would google it for you now, there is no way to do that. If I type firefox i

  • Error on backup  database is closed

    please! help me I have an error when I do a backup from EM I use oracle 11g is installed on Solaris 10, if I come in remotely and directly use RMAN / target with these commands backup device type disk tag '% TAG' database; backup device type disk tag