Missing terminating null in string argument

When the statement is executed "if ((strstr (refData, "end section") != test) || (strstr (refData, "end file") != test))", it displayed "Missing terminating null in string argument".The error is about refData,refData is a variable.
I don't know why this problem turned up,because it did not always appear except serval parameters.
Please tell you how to resolve this problem.
Thank you!

C assumes that a string is a character array with a terminating null character. This null character has ASCII value 0 and can be represented as just 0 or '\0'. This value is used to mark the end of meaningful data in the string. If this value is missing, many C string functions will keep processing data past the end of the meaningful data and often past the end of the character array itself until it happens to find a zero byte in memory, see here
So in order to resolve the problem make sure that your string ends with a null character.

Similar Messages

  • SCCM Reporting: Software Updates / Apllication the "Installed date" is missing or null in reports

    When the “V_GS_Add_Remove_Programs” or “V_GS_Quick_Fix_Engineering” queried for installed date (the views that contains information  on updates/application
    installed date),  the “installDate0” Column returns “Null” or is
    "blank" on most of the rows.
    The machine in this example is “X”
    2. As you can see from the machines X's add remove Programs installed Date is given clearly.
    Appreciate your help on this as its for an audit report of windows updates and applications installed date, I know that some applications do not populate this value but my argument is if its visible from Programs and Features why isn't the data being collected.
    Best Regards,
    Michael

    Duplicated post.
    http://social.technet.microsoft.com/Forums/en-US/678489ad-3289-4fd6-8e84-bbaf487abacf/sccm-reporting-software-updates-apllication-the-installed-date-is-missing-or-null-in-reports?forum=configmanagergeneral
    http://www.enhansoft.com/

  • How to run a .bat file with string arguments?

    Hi,
    I have a problem in running a .bat file with string arguments
    - the file is XPathOverlap.bat with 2 stringarguments like: "/a" and "//a"
    - the cmd: c:\Downloads>XPathOverlap "//a" "/a" works fine.
    - here is my code:
    public static void test(){
         try{
              String loc1 = "//a";
              String loc2 = "/a";
              String[] cmdarray = {"c:\Downloads\XPathOverlap", loc1, loc2};
              Process p = Runtime.getRuntime().exec(cmdarray);
              p.waitFor();
              System.out.println("Exit Value: "+p.exitValue());
              //code to print command line replies
              InputStream cmdReply = p.getInputStream();
              InputStreamReader isr = new InputStreamReader(cmdReply);
              BufferedReader br = new BufferedReader(isr);
              String line = null;
              while((line=br.readLine())!=null){
                   System.out.println(line);
         }catch(Throwable t){
              t.printStackTrace();
    How can i run this bat file with 2 string arguments?

    Hi,
    thanks thats good and helpfully
    so this code works:
    String loc1 = "\"/a\"";
    String loc2 = "\"//a\"";
    String path = System.getenv("MuSatSolver");
    String[] cmdarray = {"cmd.exe","/C",path+"XPathOverlap.bat", loc1, loc2};
    Process p = Runtime.getRuntime().exec(cmdarray);
    p.waitFor();
    System.out.println("Exit Value: "+p.exitValue());
    InputStream cmdErr = p.getErrorStream();
    InputStreamReader isrErr = new InputStreamReader(cmdErr);
    BufferedReader brErr = new BufferedReader(isrErr);
    String line2 = null;
    while((line2=brErr.readLine())!=null){
         System.out.println("Error: "+line2);
    but now i have another problem, this is the output:
    Exit Value: 0
    Error: java.lang.NoClassDefFoundError: fr/inrialpes/wam/treelogic/_xml/XPathOverlap
    Error: Exception in thread "main" The Exit value is 0, so the process terminates normally.
    I have tested this bat file in cmd and there it works correctly.
    Why do i get this error message?

  • Passing String arguments result in NullPointerExceptions.

    Hi,
    I'm passing a string argument in a chain of methods in the usual way.
    e.g. main(String aStringArg) {};
    This argument starts life as a value passed to main(). The main method calls a method in another class. The receiving method tests this argment using the string comparision method. The code snippet shows this:
    method2(String aStr) {
         if (portId.getName().equals(portName)) {
    This throws the NullPointerException.
    If I insert a string in to the statement as follows...
    method2(String aStr) {
         if (portId.getName().equals("COM1")) {
    it works OK.
    It seems that the argument is referenced as it flows down the chain of methods.
    What's wrong with my approach and why does it fail please?
    I'm sure that there's a better and more effective way to handle arguments passed to main() or any other method.
    Please educate me.
    Thanks,
    Phil

    Hi,
    I'm passing a string argument in a chain of methods
    in the usual way.
    e.g. main(String aStringArg) {};Wrong - this is not the usual way. The only correct signature for main is:
    public static void main(String [] args)Note: an array of Strings, not a single String.
    This argument starts life as a value passed to
    main(). The main method calls a method in another
    class. The receiving method tests this argment using
    the string comparision method. The code snippet shows
    this:
    method2(String aStr) {
         if (portId.getName().equals(portName)) {
    This throws the NullPointerException.
    If I insert a string in to the statement as
    follows...
    method2(String aStr) {
         if (portId.getName().equals("COM1")) {
    it works OK.
    It seems that the argument is referenced as it flows
    down the chain of methods.
    What's wrong with my approach and why does it fail
    please?
    I'm sure that there's a better and more effective way
    to handle arguments passed to main() or any other
    method.
    Please educate me.
    Thanks,
    Philit's hard to tell based on the code you've posted. the snippets are confusing and poorly named. for example, you posted this:
         method2(String aStr) {
         if (portId.getName().equals(portName)) {
         }the signature isn't legal Java. (Should at least return void.) method2 doesn't use aStr at all. I have no idea where portId is set. What does this tell me? Nothing. This method will only throw an NPE if portId is null. The string you pass in will have no effect at all. It'll just return false.
    This code works and seems to mimic what I can gather from your post. How is mine different?
    public class Port
        private String portName;
        public Port() { this(""); }
        public Port(String name) { this.portName = name; }
        public String getPortName() { return this.portName; }
        public String toString() { return this.portName; }
        public boolean hasName(String name) { return this.portName.equals(name); }
        public static void main(String [] args)
            String name = ((args.length > 0) ? args[0] : "");
            Port port = new Port(name);
            for (int i = 0; i < args.length; ++i)
                System.out.println(args[i] + (port.hasName(args) ? " has this name" : " does not have this name"));

  • What is the difference between string != null and null !=string ?

    Hi,
    what is the difference between string != null and null != string ?
    which is the best option ?
    Thanks
    user8729783

    Like you've presented it, nothing.  There is no difference and neither is the "better option".

  • Sender FTP: FCC Missing Consistency check: no. of arguments does not match

    Hi well my Input i as follows:
    7283167S500481000000001789098
    whereas my FCC in Sender-CC FTP is like:
    RecordSet-Name: BestfileRecordSet
    PecordSetStructure: BestFileHeader,,BestFilePos,
    Recordsets per Mesage: *
    KeyfieldName: BDART
    BestFileHeader.fieldNames=BDKDNR,BDDSKNR,BDART
    BestFileHeader.fieldFixedLenghts=4,3,1
    BestFileHeader.endSeparator= 'nl'
    BestFileHeader.processFieldNames= fromConfiguration
    BestFileHeader.keyFieldValue=T
    BestFilePos.fieldNames= BDART,BDIDENT,BDMENGE,BDFREMD
    BestFilePos.fieldFixedLenghts= 1,8,7,10
    BestFilePos.endSeparator= 'nl'
    BestFilePos.processFieldNames= fromConfiguration
    BestFilePos.keyFieldValue = S
    BestfileRecordSet.endSeparator='nl'
    In CC-Monitoring i get:
    java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'BestFileHeader.fieldFixedLengths' or 'BestFileHeader.fieldSeparator' is missing Consistency check: no. of arguments in 'BestFileHeader.fieldFixedLength' does not match 'BestFileHeader.fieldNames' (0 <> 3)
    so what is wrong?! Can sb help me?!
    br Jens

    Hi Guru, i would appreciate your help. Well the data in input-structure looks like:
    7283167TCARTON        
    7283167T                        
    7283167S014800000000010
    7283167S015823030000004
    7283167S016352100000040
    7283167S016792020000007
    7283167S016793020000007
    7283167S031502020000010
    etc.
    Problem is also that instead of T (header) and S (Position) there might be L,D (also for Position). Therefore i have no clue how to handle these values as keyfieldValues.
    some ideas?! br Jens

  • Plsql - store function - passing a NULL or empty string argument

    Please see the question I posed below. Does anyone have experience with passing a NULL or empty string to a store function? THANKS.
    Hi All,
    I have a function that takes in two string arrays, status_array, and gender_array. You can see the partial code below. Somehow if the value for the string array is null, the code doesn't execute properly. It should return all employees, but instead it returns nothing. Any thoughts? THANKS.
    for iii in 1 .. status_array.count loop
    v_a_list := v_a_list || '''' || status_array(iii) || ''',';
    end loop;
    v_a_list := substr(v_a_list, 1, length(trim(v_a_list)) - 1);
    for iii in 1 .. gender_array.count loop
    v_b_list := v_b_list || '''' || gender_array(iii) || ''',';
    end loop;
    v_b_list := substr(v_b_list, 1, length(trim(v_b_list)) - 1);
    IF v_a_list IS NOT NULL and v_b_list IS NOT NULL THEN
    v_sql_stmt := 'select distinct full_name from t_employee where status in (' || v_a_list || ') and gender in (' || v_b_list || ')';
    ELSIF v_a_list IS NOT NULL and v_b_list IS NULL THEN
    v_sql_stmt := 'select distinct full_name from t_employee where status in (' || v_a_list || ') ';
    ELSIF v_a_list IS NULL and v_b_list is not null THEN
    v_sql_stmt := 'select distinct full_name from t_employee where gender in (' || v_b_list || ')';
    ELSE
    v_sql_stmt := 'select distinct full_name from t_employee';
    END IF;
    OPEN v_fullname_list FOR v_sql_stmt;
    RETURN v_fullname_list;

    Not sure what version of Oracle you are using, so here's an approach that will work with many releases.
    Create a custom SQL type, so we can use an array in SQL statements (we'll do that at the end).
    create or replace type string_list is table of varchar2(100);
    /declare your A and B lists as the type we've just created
    v_a_list    string_list default string_list();
    v_b_list    string_list default string_list();populate the nested tables with non-null values
    for iii in 1 .. status_array.count
    loop
       if status_array(iii) is not null
       then
          v_a_list.extend;
          v_a_list(v_a_list.count) := status_array(iii);
       end if;
    end loop;Here you'd want to do the same for B list.
    Then finally, return the result. Using ONE single SQL statement will help a lot if this routine is called frequently, the way you had it before would require excessive parsing, which is quite expensive in an OLTP environment. Not to mention the possibility of SQL injection. Please, please, please do some reading about BIND variables and SQL injection, they are very key concepts to understand and make use of, here's an article on the topic.
    [http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1922946900346978163]
    So here we ask for the distinct list of full names where either the status and the gender qualify based on the input data, OR the array passed in had no data to restrict the query on (the array.count = 0 does this).
    OPEN v_fullname_list FOR
       select
          distinct
             full_name
       from t_employee
       where
          status in (select /*+ CARDINALITY ( A 5 ) */ column_value from table(v_a_list) A )
          or v_a_list.count = 0
       and
          gender in (select /*+ CARDINALITY ( B 5 ) */ column_value from table(v_b_list) B )
          or v_b_list.count = 0
       );Hope that helps.
    Forgot to mention the CARDINALITY hint i added in. Oracle will have no idea how many rows these arrays (which we will treat as tables) will have, so this hint tells Oracle that you expect X (5 in this case) rows. Adjust it as you need, or remove it. If you are passing in thousands of possible values, where i've assumed you will pass in only a few, you may want to reconsider using the array approach and go for a global temporary table.
    Edited by: Tubby on Dec 11, 2009 11:45 AM
    Edited by: Tubby on Dec 11, 2009 11:48 AM
    Added link about using Bind Variables.

  • How to use NULL as an argument in a dbms_scheduler.create_job script?

    Hello All,
    We are trying to pass a null argument as a parameter to a PL/SQL program after CURRENT_TIMESTAMP. However, every attempt we try is producing errors. Why we are passing the null is another story. Does anyone know of the correct syntax, if there is any, to accomplish passing the null argument as a parameter to a PL/SQL program?
    We'd like to continue running with this same script setup and have the passing of the null working.
    This is what we've tried and directly below are the results. Any help so far would be appreciated!
    begin
    dbms_scheduler.create_job ( job_name => 'LOAD_CRF_TRANSACTION',
    job_type => 'PLSQL_BLOCK',
    job_action => 'begin
    DW_CRF.PKG_LPS_CRF_LOAD_TRANS.sp_load_target(''LOAD_CRF'', ''LOAD_LOAN_TRAN'', CURRENT_TIMESTAMP, );
    end;',
    start_date => sysdate +1/24/59,
    enabled => TRUE,
    auto_drop => TRUE,
    comments => 'LOAD LOAN TRANSACTION TABLE IN DW_CRF ' );
    end;
    ORA-06550: line ORA-06550: line 2, column 115:
    PLS-00103: Encountered the symbol ")" when expecting one of the following:
    ( - + case mod new not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    <an alternatively-quoted string literal with character set specification>
    <an alternatively-q
    , column :
    begin
    dbms_scheduler.create_job ( job_name => 'LOAD_CRF_TRANSACTION',
    job_type => 'PLSQL_BLOCK',
    job_action => 'begin
    DW_CRF.PKG_LPS_CRF_LOAD_TRANS.sp_load_target(''LOAD_CRF'', ''LOAD_LOAN_TRAN'', CURRENT_TIMESTAMP);
    end;',
    start_date => sysdate +1/24/59,
    enabled => TRUE,
    auto_drop => TRUE,
    comments => 'LOAD LOAN TRANSACTION TABLE IN DW_CRF ' );
    end;
    ORA-06550: line ORA-06550: line 2, column 21:
    PLS-00306: wrong number or types of arguments in call to 'SP_LOAD_TARGET'
    ORA-06550: line 2, column 21:
    PL/SQL: Statement ignored
    , column :
    begin
    dbms_scheduler.create_job ( job_name => 'LOAD_CRF_TRANSACTION',
    job_type => 'PLSQL_BLOCK',
    job_action => 'begin
    DW_CRF.PKG_LPS_CRF_LOAD_TRANS.sp_load_target(''LOAD_CRF'', ''LOAD_LOAN_TRAN'', CURRENT_TIMESTAMP, NULL);
    end;',
    start_date => sysdate +1/24/59,
    enabled => TRUE,
    auto_drop => TRUE,
    comments => 'LOAD LOAN TRANSACTION TABLE IN DW_CRF ' );
    end;
    ORA-20050: ORA-20050: Error Loading PKG_LPS_CRF_LOAD_TRANS Data
    ORA-06512: at "DW_CRF.PKG_LPS_CRF_LOAD_TRANS", line 958
    ORA-06512: at line 2
    begin
    dbms_scheduler.create_job ( job_name => 'LOAD_CRF_TRANSACTION',
    job_type => 'PLSQL_BLOCK',
    job_action => 'begin
    DW_CRF.PKG_LPS_CRF_LOAD_TRANS.sp_load_target(''LOAD_CRF'', ''LOAD_LOAN_TRAN'', CURRENT_TIMESTAMP, "NULL");
    end;',
    start_date => sysdate +1/24/59,
    enabled => TRUE,
    auto_drop => TRUE,
    comments => 'LOAD LOAN TRANSACTION TABLE IN DW_CRF ' );
    end;
    ORA-01858: a non-numeric character was found where a numeric was expected

    Hi,
    The third syntax you used is correct i.e.
    DW_CRF.PKG_LPS_CRF_LOAD_TRANS.sp_load_target(''LOAD_CRF'', ''LOAD_LOAN_TRAN'', CURRENT_TIMESTAMP, NULL);
    Alternatively you can use
    DW_CRF.PKG_LPS_CRF_LOAD_TRANS.sp_load_target(''LOAD_CRF'', ''LOAD_LOAN_TRAN'', CURRENT_TIMESTAMP, '''');
    all the other calls give syntax errors that are expected. The third call is giving an application error which you will need to look into (maybe starting at "DW_CRF.PKG_LPS_CRF_LOAD_TRANS", line 958). One thing that may help clarify things is if you were to switch to naming your parameters e.g. target_name=>''LOAD_CRF'' since that helps clarify exactly what parameter is called with which value.
    Hope this helps,
    Ravi.

  • Null/Empty Strings use in ESB Database Adapter

    Hi
    I'm trying to use a database adapter to execute an update on a table with a composite primary key; one of the primary key columns sometimes contains an empty string, however whenever I try to call the adapter, it always converts this to a null value. Is there an easy way to force the adapter to use an empty string instead of a null?
    Thanks.

    the idea here is to execute the dbms statement, or the setpolicycontext statement in a db session, and being able to execute the next sql statement in the same db session.
    This is possible with consecutive database adapters sharing the same db session.
    and two db adapters sharing the same db session is possible, if you make sure that the bpel is participating in the db transaction which can be made possible via xa db connections.
    Hope this helps,
    Write back in case you need more info.

  • Please tell basic difference between "" and null  for String  variable.

    1.What is difference between String strRemitInfo = "" and String strRemitInfo = null?
    2. Which one is good practice while coding ?

    1.What is difference between String strRemitInfo = ""
    and String strRemitInfo = null?Emptry string and nul reference
    >
    2. Which one is good practice while coding ?Depends on what you want to do.

  • Null query string in servlet filter with OC4J 10.1.3.1.0

    I have a strange problem with OC4J 10.1.3.1.0. In the servlet filter, while requesting the querystring with HttpServletRequest.getQueryString the result is null, even if it is verified with a sniffer that that query string is there. This happens only with certain requests. The query string is long but nothing very special otherwise.
    Any ideas what might be wrong?
    Thanks,
    Mika

    I got the same problem. I tried in others application servers alternatives and it works. By now i have to change links like this "http://localhost:8888/SIVIUQ/LoadIndex.portal?test=1" for forms using javaScript to send the parameters corresponding to the button pressed. To use buttons instead links is not the better solution due to usability. Any suggestion to solve this problem?
    Thanks
    Javier Murcia
    Yo tengo el mismo problema. He intentado con otros servidores de aplicaciones y funciona. Por ahora tengo que cambiar links como "http://localhost:8888/SIVIUQ/LoadIndex.portal?test=1" por formularios, usando javaScript para enviar los parametros correspondientes al boton presionado. Usar botones en vez de links no es la mejor solucion debido a usabilidad. ¿Alguna sugerencia para resolver este problema?
    Gracias
    Javier Murcia

  • Missing some letters in string

    Well guys, I have one VI that I write some text at a string and I can read it from another VI.
    Always works nice for me, but since some days ago... I start to have some problems
    When I wrote a text like: "Hey, my name is Eduardo"
    when I tryed to read in the other VI, it's missing some letters at the beggining
    it's appearing like: "ame is Eduardo" 
    Some one know what is happening? Because I already tryed change the strings, replace for a new one.. but still the same!
    Thanks

    Well, This VI is in LV 7.1
    I use create a binary header to nominate the file...
    It always work good, but since some days ago start to give me problems with the string that show the name of the file.
    Yes, I tryed to duplicate the code, but I receive the same error, I'm starting to think about reinstall LV 7.1
    maybe something happened I don't know... but if it always work and now start to have problems and I didn't change anything.
    Well I'm uploading the images from write and read, and bouth Sub-vi's that make this ID:
    The problem is happen where I make a red circle.
    Message Edited by EduU on 12-21-2009 07:40 AM
    Attachments:
    SubVI_create binary header.vi ‏61 KB
    SubVI strip binary header.vi ‏64 KB

  • Create an object with the name passed in as a string argument to a method

    Hi,
    I am sorry if it's too trivial for this forum , but I am stuck with the following requirements.
    I have a method
    void abc(String object_name, String key, String value)
    method abc should first check if there exists in memory a hashmap object with the name passed in as argument object_name.
    If yes ..just put the key and value there.
    if not , then create the hashmap object called <object_name> and insert the key/value there.
    Can anybody help me in the first step i.e, how to check if an object exists with the name passed in and if not then create it.
    Will getInstance method be of any help?
    Thanks in advance for your response.
    -Sub-java

    Dear Cotton.m,
    Thanks for your suggesstion. I will remember that.
    But somehow I have a strong belief that you still need to consult dictionary for exact meaning of the words like "upset" , "frustration" etc. Not knowing something in a language , that too as a beginner, does not yield frustration, but increases curiosity. And people like petes1234 are there to diminish that appetite.
    To clarify above, let me compare jverd's reply to my doubt with petes1234's.
    jverd said it cannot be done and suggested a work around (It was perfect and worked for me) While petes1234 , having no work in hand probably, started analysis of newbies mistakes.
    jverd solved my problem by saying that it cannot be done. petes1234 acted as a worthless critic in my opinion and now joined cotton.m.
    Finally, this is a java forum and I do not want to discuss human characteristics here for sure.
    My apologies if I had a wrong concept or if I chose a wrong forum to ask, where people like petes1234 or Cotton.m show their geekdom by pointing out "shortfalls" rather than clearing that by perfect examples and words.
    Again take it easy and Cotton.m , please do not use this forum to figure out others' frustration but be a little more focussed on solving others "Java related" problems :)
    -Sub-java

  • Missing Terminal

    Terminal is missing from my Utilities folder. I've tried everything to find it but it's isn't there. How can I reinstall it?

    You can reinstall it from your Install DVD using Pacifist.
    downloadable here
    Pacifist
    And to avoid any problems in using it, read the documentation here:
    Pacifist Documentation.
    Click on Usage to see examples.

  • Spawned Concurrent Request passing null to the argument

    Hi,
    I created a concurrent request with a package.procedure1 as the executable. This calls another concurrent program which has the executable as package.procedure2. This calls by passing one argument, the 2nd program was called but inside the procedure2, the arugument value is null. Before passing the arugument value is 1 and also in the 2nd program concurrent request parameters also its showing the value as 1. But inside the 2nd program procedure, tha value is becoming null. Can you please help me in this.
    Thanks,
    HC

    In the form FNDRSRUN which is the Standard Request Submission form there are parameters CHAR1-CHAR5, NUMBER1-NUMBER5, and DATE1-DATE5. I was wondering if i populate the parameter NUMBER1 with my value how can I access this parameter when the form is brought up. This is more of an applications setup issue I will be creating a function that calls the FNDRSRUN form this function will force this form to use a single request not a request group. In the request setups there is a parameter. When I set up the request parameter I have to select a value set and then for Default Type I can select Constant, Profile, SQL Statement, or Segment and then I have to give a default value. Can I default this parameter to use NUMBER1 or another parameter in the FNDRSRUN form.

Maybe you are looking for

  • Mass Deletion of Material Master

    Hi All Please am trying to delete material master have created. i need a Tcode for mass deletion. Thank you.

  • Turn metronome off ... once and for all  ...

    I've seen the same question both here and other places on the web ... But I've yet to see a definitve answer/solution ... :-/ So : Is there a way to disable/turn off the metronome ONCE AND FOR ALL ! ? Now I have to turn it off every time I start a ne

  • Writing a char reference in CMOD Enhancement?

    Hi, Can anyone tell me how to write the char reference of a praticular cube in CMOD enhcancement? As because the char will be stored in dimesnions, we can only give table names, is there any option? Thanks in advance Regards ram

  • Document for integrating WebDynPro with EP

    I want to integrate the webdynpro application in EP. Could anyone share the necessary document for that.

  • Can't download tv shows on iTunes

    I have been trying to download a TV show. Just it is about to finish downloading (2.80 GB of 2.81 GB) it says "There was a problem downloading (-50)" ask to check my network access. I have not problem downloading music. Please help. I just want to de