Hi, Danny
(Tim is on vacation this week).
W.r.t netbeans alias:
To send feedback, get support, and receive updates and information
about J2EE development support in NetBeans, subscribe to
*nbj2ee_at_netbeans.org*. You can subscribe to the mailing list by sending
a blank email to nbj2ee-subscribe_at_netbeans.org
<mailto:nbj2ee-subscribe_at_netbeans.org>. You can also send questions and
feedback to nbusers_at_netbeans.org <mailto:nbusers_at_netbeans.org>.
Debugging glassfish with netbeans is similar as debugging with
other debugger:
1. For glassfish server side debugging, enable the "debug-enabled"
attribute in the GF_INSTALL/domains/domain1/config/domain.xml (you can
customize the port):
<java-config java-home="${com.sun.aas.javaRoot}"
debug-enabled="true" debug-options="-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009"
rmic-options="-iiop -poa -alwaysgenerate -keepgenerated -g"
javac-options="-g"
system-classpath="${com.sun.aas.installRoot}/lib/appserv-launch.jar"
classpath-suffix="" env-classpath-ignored="true">
2. For glassfish appclient side debugging, the appclient script in
located in the GF_INSTALL/bin directory, add the following debug option
to the java command of the script (you can customize the port):
"-Xdebug
-Xrunjdwp:transport=dt_socket,address=5678,server=y,suspend=y"
And then have the debugger attach to the corresponding port.
Thanks,
- Hong
glassfish_at_javadesktop.org wrote:
>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
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>