[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] Commented: (OFBIZ-3026) Datafile does not catch lack of delimiter if at end of line.

Nicolas Malin (Jira)

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

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

I have a enhancement that instead of putting a null will take the field type and return the data that fits. like double would be 0.0.

let me know if you want that for 9.04.

> 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.

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=12845764#action_12845764 ]

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

Hi BJ,

Quick question: why did you had this comment? Should we keep it?
//protected String eol =  new String("\u001A");



> 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.

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=12845890#action_12845890 ]

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

it was something I was going to use but did not.
it can be removed.
the others were left so I could remember what I changed.
if you want will remove them from the patch once I figure out how to.


> 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.

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=12845905#action_12845905 ]

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

No worries, was just curious

> 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.

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=12845941#action_12845941 ]

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

Sorry BJ ,

I can't apply your patch, seems that you are missing the ASL2 header in your RecordIterator.java 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
>            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.

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=12845962#action_12845962 ]

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

Thanks BJ,

Don't worry I have finally applied you patch in trunk at r923828 and R9.04 at r923829. Because the invalid hunk contained only the commented line we spoke above

Small details:
* not sure it's you but there was a bad indentation after "//some input lines may be less than the header model."
* put { just after else and not on another line

I kept the commented lines in RecordIterator.java, they could prove to be useful later.



> 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.

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: Fixed

> 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.

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=12845963#action_12845963 ]

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

strange. I see the header.
history shows 759232.


> 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.

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=12845986#action_12845986 ]

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

OK,

Forget it anyway, it's commited. However could you take into account Adam's remarks on dev ML and provide a corrective patch, mostly as didactic purpose, 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
>
>         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.

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=12845995#action_12845995 ]

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

may take me some time to figure out, since I updated my copy for svn.
and I am focusing on the memory problem
https://issues.apache.org/jira/browse/OFBIZ-3558

I may include it when I do the memory 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
>
>         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.

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-3026recorditerator.patch

I did a Crtl A then a Ctrl I to adjust the indents.
I also removed the extra lines in  method.
per jacque's email left in the comment out lines.


> 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, OFBIZ-3026recorditerator.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.

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 ]

Jacques Le Roux updated OFBIZ-3026:
-----------------------------------

    Attachment: screenshot-1.jpg

BJ,

As you can see on the screenshot I have issues with Eclipse (reported ealier) and even svn merge (TortoiseMerge uses it underneath)

Is this patch from trunk?

> 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, OFBIZ-3026recorditerator.patch, screenshot-1.jpg
>
>
> 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=12846170#action_12846170 ]

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

sigh.
Version: 3.2.2
Build id: M20070212-1330

I have a project for 9.04. seperate from trunk.
I just updated after your last update
rev 923892.

not sure what to tell you.
sorry for all the trouble.

> 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, OFBIZ-3026recorditerator.patch, screenshot-1.jpg
>
>
> 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: RecordIterator.java

here is the file see what happens when you try to create 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
>
>         Attachments: OFBIZ-3026missingdataindatafile.patch, OFBIZ-3026recorditerator.patch, RecordIterator.java, screenshot-1.jpg
>
>
> 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=12846177#action_12846177 ]

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

OK thanks,

Yes I saw the update in the patch, weird. I will see that tomorrow, not a big deal anyway, just continuing in the didactic way (I could have done it myself)

> 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, OFBIZ-3026recorditerator.patch, RecordIterator.java, screenshot-1.jpg
>
>
> 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=12846371#action_12846371 ]

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

OK, done at r924208 the conflicts came from this line (not sure how and why)
    protected String eof = new String("\u001A");
I kept
    protected String eof = "\u001A";

Small formatting change also in Record.java at r924211

> 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, OFBIZ-3026recorditerator.patch, RecordIterator.java, screenshot-1.jpg
>
>
> 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=12846425#action_12846425 ]

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

thanks for your help will update and start to work on the memory solution.

> 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, OFBIZ-3026recorditerator.patch, RecordIterator.java, screenshot-1.jpg
>
>
> 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=12847675#action_12847675 ]

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

you made some changes in record.java

as a result I have

line 554<<<<<<< .mine
                //some input lines may be less than the header model.
                if (st.hasMoreTokens()) {
                try {
                    strVal = st.nextToken();
                    if (strVal.equals("" + delimiter)) {
                        strVal = null;
                    } else {
                        if (st.hasMoreTokens()) {
                            st.nextToken();
=======


line575 >>>>>>> .r923845
                        }
                    } catch (NoSuchElementException nsee) {
                        throw new DataFileException("Field " + modelField.name + " could not be read from a line (" + lineNum + ") with only " +
                                line.length() + " chars.", nsee);
                    }                
                }                
                }
<<<<<<< .mine
                else//if input line is less than the header model then pad with null
                {
                    strVal = null;
                }
=======


line 583  <<<<<<< .mine
                else//if input line is less than the header model then pad with null
                {
                    strVal = 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
>            Assignee: Jacques Le Roux
>             Fix For: Release Branch 9.04
>
>         Attachments: OFBIZ-3026missingdataindatafile.patch, OFBIZ-3026recorditerator.patch, RecordIterator.java, screenshot-1.jpg
>
>
> 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=12847791#action_12847791 ]

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

in trunk or R9.04 ?

> 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, OFBIZ-3026recorditerator.patch, RecordIterator.java, screenshot-1.jpg
>
>
> 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=12847792#action_12847792 ]

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

BTW in trunk the last changes have been done by Scott at r924378

> 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, OFBIZ-3026recorditerator.patch, RecordIterator.java, screenshot-1.jpg
>
>
> 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