this isn't a bug, you don't have any permission to get the system's portswithin an applet...and it doesn't make sense to use it within EJB...