is it feasable to go to Amsterdamn via train from barcelona?
Picking a random day, I'm seeing 11 to 12 hour durations, with 1 to 3 transfers. The best source for schedule information is: http://www.bahn.com/i/view/GBR/en/index.shtml
I'd suggest checking skyscanner,com to see what flight options exist.
I'm sure that flying will be both faster and cheaper.
If you were using a day of a Eurail pass, then you would get a good value out of it, but seat reservations would still add about $100 in 2nd class or $150 in 1st for the fast, international trains (Paris-Amsterdam being 2/3 of that cost) and those reservations are best made weeks in advance. See also https://ricksteves-cms.herokuapp.com/travel-tips/transportation/trains/reservations.