Reference to entity must end with ;

Hi All,
My application uses SAX parser to strip and parse the incoming xml file. My problem is whenever the payload contains L@amp;T symbol, it is throwing 'SAX Exception saying that Reference to the entity must end with ;'.
But, i could open the xml file using xml tool such as xml spy and xml notepad. And as far i know, @amp; is valid representation in xml. I really don't understand why i am getting this exception?
For testing purpose i put one more ';' at the end of '&' like 'L&;T'. The file was processed successfully and in the output i saw 'L&;T', which was supposed to be L&T.
I will post the problamatic file as well as the exact exception phrase in my next post. In the meantime, if anybody encountered this problem before, kindly let me know the root cause of this problem and the way to resolve it.
Your earlier advice is greatly appreciated.
Thanks in advance for your time.
Thanks and regards,
ravi.

What happens if you use
L@amp;T
Hi All,
My application uses SAX parser to strip and parse the
incoming xml file. My problem is whenever the payload
contains L@amp;T symbol, it is throwing 'SAX
Exception saying that Reference to the entity must
end with ;'.
But, i could open the xml file using xml tool such as
xml spy and xml notepad. And as far i know, @amp; is
valid representation in xml. I really don't
understand why i am getting this exception?
For testing purpose i put one more ';' at the end of
'&' like 'L&;T'. The file was processed
successfully and in the output i saw 'L&;T', which
was supposed to be L&T.
I will post the problamatic file as well as the exact
exception phrase in my next post. In the meantime, if
anybody encountered this problem before, kindly let
me know the root cause of this problem and the way to
resolve it.
Your earlier advice is greatly appreciated.
Thanks in advance for your time.
Thanks and regards,
ravi.What happens if you use

