Sending alert, gives an error but.......

Hi,
I'm sending an alert with the code bellow which was taken from the sample.  I tested it and it did works ONCE  but now for an unknown reason I get an error.  First here's the code I'm using
I'm seinding to 3 recipients in the collection.
private static string _SendAlert(string Subject, string Body, string ColumnName, int ObjectType, string ObjectKey, SAPbobsCOM.Company oCompany, System.Collections.Generic.List<string> Recipients)
    SAPbobsCOM.CompanyService oCmpSrv = null;
    MessagesService oMessageService = null;
    SAPbobsCOM.Message oMessage = null;
    MessageDataColumns pMessageDataColumns = null;
    MessageDataColumn pMessageDataColumn = null;
    MessageDataLines oLines = null;
    MessageDataLine oLine = null;
    RecipientCollection oRecipientCollection = null;
    try
        oCmpSrv = oCompany.GetCompanyService();
        oMessageService = ((SAPbobsCOM.MessagesService)(oCmpSrv.GetBusinessService(ServiceTypes.MessagesService)));
        oMessage = ((SAPbobsCOM.Message)(oMessageService.GetDataInterface(MessagesServiceDataInterfaces.msdiMessage)));
        oMessage.Subject = Subject;
        oMessage.Text = Body;
        oRecipientCollection = oMessage.RecipientCollection;
        foreach (string RecipientName in Recipients)
            oRecipientCollection.Add();
            oRecipientCollection.Item(oRecipientCollection.Count - 1).SendInternal = BoYesNoEnum.tYES;
            oRecipientCollection.Item(oRecipientCollection.Count - 1).UserCode = GetUserCode(RecipientName, oCompany);
        // Don't add a document link if we pass -1 as parameter.
        if (ObjectType != -1)
            // get columns data
            pMessageDataColumns = oMessage.MessageDataColumns;
            // get column
            pMessageDataColumn = pMessageDataColumns.Add();
            // set column name
            pMessageDataColumn.ColumnName = ColumnName;
            // set link to a real object in the application
            pMessageDataColumn.Link = BoYesNoEnum.tYES;
            // get lines
            oLines = pMessageDataColumn.MessageDataLines;
            // add new line
            oLine = oLines.Add();
            // set the line value
            oLine.Value = ObjectKey;
            // set the link to BusinessPartner (the object type for Bp is 2)
            oLine.Object = ObjectType.ToString();
            // set the Bp code
            oLine.ObjectKey = ObjectKey;
        // send the message
        oMessageService.SendMessage(oMessage);
        return "";
    catch (Exception ex)
        return ex.Message;
The error message is :
This entry already exists in the following tables (ODBC - 2035)
[(----) 131-183]
Sorry but I don't know how to decode this error message to know which table and also I don't understand the ALERT system and why am I receiving this error and of course I don't know what to do to prevent this according to the code above or something else I don't understand.

Hi,
Surprisingly, I indeed look in those table when I saw it in the HELP CENTER
and there was no entry in there.  The tale was empty.  But
I was sending alerts to 3 people,  I deleted the 2 others that wasn't me ME means manager currently logged in SAP and when I did send an alert just to manager, it was working.
Maybe there's another table that have entry for the 2 other users I was sending an alert ?
Well,  Seems that sending an alert just to manager was working.  I will try to send to manager an another user then the 2 I was sending previously to see if it's because I'm trying to send to multiple recipient.

