[jira] Created: (OFBIZ-3026) Datafile does not catch lack of lack of delimiter if at end of file.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
42 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-3026) Datafile does not catch lack of lack of delimiter if at end of file.

Nicolas Malin (Jira)
Datafile does not catch lack of lack of delimiter if at end of file.
--------------------------------------------------------------------

                 Key: OFBIZ-3026
                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
             Project: OFBiz
          Issue Type: Bug
          Components: framework
    Affects Versions: Release Branch 9.04, SVN trunk
         Environment: 9.04 revision 823664
            Reporter: BJ Freeman
             Fix For: Release Branch 9.04


datafile that does not have the last delimiter before the CRLF.

2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
---- exception report ----------------------------------------------------------
Exception: org.ofbiz.datafile.DataFileException
Message: Field map could not be read from a line (1) with only 234 chars. (null)
---- cause ---------------------------------------------------------------------
Exception: java.util.NoSuchElementException
Message: null
---- stack trace ---------------------------------------------------------------
java.util.NoSuchElementException
java.util.StringTokenizer.nextToken(Unknown Source)
org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)



--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of lack of delimiter if at end of file.

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764417#action_12764417 ]

BJ Freeman commented on OFBIZ-3026:
-----------------------------------

I am only working with 9.04 so I will only submit a patch for that.
Unless somone beats me to it

> Datafile does not catch lack of lack of delimiter if at end of file.
> --------------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of lack of delimiter if at end of file.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764418#action_12764418 ]

BJ Freeman commented on OFBIZ-3026:
-----------------------------------

My proposed fix is to use the datamap as the template and to inject a delimiter to match the fields in the map ,if they are null.

> Datafile does not catch lack of lack of delimiter if at end of file.
> --------------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

BJ Freeman updated OFBIZ-3026:
------------------------------

    Summary: Datafile does not catch lack of delimiter if at end of line.  (was: Datafile does not catch lack of lack of delimiter if at end of file.)

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12767907#action_12767907 ]

BJ Freeman commented on OFBIZ-3026:
-----------------------------------

I have run into problems with the supplier of files, I need
to bullet proof the datafile code to cover these problems.

The problem is the file I have has no data or delimiter to the last column.
nexttolastcolmn (delimiter) lastcolumn (eol)  = expected
data            no delimiter nodata (eol)= real data
If I add the delimiter then it works.
however this files are like  24 megs and up and not able to be edited
easily.


it seems the Record.createRecord is more for fixed files than for delimited.
this causes a an error in
            try {
                strVal = line.substring(modelField.position,
modelField.position + modelField.length);
            } catch (IndexOutOfBoundsException ioobe) {
                throw new DataFileException("Field " + modelField.name +
" from " + modelField.position +
                        " for " + modelField.length + " chars could not
be read from a line (" + lineNum + ") with only " +
                        line.length() + " chars.", ioobe);
            }
This is around line 515.

1) would this be the place to add code for the delimited
2) or would Record.createDelimitedRecord be a better place.
        if (line.endsWith(String.valueOf(delimiter))) {
            st = new StringTokenizer(line + " ", "" + delimiter, true);
            Debug.logInfo(" does end with a delimiter", module);
        }
        else {
            st = new StringTokenizer(line, "" + delimiter, true);
            Debug.logInfo(" does not end with a delimiter", module);
                  }
 about line 551

any thoughts.


> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769788#action_12769788 ]

Jacques Le Roux commented on OFBIZ-3026:
----------------------------------------

But is this not already handled by

{code}
        if (line.endsWith(String.valueOf(delimiter))) {
            st = new StringTokenizer(line + " ", "" + delimiter, true);
        }
        else {
            st = new StringTokenizer(line, "" + delimiter, true);
        }
{code}

in createDelimitedRecord  ?

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769852#action_12769852 ]

BJ Freeman commented on OFBIZ-3026:
-----------------------------------

I added the debug to check this out and the logic works
but it does not work.
{code}
       if (line.endsWith(String.valueOf(delimiter))) {
            st = new StringTokenizer(line + " ", "" + delimiter, true);
            Debug.logInfo(" does end with a delimiter", module);
        }
        else {
            st = new StringTokenizer(line, "" + delimiter, true);
            Debug.logInfo(" does not end with a delimiter", module);
                  }
{code}
 Log shows
 does not end with a delimiter

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769854#action_12769854 ]

Jacques Le Roux commented on OFBIZ-3026:
----------------------------------------

OK, so the best would be to fix it, isn'it ?

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769886#action_12769886 ]

BJ Freeman commented on OFBIZ-3026:
-----------------------------------

not sure what to fix
but thanks for the clarification.


> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773239#action_12773239 ]

