Sample comes from EJB 3.0 books.
Are you sure that you are reading an EJB 3 book? These line, which causes the exception, looks like an EJB 2 line:
With EJB3,
you should use:
The PortableRemoteObject.narrow is required for EJB 2.x, not for EJB 3. If you really got this code from an "EJB3 book", I recommend finding a different book.
By the way, is a JAR file containing TravelAgentRemote in your classpath?
Finally, JBoss in Action has some simple EJB 3 apps that you could use to get started (though the book does not teach EJB3).