Similar Messages

  • The reference to entity "M" must end with the ';' delimiter issue

    Hello,
    My interface scenario is third party system sending file to PI; Then PI is generating IDOC and sending it to ECC system.
    Now issue is we are getting below error message,
    “The reference to entity "M" must end with the ';' delimiter”.
    What do I have to do to fix this error? I'm not sure what the problem about the delimiter is?
    I am giving example here,
    Input payload like:
    <NAME>H&M</NAME>
    <NAME_2>H&M</NAME_2>
    <NAME_3></NAME_3>
    <POSTL_CODE>00002</POSTL_CODE>
    <CITY>HELSINKI</CITY>
    If I removed ‘&’ from  <Name> segment value then IDOC is generated correctly.
    But Name is coming to PI like that only.
    Please help me.

    Hello Rohan
    It might be that PI thinks &M is part of an XML escape code in line
    <NAME>H&M</NAME>
    it should be <NAME>H&amp;M</NAME>
    Kind regards
    Steve

  • The declaration for the entity "HTML.Version" must end with ' '.

    Hi experts.
    I have an synchronous escenario Proxy - SOAP (SAP ERP - SalesForce) Is a very simple escenario:
    1. ERP sends user and password to SF and SF respond with a token.
    2. PI sends to SF a Request message with some information, SF get the message without problems.
    3. When SF responds to PI, the following error appears on the SXI_MONITOR:
    <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_SF_General_Response_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2>
      <SAP:P3>The declaration for the entity "HTML.Version" must</SAP:P3>
      <SAP:P4>end with '>'.</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_SF_General_Response_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:The declaration for the entity "HTML.Version" must end with &#39;>&#39;.</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
    The response structure from login and the point 3 are the same.
    I tested in the SOAP UI and responds fine, without error:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://soap.sforce.com/schemas/class/AXT_SF_SAP_ws" xmlns:objResponse="http://soap.sforce.com/schemas/class/Objetos_ws">
       <soapenv:Body>
          <fnActualizaCostoActividadResponse>
             <result>
                <objResponse:bResponse>true</objResponse:bResponse>
                <objResponse:sResponse>Éxito en la Actualización del Costo de la Actividad, para el Caso: 001 .</objResponse:sResponse>
             </result>
          </fnActualizaCostoActividadResponse>
       </soapenv:Body>
    </soapenv:Envelope>
    Any idea to whats going on with this? I appreciate so much your help.
    Cristina.

    This has been fixed. I updated to the latest version of Java (Version 6 Update 17 (build 1.6.0_17-b04)) & cleared my browser history (temporary files, history, cookies, saved passwords and web form information). I did not have to reboot. Apparently, Java version 6 update 15 had some sort of conflict with P6 Web.

  • Document type declaration for root element type "web-app" must end with ' '

    I am attempting to deploy an application (.war file) using the Sun Access Manager Agent installed, (Reference http://docs.sun.com/app/docs/doc/819-3201/6n5eht3k4?a=view -near the bottom) and I get this error:
    Error loading deployment descriptors for ajacs Line 3 Column 19 -- The document type declaration for root element type "web-app" must end with '>'.
    Here is the relavent code:
    <!DOCTYPE web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <web-app>
    <filter>
    <filter-name>Agent</filter-name>
    <filter-class> com.sun.identity.agents.filter.AmAgentFilter </filter-class>
    </filter>
    <filter-mapping>
    <filter-name>Agent</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    <display-name>AJACS</display-name>
    <welcome-file-list>
    <welcome-file>frameSet.jsp</welcome-file>
    </welcome-file-list>
    etc...
    Now, when I remove the parts that http://docs.sun.com/app/docs/doc/819-3201/6n5eht3k4?a=view said to add, it deploys just like it used to deploy- just fine with no errors. However, I add that code and it breaks.
    Note: The code was a straight copy/paste, so if there is any error in the code, it is because it's written incorrectly on the Sun doc website.
    Any help would be MUCH appreciated. Thanks!

    Well, if that was pasted on one line, it would be:
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    So it's supposed to be that way. I just tried it with the extra quotes, and no dice...

  • Exception: The declaration for the entity "ContentType" must end with ' '

    I am trying to parse a remote XML file into org.w3c.dom.Document, but it always shows the above Warning information. Any idea for that?
    My Code is like:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(true);
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document doc = builder.parse("remote url");Thanks!
    Edited by: usfish on Jan 12, 2009 11:43 AM

    As a wild guess, you have an "<!ENTITY" declaration that is not terminated. It's possible that the file is somehow corrupted.
    The error message should contain the line number and column where the parser discovered the error. If you retrieve the XML file by hand and look at that location, you should find the problem.

  • Problem with SAX parser - entity must finish with a semi-colon

    Hi,
    I'm pretty new to the complexities of using SAXParserFactory and its cousins of XMLReaderAdapter, HTMLBuilder, HTMLDocument, entity resolvers and the like, so wondered if perhaps someone could give me a hand with this problem.
    In a nutshell, my code is really nothing more than a glorified HTML parser - a web page editor, if you like. I read in an HTML file (only one that my software has created in the first place), parse it, then produce a Swing representation of the various tags I've parsed from the page and display this on a canvas. So, for instance, I would convert a simple <TABLE> of three rows and one column, via an HTMLTableElement, into a Swing JPanel containing three JLabels, suitably laid out.
    I then allow the user to amend the values of the various HTML attributes, and I then write the HTML representation back to the web page.
    It works reasonably well, albeit a bit heavy on resources. Here's a summary of the code for parsing an HTML file:
          htmlBuilder = new HTMLBuilder();
    parserFactory = SAXParserFactory.newInstance();
    parserFactory.setValidating(false);
    parserFactory.setNamespaceAware(true);
    FileInputStream fileInputStream = new FileInputStream(htmlFile);
    InputSource inputSource = new InputSource(fileInputStream);
    DoctypeChangerStream changer = new DoctypeChangerStream(inputSource.getByteStream());
    changer.setGenerator(
       new DoctypeGenerator()
          public Doctype generate(Doctype old)
             return new DoctypeImpl
             old.getRootElement(),
                              old.getPublicId(),
                              old.getSystemId(),
             old.getInternalSubset()
          resolver = new TSLLocalEntityResolver("-//W3C//DTD XHTML 1.0 Transitional//EN", "xhtml1-transitional.dtd");
          readerAdapter = new XMLReaderAdapter(parserFactory.newSAXParser().getXMLReader());
          readerAdapter.setDocumentHandler(htmlBuilder);
          readerAdapter.setEntityResolver(resolver);
          readerAdapter.parse(inputSource);
          htmlDocument = htmlBuilder.getHTMLDocument();
          htmlBody = (HTMLBodyElement)htmlDocument.getBody();
          traversal = (DocumentTraversal)htmlDocument;
          walker = traversal.createTreeWalker(htmlBody,NodeFilter.SHOW_ELEMENT, null, true);
          rootNode = new DefaultMutableTreeNode(new WidgetTreeRootNode(htmlFile));
          createNodes(walker); However, I'm having a problem parsing a piece of HTML for a streaming video widget. The key part of this HTML is as follows:
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                  id="client"
            width="100%"
            height="100%"
                  codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
                  <param name="movie" value="client.swf?user=lkcl&stream=stream2&streamtype=live&server=rtmp://192.168.250.206/oflaDemo" />
             etc....You will see that the <param> tag in the HTML has a value attribute which is a URL plus three URL parameters - looks absolutely standard, and in fact works absolutely correctly in a browser. However, when my readerAdapter.parse() method gets to this point, it throws an exception saying that there should be a semi-colon after the entity 'stream'. I can see whats happening - basically the SAXParser thinks that the ampersand marks the start of a new entity. When it finds '&stream' it expects it to finish with a semi-colon (e.g. much like and other such HTML characters). The only way I can get the parser past this point is to encode all the relevant ampersands to %26 -- but then the web page stops working ! Aaargh....
    Can someone explain what my options are for getting around this problem ? Some property I can set on the parser ? A different DTD ? Not to use SAX at all ? Override the parser's exception handler ? A completely different approach ?!
    Could you provide a simple example to explain what you mean ?
    Thanks in anticipation !

    You probably don't have the ampersands in your "value" attribute escaped properly. It should look like this:
    value="client.swf?user=lkcl&stream=...{code}
    Most HTML processors (i.e. browsers) will overlook that omission, because almost nobody does it right when they are generating HTML by hand, but XML processors won't.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • URGNET - Electronic Bank Statement - Master Account not ends with zero.

    Hi
    I have a peculiar situation.  I have a House bank which we would like to use for EBS.  The GL account assigned for this house bank ends with 6. 
    As per the EBS design, the master account must end with zero (0) and all other clearing account can end with from 1 to 9. 
    I dont want to change my current GL account assigned to this house bank.  Is there any way to implement EBS for this account without changing the house bank GL account.  At the same time, I should have the remaining clearing accounts.
    Please suggest me.
    Thanks and Regards
    Raj

    Hi Raj,
    You sure have a peculiar scenario.
    Though have never tried anything like this. But i think it could be done if you could play around with the 'Acct Modifier' and 'Currency' Options provided when you assign your account symbols to Accounts.
    Normally, we give a '+' for both these fields signifying all options.
    Let me know your experience on this.
    Regards,
    Chetan

  • I have been using a Google moderated group with a robo receptor which suddenly turns down my message submission because it won't "word wrap" correctly. I have made no changes in my messages to the forum so the problem must be with my end. Any Ideas?

    I have been using a Google moderated group with a robo receptor which suddenly turns down my message submission because it won't "word wrap" correctly. I have made no changes in my messages to the forum so the problem must be with my end. Any Ideas?

    I have been using a Google moderated group with a robo receptor which suddenly turns down my message submission because it won't "word wrap" correctly. I have made no changes in my messages to the forum so the problem must be with my end. Any Ideas?

  • At my wits end with BT - can anyone help please?

    This is a long and ongoing saga and so I apologise for the long post.
    In February due to a change in job I needed to change the payment date of my DD payment. I did this online and received an email confirming the new payment date of the 28th. I stupidly assumed that was the date BT would take payment. The account is only used for Direct Debits and so money is put in there shortly before they're due. Over two weeks before the payment was due I received an unpaid DD letter from my bank. BT had attempted to take the payment early. I contacted BT and was assured my payment date was the 28th and they had no idea why payment had been attempted early. Later that day BT called to discuss the returned DD and I explained it was a BT error. A week later BT attempted to take the DD again. Once again I contacted them to be told my DD was definitely set up for the 28th and "there must be an error on the system" Later that day I received another call from BT to inform me my DD had been returned unpaid and again I explained that it was a BT error. Not trusting BT I cancelled the DD with the intention of making my payment online on the 28th. On 28th Feb before I had chance to make the payment I received a call from someone at BT who was mentioning late payment charges etc. I made it clear that any charges would be unacceptable as the error was down to BT and my payment wasn't actually late. I was asked to make payment over the phone but as it was difficult to understand each other I made it online and gave the payment reference number.
    My online balance at this point showed as zero and so I decided against setting up another DD for BT to attempt to take money as and when they pleased. Late March I received a phone call from BT telling me my DD wasn't set up and I had an outstanding balance of £57.75. I explained I'd had a zero balance but it would appear that my online balance was showing incorrectly. The person I spoke to said he could set up a new DD for this amount but as a one off it would come out on the 13th - something to do with making sure payment was made before the new bill came out and it taking X amount of time for a DD to set up. This would be a one off payment and after it had been made I'd be contacted to set up a new DD.
    On 20th April I received a call from UK based BT asking did I want to set up my new DD However to do this I would need to pay £120 over the phone. I asked why when I definitely had a zero balance, I'd received no bill and quite simply owed BT no money at that point. I was told there was a problem seeing all the data and somebody would call me back after the Easter weekend. Instead later that same day somebody else UK based phoned me asking me to set up my DD. I explained about the earlier phone call and she was confused as to why I'd been asked to pay anything as I clearly had a zero balance. I set up a new DD with her for £60 a month, payments to be made on 28th, starting 28th May. A few days after this my new bill arrived for £109.
    On 5th May my bank called me to say once again BT had attempted to take the DD early but this time they'd attempted to take £109. Once again I called BT and this time spoke to an Indian gentleman who advised me to cancel the DD with my bank while I was on the phone with him, he'd cancel it at that end and then he would set up a new one. He said letters of confirmation would be sent out to me.
    I sent an email to BT explaining all this and also saying I wasn't happy that they'd charged me £10 late payment charge on the new bill for unpaid DD. Had BT taken the payment when they should it wouldn't have been unpaid!! A gentleman phoned me back, assured me the £60 a month DD was set up for the 28th starting 28th May. He also emailed me confirmation of this.
    On 9th May I received an email saying I had a "supplementary bill" so looked at my online account to see my bill had gone up by about £5. My DD wasn't showing as set up on the online account but I decided to leave it a couple of days before contacting BT. Later that day though I received three letters. One saying my DD had been cancelled as discussed, and two others saying my DD had been set up to be paid 28th of every month starting 28th May for the amount £104!
    Before I had chance to call BT someone UK based called me to ask did I want to set up my DD as I had no payment plan set up. By this point I'd more than had enough and told her I had one email and two letters clearly saying my DD was set up and the only reason she'd be calling to ask me to do this would be if BT had cancelled the DD themselves. I refused to set up the DD yet again and she put me through to India based billing to discuss what was happening. I was told a DD wasn't set up on my account, that I couldn't set one up unless I paid my bill in full and that line restrictions are due to come into place on 29th May if the bill isn't paid in full.
    Today my BT online account shows no DD set up. However my bank shows the new DD is in fact active. I have no idea when BT will take money, or for how much. I don't know what to do, do I cancel the DD and just pay all future bills in full when they come in and in doing so be penalised by BT for not paying by DD? Or do I just leave it and hope they finally get it right? Bearing in mind I've had two letters saying they're going to take £104 and an email saying £60 I can't see that happening.
    It appears not one BT department speaks to the other, half the calls aren't logged and nobody at BT listens to the customer. I have spoken to Ofcom about this and they've advised me to give BT one more chance to sort this out and then go to the Ombudsman. I've just come across the forums and so am giving this a try to see if I can get any joy here.
    At some point during all this I spoke to somebody UK based who told me to send my bank charge letters to BT which I have done but as yet have heard nothing in return! I've lost track of how many people I've spoken to and am at my wits end with it all.
    Solved!
    Go to Solution.

    I'm even more concerned now after hearing back regarding my initial post. Apparently any cancellations or changes are showing as done by me using the self help platform on my BT account. This isn't the case. The actions carried out on certain dates listed on the email I received were all carried out by BT over the phone and not myself. I didn't even know it was possible to cancel a direct debit using the BT website. I thought it had to be cancelled at the bank and then a phone call to BT. I was logged onto my BT account while the phone calls were taking place but any action was carried out by BT and not myself. 
    BT are insisting I have no DD set up. Yet it clearly shows on my bank account that there is an active DD for BT. To confirm that, I've spoken to my bank today who have verified there is most definitely a DD set up to pay BT on the bank account. They've double checked the account number with me and it's definitely for my BT account. The bank are sending me a letter confirming it's an active DD for me to include all other details for the Ombudsman because I really feel this needs fetching to their attention. 
    To be fair to the person who has replied I have been told I can pay a small amount and set the DD up rather than pay in full or face restrictions. But despite BT's insistence that I have no DD set up my bank clearly states I have. I'm now going to have to cancel the DD that BT are sure isn't active and set it up again.
    Incidentally the monthly payments I'm to make are £45 - less than the £60 and a lot less than the £104 previously mentioned! So on one hand I will have a satisfactory conclusion but on the other I have to still cancel a "none existent" existing DD, set a new one up and am out of pocket on bank charges caused by BT trying to take payment on the wrong date. I then have to trust they'll not do the same thing again.......
    It's all like a stupid joke that's just not funny. 

  • Why method parameter end with three dots

    i generate hibernate pojos + hybernate mapping + dao. in dao class i have some doubt in coding please clear.
    package org.triology.blog.hibernate;
    import org.triology.blog.GenericDAO;
    import java.io.Serializable;
    import java.lang.reflect.ParameterizedType;
    import java.util.List;
    import java.util.Map;
    import org.hibernate.Criteria;
    import org.hibernate.FlushMode;
    import org.hibernate.Query;
    import org.hibernate.LockMode;
    import org.hibernate.Session;
    import org.hibernate.criterion.Restrictions;
    import org.hibernate.criterion.Criterion;
    import org.hibernate.criterion.Example;
    * Generated at Wed Jul 30 16:57:35 IST 2008
    * @author Salto-db Generator v1.0.16 / Pojos + Hibernate mapping + Generic DAO
    * @see http://www.hibernate.org/328.html
    public abstract class AbstractHibernateDAO<T, ID extends Serializable> implements GenericDAO<T, ID> {
    private Session session;
    private Class<T> persistentClass;
    public AbstractHibernateDAO() {
    this.persistentClass = (Class<T> ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];
    public void setSession(Session session) {
    this.session = session;
    protected Session getSession() {
    if (session == null)
    session = HibernateUtil.getSessionFactory().getCurrentSession();
    return session;
    public Class<T> getPersistentClass() {
    return persistentClass;
    @SuppressWarnings("unchecked")
    public T getById(ID id) {
    return (T) getSession().get(getPersistentClass(), id);
    @SuppressWarnings("unchecked")
    public T getById(ID id, boolean lock) {
    if (lock) {
    return (T) getSession().get(getPersistentClass(), id,
    LockMode.UPGRADE);
    } else
    return getById(id);
    @SuppressWarnings("unchecked")
    public T loadById(ID id) {
    return (T) getSession().load(getPersistentClass(), id);
    public void save(T entity) {
    getSession().save(entity);
    public void update(T entity) {
    getSession().update(entity);
    public void saveOrUpdate(T entity) {
    getSession().saveOrUpdate(entity);
    public void delete(T entity) {
    getSession().delete(entity);
    public void deleteById(ID id) {
    getSession().delete(loadById(id));
    @SuppressWarnings("unchecked")
    public List<T> findAll() {
    return findByCriteria();
    * Use this inside subclasses as a convenience method.
    @SuppressWarnings("unchecked")
    protected List<T> findByCriteria(Criterion... criterion) {
    Criteria crit = getSession().createCriteria(getPersistentClass());
    for (Criterion c : criterion) {
    crit.add(c);
    return crit.list();
    * Find by criteria.
    @SuppressWarnings("unchecked")
    public List<T> findByCriteria(Map criterias) {
    Criteria criteria = getSession().createCriteria(getPersistentClass());
    criteria.add(Restrictions.allEq(criterias));
    return criteria.list();
    * This method will execute an HQL query and return the number of affected entities.
    protected int executeQuery(String query, String namedParams[], Object params[]) {
    Query q = getSession().createQuery(query);
    if (namedParams != null) {
    for (int i = 0; i < namedParams.length; i++) {
    q.setParameter(namedParams, params[i]);
    return q.executeUpdate();
    protected int executeQuery(String query) {
    return executeQuery(query, null, null);
    * This method will execute a Named HQL query and return the number of affected entities.
    protected int executeNamedQuery(String namedQuery, String namedParams[], Object params[]) {
    Query q = getSession().getNamedQuery(namedQuery);
    if (namedParams != null) {
    for (int i = 0; i < namedParams.length; i++) {
    q.setParameter(namedParams[i], params[i]);
    return q.executeUpdate();
    protected int executeNamedQuery(String namedQuery) {
    return executeNamedQuery(namedQuery, null, null);
    @SuppressWarnings("unchecked")
    public List<T> findByExample(T exampleInstance, String[] excludeProperty) {
    Criteria crit = getSession().createCriteria(getPersistentClass());
    Example example = Example.create(exampleInstance).excludeZeroes().enableLike().ignoreCase();
    for (String exclude : excludeProperty) {
    example.excludeProperty(exclude);
    crit.add(example);
    return crit.list();
    in above class my doubt is
    * Use this inside subclasses as a convenience method.
    @SuppressWarnings("unchecked")
    protected List<T> findByCriteria(Criterion... criterion) {
    Criteria crit = getSession().createCriteria(getPersistentClass());
    for (Criterion c : criterion) {
    crit.add(c);
    return crit.list();
    why we pass findByCriteria parameter end with three dots (Criterian...)
    Edited by: BalaTTPL on Jul 31, 2008 8:53 AM

    protected List<T> findByCriteria(Criterion... criterion) {
        Criteria crit = getSession().createCriteria(getPersistentClass());
        for (Criterion c : criterion) {
            crit.add(c);
        return crit.list();
    }The "Criterion..." argument just means that you can call the method with any number (zero or more) of Criterion references. Within the method criterion is treated like an array - for instance in the for loop.
    The notation is known as "varargs" and is described in the JDK1.5 [Tech notes|http://java.sun.com/javase/6/docs/technotes/guides/language/varargs.html].

  • Expression and "end with"

    Hi,
    Using expression, i'm trying to build an expression that use a field as a like criteria. It a kind of reverse "like" SQL function. I have entity "reference" with à refcode field and some record that look like :
    Id refcode
    1 123
    2 BLA
    3 BLA1
    I would like to get one of this record depending request arguement that I call "code". It look like that :
    If I want record that match the begin of the "code" BLA1TEST1, it will return entity Id 2 and 3. So It look like :
    ExpressionBuilder eb = new ExpressionBuilder();
    Expression e1 = eb.get("refcode").concat('%')
    Expression expr = eb.getParameter("code").like(e1)
    Query query.addArguement("BLA1TEST1");
    And it work.
    If I want record that match "contain" of the "code" ESSBLA123", it will return entity Id 1 and 2 and 3. And it look like :
    ExpressionBuilder eb = new ExpressionBuilder();
    Expression e1 = eb.get("refcode")
    Expression expr = eb.getParameter("code").containsSubstring(e1)
    Query query.addArguement("ESSBLA123");
    work too.
    But if I want record that match the end of the "code" BL123, that may return entity Id 1, I don't kown howto ?
    Thanks for your help.
    Note : I get the result with JPQL like this :
    For begin with :
    String asql = String.format ("SELECT a.id FROM Reference a WHERE '%s' LIKE concat(a.refCode,'%%')", code);
    Query sq = em.createQuery (asql, Reference.class);
    For end with :
    String asql = String.format ("SELECT a.id FROM Reference a WHERE '%s' LIKE concat('%%', a.refCode)", code);
    For contain :
    String asql = String.format ("SELECT a.id FROM Reference a WHERE '%s' LIKE concat('%%', a.refCode, '%%')", code);
    Edited by: user11112980 on 6 oct. 2011 03:44
    Edited by: user11112980 on 6 oct. 2011 04:57

    Hello,
    I assume the problem is with creating an expression equivalent to "SELECT a.id FROM Reference a WHERE '%s' LIKE concat('%%', a.refCode)"? If so you can use a literal:
    ExpressionBuilder eb = new ExpressionBuilder();
    Expression e1 = eb.literal('%').concat(eb.get("refcode"));
    Expression expr = eb.getParameter("code").like(e1)
    Query query.addArguement("BL123");
    Or it might be more accurate to use a constant:
    ExpressionBuilder eb = new ExpressionBuilder();
    Expression e1 = (new ConstantExpression('%', eb)).concat(eb.get("refcode"));
    Best Regards,
    Chris

  • Job_open FM called in output type is ending with dump

    Hi All,
    I have a job_open FM called in output type is ending with dump, In dump analysis its given as "Statement "COMMIT" is not allowed in this form." and "There is probably an error in the program
    "SAPLSYDB".
    This program is triggered in the update task. There, the
    following ABAP/4 statements are not allowed:
    -  CALL SCREEN
    -  CALL DIALOG
    -  CALL TRANSACTION
    -  SUBMIT
    Kindly advise me to avoid this.
    Thaks in advance.
    Joshi

    Hi,
    This update termination occurs when a DB commit occurs in update task.......and probably job_open FM must hav done the DB commit.....
    So issuing the output while saving the transaction is not possible with job_open FM in output program.....
    try putting 3 (send with application own transaction)  in  despatch time of output and issue it manually.....
    Cheers,
    Jose.

  • Transport control program tp ended with error code 0203

    when i import queue and transport queue from dev to prd ,error show:
    Transport control program tp ended with error code 0203
    Message no. XT200
    Diagnosis
    An error occurred when executing a tp command.
      Command: IMPORT DEVK900298 P01 clientP01 U0 pf=/usr/sap/tra
      Return code: 0203
      Error text: wrong syntax in tp call
      Request: DEVK900298
    System Response
    The function terminates.
    Procedure
    Correct the error and execute the command again if necessary.

    Dear Allen,
    The transport control program tp collects all return codes that occur when a tp command is executed. From all of these single return codes, a combined return code is calculated that tp outputs as a result at the end the command. During an import, for example, all return codes for individual import steps are handled. If a special return code does not occur, then the combined return code at the end is the maximum of individual return codes that occur. In addition to the value of the return code, tp also gives a short description of this return code. You can display this short description using the command explainrc.
    Normally, all return codes that occur originate from individual transport steps. Since these individual return codes can only have the following values 0, 4, 6, 8, 12, 13, 14, 16, the combined return code also has one of these values. However, if a general error occurs, a single return code over 200 is generated. For example, this could arise if tp cannot establish a connection to the database. The maximum return code for all single transport steps is output in a separate message before specifying the combined returned code. In this case, the combined return code is always the return code of the general error message.
    <b>tp Commands:</b>
    tp addtobuffer <request> <sapsid>
    As of Release 4.6A, an explicit addtobuffer command leaves the position of the entry unchanged, if the relevant transport request is already in the buffer. Only the status of the entry is changed:
    Unconditional modes appearing in the command line are added to the unconditional modes in the buffer.
    All the steps of the entry are re-initialized.
    If the entry found is not an initial entry, the import step for the command file is set to *4000 .
    Before you call this command and its options, consider the effects of changing the import sequence.
    tp cleanbuffer <sapsid>
    This deletes successfully imported change requests from the list of requests that are marked for import into the SAP System <SAPSID>. This function is contained in the commands tp import all <sapsid> and tp put <sapsid> .
    tp delfrombuffer <request> <sapsid>
    If the specified request is marked for import into the specified SAP System, this flag is deleted from the import list.
    Before you call this command, consider the effects of changing the import sequence.
    As of Release 4.6A: If a transport request was only partially imported, you can delete this type of transport request from the buffer. However, if a deleted transport request is placed in the buffer (without having been initially or completely imported), the attributes of the old entry are reactivated. This means the return codes, the unconditional modes and tags of the deleted entry appear in the new entry.
    tp delstopmark <sapsid>
    If the list of requests marked for import into the specified SAP System contains a STOP mark, the mark is deleted.
    tp export <request>
    This exports the complete request from the source system. This command starts the export of a request from the operating system level. Only use this command in exceptional cases. The SAP System uses the command expwbo to release requests from CTS transactions.
    tp reformatbuffer <sapsid> [options]
    This automatically reformats the entire buffer.
    As of Release 4.5A, there are 2 different formats for buffer entries. (As of Release 4.5A, tp can work with both formats, and with a puffer containing heterogeneous entries. As of Release 4.6A, tp can work with 3 formats.)
    However, in certain cases entries with the old formatting have to be reformatted during the normal run of tp . In this case, the entire buffer is automatically reformatted.
    If you use the options downtorelease and Iagree for command reformatbuffer , you can format the buffer so that its formatting is compatible with an older release:
    Option downtorelease <Release>
    The command reformatbuffer with this option formats the buffer so that the formatting corresponds to the one used in an old release. This is necessary if tp writes buffer entries to the buffer of another system, but uses a buffer format that the transport control programs does not understand in this system.
    Since older formats cannot store the same amount of information as the newer ones, some information contained in the original buffer may not be stored in the unformatted buffer. This may lead to data loss.
    To avoid data loss, the original buffer is stored. In addition, you have the following functions:
    Displaying the unformatted buffer (using showbuffer <SID> )
    Displaying the original buffer (using showbuffer buffer=<SID>SAV )
    Accepting the unformatted buffer (using reformatbuffer and the option Iagree yes )
    Resetting the changes (using reformatpuffer and the option Iagree no )
    If you call reformatpuffer using downtorelease , tp displays in detail if information was lost by reformatting, and what that information was. tp also names the commands that is has to execute to accept or reject the changes.
    If you use the option downtorelease , you must also specify the option Iagree with yes or no . You cannot use the transport system until you decide to accept or reject the changes.
    Option Iagree
    Here are the following values for this option:
    yes ( true )
    Accept the change made by tp reformatbuffer <SID> downtorelease <rel>
    In this case, tp deleted the buffer semaphore file that was lifted for security reasons at the first call of reformatbuffer
    no ( false )
    Reject the change made by tp reformatbuffer <SID> downtorelease <rel> In this case, tp copies the backup of the original buffer back and deletes the buffer semaphore file that was lifted for security reasons at the first call of reformatbuffer
    tp setstopmark <sapsid>
    A special STOP mark is added to the list of requests registered for import into the specified SAP System. The commands tp import all <sapsid> and tp put <sapsid> only process the requests in front of this stop mark.
    If there is no stop mark, it is automatically generated by the commands
    tp import all <sapsid> and tp put <sapsid> .
    When all the requests in front of the stop mark have been imported successfully, at the end of all the calls the related marks and the mark itself are deleted.
    A STOP mark can only be placed at the end of the change requests that have already been marked. In addition, it can only be set if no other mark of the same kind already exists.
    tp showparams <sapsid>
    This tp function displays which values the individual parameters of the transport profile have for the current SAP System.
    tp verse <request>
    This creates versions of the objects in the specified request. This transport step is contained in command export .
    As of Release 4.5A, more actions that prepare the export are performed in this step.
    Thanks and Regards,
    Naveen.

  • What year/ model is my mac pro? serial ends with 6R0GP

    Hello Geniuses,
    I have spent hours trying to find the year and or model of my Mac Pro 2 x 3 GHz Quad-Core Intel Xeon.
    The search is not for the faint of heart.  I running Lion and want to know if I can upgrade to Mountain Lion.  I had a similar experience trying to figure out my "kernel" to see if I could run Logic at 64 bit.  I fianlly just tried it and it worked beautifully.  I don't think downloading a new OS to "find out" would be a good idea .  I've found many "theories" from users who do not have my set up.  Please consider that the model and year does not show up on my "about this mac" pop up menu.  Just my processor, memory, graphic, serial number and software. I found one article that had a link to "Tech Specs" that must have been changed. I could not find where I could enter my serial number to search this info. There are several articles out there that state other wise.  It's not greyed out. It's not there.  I've looked under all hardware.  Where is the year and model hiding?
    Thank you for reading

    Thank You Hatter and everyone,
    my hardware header simply states "Mac Pro"
    I believe I may have replaced the ram in order to have matching sets when beefed up.
    Here's what I can tell you:
    Mac OSX 10.7.5
    Processor 2 x3 GHz Quad-Core Intel Xeon
    Memory 16 GB 667 MHz DDR2 FB-DIMM
    Graphics  NVIDIA GeForce 7300 GT 256 MB
    Model Name:                              Mac Pro
    Model Identifier:                        MacPro2,1
    Processor Name:                      Quad-Core Intel Xeon
    Processor Speed:                     3 GHz
    Number of Processors:             2
    Total Number of Cores:             8
      L2 Cache (per Processor):         8 MB
    Memory:                                   16 GB
      Bus Speed:                               1.33 GHz
      Boot ROM Version:                   MP21.007F.B08
      SMC Version (system):              1.15f3
    Serial Number (system):            ending with 6R0GP
        Hardware UUID:           00000000-0000-1000-8000-001D4F4574B8
    So yes, it's a Mac Pro2,1
    I could have sworn that  I found an article years ago when I was trying to run Logic 9 as 64 bit - that showed my Kenel was 64 - I was unable to find it later.   I am clearly not as informed as you. How and where do I find if I have EF 132 or EF164 ?
    I found another thread where people with notebooks ugraded their main hard drive to a larger size and they were allowed to upgrade/ download to Mountain Lion.  I was hoping to upgrade in order to use the new Logic X.  Whatever I have, it works great with Logic 9 running in 64, but I end up using another software when I have a lot of tracks. I am quite amazed as to what Logic 10 is capable.  If ML is a pipe dream, then I better start saving my money.

  • Control record must start with tag EDI_DC40, not E1LFA1M

    Hi,
    I am trying sxample <b>FILE>XI>IDOC ADAPTER-->R/3</b>
    I am getting error as
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_RUNTIME</SAP:Code>
      <SAP:P1>MSGGUID F95236609A0C11D98F65000D56714443: Control record must start with tag EDI_DC40, not E1LFA1M</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error: MSGGUID F95236609A0C11D98F65000D56714443: Control record must start with tag EDI_DC40, not E1LFA1M</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Do i have to apply the note saying Apply the Support pack SP 11(Note No)  792957.
    Currently I have XI 3.0 SR1.
    Or can i try the similar example with some other IDOC.
    Please Help me in this.
    Thanks a lot
    Deepti

    Hi Deepti,
    I have got the same problem but after rescheduling the message its fine on the XI end. But at the R/3 End the status is still red with status number 56 (IDoc with errors added)Idoc used is CREMAS03. what might be the possible errors.
    Please help me.
    Regards,
    Gopesh Kumar Agarwal

Maybe you are looking for

  • The difference between photoshop eps and illustrator eps

    Before installing snow leopard, Quark Xpress could distinguish between photoshop eps and illustrator eps files when a file needed to be modified. Now all it does is open files in only one item of software (depending on which you have told it to open

  • Staffing changes and how to handle within the middle of a project

    Hello, Our users have this issue.  They have a project set up that is partially complete.  Let's say the project lasts three years and we have finished half of the project.  We have a resource staffed to a role that has been listed as the responsible

  • Photoshop CS2 suddenly not working

    I'm suddenly having troubles with my Photoshop CS2. I had uploaded the software onto my new laptop, Dell with Vista, and it has always worked fine. Suddenly, this message is popping up and I have no more use of Photoshop CS2: http://i19.photobucket.c

  • Problem with combobox gets dispalyed infront of popup window

    when ever popup window is open and kept on combobox ,combobox appears in front or overlaps the popup window,where exactly i have to check the code.which place of code i have to look into... plz help if there is any problem with css then plz specify w

  • Change documents for DEFAULTS tab in su01

    Hi all!! Somehow SPOOL CONTROL option-> output device for a user changed(under SU01--> DEFAULTS tab) in my Production system. Question> can i find out change documents for DEFAULTs TAB  in SU01 for a user ID?