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 241475 - REST Sample Application cannot start
Summary: REST Sample Application cannot start
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-06 08:13 UTC by Jiri Skrivanek
Modified: 2015-08-07 12:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2014-02-06 08:13:45 UTC
REST Sample Application is buildable but application is not opened. To reproduce:

- register GlassFish server to IDE
- open new project wizard
- choose "Samples|Java Web Services|REST: Message Board"
- finish the wizard
- run project
- open new project wizard
- choose "Samples|Maven|REST Sample Application (Maven)"
- finish the wizard
- build main project "rest-sample-application - NetBeans Platform Application"
- run project "rest-sample-application - NetBeans Platform based application". It opens splash screen but nothing else. There is no error message either.

Product Version: NetBeans IDE Dev (Build 201402050001)
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b67
Runtime: Java(TM) SE Runtime Environment 1.8.0-b126
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 1 Jan Stola 2015-07-16 12:49:37 UTC
I am sorry, I am not able to reproduce this issue. The application starts correctly when I use the latest development build:

Product Version: NetBeans IDE Dev (Build 20150713-34f4983c5f8a)
Java: 1.7.0_75; Java HotSpot(TM) 64-Bit Server VM 24.75-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_75-b13
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 2 Jiri Skrivanek 2015-07-17 11:40:41 UTC
For me it still does not open application. It launches the following command

cmd.exe /X /C "D:\Development\builds\nbUserdir-20150717104649\RestRCPMvnAppSample\application\target\restsample\bin\restsample.exe --console suppress --userdir D:\Development\builds\nbUserdir-20150717104649\RestRCPMvnAppSample\application\target\userdir -J-Dnetbeans.logger.console=true -J-ea --branding restsample --jdkhome D:\jdk1.8.0"

Product Version: NetBeans IDE Dev (Build 201507140001)
Java: 1.8.0_51; Java HotSpot(TM) 64-Bit Server VM 25.51-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16
System: Windows 8 version 6.2 running on amd64; Cp1250; en_US (nb)
Comment 3 Jan Stola 2015-07-20 13:03:54 UTC
> For me it still does not open application ...

OK, I see. It works fine with JDK 7 but it fails with JDK 8.
Comment 4 Jan Stola 2015-07-21 12:23:37 UTC
I tried to debug the application on JDK 8 and it does not start because of the following exception (that is not printed anywhere but can be seen by putting a breakpoint into TopThreadGroup.run()):

java.lang.IllegalAccessException: Class org.openide.util.WeakListenerImpl$ProxyListener can not access a member of class org.openide.filesystems.$Proxy0 with modifiers "public"
        at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)
        at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296)
        at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:412)
        at org.openide.util.WeakListenerImpl$ProxyListener.<init>(WeakListenerImpl.java:413)
Caused: java.lang.IllegalStateException
        at org.openide.util.WeakListenerImpl$ProxyListener.<init>(WeakListenerImpl.java:423)
        at org.openide.util.WeakListenerImpl.create(WeakListenerImpl.java:164)
        at org.openide.util.WeakListeners.create(WeakListeners.java:271)
        at org.openide.filesystems.MultiFileObject.<init>(MultiFileObject.java:125)
        at org.openide.filesystems.MultiFileObject.<init>(MultiFileObject.java:142)
        at org.openide.filesystems.MultiFileSystem.getMultiRoot(MultiFileSystem.java:267)
        at org.openide.filesystems.MultiFileSystem.findResource(MultiFileSystem.java:355)
        at org.openide.filesystems.FileUtil.getConfigFile(FileUtil.java:2207)
        at org.openide.filesystems.FileUtil.getConfigRoot(FileUtil.java:2218)
        at org.netbeans.core.startup.Main.getModuleSystem(Main.java:162)
        at org.netbeans.core.startup.Main.start(Main.java:308)
[catch] at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
        at java.lang.Thread.run(Thread.java:745)

The root of this exception is described in issue 229191 - it is caused by an incompatible change in JDK 8. The issue 229191 was fixed in NetBeans 7.3 but the REST Sample Application uses NetBeans platform artifacts from NetBeans 7.0. So, the bug is still present there. I will modify the template to use newer artifacts.
Comment 5 Jan Stola 2015-07-21 13:09:45 UTC
Fixed by https://hg.netbeans.org/web-main/rev/7f768b0eba86
Comment 6 Quality Engineering 2015-07-22 04:37:32 UTC
Integrated into 'main-silver', will be available in build *201507220303* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7f768b0eba86
User: Jan Stola <jstola@netbeans.org>
Log: #241475: REST Sample Application does not start on JDK 8
Comment 7 Jiri Skrivanek 2015-08-07 12:36:37 UTC
Verified. Thanks.