NullPointerException - Create New Attachment to Message Payload

in PI 7.1, I am trying to add a new attachment to the Message using the following code.
A NullPointerException is recieved when statement <msg.addAttachment(text);> is executed.
Message msg = (Message) inputModuleData.getPrincipalData();
TextPayload text = msg.createTextPayload();
text.setContentType("text/plain;filename=\"Instrucoes.txt\"");
text.setContent(message.getBytes("UTF-8"));
text.setText("Set Text");
text.setDescription("Set Description");
text.setName("Set Name");
msg.addAttachment(text);
Has anybody experienced this problem? Or have any clues to what is causing the problem.
Thanks,
Tijo

Yes. Even with the following statement to build up the new payload. It is undefined causing NullpointerException.
TextPayload text = msg.createTextPayload();
text.setContentType("text/plain;filename=\"Instrucoes.txt\"");
text.setContent(message.getBytes("UTF-8"));
text.setText("Set Text");
text.setDescription("Set Description");
text.setName("Set Name");

Similar Messages

  • Creating new user get message "Name is used by an other user"

    10.9.2.
    Trying to create a new user getting the message "Name is used by an other user" under the short name. 
    How can I remove the remnants of this user that I suppose has been transferred when I migrated the users from an old mac to this one?  Becuase it might have been there in the past, but has been deleted.  Needless to say there is presently only one user in the 'Users & Groups' control panel.  And this one is not using this name. 
    I tried in Terminal
    sudo rm -rf /Users/ShortName\\ deleted
    (ShortName to be replaced by the name of the account it refuses to create). This does not make a change.

    I found the solution here:
    http://reviews.cnet.com/8301-13727_7-20102973-263/stubborn-user-accounts-returni ng-when-deleted-in-os-x/
    Thanks to Topher Kessler

  • Enqueuing JMS_TEXT_MESSAGE with Java creates strange message payload

    Hello everybody,
    I'm trying to enqueue a JMS_TEXT_MESSAGE. There is no problem doing this with PL/SQL, but with Java the payload of the enqueued message seems to contain garbage. I tried a lot but actually I have no idea why this happens.
    Here are the different user_data values of the enqueued messages:
    Java: (((; ; 0); ; ; ; ; ; ((; 100; ; ; 27); (; 200; ; 1257325532555; 24); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; )); 14; ; )
    PL/SQL: ((; ; ; ; ; 0; ); 14; This is a test; )
    As you can see there are a lot of differences. The length of the string (14) is correct with Java, too, but where do the other values come from ? And what happened to the message text ?
    Environment:
    - Oracle Database 10g Enterprise Edition 10.2.0.3.0
    - JDK 1.5.0_06
    - Used libraries
    -- $ORACLE_HOME/rdbms/jlib/jmscommon.jar
    -- $ORACLE_HOME/rdbms/jlib/aqapi13.jar
    -- $ORACLE_HOME/jdbc/lib/ojdb14.jar
    -- $ORACLE_HOME/jlib/jta.jar
    This is how created the user:
    CREATE USER strm_admin IDENTIFIED BY strm_admin;
    GRANT connect, resource, aq_administrator_role TO strm_admin;
    GRANT execute on dbms_aq TO strm_admin;
    Here is the test class that creates the strange payload:
    package test;
    import javax.jms.MessageProducer;
    import javax.jms.Queue;
    import javax.jms.QueueConnection;
    import javax.jms.QueueConnectionFactory;
    import javax.jms.TextMessage;
    import oracle.AQ.AQQueueTable;
    import oracle.AQ.AQQueueTableProperty;
    import oracle.jms.AQjmsDestination;
    import oracle.jms.AQjmsDestinationProperty;
    import oracle.jms.AQjmsFactory;
    import oracle.jms.AQjmsSession;
    public class AQTest
    public static void main(String[] args) throws Exception
    String url = "jdbc:oracle:thin:@server:port:sid";
    QueueConnectionFactory qcf = AQjmsFactory.getQueueConnectionFactory(url, null);
    QueueConnection connection = qcf.createQueueConnection("strm_admin", "strm_admin");
    AQjmsSession session = (AQjmsSession)connection.createQueueSession(true, 0);
    // create queuetable
    AQQueueTableProperty tableProperty = new AQQueueTableProperty("SYS.AQ$_JMS_TEXT_MESSAGE");
    session.createQueueTable("strm_admin", "testqueuetablejms", tableProperty);
    // create queue
    AQQueueTable queueTable = session.getQueueTable("strm_admin", "testqueuetablejms");
    Queue queue = session.createQueue(queueTable, "testqueuejms", new AQjmsDestinationProperty());
    ((AQjmsDestination)queue).start(session, true, true);
    // enqueue message
    TextMessage message = session.createTextMessage();
    message.setText("This is a test");
    MessageProducer producer = session.createProducer(queue);
    producer.send(message);
    producer.close();
    // close
    session.commit();
    session.close();
    connection.close();
    With this PL/SQL the message payload is correct:
    DECLARE
    v_enqueue_options DBMS_AQ.ENQUEUE_OPTIONS_T;
    v_message_properties DBMS_AQ.MESSAGE_PROPERTIES_T;
    v_message SYS.AQ$_JMS_TEXT_MESSAGE;
    v_message_id RAW(16);
    BEGIN
    v_message := SYS.AQ$_JMS_TEXT_MESSAGE.CONSTRUCT;
    v_message.set_text('This is a test');
    DBMS_AQ.ENQUEUE (
    queue_name => 'strm_admin.testqueuejms'
    ,enqueue_options => v_enqueue_options
    ,message_properties => v_message_properties
    ,payload => v_message
    ,msgid => v_message_id
    COMMIT;
    END;
    Can anyone help me, please ? Has anyone experienced the same problem ? Or can anyone reproduce it ?
    Any help is appreciated.
    Roland

    Finally I got it fixed !
    The library "orai18n.jar" hat to be included in class path. Very strange, that there was no exception or any hint to what was missing.

  • Unable to upload txt file when creating new message

    Hi Expert,
    We installed SolMan 7.1, but we are not able to upload txt file when
    create a new message, detailed steps as below:
    1. Click on “New
      Message” under “Common Tasks” in the left side
    2. Click on
      “Attachment” under “Create Message”
    3. Click on “Add”
      under “Attachment”
    4. Select file and
      click on “OK”
    5. But as the result, it says “No attachments. Select Add to
      upload a new attachment.”
    Could you please help advise the reason and solution?
    BR
    Takashi

    Hi Vikram,
    Thanks for your reply.
    I have tried again and found that, it seems if the file size is 0, it can't be uploaed; if the size if bigger than 0, then it can be uploaded.
    So I close this discussion now. Thank you!
    BR
    Takashi

  • I group messaged from my ipad and this has screwed up the way my messages are reveived by my friends (it creates new threads in their phones with my email in place of my contact name) I've stopped messaging from my ipad but the problem remains. Any help?

    I have an iPhone 4S and use the group texting feature ALL THE TIME. I recently updated my iPad to the latest software and made the colossal mistake of continuing my group messaging from my iPad while connected to wifi. Doing this has successfully screwed but every group text thread I am in, to the point where its very hard for those involved in the thread to keep up. When I initially messaged those I was already engaged in text threads with it created a new thread in their phones replacing my name in their phones with my email. At first this was not a big deal but ever since then the people I am messaging have become increasingly frustrated with how my messages come through. If I am messaged in a group text and respond to it, sometimes when I respond it will create an entirely different thread in my recipients phones. So at that point they have to switch threads in order to read what I wrote. The new thread that my phone creates will send the message under my email not my name (related to the contact they have me saved as in their phones). The worst part about it is that there seems to be no rhyme or reason to why or when my phone will send the message as normal or under my email like it did with my iPad. I haven’t messaged from my iPad since these problems immediately began a month ago but the issues still continue. I have tried everything to get this to stop, I’ve turned off my wifi, I’ve had my friends delete the threads that my messages create in their phones. I’ve had them delete my email in their contact lists and nothing has worked. Can you help me? Any info you could provide would be greatly appreciated.
    Note: My phone message no different whatsoever. All the threads have remained the same. The issue is what it is doing to the people that I am messaging.
        Best Regards
             Rick Mulhern
    Message was edited by: Rickapplehelp19

    I have this identical problem.  For a while my group texts didnt show up on my ipad.  Then one day they did, maybe everyone in the group started using the same os version or something.  Ever since my first reply to the group there have been complaints of multiple threads.  I can not find a pattern for when my group text's decide they want to create a new thread. (it doesnt happen every time)  Everyone in the group has deleted the thread, we've all toggled imessage on/off etc.  There still hasn't been a solution.
    Any help would be appreciated.
    Thanks

  • Create a new group in Messaging

    How do you create a new group in messaging, I had to select ios4.33 in the Operating system as ios5 is not available yet

    Someone should show you how to perform a search. There's a sample in this forum.
    http://forums.sun.com/thread.jspa?threadID=623860

  • Error in message monitoring while creating new record in R/3

    Hi All,
    I am getting the following error in message monitoring while creating a new record from SAP Mobile client.
    Service name: Validation_Service
    Message: BackendKeys are not filled in table HEADER returned by getDetails
    I am passing some random number from Client to SAP R/3 create function module.
    When i pass the same value in create FM as in message monitoring. I am able to create the record successfully,
    Corresponding to newly created record, i can see the data in getdetail header also.
    Not sure why this error is coming.
    Appreciate your help!!
    Thanks & Regards
    Devendra

    The CREATE FM should not only create the entry, it should also EXPORT the key that it uses to create the entry. Is it doing that?
    i.e. the CREATE signature is usually something like:
    CREATE_BLAH
      IMPORTING header TYPE header_row
      EXPORTING key type header_row-key_field.
    So the 'key' here should be filled by the FM and returned to DOE.

  • Error message while creating new Track.

    Hi,
    I was unable to create new track in our NWDI systems, getting the following message. I checked authorizations and it looks fine to me.
    CBS (URL http://<HOST>:<PORT>/tc.CBS.Appl/archiveapi2/) authorization exception: User not authorized to log into build server. ( Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://<HOST>:<PORT>/CBSWebService/CBSHttpSOAP?style=rpc" )
    Please help me to resolve this issue.
    Thanks & Regards
    Srinivas

    Please see the fine documentation:
    http://help.sap.com/saphelp_nw70/helpdata/EN/da/f812d366aa44ad83a30418b34dae1c/frameset.htm

  • Warning: Unable to create new entry, caught: "javax.ejb.CreateException", message is:

    Warning: Unable to create new entry, caught: "javax.ejb.CreateException", message is: "Error creating EntityBean: Io exception: The Network Adapter could not establish the connection".
    while executing JSP:<%
    * add.jsp
    * Adds a new entry through EmployeeBean. This is a JSP that serves 2
    * functions. First of all, when called with no arguments, it will display a
    * table with a few input fields. The user should enter empNo, empName and
    * salary of the new record to be added. When she submits this
    * information, it is sent to this page again. If it is successful, then the
    * user can continue adding new entries. If it is not, then the old data will
    * be displayed, and a warning message will be shown to her.
    %>
    <%@ page import="com.webstore.*,java.io.*,java.util.*,javax.naming.*" %>
    <%
    // Make sure this page will not be cached by the browser
    response.addHeader("Pragma", "no-cache");
    response.addHeader("Cache-Control", "no-store");
    // We will send error messages to System.err, for verbosity. In a real
    // application you will probably not want this.
    PrintStream errorStream = System.err;
    // If we find any fatal error, we will store it in this variable.
    String error = null;
    // In a moment we will check if all columns were passed to this page
    String param_1 = "";
    String param_2 = "";
    String param_3 = "";
    long dptNo = 0;
    String dptName = null;
    // This variable indicates what function of this page is currently used. If
    // this page is called with parameters, then a new entry should be
    // added. In that case this variable is true.
    boolean submitting = false;
    // We will first attempt to get the reference to EmployeeHome from the
    // session. The "list.jsp" page sets this attribute in the session.
    DepartmentHome home = (DepartmentHome) session.getAttribute("DepartmentHome");
    if (home == null) {
    error = "No previous connection to DepartmentBean.";
    } else {
    // Attempt to get all 3 parameters from the session
    param_1 = request.getParameter("DPTNO");
    param_2 = request.getParameter("DPTNAME");
    // If all 3 parameters are specified, then this is probably a submission by
    // this very page. Note that if the user left one of the fields blank, then
    // the corresponding parameter will be "", not null.
    if (param_1 != null && param_2 != null) {
    param_1 = param_1.trim();
    param_2 = param_2.trim();
    submitting = true;
    // In the following variable we will store a (non-fatal) warning message. This
    // message will be displayed in the page, but so will the submission form.
    String warning = null;
    if (submitting) {
    warning = "";
    // If there is an empty param_1, param_2 and/or param_3, then this will be noted
    // in the warning message.
    if ("".equals(param_1)) {
    warning = "Null param_1 specified. ";
    if ("".equals(param_2)) {
    warning += "Null param_2 specified. ";
    // If we don't have a warning message yet, then we will attempt to create
    // a new record.
    if ("".equals(warning)) {
    try {
    dptNo = (long)Long.parseLong(param_1);
    dptName = new String(param_2);
    Department rec = (Department) home.create(dptNo);
    rec.setDptname(dptName);
    // empty columns after insert for effect
    param_1 = "";
    param_2 = "";
    // If we got this far, then there was no problem detected.
    warning = null;
    } catch (Exception e) {
    // Set the warning variable to indicate a problem.
    warning = "Unable to create new entry, caught: \"" +
    e.getClass().getName() + "\", message is: \"" +
    e.getMessage() + "\".";
    // Decide what the title will be.
    String title;
    if (error != null) {
    title = "Error";
    } else {
    title = "com.webstore | Add entry";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <HTML>
    <HEAD>
    <TITLE><%= title %></TITLE>
    </HEAD>
    <BODY bgcolor="#FFFFFF">
    <H1><%= title %></H1>
    <%
    // If there was a fatal error, then display the error message
    if (error != null) {
    %>
    <P><BLOCKQUOTE><%= error %></BLOCKQUOTE>
    <%
    // Otherwise display a table with fields to be filled in.
    } else {
    // If there was a warning, then display it.
    if (warning != null) {
    %>
    <TABLE border="1" bgcolor="#FF2222">
    <TR><TD><FONT color="#FFFFFF"><STRONG>Warning: <%= warning %></STRONG></FONT></TD></TR>
    </TABLE>
    <%
    } /* if */
    // Display the table with fields. There are two columns. The left column
    // contains the names of the fields, while the right column contains the
    // fields.
    %>
    <FORM action="dptadd.jsp" method="GET">
    <P><TABLE border="1">
    <TR>
    <TD><STRONG>DptNo:</STRONG></TD>
    <TD><INPUT type="text" name="DPTNO" value="<%= param_1 %>"></INPUT></TD>
    </TR>
    <TR>
    <TD><STRONG>DptName:</STRONG></TD>
    <TD><INPUT type="text" name="DPTNAME" value="<%= param_2 %>"></INPUT></TD>
    </TR>
    <TR>
    <TD colspan="3" align="center"><INPUT type="submit" value="Add this entry"></INPUT></TD>
    </TR>
    </TABLE>
    </FORM>
    <%
    } /* else */
    %>
    <P><TABLE border="1">
    <TR><TD>Back to list</TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    Please guide me..

    Rajive,
    This is the same problem as in your other post:
    sql is running very slow
    So please refer to my answer there.
    Good Luck,
    Avi.

  • Please help me regarding VAR customer create new message in work center

    Hi, guru
    I have encountered with a problem regarding, for example, when VAR customer 'X' create new message in work center and specify message processor to partner no '1'  (partner no 1 has employee role with username 'A' in BP) but when username 'A' log on and open work center via SAPGUI to find a new message created to him, username 'A' did't got a new message from VAR customer 'X' whom choose specify message processor to him and work center show My Messages (0)
    why, do I set something config wrong ?
    Any recommend would be appreciated
    thank you very much

    Hi
    1) can you check in CRM_DNO_MONITOR and oepn the ticket , whethere the processor name appearing in the ticket?
    2) Does your customer assign the processor manually or any automatic support team assgnemt, if so please verify your automatic support tean assignment against the blog
    [/people/dolores.correa/blog/2007/10/06/service-desk-support-team-determination|/people/dolores.correa/blog/2007/10/06/service-desk-support-team-determination]
    3)Might be an authoraisation issue of the Processor. assign SAP_ALL access and check again
    [Service desk roles|http://help.sap.com/saphelp_sm32/helpdata/en/0a/f12c41ab78f66fe10000000a1550b0/content.htm]
    Thanks,
    Jansi

  • Attachment of another PO while creating New PO

    There was one Standard PO 8100000299 available with Two attachments.
    Now, when I had open Attachment List to attach document while creating new Service PO, attachments of PO 81/299 was already there and new attachments added to PO 81/299, not to newly created Service PO.
    Kindly resolve this issue.

    One standard PO 81/299 was already there with Two attachment documents.
    Now, when I am going to  attach documents while creating new service PO, attachment list of PO 81/299 opened instead of blank list and new attachements will be added to 81/299 instead of newly created Service PO.

  • Create new folders for old messages on my computer

    How do I create new folders in my computer to archive old messages and save them to my computer.

    Do you mean in Mail or the Finder? In Mail simply click on the [+] button at the bottom left of the folders fist. Select New Folder. In the dialog select where you want the folder located and the name for it.
    In the Finder navigate to where you want to create the folder then press SHIFT-COMMAND-N to create a new "untitled" folder.

  • Im getting message while i create new icloud id " no more free account for this iphone "

    im getting message while i create new icloud id " no more free account for this iphone "
    please help me if anyone knew the solution,
    thanks

    https://discussions.apple.com/message/24635931#24635931

  • An Attachement for the payload of the message monitoring.

    Hello ,
    From the forum links, I found that to access a message payload for the message monitoring, we need to call <u>cl_xms_persist->read_msg_all.</u>
    and the export parameter would give the payload message as an attachment.
    <i>
    But when I tried to find if there is any attachment with the messages I dont see them (size comes with the value 0).</i>
       <u>    CALL METHOD ex_message->numberofattachments
            RECEIVING
              size = size.</u>
    <b>
    Is there any other option available to get a payload for the message?</b>
    Thanks a lot.

    Hi Arjun,
         You can see your payload in Tcode  SXMB_MONI
         SXMB_MONI-->
         MONITOR FOR PROCESSED XML MESSAGES-->
         click F8 (if required change the date of execution from to select specific message on date range)-->
         Double click on the right most 3D button type of box before the flag icon,
    Now you will be able to see the Different pipeline Execution steps(7 Steps)  that Your message has under gone .Click on any one of them and see your payload in payload folder at each and every step.This helps us in understanding the way your message is undergoing transformations through out its journey from sender to receiver.
    VIRTUAL RECIVER..Is actually a part of an annonymous and adressable unit like service to simulate the receiver that is participating in B2B communication.Its jus a mandatory parameter that has to be mntione din Receiver deternination when We test our B2B scenarios using this option in ID part of PI/XI.
    Thanks,
    Ram.

  • Blank error message when attempt to create new batch

    I am useing Oracle Applications : 12.1.1 & RDBMS : 11.1.0.7.0
    when I attempt to create new batch for selecting specific Recipe and declaring product quantity in OPM
    Then there generate blank error message. Also I am using automatic document numbering ,But there haven't Generate any document number in the document Number field.
    Plz someone help me.
    Thanks
    Omar Parvez
    Edited by: user13140975 on Sep 5, 2011 1:18 AM

    Plz go following link
    http://www.scrnshots.com/login
    and provide username omarparvez & password 123456
    Thanks & Regards
    Omar Parvez

Maybe you are looking for

  • Apple broke my iPod and refused to fix it, What should I do?

    Sometime around the end of September, I downloaded iTunes version 5.0 (I believe). The first time I opened it, it told me I needed to download the software updater for my iPod mini. So I downloaded the Software Updater, then the problems started. Thi

  • Create a 24fps export from 23.976fps sequence

    I have a 23.976 sequence (built from DPX files exported from SpeedGrade and also with title clips) within Premiere Pro CC.  I want to export the sequence at 24fps and I'm not sure how to do that best.  I'm not concerned about audio (I already have st

  • IPad backup

    I plugged my iPad4 into my MacBook Pro and ran a manual backup. Where do these files go? I read that they are in Library/Application Support/MobileSync/Backup. I don't have a MobileSync folder. I would appreciate help with this. Thanks!

  • Iphone, ipod wont mount on iMac 27 inc i5 iTunes & iPhoto

    Dear All I have had my new iMac 27 inch i5 for a week and all was well until (i think) last software update which had an iPhone SDK, I can mount drives fine to desktop still but I can't mount iPhone or iPod to iMac yes I have checked cables and both

  • How to view pictures on my mac

    I consider myself a very technologically apt person. I can fix most my computer problems, and understand most software with an amount of ease. but i'll be honest, i never deal with pictures. I dont even own a digital camera actually. But i have all t