Hi Tim,
I tried your latest solution, and it works! Many thanks.
I still have a problem, though. I can deploy the application through an .ear, and can start it with web start and it shows my "hello world".
What I can't do is debug the application through NetBeans. This is a very important objective for me and a no-win solution until this is resolved. I suppose this is not the right forum for NetBeans, so I'm setting this post to "answered". Maybe you or someone else knows of a good forum for NetBeans in conjunction with EJB 3.0 beans and Sun AS.
I'm uploading the final .ear and NetBeans project files. Maybe this 3-project solution can help someone else in the future. The projects don't use any special jars or ressources, so they'll run on any system. I deployed on WinXP, Win2003 Server and SuSE Linux Enterprise Server V10. It worked everywhere.
Danny.
P.S.
Thank you for all your prompt and professional responses. They helped me to understand EJB-Injection a bit more. By the way, that is where my problem with debugging is. I get this stack trace when i try to debug the app-client (debugging the single project, not the .ear):
06.08.2007 17:14:41 com.sun.enterprise.appclient.MainWithModuleSupport <init>
WARNUNG: ACC003: Application threw an exception.
com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref MenueFacade_at_jndi: remote.MenueFacadeRemote_at_null@remote.MenueFacadeRemote_at_Session@null into class aev.Main
at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:373)
at com.sun.enterprise.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:193)
at com.sun.enterprise.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:131)
at com.sun.enterprise.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:123)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:325)
at com.sun.enterprise.appclient.Main.main(Main.java:180)
Caused by: javax.naming.NameNotFoundException: remote.MenueFacadeRemote#remote.MenueFacadeRemote not found
at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:203)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:175)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
Exception in thread "main" java.lang.RuntimeException: com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref MenueFacade_at_jndi: remote.MenueFacadeRemote_at_null@remote.MenueFacadeRemote_at_Session@null into class aev.Main
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:364)
at com.sun.enterprise.appclient.Main.main(Main.java:180)
Caused by: com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref MenueFacade_at_jndi: remote.MenueFacadeRemote_at_null@remote.MenueFacadeRemote_at_Session@null into class aev.Main
at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:373)
at com.sun.enterprise.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:193)
at com.sun.enterprise.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:131)
at com.sun.enterprise.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:123)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:325)
... 1 more
Caused by: javax.naming.NameNotFoundException: remote.MenueFacadeRemote#remote.MenueFacadeRemote not found
at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:203)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:175)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
Java Result: 1
[Message sent by forum member 'dsmith9094' (dsmith9094)]
http://forums.java.net/jive/thread.jspa?messageID=229620