The object returned by lookup method seems not to be of type LoginHome.
Print out ref.getClass().getName() to see what's the class name.
Is LoginHome a remote home interface ?
With a client app outside of the server app's jboss jvm you can only use the RemoteHome interfaces.
Thanks for your reply and suggestions.
Yes, LoginHome is RemoteHome interface.
I got it to work now.
Problem was that I used the wrong packagename :)