Similar Messages

  • Good night, do not know what is happening can not buy gold with my visa card for itunes gives me error, but I have money on the card, always worked but this time not accepted!!

    good night, do not know what is happening can not buy gold with my visa card for itunes gives me error, but I have money on the card, always worked but this time not accepted!!

    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Sender File Adapter - No error, but not generating any message

    I am working on a file to RFC scenario.  The sender file adapter is using content conversion to read a comma delimited file.  The file is being picked up and archived correctly, and the adapter monitor does not show any errors.  However, the process disappears at this point.  I don't see any messages in SXMB_MONI, and there is no sign that the process is reaching the RFC adapter.  Has anyone ever had this happen before?
    I have four line types for Buildings, Additions, Floors, and Rooms.
    I list all four in the recordset structure, and I identify a key for each with the keyFieldValue parameter.  I list a fieldSeparator of ',' and an endSeparator of 'nl' for each row.  And i have a list of the fieldnames in the fieldnames parameter.
    The only thing i'm not sure about is the keyFieldinStructure parameter.  I have specified ignore there, because I don't want that field in my XML.  Do I still need that field in my sender datatype, even if I'm ignoring it, or can I leave it out?
    Thanks for any help.  Please don't just list blogs unless they have something you think is helpful with my specific problem.  I have already read all of the blogs that deal generally with the sender file adapter and file content conversion, and I need more specific help at this point.

    I made one error before, it IS showing up in the Recovered Adapter Audit Log (it took that log about 10 minutes to open that particular tab so I didn't notice them there).
    Here is what it says there:
    2006-06-12 11:22:59 Success Channel CC_S_File_FIPM_Buildings: Entire file content converted to XML format
    2006-06-12 11:22:59 Warning Channel CC_S_File_FIPM_Buildings: Empty document found. Proceed without sending message
    2006-06-12 11:22:59 Success File "/interfaces/one line building.txt" archived after processing
    Here are my parameters in the file content conversion:
    Buildings.fieldNames     RecordType,PLTXT,STORT,STREET,POST_CODE1,CITY1,REGION,PARNR,X_COORD,Y_COORD,ASSIGN_SQ_FT,BLDG_NUM,CAMPUS,GR_SQ_FT,NET_SQ_FT
    Buildings.keyFieldValue     'B'
    Buildings.fieldSeparator     ','
    Buildings.endSeparator     'nl'
    Buildings.keyFieldInStructure     ignore
    Additions.fieldNames     RecordType,ASSIGN_SQ_FT,BLDG_ABBR,CAMPUS,ADDITION,BLDG_USE,BLDG__NUMBER
    Additions.keyFieldValue     'A'
    Additions.fieldSeparator     ','
    Additions.endSeparator     'nl'
    Additions.keyFieldInStructure     ignore
    Floors.fieldNames     RecordType,BLDG_ABBR,CAMPUS,ADDITION,FLOOR,ASSIGNABLE_SQUARE_FOOT,BLDG_NUMBER
    Floors.keyFieldValue     'F'
    Floors.fieldSeparator     ','
    Floors.endSeparator     'nl'
    Floors.keyFieldInStrucutre     ignore
    Rooms.fieldNames     RecordType,SHTXT,MSGRP,ADDITION,ASSIGNED_DEPT,BLDG_ABBV,FLOOR_CAMPUS,AREA,RCD_CODE,DEPT_CODE,BUILDING_NUMBER,ROOM_COMMON_KEY
    Rooms.keyFieldValue     'R'
    Rooms.fieldSeparator     ','
    Rooms.endSeparator     'nl'
    Rooms.keyFieldInStructure     ignore
    And here is my data type:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_FIPM_BuildingUpdate xmlns:ns0="urn:XXXXXX:FIPM:Buildings:SYS">
       <Buildings>
          <PLTXT/>
          <STORT/>
          <STREET/>
          <POST_CODE1/>
          <CITY1/>
          <REGION/>
          <PARNR/>
          <X_COORD/>
          <Y_COORD/>
          <ASSIGN_SQ_FT/>
          <BLDG_NUM/>
          <CAMPUS/>
          <GR_SQ_FT/>
          <NET_SQ_FT/>
       </Buildings>
       <Additions>
          <ASSIGN_SQ_FT/>
          <BLDG_ABBR/>
          <CAMPUS/>
          <ADDITION/>
          <BLDG_USE/>
          <BLDG_NUMBER/>
       </Additions>
       <Floors>
          <BLDG_ABBR/>
          <CAMPUS/>
          <ADDITION/>
          <FLOOR/>
          <ASSIGNABLE_SQUARE_FOOT/>
          <BLDG_NUMBER/>
       </Floors>
       <Rooms>
          <SHTXT/>
          <MSGRP/>
          <ADDITION/>
          <ASSIGNED_DEPT/>
          <BLDG_ABBV/>
          <FLOOR/>
          <CAMPUS/>
          <AREA/>
          <RCD_CODE/>
          <DEPT_CODE/>
          <BUILDING_NUMBER/>
          <ROOM_COMMON_KEY/>
       </Rooms>
    </ns0:MT_FIPM_BuildingUpdate>
    I'm going to recheck everything again, but maybe you guys will see something?  I don't.
    Vanda

  • Send comments gives the error message "Submission status must be modified"

    Hi,
    When I want to send comments I get the error message "This cell cannot be updatëd. Submission status must be modified to allow changes."
    The work status is still unlocked for this period. It has something to do with authorizations.
    We have users in teams with a data entry profile. These users have the "AddComment" task in their profile.
    They are not able to send comments.
    When I add these users to a team (being the owner of the parent entity) than they can send comments.
    The problem is that in this way they can approve, luck and unlock periods which is not allowed.
    How can I solve this problem?
    Please help!
    With kind regards,
    Robert Nijsink

    Hi there,
    I changed the work state for comments as follows:
    - Unlocked / <all>
    - Submitted / <all>
    I still get the same error message: "Submission status must be modified to allow changes"
    The combination of a team being "Owner" of the parent with "data entry rights" is working properly.
    What do I miss?
    Regards,
    Robert

  • CF11 cfc gives 500 error but cfm is fine

    We are testing our cf code which all works fine on a CF9 Windows Server 2008 machine but we are going to migrate to a CF11 Windows 2012 R2 machine. We have a test machine setup and all the code moved over and so far the cfm pages seem to work fine as well as the Application.cfc page but when we call a cfc via AJAX or we visit the cfc methods directly we get a 500.0 error Application could not be found.
    Anybody else run into this?

    I will do both as separate messages with some info redacted with XXXXXX. The Application.cfc in the root directory is below.
    <cfcomponent
        displayname="Application"
        output="true"
        hint="Handle the application.">
            <!--- Set up the application. --->
            <cfset THIS.Name = "XXXXXX" />
            <cfset THIS.ApplicationTimeout = CreateTimeSpan( 2, 0, 0, 0 ) />
            <cfset THIS.SessionManagement = true />
            <cfset THIS.SessionTimeout = CreateTimeSpan( 0, 2, 30, 0 ) />
            <cfset THIS.SetClientCookies = true />
        <!--- Define the page request properties. --->
        <cfsetting
            requesttimeout="30"
            showdebugoutput="true"
            enablecfoutputonly="false"
            />
        <cffunction
            name="OnApplicationStart"
            access="public"
            returntype="boolean"
            output="false"
            hint="Fires when the application is first created.">
            <CFQUERY NAME="GetAdmin" DATASOURCE="XXXXXX">
                SELECT * FROM AdminOptions
                WHERE ID = 1
            </CFQUERY>
             <cfset APPLICATION.DSN = "XXXXXX" />
             <cfset APPLICATION.debugIPAddress = "XXXXXX" />
             <cfset APPLICATION.debugIPAddress2 = "XXXXXX" />
             <cfset APPLICATION.ScheduledTaskIP = "XXXXXX" />
             <cfset APPLICATION.ScheduledTaskIP2 = "XXXXXX" />
             <cfset APPLICATION.EncryptionKey = "XXXXXX" />
             <cfset APPLICATION.AdminEmail = "XXXXXX" />
             <cfset APPLICATION.NotificationEmail = #GetAdmin.mainEmail# />
             <cfset APPLICATION.SiteTitle = "XXXXXX" />
             <!--- urls --->
             <cfset APPLICATION.SiteURL = "XXXXXX" />
             <cfset APPLICATION.ImageURL = "XXXXXX" />
             <cfset APPLICATION.AttachmentURL = "XXXXXX" />
             <!--- directories --->
             <cfset APPLICATION.BaseDirectory = "XXXXXX" />
             <cfset APPLICATION.VendorUploadsDirectory = "XXXXXX\data\VendorUploads" />
             <cfset APPLICATION.VendorDownloadsDirectory = "XXXXXX\www\downloads" />
             <cfset APPLICATION.ImageDirectory = "XXXXXX\www\product-images" />
             <cfset APPLICATION.AttachmentDirectory = "XXXXXX\www\uploads" />
             <cfset APPLICATION.FeedDirectory = "XXXXXX\data" />
             <cfset APPLICATION.cfcRoot = "#APPLICATION.BaseDirectory#\api">
             <!--- include startup file(s) --->
             <cfinclude template="includes/inc-cleanup.cfm">
            <!--- Return out. --->
            <cfreturn true />
        </cffunction>
        <cffunction
            name="OnSessionStart"
            access="public"
            returntype="void"
            output="false"
            hint="Fires when the session is first created.">
            <!--- Define the local scope. --->
            <cfset var LOCAL = {} />
            <!---
            Store the CF id and token. We are about to clear the
            session scope for intialization and want to make sure
            we don't lose our auto-generated tokens.
            --->
            <cfset LOCAL.CFID = SESSION.CFID />
            <cfset LOCAL.CFTOKEN = SESSION.CFTOKEN />
            <!--- Clear the session. --->
            <cfset StructClear( SESSION ) />
            <!---
            Replace the id and token so that the ColdFusion
            application knows who we are.
            --->
            <cfset SESSION.CFID = LOCAL.CFID />
            <cfset SESSION.CFTOKEN = LOCAL.CFTOKEN />
            <!--- Assigns and passes shopping cart ID. Do not change! --->
            <CFINCLUDE TEMPLATE="includes/inc-session-id.cfm">
            <!--- Return out. --->
            <cfreturn />
        </cffunction>
        <cffunction
            name="OnRequestStart"
            access="public"
            returntype="boolean"
            output="false"
            hint="Fires at first part of page processing.">
            <!--- Define ARGUMENTS. --->
            <cfargument
                name="TargetPage"
                type="string"
                required="true"
                />
            <!--- Define the local scope. --->
            <cfset var local = {} />
            <!--- Assigns and passes shopping cart ID. Do not change! --->
            <CFINCLUDE TEMPLATE="includes/inc-session-id.cfm">
            <!--- Get requested URL from request object. --->
            <cfset prevURL = #CGI.HTTP_REFERER# />
            <!--- Check for reinitialization. --->
            <cfif StructKeyExists( URL, "reset" )>
                <!--- Reset application and session. --->
                <cfset THIS.OnApplicationStart() />
                <cfset THIS.OnSessionStart() />
            </cfif>
            <cfif structKeyExists( url, "logout" )>
            <!--- Change the timeout on the current session scope. This is an undocumented function. We are changing it to one second. --->
            <cfset session.setMaxInactiveInterval(javaCast("long", 1)) />
            <!--- Clear all of the session cookies. This will expire them on the user's computer when the CFLocation executes.        
            NOTE: We need to do this so that the redirect
            doesn't immediately pick up the previous session
            within the new, one-second timeout (which would
            completely defeat our purpose).
            --->
            <cfloop index="local.cookieName" list="cfid,cftoken,cfmagic">
                <!--- Expire this session cookies --->
                <cfcookie name="#local.cookieName#" value="" expires="now" />
            </cfloop>
            <!---
            Redirect back to the primary page (so that we dont
            have the killSession URL parameter visible).
            --->
            <cflocation url="./index.cfm" addtoken="false" />
            </cfif>
            <!--- Return out. --->
            <cfreturn true />
        </cffunction>
        <cffunction
            name="OnRequest"
            access="public"
            returntype="void"
            output="true"
            hint="Fires after pre page processing is complete.">
            <!--- Define ARGUMENTS. --->
            <cfargument
                name="PageRequestedByUser"
                type="string"
                required="true"
                />
            <cfif (isDefined("SESSION.Vendor.ID") AND SESSION.Vendor.ID NEQ 0)>
            <cfif isDefined("SESSION.SessionID")>
                <!--- lookup cart total --->
                <cfquery name="GetCartTotal" datasource="#APPLICATION.DSN#">
                SELECT SUM(Cart.Price * Cart.Quantity) AS CurrCartTotal FROM Cart
                WHERE Cart.SessionID = <cfqueryparam cfsqltype="cf_sql_integer" value="#SESSION.SessionID#"> AND Cart.CustomerID = <cfqueryparam cfsqltype="cf_sql_integer" value="#SESSION.Vendor.ID#"> AND (Status = 'Shopping' OR Status = 'Saved')
                </cfquery>
            </cfif>
            <!--- User logged in. Allow page request. --->
            <cfinclude template="#ARGUMENTS.PageRequestedByUser#" />
            <cfelseif FindNoCase("request-catalog.cfm", ARGUMENTS.PageRequestedByUser)>
            <!--- User requested catalog. --->
            <cfinclude template="request-catalog.cfm" />
            <cfelse>
            <!---
            User is not logged in - include the login page regardless of what was requested.
            --->
            <cfinclude template="login.cfm" />
            </cfif>
            <!--- Return out. --->
            <cfreturn />
        </cffunction>
        <cffunction
            name="OnRequestEnd"
            access="public"
            returntype="void"
            output="true"
            hint="Fires after the page processing is complete.">
            <!--- dump out the session to the screen --->
            <cfif CGI.REMOTE_ADDR IS APPLICATION.debugIPAddress>
                <cfdump var="#SESSION#">
            </cfif>
            <!--- Return out. --->
            <cfreturn />
        </cffunction>
        <cffunction
            name="OnSessionEnd"
            access="public"
            returntype="void"
            output="false"
            hint="Fires when the session is terminated.">
            <!--- Define ARGUMENTS. --->
            <cfargument
                name="SessionScope"
                type="struct"
                required="true"
                />
            <cfargument
                name="ApplicationScope"
                type="struct"
                required="false"
                />
            <!--- session cleanup code here --->
            <!--- Return out. --->
            <cfreturn />
        </cffunction>
        <cffunction
            name="OnApplicationEnd"
            access="public"
            returntype="void"
            output="false"
            hint="Fires when the application is terminated.">
            <!--- Define ARGUMENTS. --->
            <cfargument
                name="ApplicationScope"
                type="struct"
                required="false"
                default="#StructNew()#"
                />
             <!--- Return out. --->
            <cfreturn />
        </cffunction>
    <cffunction name="onError">
        <!--- The onError method gets two arguments:
                An exception structure, which is identical to a cfcatch variable.
                The name of the Application.cfc method, if any, in which the error
                happened. --->
        <cfargument name="Except" required = true />
        <cfargument type="String" name = "EventName" required = true />
        <!--- Log all errors in an application-specific log file. --->
    <!---    
        <cflog file="#This.Name#" type="error" text="Event Name: #Eventname#" >
        <cflog file="#This.Name#" type="error" text="Message: #except.message#">
         --->
        <!--- Throw validation errors to ColdFusion for handling. --->
        <cfif Find("coldfusion.filter.FormValidationException", Arguments.Except.StackTrace)>
            <cfthrow object="#except#">
        <cfelse>
            <!--- You can replace this cfoutput tag with application-specific error-handling code. --->
            <cfif #CGI.REMOTE_ADDR# IS #APPLICATION.debugIPAddress#>
                <p>Error Event: #EventName#</p>
                    <cfif isDefined("SESSION.Vendor.ID")><p>Member ID: #SESSION.Vendor.ID#</p></cfif>
                    <cfif isDefined("ID")><p>ID Posted: #ID#</p></cfif>
                    <p>Error details:<br><cfdump var="#except#"></p>
                    <p>Application vars:<br><cfdump var="#Application#"></p>
                    <p>Session vars:<br><cfdump var="#SESSION#"></p>
                    <p>CGI vars:<br><cfdump var="#cgi#"></p>
                    <p>FORM vars:<br><cfdump var="#FORM#"></p>
                    <p>URL vars:<br><cfdump var="#URL#"></p>
                <cfmail TO="#APPLICATION.AdminEmail#" FROM="#APPLICATION.AdminEmail#" SUBJECT="#APPLICATION.SiteTitle# Exception Error" TYPE="HTML">
                    <p>Error Event: #EventName#</p>
                    <cfif isDefined("SESSION.Vendor.ID")><p>Member ID: #SESSION.Vendor.ID#</p></cfif>
                    <cfif isDefined("ID")><p>ID Posted: #ID#</p></cfif>
                    <p>Error details:<br><cfdump var="#except#"></p>
                    <p>Application vars:<br><cfdump var="#Application#"></p>
                    <p>Session vars:<br><cfdump var="#SESSION#"></p>
                    <p>CGI vars:<br><cfdump var="#cgi#"></p>
                    <p>FORM vars:<br><cfdump var="#FORM#"></p>
                    <p>URL vars:<br><cfdump var="#URL#"></p>
                </cfmail>
            <cfelse>       
                <cfmail TO="#APPLICATION.AdminEmail#" FROM="#APPLICATION.AdminEmail#" SUBJECT="#APPLICATION.SiteTitle# Exception Error" TYPE="HTML">
                    <p>Error Event: #EventName#</p>
                    <cfif isDefined("SESSION.Vendor.ID")><p>Member ID: #SESSION.Vendor.ID#</p></cfif>
                    <cfif isDefined("ID")><p>ID Posted: #ID#</p></cfif>
                    <p>Error details:<br><cfdump var="#except#"></p>
                    <p>Application vars:<br><cfdump var="#Application#"></p>
                    <p>Session vars:<br><cfdump var="#SESSION#"></p>
                    <p>CGI vars:<br><cfdump var="#cgi#"></p>
                    <p>FORM vars:<br><cfdump var="#FORM#"></p>
                    <p>URL vars:<br><cfdump var="#URL#"></p>
                </cfmail>
                <cfinclude template="error.cfm" />
            </cfif>
        </cfif>
    </cffunction>
    </cfcomponent>

  • .html gives 404 error but htm works

    I published my site to a folder on my hd, I uploaded as usual and went to view the site threw my browsers and I was getting a 404 page not found. So I changed the index ext from .html to .htm and the site now works... Anyone know why? I never had this problem before.

    Sounds like a problem with your server. Ask the people who run it.
    If you want more help, provide your url so people can see for themselves what is happening.

  • GRPO with Freight gives an error ...

    Hello Experts,
    When I post a GRPO without Freight it gives no error, but when I try to add with Freight Amount it gives an ERROR.
    Inventory Account is not defined [Goods Receipt PO - Rows - Warehouse Code] Message 173-77.
    Freight Setup: for that perticulat Freight that I am using... is Revenue and Expense Accounts are defined... Distribution and Drawing Methods are Quantity and Stock Check Box is CHECKED.
    Help Required...
    Thanks & Regards

    Hello Nazir,
    If your the items are set up with 'GL accounts managed by warehouse' (this is defined under the Inventory Tab of the Item Master Data), you should check that all the accounts for the warehouse have been set up under Administration => Set Up => Inventory => Warehouses => Accounting Tab.
    In particulary you should check that you have defined an Expense Account for the specific warehouse in the GRPO document.
    Also since you have chosen to affect the stock with additional expenses you need to specify an offsetting G/L account to the Stock account for clearing journal entries created by A/P Invoices and Goods Receipt POs.                                           
    I hope it solves your issue.
    Kind Regards,
    Magalie Grolleau
    SAP Business One Forums Team

  • Reading from text file gives IndexOutOfBoundsException error

    Dear All
    I really need your help in doing my assignment as soon as possible
    I am reading from a text file the following data
    4231781,Ali,AlAli
    4321790,Adnan,AlAli
    using two classes first one is
    public class Student
    private String studFName;
    private String studLName;
    private String studID;
    private double assignment1;
    private double assignment2;
    private double final_exam;
    private double total;
    public String getstudfName() {
    return studFName;
    public void setstudfName(String studFName) {
    this.studFName = studFName;
    public String getstudlName() {
    return studLName;
    public void setstudlName(String studLName) {
    this.studLName = studLName;
    public String getstudid() {
    return studID;
    public void setStudID(String studID){
    this.studID = studID;
    public double getAssignment1() {
    return assignment1;
    public void setAssignment1(double Assignment1) {
    this.assignment1 = assignment1;
    public double getAssignment2() {
    return assignment1;
    public void setAssignment2(double Assignment2) {
    this.assignment2 = assignment2;
    public double getFinal_exam() {
    return final_exam;
    public void setFinal_exam(double final_exam) {
    this.final_exam = final_exam;
    public double getTotal() {
    return total;
    public void setTotal(double total) {
    this.total = total;
    Student[] students = new Student[30];
    the second is manager one which is:
    import java.io.*;
    import java.io.IOException;
    import java.util.Arrays;
    import java.util.ArrayList;
    public class manager {
    public static Student[] students = new Student[30];
    public static void main(String args[]) {
    // We want to let the user specify which file we should open
    // on the command-line. E.g., 'java TextIO TextIO.java'.
    if(args.length != 1) {
    System.err.println("usage: java manager (file_name)");
    System.exit(1);
    // We're going to read lines from 'input', which will be attached
    // to a text-file opened for reading.
    BufferedReader input = null;
    try {
    FileReader file = new FileReader(args[0]); // Open the file.
    input = new BufferedReader(file); // Tie 'input' to this file.
    catch(FileNotFoundException x) { // The file may not exist.
    System.err.println("File not found: " + args[0]);
    System.exit(2);
    // Now we read the file, line by line, echoing each line to
    // the terminal.
    try {
    String line;
    // Student[] students = new Student[30];
    while( (line = input.readLine()) != null ) {
    // System.out.println(line);
    int m = line.indexOf(",");
    int j = line.lastIndexOf(",");
    String sID = line.substring(0,m);
    String sfn = line.substring(m+1,j) ;
    String sln = line.substring(j+1);
    int n = 0;
    students[n] = new Student();
    students[n].setStudID(sID);
    students[n].setstudfName(sfn);
    students[n].setstudlName(sln);
    students[n].setAssignment1(0.0);
    students[n].setAssignment2(0.0);
    students[n].setFinal_exam(0.0);
    students[n].setTotal(0.0);
                        ++n;
    catch(IOException x) {
    x.printStackTrace();
    // Arrays.sort(Student.students);
         int length = args.length;
    System.out.println();
    // System.out.println("Sorted by stuID");
    for (int i=0; i<length; i++) {
    System.out.print("Student ID "+students.getstudid() + "|||");
    System.out.print("Student Fname "+students[i].getstudfName() + "|||");
    System.out.print("Student name "+students[i].getstudlName());
    when I comile progrma it doesn't give any error but when I run it gives me the following exception:
    java.lang.String.substring. IndexOutOfBoundsException string index out of range : -1
    as can be seen from the manager class I form the read line from readline method as follows:
    int m = line.indexOf(",");
    int j = line.lastIndexOf(",");
    String sID = line.substring(0,m);
    String sfn = line.substring(m+1,j) ;
    String sln = line.substring(j+1);
    Therefore, student ID should be read from the beggining tel the character before the comma (,) then from the character after first comma tel that before second comma will be firstname, finally the rest after second comma will be last name.
    I want my program to read all lines in the text file and put them in order as above forming the array like database record and print them all.
    Could you please Help me in this matter friends as soon as possible.
    Regards,
    Java_Hobby

    please, format you code first (select your java code and hit the code button), then post all the error log message.

  • Flat file to table - send mail report on error

    Hello,
    I've created simple project - loading data from csv flat file to oracle database table, using this tutorial: http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/odi/odi_11g/odi_project_flatfile-to-table/odi_project_flatfile-to-table.htm. Now, I need to add support for sending mail to this project. Mail, with error descritpion should be sent to Administrator via smtp server when error occurs.
    Can you provide any step by step description how to add this feature in my case? I know this should be possible via ODISendMail, but I was unable to find any basic, step by step tutorial. Can you help me?

    960949 wrote:
    Ok, so is there any other solution to send mail? I found this post: Send Jython HTML Email Error but link to procedure is inactive: https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=HOWTO&id=424304.1
    You need to login to My Oracle Support in order to download the procedure code .
    For this you need a valid Oracle CSI

  • Why it gives an error , although the result is correct

    Hello everybody,
    here is my code, which i wrote in another way,
    After th sucessful compiling it gives an error, but the results of execution is ok.
    What is wrong?
    import java.io.*;
    import java.lang.*;
    import java.util.*;
    import java.awt.*;
    public class ReadFkOut {
         private static double[] ar;
         private static double[] ar1;
         ReadFkOut() {
    ar=new double [6];
    ar1=new double[6];
              try {
                   FileReader file = new FileReader("bambam1.dat");
                   BufferedReader buff = new BufferedReader(file);
    StreamTokenizer stk=new StreamTokenizer(buff);
    stk.eolIsSignificant(false);
    stk.parseNumbers();
    int lineNumber=0;
    stk.nextToken();
    while(stk.ttype==stk.TT_NUMBER) {
    ar[lineNumber]=(double)stk.nval;
    stk.nextToken();
    ar1[lineNumber]=(double)stk.nval;
    lineNumber++;
                   buff.close();
              catch (Exception e) {
                   System.out.println("Error - - " );
         public double[] getValues() {
              return ar;
         public double[] getValues1() {
              return ar1;
    0.00000000 39.409
    5.00000000 39.409
    10.0000000 39.409 file bambam1.dat
    15.00000000 39.409
    20.00000000 39.409
    25.0000000 39.409
    main coimport java.io.*;
    import java.lang.*;
    import java.util.*;
    import java.awt.*;
    public class Galka {
    ReadFkOut rf;
    static double [] gallochka;
    static double [] gallochka1;
    public static void main(String[] args) {
              ReadFkOut rf=new ReadFkOut();
              gallochka=rf.getValues1();
    gallochka1=rf.getValues();
    System.out.println(gallochka[1]);
    System.out.println(gallochka1[1]);

    import java.io.*;
    import java.lang.*;
    import java.util.*;
    import java.awt.*;
    public class ReadFkOut {
    private static double[] ar;
    private static double[] ar1;
    ReadFkOut() {
    ar=new double [6];
    ar1=new double[6];
    try {
    FileReader file = new FileReader("bambam1.dat");
    BufferedReader buff = new BufferedReader(file);
    StreamTokenizer stk=new StreamTokenizer(buff);
    stk.eolIsSignificant(false);
    stk.parseNumbers();
    int lineNumber=0;
    stk.nextToken();
    while(stk.ttype==stk.TT_NUMBER) {
    ar[lineNumber]=(double)stk.nval;
    stk.nextToken();
    ar1[lineNumber]=(double)stk.nval;
    lineNumber++;
    buff.close();
    catch (Exception e) {
    System.out.println("Error - - " );
    public double[] getValues() {
    return ar;
    public double[] getValues1() {
    return ar1;
    0.00000000 39.409
    5.00000000 39.409
    10.0000000 39.409 file bambam1.dat
    15.00000000 39.409
    20.00000000 39.409
    25.0000000 39.409
    main coimport java.io.*;
    import java.lang.*;
    import java.util.*;
    import java.awt.*;
    public class Galka {
    ReadFkOut rf;
    static double [] gallochka;
    static double [] gallochka1;
    public static void main(String[] args) {
    ReadFkOut rf=new ReadFkOut();
    gallochka=rf.getValues1();
    gallochka1=rf.getValues();
    System.out.println(gallochka[1]);
    System.out.println(gallochka1[1]);
    }The output is
    Error --
    5.0
    39.409

  • Jam Pack 3, Install "Alert:something happened" error

    When i install Jampack i have window with Alert: something happened error, but install complete and garageband run. In garageband i push "i" button and select jam pack in drop down list, but below of this list is nothing to choose. Garageband not see the instruments, rhythm or something else! Please help me! In garageband 08 jampack work good! This problem on my new macbook pro 13'' 2011!

    I had the same problem.
    Someone else reported that they encountered the error message but the Jam Pack installed for them anyway.
    But it's not working for me, or for you apparently.
    I don't think it's the content, but an incompatibility with the installer (which could be downloaded - easy for Apple to fix). 
    Here's the feedback link. If enough people let them know it's not working, hopefully they'll fix it:
    http://www.apple.com/feedback/garageband.html

  • Mail 2.1.1 recieves but doesn't send mail and gives no error message?

    I've an issue with mail on an I-Mac with 2 gig intel core duo running O/S 10.4.9 and mail app version 2.1.1. I was using the machine at my studio for a studio manager. I downsized the studio and gave that machine to my parents who have been using an old G4 I gave them running o/s X and using the mail app for all their e-mailing. I migrated their old system from the G4 to the I-mac via target mode and everything seemed to be working until they tried to type more than one word in the body of the e-mail. once you hit the space bar and try to type another word it just gives an error tone. Also they are not able to send mail but are able to recieve. There is absolutely no error message or tone when you hit send or hit the return key. It just does nothing and gives me no feedback. I have gone through all the settings from the old machine which is sending and recieving mail as it has for the last 3 years with out incidence. I've updated the software, verified and repaired the disk and permissions. They are using RCN as their ISP with a cable modem. Again the G4 is working as it should with the exact same settings that the I-mac is configured with. Is there some issue with the older intel machines? Any help would be greatly appreciated. thanks,
    -Russ

    This problem in Mail is usually caused by some Launch Services cache or preferences corruption that affects the built-in spell checker. The following article describes how to manually reset Launch Services — the notes at the bottom of the article also provide information about the side effects of deleting each of the files involved:
    Resetting Launch Services
    If you prefer using a cache cleaning utility instead of following the manual procedure described in the previous article, take a look at this other article for general troubleshooting and cache-cleaning procedures. Actually, you should also verify/repair the startup disk (not just permissions), as described there:
    Resolving Disk, Permission, and Cache Corruption
    The most appropriate utility for this particular problem probably is Tiger Cache Cleaner, but you may also want to consider other utilities, such as OnyX, or Cache Out X, which are free. Whatever utility you choose, be sure to read this first:
    Side effects of System cache cleaning
    As an example, this is how you should proceed with OnyX:
    1. Quit all applications.
    2. Launch OnyX and enter your administrator password.
    3. Go to Maintenance > Reset and check LaunchServices database.
    4. Un-check any other pre-checked options.
    5. Click the Execute button.
    6. Restart the computer.

  • Send Alerts(e-mail) for errors in SXMB_MONI(message mapping exceptions)

    Good afternoon !
            I´m configuring SAP Netweaver PI 7.0(SP13) to use Alert Framework to send Alerts when errors occurs in the interfaces processing.
            I just achieved configure to send alerts when errors ocurrs in the Adapter Framework but, I can´t configure correctly to send alerts when errors ocurred only in SXMB_MONI(for example, message mapping exception in asyncronous interface).
            I just followed the instructions at Michal Krawczyk
    weblog(/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step) and, initially, this was not sufficient to start to send alert when errors occurs only on SXMB_MONI, so, I researched and found some configurations to do in CCMS(started from here: http://help.sap.com/saphelp_nw70/helpdata/en/e3/bf3b7a8ccb8040b638ff732c551aeb/content.htm), jobs to start events collectors, etc, and after this, I could see a mail for an message mapping exception. BUT, this message, sent from CCMS to ALM, doesn´t carry out all the message parameters, like message Id, sender(service, interface), receiver(service, interface), that is very important to help to find the message with errors to be solved.
            There is somebody here that already done the Alert configuration to send messages for errors found only in SXMB_MONI(Monitor for processed XML Messages) ?
            There is a better way to achieve this ?
            Thank you for your attention,
            Wilson Rodrigo dos Santos
            SAP Netweaver XI/PI Consultant

    Hi
    Go through these links and follow it.
    ALERTS CONFIG AND STUFF
    http://help.sap.com/saphelp_nw04/helpdata/en/80/942f3ffed33d67e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    XI: Alerts - Step by step
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    http://help.sap.com/saphelp_nw04s/helpdata/en/d0/d4b54020c6792ae10000000a155106/frameset.htm
    Triggering by Calling a Function Module Directly.
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    Alerts with variables from the messages payload (XI) u2013 UPDATED
    /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    Simple Steps to Get Descriptive Alerts from BPM in XI
    /people/community.user/blog/2006/10/16/simple-steps-to-get-descriptive-alerts-from-bpm-in-xi
    Triggering XI Alerts from a User Defined Function
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    Throwing Smart Exceptions in XI Graphical Mapping
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    /people/sukumar.natarajan/blog/2007/01/07/how-to-raise-alerts-from-abap-proxy
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
    /people/sravya.talanki2/blog/2006/11/22/error-handling-framework-xiout-of-the-box-episode-1
    /people/ginger.gatling/blog/2005/06/16/integrating-alerts-into-uwl--its-no-problem
    /people/aravindh.prasanna/blog/2006/02/20/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part-3
    /people/aravindh.prasanna/blog/2005/12/24/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part-2
    /people/aravindh.prasanna/blog/2005/12/23/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part--1
    http://help.sap.com/saphelp_nw2004s/helpdata/en/56/d5b54020c6792ae10000000a155106/content.ht
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/abb2e7ff6311d194c000a0c93033f7/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/80/942f3ffed33d67e10000000a114084/frameset.htm
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    check this links.
    https://www.sdn.sap.com/irj/sdn/forums
    Trouble shooting Alert configuration:
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
    /people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
    Alert Inbox
    http://help.sap.com/saphelp_nw04/helpdata/en/80/942f3ffed33d67e10000000a114084/frameset.htm
    Alert Notification Step-by-Step
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    Defining Alert Classifications
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    Triggering Alerts
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    Setting up alerts
    Setting up alerts in RZ20
    Alert Management
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e04141e8-0f11-2a10-adaa-9d97b062c2df
    Alert Notification
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90f449a8-a6db-2910-a386-d2b5999f5751
    /people/matt.kangas/blog/2006/06/27/personalized-alert-delivery
    Thanks
    Saiyog

  • Help! I have recently updated LR5 and before doing so I was able to email files to clients! (Very Convenient) Now my problem is I have not been able to get pass this error message reading "failed to send" which gives no further detail about what to do to

    Help! I have recently updated LR5 and before doing so I was able to email files to clients! (Very Convenient) Now my problem is I have not been able to get pass this error message reading "failed to send" which gives no further detail about what to do to rectify the situation. Someone please guide me through this! Thanks in advance!

    Did this ever get resolved, as I am having the same issue.  Trying to learn LR5 AFTER a decade using Aperture.   I was able to set up a validated account but when I try to send an e-mail or photo I get the simple " Failed to Send " message.   Using latest version of Mac OS X.

  • Acrobat X Pro does not open, gives fatal error - "Acrobat failed to send a DDE command"

    Acrobat X Pro does not open and gives fatal error - "Acrobat failed to send a DDE command"
    It either does the above or the application starts and is listed in the system processes but never physically opens on the desktop for viewing.

    AA 9 will not work for anything but the print function from WORD 2010. The only version of Acrobat that is compatible with OFFICE 2010 for PDF Maker is AA X. Thus, open WORD and print to the Adobe PDF printer. Then open the pdf in Acrobat. Go to FORMS>Add or Edit fields. Since you have no fields at present, Acrobat will ask if you would like to detect form fields. Answer yes and you will get a first cut at the form fields. Yes, you will likely have to add some more and change the ones that Acrobat estimates, but you are on your way.
    The other two options you have is to go back to WORD 2007 or earlier or upgrade to AA X (or find someone with AA X and WORD 2010). These methods are pretty much your options with the software combination that you have.

Maybe you are looking for

  • Print documents from DMS with Output of Billing Document

    Hi,     I have a requirement to print the DMS attachements of an Billing document, when triggering the output type of the document.     Is there a third party product which can provide this functionality or will abap changes be required to the print

  • Had youtube add on, now it's gone; how do I get it back ?

    I had a program called Medium Human Audio Converter on Firefox (with a little YouTube icon on the Firefox 21.0 home page). It made it possible for me to take a YouTube song and put the song into ITunes. The "Medium Human Audio Converter" icon is STIL

  • BPS Post Processing Question

    Dear All, We have an EXIT function which resides in one planning level and the planning layout in another planning level. The EXIT function is calculating the numbers correctly which creates internal table XTH_DATA and passes it to function module UP

  • I can not get the oil paint filter to work in photoshop CC

    Can anyone help me with getting the oil paint filter to work in photoshop CC. I have a high end gaming card for video but it still does not seem to be available. Help. please!

  • Basic code editor tools missing? Extensions?

    Is there really no batch search-and-replace, GREP replacement, or HTML element autocompletion? Assumed this 'new' tool could perform at least at a level the code editor DW CS3 (or earlier?) could... love the idea of the in-place related file editor b