Jacques Le Roux commented on OFBIZ-3026:
----------------------------------------

Hi BJ,

Which delimiter are you using ? Not sure why (xml encoding?), I had a problem using [tab], replaced by [,], whitout ending delimiter (at EOL) it works correctly. I have a newline (empty) at EOF.

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773318#action_12773318 ]

BJ Freeman commented on OFBIZ-3026:
-----------------------------------

Tab
by the code it should not matter which delimiter you use.
unless the StringTokenizer has a problem with the tab.
here is the file layout shortened

supplier_id<tab>image_file<tab>image_width<tab>image_height<tab>additional_images<lf>
supplier_id_data<tab>image_file_data<tab>image_width_data<tab>image_height_data<lf>

you will note that  no<tab> after image_height_data column and the column additional_images has not data not even a null.

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773392#action_12773392 ]

Jacques Le Roux commented on OFBIZ-3026:
----------------------------------------

Hi BJ,

Believe me or not, I had a problem with a file delimited by tab, I replaced by ; it worked...
Not sure exactly why though (an issue with my file encoding?), but you could try...

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-3026.
----------------------------------

    Resolution: Won't Fix
      Assignee: Jacques Le Roux

I closed because I believe it's not a problem in code but data

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>            Assignee: Jacques Le Roux
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773726#action_12773726 ]

BJ Freeman commented on OFBIZ-3026:
-----------------------------------

I don't have a choice
i have to solve it.

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>            Assignee: Jacques Le Roux
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844098#action_12844098 ]

BJ Freeman commented on OFBIZ-3026:
-----------------------------------

from a programmers point of view (I coded it right your data is wrong) is valid, but not acceptable in a environment where human err can injected bad data, from an external source.
I am not sure if it is called the same but the Term "bullet proofing" code means the programmer has taken into account the possible errors that could be induced and develop helpful messages or some compensation for the error to allow the correct operation to be performed.

IMHO bullet proofing for this is lacking.


> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>            Assignee: Jacques Le Roux
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844237#action_12844237 ]

Jacques Le Roux commented on OFBIZ-3026:
----------------------------------------

A patch ?

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>            Assignee: Jacques Le Roux
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844643#action_12844643 ]

BJ Freeman commented on OFBIZ-3026:
-----------------------------------

to be able to patch I can only provide to release branch 9.04
some of it may be considered new feature.

I will leave others to make it work with trunk.

this removes a lot labor from providing patches to ofbiz

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>            Assignee: Jacques Le Roux
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844819#action_12844819 ]

Jacques Le Roux commented on OFBIZ-3026:
----------------------------------------

Yes, we can try that... I don't expect much changes in this areas..

Thanks

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>            Assignee: Jacques Le Roux
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Reopened: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reopened OFBIZ-3026:
------------------------------------


> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>            Assignee: Jacques Le Roux
>             Fix For: Release Branch 9.04
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

BJ Freeman updated OFBIZ-3026:
------------------------------

    Attachment: OFBIZ-3026missingdataindatafile.patch

this fixes where there is not data for a field.
it also fixes the eol\

> Datafile does not catch lack of delimiter if at end of line.
> ------------------------------------------------------------
>
>                 Key: OFBIZ-3026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3026
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 9.04, SVN trunk
>         Environment: 9.04 revision 823664
>            Reporter: BJ Freeman
>            Assignee: Jacques Le Roux
>             Fix For: Release Branch 9.04
>
>         Attachments: OFBIZ-3026missingdataindatafile.patch
>
>
> datafile that does not have the last delimiter before the CRLF.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:135:INFO ] -- getModelDataFile: #1 Loaded dataFile: Product
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [ModelDataFileReader.java:74 :INFO ] [ModelDataFileReader.getModelDataFileReader] : returning reader.
> 2009-10-10 20:33:19,265 (http-0.0.0.0-8443-2) [                       ?:?  :INFO ]
> ---- exception report ----------------------------------------------------------
> Exception: org.ofbiz.datafile.DataFileException
> Message: Field map could not be read from a line (1) with only 234 chars. (null)
> ---- cause ---------------------------------------------------------------------
> Exception: java.util.NoSuchElementException
> Message: null
> ---- stack trace ---------------------------------------------------------------
> java.util.NoSuchElementException
> java.util.StringTokenizer.nextToken(Unknown Source)
> org.ofbiz.datafile.Record.createDelimitedRecord(Record.java:555)
> org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:123)
> org.ofbiz.datafile.RecordIterator.setupStream(RecordIterator.java:79)
> org.ofbiz.datafile.RecordIterator.<init>(RecordIterator.java:61)
> org.ofbiz.datafile.DataFile.makeRecordIterator(DataFile.java:165)
> org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:124)
> org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

123