This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 185864

Summary: app client works from netbeans, fails as JNLP invoked app client
Product: javaee Reporter: emiddio <emiddio>
Component: App ClientAssignee: Vince Kraemer <vkraemer>
Status: RESOLVED WONTFIX    
Severity: normal CC: dkonecny, jportway
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description emiddio 2010-05-10 22:45:41 UTC
nb69 dev 201005060200
jdk 1.6.0_20 64bit

stack trace from jnlp launcher

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at com.sun.enterprise.appclient.jws.boot.JWSACCMain.run(JWSACCMain.java:250)
	at com.sun.enterprise.appclient.jws.boot.JWSACCMain.main(JWSACCMain.java:188)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/geb/Ws1
	at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:488)
	... 15 more
Caused by: java.lang.NoClassDefFoundError: com/geb/Ws1
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at com.sun.enterprise.appclient.AppClientInfo.validateMainClass(AppClientInfo.java:278)
	at com.sun.enterprise.appclient.AppClientInfo.completeInit(AppClientInfo.java:174)
	at com.sun.enterprise.appclient.AppClientInfoFactory.buildAppClientInfo(AppClientInfoFactory.java:155)
	at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:367)
	... 15 more
Caused by: java.lang.ClassNotFoundException: com.geb.Ws1
	at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:738)
	at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:628)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 21 more
Comment 1 David Konecny 2010-05-12 20:21:52 UTC
JNLP is generated by GlassFish on demand and GF should be first place to investigate this failure. Especially because invocation works from NB. See https://glassfish.dev.java.net/issues Thanks, David.
Comment 2 chreex 2010-06-26 16:08:29 UTC
I have the same problem. The key seems to be the 'directory deployment' feature of Glassfish: Netbeans automatically directory deploys EAR projects, and for some reason, Glassfish V3 - maybe because of a bug - cannot generate a jnlp file for the appclient if it has been deployed this way. (The server generates a page with an error 404, if, for example, the application client URL is typed into a browser.)

But, as there is a checkbox in the Servers dialog for choosing directory deployment (checked state) or EAR upload deployment (unchecked state) for Glassfish V2, there should also be one for Glassfish V3. This may not only be a workaround for the current problem, but may be useful in other cases.

One more thing: if an EAR project is deployed, containing an appclient, the webstart feature is not automatically enabled for it, as it can be seen in the Glassfish web admin interface. Anyway, if it is enabled by hand, starting the appclient by webstart is still not possible. (The symptoms are the same as when trying to launch the appclient without enabling webstart feature, as mentioned earlier.)
Comment 3 emiddio 2010-06-26 19:44:36 UTC
does this mean a bug against glassfish should be filed ?

thanks
Comment 4 David Konecny 2010-06-27 20:14:30 UTC
(In reply to comment #2)
> I have the same problem. The key seems to be the 'directory deployment' feature
> of Glassfish: Netbeans automatically directory deploys EAR projects, and for
> some reason, Glassfish V3 - maybe because of a bug - cannot generate a jnlp
> file for the appclient if it has been deployed this way. (The server generates
> a page with an error 404, if, for example, the application client URL is typed
> into a browser.)

as I said please file an issue against GlassFish and mention it here. thanks.

> But, as there is a checkbox in the Servers dialog for choosing directory
> deployment (checked state) or EAR upload deployment (unchecked state) for
> Glassfish V2, there should also be one for Glassfish V3.This may not only be a
> workaround for the current problem, but may be useful in other cases.
> 
> One more thing: if an EAR project is deployed, containing an appclient, the
> webstart feature is not automatically enabled for it, as it can be seen in the
> Glassfish web admin interface. Anyway, if it is enabled by hand, starting the
> appclient by webstart is still not possible. (The symptoms are the same as when
> trying to launch the appclient without enabling webstart feature, as mentioned
> earlier.)

These two I'm passing to Vince to comment.
Comment 5 tjquinn 2010-11-23 15:42:23 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > I have the same problem. The key seems to be the 'directory deployment' feature
> > of Glassfish: Netbeans automatically directory deploys EAR projects, and for
> > some reason, Glassfish V3 - maybe because of a bug - cannot generate a jnlp
> > file for the appclient if it has been deployed this way. (The server generates
> > a page with an error 404, if, for example, the application client URL is typed
> > into a browser.)
> 
> as I said please file an issue against GlassFish and mention it here. thanks.

The GlassFish part of this is no longer a problem as of GlassFish 3.1.  Once the GlassFish issue database reopens I'll close that issue there.

I'll let Vince comment on the other aspects.
Comment 6 Vince Kraemer 2011-11-10 20:02:42 UTC
this looks to be working with 7.1 dev builds and GF 3.1.1.

I do not know of a code change that resolved it... so I am marking this as worksforme.

If this is still an issue in a 7.1/gf 3.1.1... please reopen and provide more details on how to reproduce the problem.
Comment 7 thufir 2014-09-26 00:58:02 UTC
I believe this is still a bug, and still occurs.  However, it's probably a glassfish bug and not a netbeans bug.  The JNLP file lacks a manifest, which Glassfish should include.
Comment 8 Martin Balin 2016-07-07 08:55:04 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss