Modify

Opened 12 years ago

Closed 12 years ago

#4175 closed defect (fixed)

Bogus error: user with same id but different name

Reported by: Daeron Owned by: team
Priority: critical Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

I just got a DataIntegrityProblemException after downloading some data from the api which contained multiple usernames for a single uid. The area in question is: http://api.openstreetmap.org/api/0.6/map?bbox=25.56741714477539,60.98416240519864,25.582265853881836,60.98861674828902 although there's currently heavy editing in the area so I'll attach the osm-file downloaded by wget here.

Josm declined to use the downloaded data, so this is a major problem which makes it impossible to edit areas that contain multiple usernames for one uid.

This is NOT an error, and should not result in any kind of exception in josm.

Attachments (1)

userid.osm (207.8 KB) - added by Daeron 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by Daeron

Attachment: userid.osm added

comment:1 Changed 12 years ago by Daeron

It seems that only that file does not lead to the exception. I was heavily editing the area, and downloaded that area in addition to the other areas I already had downloaded, which lead to the exception and I also tested the file on the same instance after deleting all layers. But when loaded after restart, the exception does not appear.

GET http://api.openstreetmap.org/api/0.6/map?bbox=25.56741714477539,60.98416240519864,25.582265853881836,60.98861674828902                     
org.openstreetmap.josm.io.OsmTransferException: org.openstreetmap.josm.io.IllegalDataException: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: User with the same uid but different name found                                                                                
        at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:107)                                            
        at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:90)                          
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:62)                                                 
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:104)                                                      
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)                                                             
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)                                                                  
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)                                                                            
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)                                                 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)                                                     
        at java.lang.Thread.run(Thread.java:619)                                                                                               
Caused by: org.openstreetmap.josm.io.IllegalDataException: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: User with the same uid but different name found                                                                                                                     
        at org.openstreetmap.josm.io.OsmReader.parseDataSet(OsmReader.java:616)                                                                
        at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:103)                                            
        ... 9 more                                                                                                                             
Caused by: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: User with the same uid but different name found                      
        at org.openstreetmap.josm.data.osm.User.createOsmUser(User.java:59)                                                                    
        at org.openstreetmap.josm.io.OsmReader$Parser.createUser(OsmReader.java:325)                                                           
        at org.openstreetmap.josm.io.OsmReader$Parser.readCommon(OsmReader.java:349)                                                           
        at org.openstreetmap.josm.io.OsmReader$Parser.startElement(OsmReader.java:231)                                                         
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)                               
        at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)               
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)   
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)                                                                                                                                        
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)                                
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)        
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)                                    
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)                                    
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)                                                      
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)                                     
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)                                   
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)                                                                               
        at org.openstreetmap.josm.io.OsmReader.parseDataSet(OsmReader.java:595)                                                                
        ... 10 more                                                                                                                            
org.openstreetmap.josm.io.OsmTransferException: org.openstreetmap.josm.io.IllegalDataException: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: User with the same uid but different name found                                                                                
        at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:107)                                            
        at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:90)                          
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:62)                                                 
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:104)                                                      
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)                                                             
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)                                                                  
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)                                                                            
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)                                                 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)                                                     
        at java.lang.Thread.run(Thread.java:619)                                                                                               
Caused by: org.openstreetmap.josm.io.IllegalDataException: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: User with the same uid but different name found                                                                                                                     
        at org.openstreetmap.josm.io.OsmReader.parseDataSet(OsmReader.java:616)                                                                
        at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:103)                                            
        ... 9 more                                                                                                                             
Caused by: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: User with the same uid but different name found                      
        at org.openstreetmap.josm.data.osm.User.createOsmUser(User.java:59)                                                                    
        at org.openstreetmap.josm.io.OsmReader$Parser.createUser(OsmReader.java:325)                                                           
        at org.openstreetmap.josm.io.OsmReader$Parser.readCommon(OsmReader.java:349)                                                           
        at org.openstreetmap.josm.io.OsmReader$Parser.startElement(OsmReader.java:231)                                                         
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)                               
        at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)               
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)   
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)                                                                                                                                        
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)                                
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)        
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)                                    
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)                                    
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)                                                      
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)                                     
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)                                   
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)                                                                               
        at org.openstreetmap.josm.io.OsmReader.parseDataSet(OsmReader.java:595)                                                                
        ... 10 more                                                                                                                            
opening fc for extension null                                                                                                                  
Open file: /home/daeron/osm/userid.osm (212793 bytes)                                                                                          
org.openstreetmap.josm.io.IllegalDataException: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: User with the same uid but different name found                                                                                                                                
        at org.openstreetmap.josm.io.OsmReader.parseDataSet(OsmReader.java:616)                                                                
        at org.openstreetmap.josm.io.OsmImporter.importData(OsmImporter.java:41)                                                               
        at org.openstreetmap.josm.io.OsmImporter.importData(OsmImporter.java:33)                                                               
        at org.openstreetmap.josm.actions.OpenFileAction.openFile(OpenFileAction.java:60)                                                      
        at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.realRun(OpenFileAction.java:91)                                          
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:62)                                                 
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:104)                                                      
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)                                                             
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)                                                                  
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)                                                                            
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)                                                 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)                                                     
        at java.lang.Thread.run(Thread.java:619)                                                                                               
Caused by: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: User with the same uid but different name found
        at org.openstreetmap.josm.data.osm.User.createOsmUser(User.java:59)
        at org.openstreetmap.josm.io.OsmReader$Parser.createUser(OsmReader.java:325)
        at org.openstreetmap.josm.io.OsmReader$Parser.readCommon(OsmReader.java:349)
        at org.openstreetmap.josm.io.OsmReader$Parser.startElement(OsmReader.java:231)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
        at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
        at org.openstreetmap.josm.io.OsmReader.parseDataSet(OsmReader.java:595)
        ... 12 more

comment:2 Changed 12 years ago by bastiK

Confirmed. From what I have observed, the userid is the only information relevant to the server. As soon as a user changes their username, all requests to the server return only this new username, even for older data.

It seems as if the old username is completely obliterated from the database.

(This only holds for the current API.)

How to get this error?

1) download an area

2) wait until a user in this area changed their username

3) download another area, where this user has also edited

If you want to simulate this error, skip step 2) and open the .osm file in a text editor instead. Replace every occurrence of a certain username by another string.

This error seems unlikely at first, but there were at least 2 people who got it and the likeliness increases for large datasets, old datasets and more user activity.

To deal with this, we shouldn't save a single username per id, but a list of usernames. Then the last known username should be remembered and used for uplaod.

comment:3 Changed 12 years ago by mjulius

AFAIK, the API does not care about what user uid or name is in the data. It will replace that with the user who is doing the upload anyway.

I think it would be just fine to ignore a mismatch of user names for the same ID and simply keep the first name encountered. I believe this happens rarely enough not to cause confusion.

If we want to do more we can keep a list of all names for each uid and display that joined by '/' or so.

comment:4 Changed 12 years ago by mjulius

Resolution: fixed
Status: newclosed

(In [2638]) fixes #4175 - Exception when user with existing ID but different name is encountered
User now keeps a list of all names for the uid and users are considered equal if the uids are equal. User.getName() now returns all names joined by '/'.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.