Could not recognize file - txt file

Help
amut
2009-12-08
2013-04-15
  • amut

    amut - 2009-12-08

    This is our company's first attempt to use AMTU to configure our account. As a simple test I decided to try to update our inventory using the same file we use for Amazon's web based administration. However, every time I attempt to upload a file I get the following error:

    Could not recognize file Test-200912081540.txt - ignoring.

    The file is a simple tab delimited file which I have tried with quotes and without quotes, reated by hand or by Excel. Nothing works. The file contains nothing more than the following:

    sku  price  quantitiy

    NAP000BLACM  14.99  1

    That's it, and it fails every time.

    The debug log isn't really a help to me but maybe it will be for someone else.

    2009-12-08 15:43:26,220  INFO  com.amazon.merchants.transport.logging.AuditLogger  Could not recognize file Test-200912081540.txt - ignoring.
    2009-12-08 15:43:26,236  DEBUG com.amazon.merchants.transport.dispatcher.Recognizer  com.amazon.merchants.transport.dispatcher.UnrecognizedDocumentException: Document type not known
    at com.amazon.merchants.transport.dispatcher.impl.RecognizerImpl.createMerchantFeed(RecognizerImpl.java:81)
    at com.amazon.merchants.transport.dispatcher.impl.RecognizerImpl.recognizeFiles(RecognizerImpl.java:46)
    at com.amazon.merchants.transport.dispatcher.impl.DispatcherServiceImpl.dispatchAll(DispatcherServiceImpl.java:73)
    at com.amazon.merchants.transport.dispatcher.impl.DispatcherServiceImpl.dispatchDirectory(DispatcherServiceImpl.java:68)
    at com.amazon.merchants.transport.dispatcher.impl.DispatcherServiceImpl.dispatch(DispatcherServiceImpl.java:53)
    at com.amazon.merchants.transport.TransportClient.run(TransportClient.java:81)
    at com.amazon.merchants.transport.timer.DispatchRunner.handleNotification(DispatchRunner.java:24)
    at com.amazon.merchants.timer.NotificationFilter.handleNotification(NotificationFilter.java:20)
    at mx4j.server.interceptor.NotificationListenerMBeanServerInterceptor$ListenerWrapper.handleNotification(NotificationListenerMBeanServerInterceptor.java:57)
    at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:346)
    at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:320)
    at javax.management.timer.Timer.sendNotification(Timer.java:498)
    at javax.management.timer.Timer$1.run(Timer.java:210)
    at mx4j.timer.TimeQueue$Loop.run(TimeQueue.java:195)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: com.amazon.merchants.transport.dispatcher.InvalidDocumentException: Document cannot be recognized as a valid Amazon document
    at com.amazon.merchants.transport.dispatcher.impl.FileContentIdentifier.getTypeKey(FileContentIdentifier.java:149)
    at com.amazon.merchants.transport.dispatcher.impl.FileContentIdentifier.getFileTypeFromString(FileContentIdentifier.java:98)
    at com.amazon.merchants.transport.dispatcher.impl.FileContentIdentifier.getFileType(FileContentIdentifier.java:70)
    at com.amazon.merchants.transport.dispatcher.impl.RecognizerImpl.createMerchantFeed(RecognizerImpl.java:70)
    … 14 more
    com.amazon.merchants.transport.dispatcher.InvalidDocumentException: Document cannot be recognized as a valid Amazon document
    at com.amazon.merchants.transport.dispatcher.impl.FileContentIdentifier.getTypeKey(FileContentIdentifier.java:149)
    at com.amazon.merchants.transport.dispatcher.impl.FileContentIdentifier.getFileTypeFromString(FileContentIdentifier.java:98)
    at com.amazon.merchants.transport.dispatcher.impl.FileContentIdentifier.getFileType(FileContentIdentifier.java:70)
    at com.amazon.merchants.transport.dispatcher.impl.RecognizerImpl.createMerchantFeed(RecognizerImpl.java:70)
    at com.amazon.merchants.transport.dispatcher.impl.RecognizerImpl.recognizeFiles(RecognizerImpl.java:46)
    at com.amazon.merchants.transport.dispatcher.impl.DispatcherServiceImpl.dispatchAll(DispatcherServiceImpl.java:73)
    at com.amazon.merchants.transport.dispatcher.impl.DispatcherServiceImpl.dispatchDirectory(DispatcherServiceImpl.java:68)
    at com.amazon.merchants.transport.dispatcher.impl.DispatcherServiceImpl.dispatch(DispatcherServiceImpl.java:53)
    at com.amazon.merchants.transport.TransportClient.run(TransportClient.java:81)
    at com.amazon.merchants.transport.timer.DispatchRunner.handleNotification(DispatchRunner.java:24)
    at com.amazon.merchants.timer.NotificationFilter.handleNotification(NotificationFilter.java:20)
    at mx4j.server.interceptor.NotificationListenerMBeanServerInterceptor$ListenerWrapper.handleNotification(NotificationListenerMBeanServerInterceptor.java:57)
    at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:346)
    at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:320)
    at javax.management.timer.Timer.sendNotification(Timer.java:498)
    at javax.management.timer.Timer$1.run(Timer.java:210)
    at mx4j.timer.TimeQueue$Loop.run(TimeQueue.java:195)
    at java.lang.Thread.run(Thread.java:534)

    Thank you for any and all assistance.

     
  • cs277

    cs277 - 2009-12-09

    This is exactly the problem.

    The feed type you're trying to use is the Price & Quantity feed which has the same problem as the Inventory Loader feed as far as AMTU goes: they are newer feeds on Amazon that don't contain the first header line with the text TemplateType=

    That's a critical keyword that AMTU is looking for in order to determine if the feed in question is something it should handle.

    I tried to submit one of these newer feeds with a made-up header line that contained that word TemplateType=

    AMTU picked up the file and sent it in but that that point Amazon failed to process it saying it didn't know what type of feed it was.

    It would be harder to get Amazon to accept and modify their feed type to include the TemplateType= header so the simple solution would be to change AMTU to not look for that when deciding if a file should be sent.

    But I have no idea who maintains AMTU and if changes are still made so that's the problem.

     
  • Stephan R Weber

    Stephan R Weber - 2009-12-09

    Jeremy Hinoski used to "own" amtu. It's been a couple years since I looked at it, and was thinking of playing around with it again. You can always make changes to your own version, since you have the source.

    I've modified it to run on earlier versions of Java (mostly security changes at that time), so you can do anything you need to to the source on your side, just not check it back in - and keep good notes about what you modified.

     
  • amut

    amut - 2009-12-10

    Thank you both for the quick responses.

    Gotcha, unfortunately having the source code is awesome, but my programming abilities are limited (that's actually putting it mildly).

    Also, I've looked around and I am unable to find templates designed for the AMTU. Where are templates, flat or xml (or both), that should be used with AMTU?

     
  • Stephan R Weber

    Stephan R Weber - 2009-12-10

    I got the template from our Amazon Technical contact. They have some over-complex documentation that has example XML in it. Your rep there should provide it. I think it's protected.

    You also need an ID that you get from them to test with. They have to set that up, or the system will reject anything you send. It's included in the header, not the envelope. Not sure, but I think there was a merchant ID and one other ID you need from them to run "real" tests.

    I still have documentation from when I was working, but I know Jeremy change it after that.

     
  • amut

    amut - 2009-12-10

    Gotcha, I didn't even realize we had an Amazon Technical contact. Thank you for your help.

    Is it just me or does it seem Amazon took something that should be fairly simple and made it completely convoluted?

     
  • Stephan R Weber

    Stephan R Weber - 2009-12-10

    It's not as bad as some, but it is over complicated. HOWEVER, it's much better now than the first iteration! Jeremy did really good considering he really didn't get a lot of support on the project. I don't think it was really "sanctioned" from inside.

    If you look closely, you can tell that this is a web service "shell" for EDI. The whole internal system is classic EDI. The first web service was synchronous, and making it asynch was a great improvement.

    I don't know if it's still the same way, but the most confusing thing to me was having to query for tables of files in process, instead of handling them by separate queries all the time. Like there are status queries that return the status of all the requests you have in process at the web service request level.

    The other thing that I found confusing was just exactly how much "storefront" you had to set up internally through the GUI before you could process any mock orders. Also, when I was doing it, you had to use a real CCNO, that got processed and then cancel and do refunds. There was no "stub" that you could use to mock behaviours.

    Even on the test side, you were placing "live" orders.

    I hope that has been made easier!

     
  • amut

    amut - 2009-12-10

    Thanks, that was a lot of great information.

    I have spoken to everyone here about this and no one seems to know of any Amazon Technical contact. How do we go about finding ours? The "Seller Support" has no mention of AMTU or anything close to it.

    We have been having problems with backorders of our inventory. So I wanted to start out small with AMTU and have our inventory updated every hour instead of every day or other day manually. Then progress from there.

    Thanks again.

     
  • Stephan R Weber

    Stephan R Weber - 2009-12-10

    I'm going to go look back through the correspondence I have. That will be like from 2006 or so, but I may find something for you. It'll take a big. The person who helped me was the account rep who handled our account setup. But they were shaky on it then too. I'll get back to you asap.

     
  • amut

    amut - 2009-12-10

    Ashkelon, you don't need to rush on my account. You have been a HUGE help already!

    But, thanks. This is more information than I got from searching google for a week.

     
  • Stephan R Weber

    Stephan R Weber - 2009-12-10

    Robert Pratt
    Engagement Manager
    Amazon.com Services
    pratt@amazon.com

    This was my last "engagement" manager. He set up our skus and test items in seller central. This was for a rebuild of AMTU to another product called AMP, which I don't think was released. My company (was there 22 yrs and then laid off) is still using AMTU.

    More when I find it.

     
  • Stephan R Weber

    Stephan R Weber - 2009-12-10

    Sent you a message. I have the links and the generic documentation, and my notes. This is older stuff, but if you think it would be useful, I've got it.

     
  • matt davies

    matt davies - 2010-01-19

    To do what you want you can use:

    TemplateType=ConsumerElectronics Version=1.7/1.2.9 This row for Amazon.com use only.  Do not modify or delete.
    sku item-price currency quantity update-delete sale-price sale-from-date sale-through-date leadtime-to-ship fulfillment-center-id
    myexample sku 10 Update

    just use the fields you wish to modify

     
  • Anonymous - 2010-07-21

    Hello,

    is there any solution for this problem?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks