Skip to main content

Java Web Start

6 replies [Last post]
Anonymous

Hello,
I have an enterprise application that contains an application client module.
I build and deploy the application, go to the GlassFish GUI console and
click on launch link for that application.
The Java Web Start splash shows up, downloads the stubs, etc. But the
application never start and I don't why?
Could someone help? Is this a bug?

thanks,
Daniel.
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tjquinn
Offline
Joined: 2005-03-30
Points: 0

Oh, of course. In fact, another user (ljnelson) recently pointed out the same shortcoming in a private e-mail message.

The changes I referred to earlier were intended particularly to display errors that might occur while the ACC is getting ready to launch the client, before any developer-provided code has had a chance to run. This happens on the main thread, but once the GUI starts on the event dispatcher thread the main thread completes.

The Java Web Start-launched ACC should set a default uncaught exception handler that will display the error dialog box that we added earlier for the start-up error handling. I have opened this issue https://glassfish.dev.java.net/issues/show_bug.cgi?id=3172 to track this enhancement.

- Tim

Daniel Cavalcanti

Thanks for the tip...
I saw what was going on and there seems to be a problem with resource
injection.
I have a stateless session bean that implements local and remote annotated
interfaces.
In the app client, I resource inject the remote bean:
@EJB()
private MyRemoteInterface bean;
However, bean is never initialized (resource injected).

Is there something I need to do?
thanks,

On 6/12/07, glassfish@javadesktop.org wrote:
>
> Hi, Daniel.
>
> 1. What build of GlassFish are you using?
>
> 2. What release of the JDK are you using?
>
> 3. One thing to try is to either have Java Web Start automatically open a
> Java console window when it launches or turn on tracing to a file. Take a
> look at the later part of this blog entry
> http://blogs.sun.com/quinn/entry/launch_that_app_client for how to do
> either of those. The trace (or console) will contain any messages sent to
> System.out or System.err.
>
> Let us know what you find.
>
> - Tim
> [Message sent by forum member 'tjquinn' (tjquinn)]
>
> http://forums.java.net/jive/thread.jspa?messageID=221824
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
[att1.html]

tjquinn
Offline
Joined: 2005-03-30
Points: 0

Hi, Daniel.

Yes, there is something you need to do - make the injected variable static!

Because of how the spec mandates that app clients are initialized and launched by the app client container, injected entities in app clients need to be static and need to be defined on the app client's main class.

That should take care of it.

Would you also do me the favor of posting here or e-mailing to me at tjquinn a-t dev d-o-t java d-o-t net the trace output (or a copy of the console output)? Some changes a while ago were intended to display such runtime errors in a dialog box precisely to avoid such mysterious silent failures. It seems as if that has not worked in your case and I'd like to understand why. Thanks.

- Tim

Daniel Cavalcanti

Sure... Here it goes...

/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:58: Engine "clearlooks" is
unsupported, ignoring
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:58: Engine "clearlooks" is
unsupported, ignoring
Jun 12, 2007 3:30:02 PM
com.sun.enterprise.appclient.MainWithModuleSupportprepareSecurity
INFO: Security Manager is ON.
Jun 12, 2007 3:30:02 PM
com.sun.enterprise.appclient.MainWithModuleSupportsetTargetServerProperties
INFO: ACC001:Using ClientContainer file: [/tmp/sunacc22551.xml].
Jun 12, 2007 3:30:02 PM com.sun.enterprise.appclient.MainWithModuleSupport
INFO: ACC024: IIOP endpoint(s) = localhost:3700
Jun 12, 2007 3:30:03 PM com.sun.enterprise.iiop.J2EEInitializer post_init
INFO: J2EEInitializer: Checking if interceptors need to be added
Jun 12, 2007 3:30:07 PM
com.sun.enterprise.appclient.MainWithModuleSupportloadMainClientClass
INFO: ACC009: Load Application Class: [
com.playground.concierge.manager.ConciergeManager]
Jun 12, 2007 3:30:07 PM com.sun.enterprise.appclient.MainWithModuleSupport
INFO: Application main() returned; GUI elements may be continuing to run
Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
at com.playground.concierge.manager.model.UnitsTableDataModel.(
UnitsTableDataModel.java:62)
at com.playground.concierge.manager.ConciergeManager .(
ConciergeManager.java:21)
at com.playground.concierge.manager.ConciergeManager$1.run(
ConciergeManager.java:151)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent (EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(
EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java
:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

That was before I made any of your suggested changes.
I still have a problem. I made the variable static, but it still does not
work because I guess it fails the second requirement you described: it must
be in the main class. The bean is declared in another 'helper" class. I was
able to solve it by doing a lookup in the initial context.

Let me know if you need any other generated logs or traces.

thanks.
Daniel.

On 6/12/07, glassfish@javadesktop.org wrote:
>
> Hi, Daniel.
>
> Yes, there is something you need to do - make the injected variable
> static!
>
> Because of how the spec mandates that app clients are initialized and
> launched by the app client container, injected entities in app clients need
> to be static and need to be defined on the app client's main class.
>
> That should take care of it.
>
> Would you also do me the favor of posting here or e-mailing to me at
> tjquinn a-t dev d-o-t java d-o-t net the trace output (or a copy of the
> console output)? Some changes a while ago were intended to display such
> runtime errors in a dialog box precisely to avoid such mysterious silent
> failures. It seems as if that has not worked in your case and I'd like to
> understand why. Thanks.
>
> - Tim
> [Message sent by forum member 'tjquinn' (tjquinn)]
>
> http://forums.java.net/jive/thread.jspa?messageID=221834
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
[att1.html]

tjquinn
Offline
Joined: 2005-03-30
Points: 0

Hi, Daniel.

1. What build of GlassFish are you using?

2. What release of the JDK are you using?

3. One thing to try is to either have Java Web Start automatically open a Java console window when it launches or turn on tracing to a file. Take a look at the later part of this blog entry http://blogs.sun.com/quinn/entry/launch_that_app_client for how to do either of those. The trace (or console) will contain any messages sent to System.out or System.err.

Let us know what you find.

- Tim

Daniel Cavalcanti

1.
I'm using GlassFish V2 b50

2.
java -version
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing)

I'll try turning on the messages in the console.

thanks,
Daniel

On 6/12/07, glassfish@javadesktop.org wrote:
>
> Hi, Daniel.
>
> 1. What build of GlassFish are you using?
>
> 2. What release of the JDK are you using?
>
> 3. One thing to try is to either have Java Web Start automatically open a
> Java console window when it launches or turn on tracing to a file. Take a
> look at the later part of this blog entry
> http://blogs.sun.com/quinn/entry/launch_that_app_client for how to do
> either of those. The trace (or console) will contain any messages sent to
> System.out or System.err.
>
> Let us know what you find.
>
> - Tim
> [Message sent by forum member 'tjquinn' (tjquinn)]
>
> http://forums.java.net/jive/thread.jspa?messageID=221824
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
[att1.html]